Refactor e2e tests for improved efficiency
The commit has made key changes to enhance the efficiency of end-to-end tests. The password generation logic and random email creation method have been modified to use bigger random numbers, ensuring
This commit is contained in:
@@ -48,8 +48,6 @@ export class AuthPageObject {
|
||||
}
|
||||
|
||||
async visitConfirmEmailLink(email: string) {
|
||||
await this.page.waitForTimeout(300);
|
||||
|
||||
return expect(async() => {
|
||||
const res = await this.mailbox.visitMailbox(email);
|
||||
|
||||
@@ -58,7 +56,7 @@ export class AuthPageObject {
|
||||
}
|
||||
|
||||
createRandomEmail() {
|
||||
const value = Math.random() * 1000;
|
||||
const value = Math.random() * 10000000000;
|
||||
|
||||
return `${value.toFixed(0)}@makerkit.dev`;
|
||||
}
|
||||
@@ -76,6 +74,10 @@ export class AuthPageObject {
|
||||
repeatPassword: 'password',
|
||||
});
|
||||
|
||||
await this.page.waitForResponse((resp) => {
|
||||
return resp.url().includes('auth');
|
||||
});
|
||||
|
||||
await this.visitConfirmEmailLink(email);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user