mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +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
|
// Wait for the dialog to appear and be fully initialized
|
||||||
await this.projectNameInput.waitFor({ state: 'visible', timeout: 10000 });
|
await this.projectNameInput.waitFor({ state: 'visible', timeout: 10000 });
|
||||||
|
|
||||||
// Wait for Angular to fully initialize the form
|
// Wait for Angular to fully initialize the form by checking submit button is enabled
|
||||||
await this.page.waitForTimeout(300);
|
await this.submitBtn.waitFor({ state: 'visible', timeout: 3000 });
|
||||||
|
|
||||||
await this.projectNameInput.fill(prefixedProjectName);
|
await this.projectNameInput.fill(prefixedProjectName);
|
||||||
await this.submitBtn.click();
|
await this.submitBtn.click();
|
||||||
|
|
|
||||||
|
|
@ -54,13 +54,12 @@ export class TagPage extends BasePage {
|
||||||
const tagNameInput = this.page.getByRole('textbox', { name: 'Tag Name' });
|
const tagNameInput = this.page.getByRole('textbox', { name: 'Tag Name' });
|
||||||
await tagNameInput.waitFor({ state: 'visible', timeout: 10000 });
|
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
|
// Submit the form - click the Save button
|
||||||
const submitBtn = this.page.getByRole('button', { name: 'Save' });
|
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();
|
await submitBtn.click();
|
||||||
|
|
||||||
// Wait for dialog to close
|
// Wait for dialog to close
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue