mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
fix(e2e): fix schedule dialog submit button selector
The selector 'button:last-child' caused a Playwright strict mode violation by matching multiple buttons (Schedule and Cancel). Changed to 'button[color="primary"]' to specifically target the primary action button. Fixes 5 failing reminder tests that were unable to schedule tasks.
This commit is contained in:
parent
269eb9952a
commit
9c5704c6c1
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ const DETAIL_PANEL_SCHEDULE_ITEM =
|
|||
'task-detail-item:has(mat-icon:text("schedule"))';
|
||||
const RIGHT_PANEL = '.right-panel';
|
||||
const DIALOG_CONTAINER = 'mat-dialog-container';
|
||||
const DIALOG_SUBMIT = 'mat-dialog-actions button:last-child';
|
||||
const DIALOG_SUBMIT = 'mat-dialog-actions button[color="primary"]';
|
||||
|
||||
/**
|
||||
* Closes the task detail panel if it's currently open.
|
||||
|
|
@ -74,7 +74,7 @@ export const scheduleTaskViaDetailPanel = async (
|
|||
// Fill time input
|
||||
await fillTimeInput(page, scheduleTime);
|
||||
|
||||
// Submit dialog
|
||||
// Submit dialog - click the primary action button (Schedule button)
|
||||
const submitBtn = page.locator(DIALOG_SUBMIT);
|
||||
await submitBtn.waitFor({ state: 'visible', timeout: 5000 });
|
||||
await submitBtn.click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue