Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ async function getPasswordlessSession(
}

test.describe('severity-2', () => {
// TODO: Remove when passwordless is enabled in production
test.beforeEach(({}, { project }) => {
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test.beforeEach(({}, { project }) => { ... }) uses an empty destructuring pattern ({}), which is flagged by ESLint's no-empty-pattern rule (enabled via eslint:recommended). Use an unused identifier instead (e.g. (_, testInfo) or (_fixtures, { project })) to avoid a lint failure.

Suggested change
test.beforeEach(({}, { project }) => {
test.beforeEach((_fixtures, { project }) => {

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh

test.skip(
['production', 'stage'].includes(project.name),
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional skip checks project.name against stage/production, but this file will still run under the stage-chromium and production-chromium projects (and any other suffixed project names). Consider basing the condition on the targetName worker fixture (stage/production) or matching via startsWith('stage') / startsWith('production') so all related projects are skipped consistently.

Suggested change
['production', 'stage'].includes(project.name),
project.name.startsWith('production') ||
project.name.startsWith('stage'),

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems a bit excessive

'Skip passwordless tests until feature is enabled.'
);
});

test.describe.configure({ mode: 'parallel' });
test.describe('Passwordless API', () => {
test.describe('POST /passwordless/send_code', () => {
Expand All @@ -38,8 +46,7 @@ test.describe('severity-2', () => {
clientId: CLIENT_ID,
});

const code =
await target.emailClient.getPasswordlessSignupCode(email);
const code = await target.emailClient.getPasswordlessSignupCode(email);
expect(code).toBeTruthy();
});

Expand All @@ -53,8 +60,7 @@ test.describe('severity-2', () => {
clientId: CLIENT_ID,
});

const code =
await target.emailClient.getPasswordlessSigninCode(email);
const code = await target.emailClient.getPasswordlessSigninCode(email);
expect(code).toBeTruthy();
});

Expand Down Expand Up @@ -113,8 +119,7 @@ test.describe('severity-2', () => {
clientId: CLIENT_ID,
});

const code =
await target.emailClient.getPasswordlessSignupCode(email);
const code = await target.emailClient.getPasswordlessSignupCode(email);
const result = await target.authClient.passwordlessConfirmCode(
email,
code,
Expand Down Expand Up @@ -148,8 +153,7 @@ test.describe('severity-2', () => {
clientId: CLIENT_ID,
});

const code =
await target.emailClient.getPasswordlessSigninCode(email);
const code = await target.emailClient.getPasswordlessSigninCode(email);
const result = await target.authClient.passwordlessConfirmCode(
email,
code,
Expand Down Expand Up @@ -184,11 +188,9 @@ test.describe('severity-2', () => {
await target.emailClient.getPasswordlessSignupCode(email);

try {
await target.authClient.passwordlessConfirmCode(
email,
'00000000',
{ clientId: CLIENT_ID }
);
await target.authClient.passwordlessConfirmCode(email, '00000000', {
clientId: CLIENT_ID,
});
expect(
true,
'passwordlessConfirmCode should have rejected invalid OTP'
Expand Down Expand Up @@ -226,8 +228,7 @@ test.describe('severity-2', () => {
clientId: CLIENT_ID,
});

const code =
await target.emailClient.getPasswordlessSigninCode(email);
const code = await target.emailClient.getPasswordlessSigninCode(email);
const result = await target.authClient.passwordlessConfirmCode(
email,
code,
Expand Down Expand Up @@ -274,8 +275,7 @@ test.describe('severity-2', () => {
clientId: CLIENT_ID,
});

const code =
await target.emailClient.getPasswordlessSignupCode(email);
const code = await target.emailClient.getPasswordlessSignupCode(email);

const result = await target.authClient.passwordlessConfirmCode(
email,
Expand All @@ -296,10 +296,7 @@ test.describe('severity-2', () => {
});

test.describe('End-to-end flows', () => {
test('full signup flow', async ({
target,
testAccountTracker,
}) => {
test('full signup flow', async ({ target, testAccountTracker }) => {
const { email, password } =
testAccountTracker.generatePasswordlessAccountDetails();
const account: any = testAccountTracker.accounts.find(
Expand All @@ -326,10 +323,7 @@ test.describe('severity-2', () => {
}
});

test('full signin flow', async ({
target,
testAccountTracker,
}) => {
test('full signin flow', async ({ target, testAccountTracker }) => {
const { email } = await testAccountTracker.signUpPasswordless();
const account: any = testAccountTracker.accounts.find(
(a) => a.email === email
Expand Down Expand Up @@ -438,5 +432,5 @@ test.describe('severity-2', () => {
}
});
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ test.describe('severity-1 #smoke', () => {
recoveryKey: RecoveryKeyPage,
settings: SettingsPage
): Promise<string> {
await expect(settings.recoveryKey.status).toHaveText('Not set');
await expect(settings.recoveryKey.status).toHaveText('Not set', {
ignoreCase: true,
});

await settings.recoveryKey.createButton.click();

Expand Down
Loading