chore: bump version to 2.21.17 and update dependencies (#431)

* chore: bump version to 2.21.17 and update dependencies
This commit is contained in:
Giancarlo Buomprisco
2025-12-21 09:58:10 +01:00
committed by GitHub
parent 26184ed082
commit c4a961e93d
23 changed files with 891 additions and 854 deletions

View File

@@ -7,37 +7,48 @@ const newPassword = (Math.random() * 10000).toString();
test.describe('Password Reset Flow', () => {
test('will reset the password and sign in with new one', async ({ page }) => {
const auth = new AuthPageObject(page);
const email = auth.createRandomEmail();
let email = '';
await auth.bootstrapUser({
email,
password: 'password',
name: 'Test User',
});
await page.goto('/auth/password-reset');
await page.waitForTimeout(200);
const emailLocator = page.locator('[name=email]');
await expect(emailLocator).toBeEnabled();
await emailLocator.fill(email);
await expect(async () => {
email = auth.createRandomEmail();
const button = page.locator('button[type="submit"]');
auth.bootstrapUser({
email,
password: 'password',
name: 'Test User',
});
await expect(button).toBeEnabled();
await page.goto('/auth/password-reset');
await page.fill('[name="email"]', email);
await page.click('[type="submit"]');
await auth.visitConfirmEmailLink(email, {
deleteAfter: true,
subject: 'Reset your password',
});
await page.waitForURL(new RegExp('/update-password?.*'));
await auth.updatePassword(newPassword);
await page.waitForURL('/home');
return Promise.all([
button.click(),
page.waitForResponse((resp) => resp.request().method() === 'POST'),
]);
}).toPass();
await auth.visitConfirmEmailLink(email, {
deleteAfter: true,
});
await page.waitForURL(new RegExp('/update-password?.*'), {
timeout: 2000,
});
await auth.updatePassword(newPassword);
await page.waitForURL('/home');
await page.context().clearCookies();
await page.reload();
await page.goto('/auth/sign-in');
await auth.loginAsUser({

View File

@@ -71,7 +71,9 @@ export class Mailbox {
});
if (email !== json.To[0]!.Address) {
throw new Error(`Email address mismatch. Expected ${email}, got ${json.To[0]!.Address}`);
throw new Error(
`Email address mismatch. Expected ${email}, got ${json.To[0]!.Address}`,
);
}
const el = parse(json.HTML);
@@ -110,7 +112,9 @@ export class Mailbox {
}
if (email !== json.To[0]!.Address) {
throw new Error(`Email address mismatch. Expected ${email}, got ${json.To[0]!.Address}`);
throw new Error(
`Email address mismatch. Expected ${email}, got ${json.To[0]!.Address}`,
);
}
const text = json.HTML.match(
@@ -151,8 +155,8 @@ export class Mailbox {
const message = params.subject
? (() => {
const filtered = messagesResponse.messages.filter(
(item) => item.Subject.includes(params.subject!),
const filtered = messagesResponse.messages.filter((item) =>
item.Subject.includes(params.subject!),
);
console.log(
@@ -238,4 +242,4 @@ export class Mailbox {
Attachments: Array<any>;
}>;
}
}
}