diff --git a/e2e/pages/project.page.ts b/e2e/pages/project.page.ts index d47384f49..9bd07df5a 100644 --- a/e2e/pages/project.page.ts +++ b/e2e/pages/project.page.ts @@ -109,8 +109,8 @@ export class ProjectPage extends BasePage { // Wait for the dialog to appear and be fully initialized await this.projectNameInput.waitFor({ state: 'visible', timeout: 10000 }); - // Wait for Angular to fully initialize the form - await this.page.waitForTimeout(300); + // Wait for Angular to fully initialize the form by checking submit button is enabled + await this.submitBtn.waitFor({ state: 'visible', timeout: 3000 }); await this.projectNameInput.fill(prefixedProjectName); await this.submitBtn.click(); diff --git a/e2e/pages/tag.page.ts b/e2e/pages/tag.page.ts index 24285d805..1e45a66cd 100644 --- a/e2e/pages/tag.page.ts +++ b/e2e/pages/tag.page.ts @@ -54,13 +54,12 @@ export class TagPage extends BasePage { const tagNameInput = this.page.getByRole('textbox', { name: 'Tag Name' }); await tagNameInput.waitFor({ state: 'visible', timeout: 10000 }); - // Wait for Angular to fully initialize the form - await this.page.waitForTimeout(300); - - await tagNameInput.fill(tagName); - // Submit the form - click the Save button const submitBtn = this.page.getByRole('button', { name: 'Save' }); + // Wait for Angular to fully initialize the form by checking submit button is enabled + await submitBtn.waitFor({ state: 'visible', timeout: 3000 }); + + await tagNameInput.fill(tagName); await submitBtn.click(); // Wait for dialog to close