diff --git a/test/scenario.js b/test/scenario.js index 381dc83..a62a0d2 100644 --- a/test/scenario.js +++ b/test/scenario.js @@ -1,5 +1,5 @@ const { expect } = require('chai'); -const faker = require('faker'); +const { faker } = require('@faker-js/faker'); let userData; const {I} = inject(); @@ -7,7 +7,7 @@ Feature('PUT tests'); Before(() => { userData = { - name: faker.name.firstName(), + name: faker.internet.userName(), job: 'leader' }; @@ -15,13 +15,13 @@ Before(() => { }); Scenario('Verify creating new user @C1', async () => { - userData.name = faker.name.firstName(); + userData.name = faker.internet.userName(); const res = await I.sendPutRequest('/api/users', userData); expect(res.data.name).to.eql(userData.name); }).tag('@pass'); Scenario('Verify creating new user @C2', async () => { - userData.name = faker.name.firstName(); + userData.name = faker.internet.userName(); const res = await I.sendPutRequest('/api/users', userData); expect(res.data.name).to.eql('abc'); }).tag('@fail');