Skip to content

Commit

Permalink
independent test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
patriciaqa committed Feb 8, 2024
1 parent 83c0958 commit b8de1ea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
21 changes: 21 additions & 0 deletions tests/api/get-pet.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { test, expect } = require('@playwright/test');

const data = [{id: 25, username: 'mariaget', firstName: 'maria', lastName: 'silva', email: 'test@mail.com', password: 'test123', phone: '11985632850', userStatus: 1}]


test.describe('New Todo', () => {
test('should allow consult user by API reques', async ({ request }) => {

await request.post(`/v2/user/createWithArray`, {data})

const listUser = await request.get(`/v2/user/${data[0].username}`)

const body = await listUser.json()
expect([body]).toEqual(data)
});
});





7 changes: 0 additions & 7 deletions tests/api/pet-post.spec.js → tests/api/post-pet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ test.describe('New Todo', () => {

});

test('should allow consult user by API reques', async ({ request }) => {

const listUser = await request.get(`/v2/user/${data[0].username}`)

const body = await listUser.json()
expect([body]).toEqual(data)
});
});


Expand Down

0 comments on commit b8de1ea

Please sign in to comment.