test: improve form initialization wait logic for project and tag pages

This commit is contained in:
Johannes Millan 2026-01-22 16:41:14 +01:00
parent b05b0400ed
commit 6a5c5f722d
2 changed files with 6 additions and 7 deletions

View file

@ -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();

View file

@ -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