Update test logs, adjust webhook timeout, and modify email handling
Improved the clarity of console logs within e2e tests for better debugging. Changed the timeout timing for webhook requests from 1000ms to 5000ms in the supabase seed.sql. The "deleteAfter" option of the visitConfirmEmailLink and getInviteEmail functions in the e2e tests has been set to "false" for email persistence.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { expect, Page } from '@playwright/test';
|
||||
import { Page } from '@playwright/test';
|
||||
import { AuthPageObject } from '../authentication/auth.po';
|
||||
import { TeamAccountsPageObject } from '../team-accounts/team-accounts.po';
|
||||
|
||||
@@ -30,6 +30,8 @@ export class InvitationsPageObject {
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log(`Inviting ${invite.email} with role ${invite.role}...`)
|
||||
|
||||
const nth = index + 1;
|
||||
|
||||
await this.page.fill(`[data-test="invite-member-form-item"]:nth-child(${nth}) [data-test="invite-email-input"]`, invite.email);
|
||||
@@ -91,10 +93,12 @@ export class InvitationsPageObject {
|
||||
}
|
||||
|
||||
async acceptInvitation() {
|
||||
console.log('Accepting invitation...');
|
||||
|
||||
await this.page.locator('[data-test="join-team-form"] button[type="submit"]').click();
|
||||
|
||||
await this.page.waitForResponse(response => {
|
||||
return response.url().includes('/join') && response.request().method() === 'POST';
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ test.describe('Invitations', () => {
|
||||
await invitations.auth.signOut();
|
||||
|
||||
await invitations.auth.visitConfirmEmailLink(invites[0]!.email, {
|
||||
deleteAfter: true
|
||||
deleteAfter: false
|
||||
});
|
||||
|
||||
await invitations.auth.signUp({
|
||||
|
||||
@@ -12,7 +12,7 @@ export class Mailbox {
|
||||
}) {
|
||||
const mailbox = email.split('@')[0];
|
||||
|
||||
console.log(`Visiting mailbox ${mailbox} ...`)
|
||||
console.log(`Visiting mailbox ${email} ...`)
|
||||
|
||||
if (!mailbox) {
|
||||
throw new Error('Invalid email');
|
||||
@@ -33,7 +33,7 @@ export class Mailbox {
|
||||
throw new Error('No link found in email');
|
||||
}
|
||||
|
||||
console.log(`Visiting ${linkHref} ...`);
|
||||
console.log(`Visiting ${linkHref} from mailbox ${email}...`);
|
||||
|
||||
return this.page.goto(linkHref);
|
||||
}
|
||||
@@ -41,7 +41,7 @@ export class Mailbox {
|
||||
async getInviteEmail(
|
||||
mailbox: string,
|
||||
params = {
|
||||
deleteAfter: true
|
||||
deleteAfter: false,
|
||||
}
|
||||
) {
|
||||
const url = `http://localhost:54324/api/v1/mailbox/${mailbox}`;
|
||||
|
||||
Reference in New Issue
Block a user