Open ondenman opened 7 years ago
A future PR (WIP https://github.com/everypolitician/scraper_test/pull/26) will allow the testing of a subset of the response data.
In anticipation of that PR, this commit provides a way to target that subset of data.
Although Instructions does not care about the contents of the :target field, it is intended to work like this:
The response data might contain multiple members within an array:
{ members: [{id: 1, name: 'Jim' }, { id: 2, name: 'Joe' }] }
To target the first member, we can supply a key value pair:
target: :id: 1
or
target: :name: 'Jim'
A future PR (WIP https://github.com/everypolitician/scraper_test/pull/26) will allow the testing of a subset of the response data.
In anticipation of that PR, this commit provides a way to target that subset of data.
Although Instructions does not care about the contents of the :target field, it is intended to work like this:
The response data might contain multiple members within an array:
To target the first member, we can supply a key value pair:
or