Skip to content

Commit 6e68877

Browse files
authored
fix: add api key for REST_test.js (#5009)
1 parent aaf07a4 commit 6e68877

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/acceptance/config_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Scenario('change config 5 @WebDriverIO @Puppeteer @Playwright', ({ I }) => {
3232

3333
Scenario('make API call and check response @Playwright', ({ I }) => {
3434
I.amOnPage('/')
35-
I.makeApiRequest('get', 'https://reqres.in/api/users?page=2')
35+
I.makeApiRequest('get', 'https://reqres.in/api/users?page=2', { headers: {'x-api-key': 'reqres-free-v1'}})
3636
I.seeResponseCodeIsSuccessful()
3737
})
3838

test/rest/REST_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('REST', () => {
150150
})
151151

152152
it('should be able to parse JSON responses', async () => {
153-
await I.sendGetRequest('https://reqres.in/api/comments/1')
153+
await I.sendGetRequest('https://reqres.in/api/comments/1', { 'x-api-key': 'reqres-free-v1'})
154154
await jsonResponse.seeResponseCodeIsSuccessful()
155155
await jsonResponse.seeResponseContainsKeys(['data', 'support'])
156156
})

0 commit comments

Comments
 (0)