Refactored e2e tests to use Promise.all for parallel execution
In this update, several end-to-end (e2e) tests were refactored to use Promise.all for parallel execution of operations. This was done to improve the efficiency and stability of the tests, as waiting for each operation one by one could cause bottlenecks and potential failures in the test execution. Receives and click actions were grouped together to allow them to be executed concurrently where possible. The changes were applied across different test scenarios.
This commit is contained in:
@@ -111,16 +111,18 @@ export class InvitationsPageObject {
|
||||
async acceptInvitation() {
|
||||
console.log('Accepting invitation...');
|
||||
|
||||
await this.page
|
||||
const click = this.page
|
||||
.locator('[data-test="join-team-form"] button[type="submit"]')
|
||||
.click();
|
||||
|
||||
await this.page.waitForResponse((response) => {
|
||||
const response = this.page.waitForResponse((response) => {
|
||||
return (
|
||||
response.url().includes('/join') &&
|
||||
response.request().method() === 'POST'
|
||||
);
|
||||
});
|
||||
|
||||
await Promise.all([click, response]);
|
||||
}
|
||||
|
||||
private getInviteForm() {
|
||||
|
||||
Reference in New Issue
Block a user