mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
test: improve form initialization wait logic for project and tag pages
This commit is contained in:
parent
b05b0400ed
commit
6a5c5f722d
2 changed files with 6 additions and 7 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue