Skip to content

Commit

Permalink
Merge pull request #47 from charlyautomatiza/fix/deprecated-faker
Browse files Browse the repository at this point in the history
fix: ♻️ Add user data generation methods for username and password using Faker
  • Loading branch information
charlyautomatiza authored Nov 22, 2024
2 parents a8f62cc + 9b3748f commit 5eb0483
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/api.ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test.afterEach(async () => {
* This test is a simple smoke test.
*/
test('API SignUp | Login UI', async ({ page }) => {
const username = faker.internet.userName() + faker.string.numeric(2);
const username = `${faker.person.firstName()}${faker.string.numeric(2)}`;
const password = faker.internet.password();

// New User
Expand All @@ -50,7 +50,7 @@ test('API SignUp | Login UI', async ({ page }) => {
* Login and find the new task in the list.
*/
test('API: SignUp, Create Task | UI: Login, Find a task', async ({ page }) => {
const username = faker.internet.userName() + faker.string.numeric(2);
const username = `${faker.person.firstName()}${faker.string.numeric(2)}`;
const password = faker.internet.password();

// New User
Expand Down
2 changes: 1 addition & 1 deletion utils/userData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { faker } from '@faker-js/faker';

export class UserData {
public getUsername(): string {
return faker.internet.userName() + faker.string.numeric(2);
return `${faker.person.firstName()}${faker.string.numeric(2)}`;
}

public getPassword(): string {
Expand Down

0 comments on commit 5eb0483

Please sign in to comment.