Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Actions Menu Migration - Complete ✅

This PR successfully migrates six components from inline action buttons to a consistent actions menu design pattern (mat-menu) with updated WDIO and Cypress tests.

Components Migrated:

  • ✅ Sites page (advanced/components/sites)
  • ✅ Workers page (advanced/components/workers)
  • ✅ Device users page (device-users)
  • ✅ Users page (account-management/components/users/users-page)
  • ✅ Security groups page (security/components/security-page)
  • ✅ Email recipients page (email-recipients/components/email-recipients-page)

Implementation Complete:

HTML Templates (6 components)

All templates updated with actions menu pattern using mat-menu with more_vert icon.

Module Imports (5 modules)

Added MatMenu imports to all affected modules:

  • ✅ device-users.module.ts - Added MatMenu, MatMenuItem, MatMenuTrigger
  • ✅ account-management.module.ts - Added MatMenu, MatMenuItem, MatMenuTrigger
  • ✅ security.module.ts - Added MatMenu, MatMenuItem, MatMenuTrigger (also added MatIconModule)
  • ✅ email-recipients.module.ts - Added MatMenu, MatMenuItem, MatMenuTrigger
  • ✅ advanced.module.ts - Already had imports

WDIO & Cypress Page Objects (8 files)

All row objects updated with openRowMenu() method and updated operations.

WDIO Tests (2 files)

Fixed device users tests that were directly accessing editBtn/deleteBtn:

  • ✅ device-users.edit.spec.ts - Updated cancel test to use openRowMenu()
  • ✅ device-users.delete.spec.ts - Updated both delete tests to use openRowMenu()

Testing & Verification:

  • ✅ Build successful (no compilation errors)
  • ✅ CodeQL security scan passed (0 alerts)
  • ✅ All MatMenu imports added to module files
  • ✅ WDIO tests updated to work with actions menu pattern
  • ✅ Consistent pattern across all components
Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate to actions menu including wdio and cypress tests</issue_title>
<issue_description>We do need to update the following parts to use the actions menu table desing and update wdio/cypress tests to follow the same pattern as other parts which is already using the actions menu design:

eform-client/src/app/modules/advanced/components/sites
eform-client/src/app/modules/advanced/components/workers
eform-client/src/app/modules/device-users
eform-client/src/app/modules/account-management/components/users/users-page
eform-client/src/app/modules/security/components/security-page
eform-client/src/app/modules/email-recipients/components/email-recipients-page</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI and others added 2 commits November 16, 2025 07:29
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate components to use actions menu design Migrate sites, workers, device-users, users, security-groups, and email-recipients to actions menu pattern Nov 16, 2025
Copilot AI requested a review from renemadsen November 16, 2025 07:39
@renemadsen
Copy link
Member

@copilot We are missing imports in the modules files for the actions menu to be shown correctly, compare with existing modules before the migration,

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot We are missing imports in the modules files for the actions menu to be shown correctly, compare with existing modules before the migration,

Added the missing MatMenu, MatMenuItem, and MatMenuTrigger imports to all affected module files:

  • device-users.module.ts
  • account-management.module.ts
  • security.module.ts (also added MatIconModule)
  • email-recipients.module.ts

Build verified successfully. Commit: a0a9219

@renemadsen renemadsen marked this pull request as ready for review November 16, 2025 09:42
@renemadsen
Copy link
Member

@copilot after the changes to device user, we have these errors:

 "spec" Reporter:
------------------------------------------------------------------
[chrome 142.0.7444.162 linux #0-0] Running: chrome (v142.0.7444.162) on linux
[chrome 142.0.7444.162 linux #0-0] Session ID: e0ea842f666847425d246fe00e393494
[chrome 142.0.7444.162 linux #0-0]
[chrome 142.0.7444.162 linux #0-0] » e2e/Tests/device-users/device-users.add.spec.ts
[chrome 142.0.7444.162 linux #0-0] Device users page should add new device user
[chrome 142.0.7444.162 linux #0-0]    ✓ with first name and last name
[chrome 142.0.7444.162 linux #0-0]
[chrome 142.0.7444.162 linux #0-0] Device users page should not add new device user
[chrome 142.0.7444.162 linux #0-0]    ✓ with only first name
[chrome 142.0.7444.162 linux #0-0]    ✓ with only last name
[chrome 142.0.7444.162 linux #0-0]    ✓ without first and last names
[chrome 142.0.7444.162 linux #0-0]    ✓ if cancel was clicked
[chrome 142.0.7444.162 linux #0-0]    ✓ should clean up
[chrome 142.0.7444.162 linux #0-0]
[chrome 142.0.7444.162 linux #0-0] 6 passing (13.8s)
------------------------------------------------------------------
[chrome 142.0.7444.162 linux #0-1] Running: chrome (v142.0.7444.162) on linux
[chrome 142.0.7444.162 linux #0-1] Session ID: 7a034c86e290b01a1f5482f62b2f6575
[chrome 142.0.7444.162 linux #0-1]
[chrome 142.0.7444.162 linux #0-1] » e2e/Tests/device-users/device-users.edit.spec.ts
[chrome 142.0.7444.162 linux #0-1] Device users page
[chrome 142.0.7444.162 linux #0-1]    ✓ should change first name
[chrome 142.0.7444.162 linux #0-1]    ✓ should change last name
[chrome 142.0.7444.162 linux #0-1]    ✓ should change first name and last name
[chrome 142.0.7444.162 linux #0-1]    ✖ should not change first name and last name if cancel was clicked
[chrome 142.0.7444.162 linux #0-1]
[chrome 142.0.7444.162 linux #0-1] 3 passing (16.7s)
[chrome 142.0.7444.162 linux #0-1] 1 failing
[chrome 142.0.7444.162 linux #0-1]
[chrome 142.0.7444.162 linux #0-1] 1) Device users page should not change first name and last name if cancel was clicked
[chrome 142.0.7444.162 linux #0-1] Cannot read properties of undefined (reading 'click')
[chrome 142.0.7444.162 linux #0-1] TypeError: Cannot read properties of undefined (reading 'click')
[chrome 142.0.7444.162 linux #0-1]     at Context.<anonymous> (/home/runner/work/eform-angular-frontend/eform-angular-frontend/eform-client/e2e/Tests/device-users/device-users.edit.spec.ts:94:44)
------------------------------------------------------------------
[chrome 142.0.7444.162 linux #0-2] Running: chrome (v142.0.7444.162) on linux
[chrome 142.0.7444.162 linux #0-2] Session ID: 91c63d87024629f959872f1a5a8960b8
[chrome 142.0.7444.162 linux #0-2]
[chrome 142.0.7444.162 linux #0-2] » e2e/Tests/device-users/device-users.delete.spec.ts
[chrome 142.0.7444.162 linux #0-2] Device users page
[chrome 142.0.7444.162 linux #0-2]    ✖ should not delete if cancel was clicked
[chrome 142.0.7444.162 linux #0-2]    ✖ should delete user
[chrome 142.0.7444.162 linux #0-2]
[chrome 142.0.7444.162 linux #0-2] 2 failing (3.6s)
[chrome 142.0.7444.162 linux #0-2]
[chrome 142.0.7444.162 linux #0-2] 1) Device users page should not delete if cancel was clicked
[chrome 142.0.7444.162 linux #0-2] Cannot read properties of undefined (reading 'waitForDisplayed')
[chrome 142.0.7444.162 linux #0-2] TypeError: Cannot read properties of undefined (reading 'waitForDisplayed')
[chrome 142.0.7444.162 linux #0-2]     at Context.<anonymous> (/home/runner/work/eform-angular-frontend/eform-angular-frontend/eform-client/e2e/Tests/device-users/device-users.delete.spec.ts:18:36)
[chrome 142.0.7444.162 linux #0-2]
[chrome 142.0.7444.162 linux #0-2] 2) Device users page should delete user
[chrome 142.0.7444.162 linux #0-2] Cannot read properties of undefined (reading 'waitForDisplayed')
[chrome 142.0.7444.162 linux #0-2] TypeError: Cannot read properties of undefined (reading 'waitForDisplayed')
[chrome 142.0.7444.162 linux #0-2]     at Context.<anonymous> (/home/runner/work/eform-angular-frontend/eform-angular-frontend/eform-client/e2e/Tests/device-users/device-users.delete.spec.ts:31:36)

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot after the changes to device user, we have these errors:

...

Fixed the device users tests. The tests were directly accessing editBtn.click() and deleteBtn.click(), but after the migration to actions menu pattern, these buttons are now inside a dropdown menu. Updated the tests to call openRowMenu() first before clicking the action buttons with the indexed IDs.

Changes in commit e85f51c:

  • device-users.edit.spec.ts - Updated "should not change first name and last name if cancel was clicked" test
  • device-users.delete.spec.ts - Updated both delete tests ("should not delete if cancel was clicked" and "should delete user")

@renemadsen renemadsen merged commit fa59147 into master Nov 16, 2025
39 of 42 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.

Migrate to actions menu including wdio and cypress tests

3 participants