Skip to content

Commit bf9503e

Browse files
committed
fix(cypress): update faker usage for v10
1 parent b95f005 commit bf9503e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cypress/e2e/smoke.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('smoke tests', () => {
66
});
77

88
it('should allow you to register and login', () => {
9-
cy.login({ email: `${faker.internet.userName()}@example.com` });
9+
cy.login({ email: `${faker.internet.username()}@example.com` });
1010
cy.visitAndCheck('/');
1111
cy.findByRole('link', { name: /notes/i }).click();
1212
cy.findByRole('link', { name: /log out/i }).click();

cypress/support/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ declare global {
4343
}
4444

4545
function login({
46-
email = faker.internet.email(undefined, undefined, 'example.com'),
46+
email = faker.internet.email({ provider: 'example.com' }),
4747
}: {
4848
email?: string;
4949
} = {}) {

cypress/support/e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import '@testing-library/cypress/add-commands';
33
import { faker } from '@faker-js/faker';
44

55
function login({
6-
email = faker.internet.email(undefined, undefined, 'example.com'),
6+
email = faker.internet.email({ provider: 'example.com' }),
77
}: {
88
email?: string;
99
} = {}) {

0 commit comments

Comments
 (0)