Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: [M3-8863, M3-9040] - Cypress test to validate aria label of Linode IP Addresses/Ranges action menu #11435

Conversation

pmakode-akamai
Copy link
Contributor

@pmakode-akamai pmakode-akamai commented Dec 18, 2024

Description 📝

Cypress test to validate ARIA label of Linode IP Addresses action menu

Changes 🔄

  • Add Cypress test to validate ARIA label of Linode IP Addresses table row action menu
  • Refactor the code

Target release date 🗓️

N/A

How to test 🧪

  • yarn cy:run -s "cypress/e2e/core/linodes/linode-network.spec.ts"
  • Ensure all tests pass
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support

  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@pmakode-akamai pmakode-akamai self-assigned this Dec 18, 2024
@pmakode-akamai pmakode-akamai added the e2e Indicates that a PR touches Cypress tests in some way label Dec 18, 2024
@pmakode-akamai pmakode-akamai marked this pull request as ready for review December 18, 2024 10:04
@pmakode-akamai pmakode-akamai requested a review from a team as a code owner December 18, 2024 10:04
@pmakode-akamai pmakode-akamai requested review from AzureLatte and removed request for a team December 18, 2024 10:04
@pmakode-akamai pmakode-akamai requested a review from a team as a code owner December 18, 2024 10:06
@pmakode-akamai pmakode-akamai requested review from cpathipa and coliu-akamai and removed request for a team December 18, 2024 10:06
Copy link

github-actions bot commented Dec 18, 2024

Coverage Report:
Base Coverage: 86.96%
Current Coverage: 86.94%

Copy link
Contributor

@coliu-akamai coliu-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ confirmed test passes - thanks Purvesh! 🚀

optional: could write a test to validate IP ranges too (maybe in a separate ticket) -
image

@coliu-akamai coliu-akamai added the Add'tl Approval Needed Waiting on another approval! label Dec 18, 2024
@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Dec 18, 2024
Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pmakode-akamai! Left a comment about the second test in linode-network.spec.ts, and agree with @coliu-akamai about her unit test suggestion, but otherwise this is looking good!

Comment on lines 86 to 99
it('validates the action menu title (aria-label) for the IP address in the table row', () => {
// Set the viewport to 1279px x 800px (width < 1280px) to ensure the Action menu is visible.
cy.viewport(1279, 800);

// Ensure the action menu has the correct aria-label for the IP address.
cy.get(`[data-qa-ip="${linodeIPv4}"]`)
.should('be.visible')
.closest('tr')
.within(() => {
ui.actionMenu
.findByTitle(`Action menu for IP Address ${linodeIPv4}`)
.should('be.visible');
});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is worth blocking the merge, but I think this test would be better as a unit test for LinodeNetworkingActionMenu.tsx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdamore-linode @coliu-akamai I’ve added the missing IP range test coverage in this PR as part of the changes. I understand the suggestion about moving this to a unit test for LinodeNetworkingActionMenu.tsx. Would it be okay to merge this PR as is (since we already have similar e2e coverage in the case of Domain Landing table action menu for aria-label), and I can follow up with a separate PR for the unit test? Let me know what works best.

@pmakode-akamai
Copy link
Contributor Author

pmakode-akamai commented Dec 19, 2024

@coliu-akamai @jdamore-linode Created a ticket (M3-9040) to validate the IP ranges as well

edit: Added coverage for IP ranges in this PR ✅

@pmakode-akamai pmakode-akamai changed the title test: [M3-8863] - Cypress test to validate aria label of Linode IP Addresses action menu test: [M3-8863, M3-9040] - Cypress test to validate aria label of Linode IP Addresses/Ranges action menu Dec 19, 2024
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 471 passing tests on test run #7 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing471 Passing2 Skipped91m 16s

@pmakode-akamai
Copy link
Contributor Author

merging - Got confirmation async - ty!

@pmakode-akamai pmakode-akamai merged commit 0b0fa66 into linode:develop Dec 20, 2024
23 checks passed
Copy link

cypress bot commented Dec 20, 2024

Cloud Manager E2E    Run #7010

Run Properties:  status check passed Passed #7010  •  git commit 0b0fa666ff: test: [M3-8863, M3-9040] - Cypress test to validate aria label of Linode IP Addr...
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #7010
Run duration 25m 27s
Commit git commit 0b0fa666ff: test: [M3-8863, M3-9040] - Cypress test to validate aria label of Linode IP Addr...
Committer Purvesh Makode
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 472
View all changes introduced in this branch ↗︎

dmcintyr-akamai pushed a commit to dmcintyr-akamai/manager that referenced this pull request Jan 9, 2025
…ode IP Addresses/Ranges action menu (linode#11435)

* Add cypress test to validate ip address table row action menu label

* Few updates

* Added changeset: Cypress test to validate aria label of Linode IP Addresses action menu

* Add test coverage for ip range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! e2e Indicates that a PR touches Cypress tests in some way
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants