Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

The task-wizard.delete.spec.cy.ts test was failing because it used an outdated selector to find the delete button directly in the table. The UI now uses Material Design menus (mat-menu) for action buttons.

Changes

  • Updated test to click #actionMenu to open the Material menu before accessing the delete button
  • Changed selector from .cdk-row .cdk-column-actions .deleteBtn.mat-warn to .cdk-overlay-container [id^=deleteTaskBtn]
  • Applied pattern consistently to both delete button interactions (cancel and confirm scenarios)

This aligns with existing patterns in task-wizard.edit.spec.cy.ts and task-wizard.copy.cy.ts.

Before

cy.get('.cdk-row .cdk-column-actions .deleteBtn.mat-warn').first().click();

After

cy.get('.task-actions')
  .first()
  .find('#actionMenu')
  .should('be.visible')
  .click({ force: true });

cy.get('.cdk-overlay-container')
  .find('[id^=deleteTaskBtn]')
  .should('be.visible')
  .first()
  .click({ force: true });
Original prompt

This section details on the original issue you should resolve

<issue_title>Fix broken cypress tests</issue_title>
<issue_description>We get this error:

 Running:  task-wizard.delete.spec.cy.ts                                                   (4 of 4)


  Area rules type 1
    1) should create task


  0 passing (37s)
  1 failing

  1) Area rules type 1
       should create task:
     AssertionError: Timed out retrying after 4000ms: Expected to find element: `.cdk-row .cdk-column-actions .deleteBtn.mat-warn`, but never found it.
      at Context.eval (webpack://eform-angular/./cypress/e2e/plugins/backend-configuration-pn/c/task-wizard.delete.spec.cy.ts:101:7)




  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        1                                                                                │
  │ Passing:      0                                                                                │
  │ Failing:      1                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        true                                                                             │
  │ Duration:     36 seconds                                                                       │
  │ Spec Ran:     task-wizard.delete.spec.cy.ts                                                    │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘

```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix broken Cypress tests for task creation Fix Cypress test for Material menu-based delete action Nov 6, 2025
Copilot AI requested a review from renemadsen November 6, 2025 13:57
Copilot finished work on behalf of renemadsen November 6, 2025 13:57
@renemadsen renemadsen marked this pull request as ready for review November 6, 2025 14:12
@renemadsen renemadsen merged commit 656b7a9 into master Nov 6, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix broken cypress tests

2 participants