Update E2E test settings and methods

Updated the Playwright End-To-End test configurations to run the local dev server before starting the tests. Removed unnecessary page load wait states in the invitation tests. Also, updated the parameters passed in the `visitMailbox` method used in the authentication tests.
This commit is contained in:
giancarlo
2024-04-13 16:33:52 +08:00
parent 6ad84026da
commit 8e04365bd0
4 changed files with 16 additions and 23 deletions

View File

@@ -44,6 +44,7 @@ export class AuthPageObject {
await this.page.fill('input[name="email"]', params.email);
await this.page.fill('input[name="password"]', params.password);
await this.page.fill('input[name="repeatPassword"]', params.repeatPassword);
await this.page.click('button[type="submit"]');
}
@@ -51,7 +52,7 @@ export class AuthPageObject {
deleteAfter: boolean
}) {
return expect(async() => {
const res = await this.mailbox.visitMailbox(email);
const res = await this.mailbox.visitMailbox(email, params);
expect(res).not.toBeNull();
}).toPass();

View File

@@ -12,9 +12,7 @@ test.describe('Invitations', () => {
await invitations.setup();
});
test('Full invite flow', async ({page}) => {
await page.waitForLoadState('networkidle');
test('Full invite flow', async () => {
await invitations.navigateToMembers();
await invitations.openInviteForm();
@@ -57,9 +55,7 @@ test.describe('Invitations', () => {
await expect(await invitations.teamAccounts.getTeams()).toHaveCount(1);
});
test('users can delete invites', async ({page}) => {
await page.waitForLoadState('networkidle');
test('users can delete invites', async () => {
await invitations.navigateToMembers();
await invitations.openInviteForm();
@@ -81,9 +77,7 @@ test.describe('Invitations', () => {
await expect(await invitations.getInvitations()).toHaveCount(0);
});
test('users can update invites', async ({page}) => {
await page.waitForLoadState('networkidle');
test('users can update invites', async () => {
await invitations.navigateToMembers();
await invitations.openInviteForm();