Update UI layout and enhance email confirmation test

The UI layout for the site header, site footer, and account section was updated to improve visual spacing and arrangement. In addition, the authentication test for email confirmation was enhanced, specifically by adding checking that the response from visiting the mailbox is not null. This improves the robustness and reliability of the test.
This commit is contained in:
giancarlo
2024-04-11 21:29:46 +08:00
parent 9ac0707bef
commit 93964e174a
3 changed files with 19 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import { Page } from '@playwright/test';
import { expect, Page } from '@playwright/test';
import { Mailbox } from '../utils/mailbox';
export class AuthPageObject {
@@ -50,7 +50,11 @@ export class AuthPageObject {
async visitConfirmEmailLink(email: string) {
await this.page.waitForTimeout(300);
await this.mailbox.visitMailbox(email);
return expect(async() => {
const res = await this.mailbox.visitMailbox(email);
expect(res).not.toBeNull();
}).toPass();
}
createRandomEmail() {