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-8951] - Cypress tests for firewall rules drag and drop keyboard interaction #11341

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

pmakode-akamai
Copy link
Contributor

@pmakode-akamai pmakode-akamai commented Nov 29, 2024

Description 📝

Add cypress test for firewall rules table drag and drop keyboard interaction which was enhanced in #11127

  • These tests confirm that the keyboard interaction for the Firewall Rules table's drag-and-drop feature works as expected.
  • The tests also validate that the CustomKeyboardSensor functions correctly:
    • We have customized the default KeyboardSensor from dnd-kit to meet our specific requirements.
    • The sensor we are using is CustomKeyboardSensor, rather than the default KeyboardSensor from dnd-kit.
    • CustomKeyboardSensor works as expected on smaller window sizes, especially when the vertical scrollbar is enabled. In contrast, the default KeyboardSensor from dnd-kit does not function as intended in this scenario.

Changes 🔄

  • Add Cypress tests for firewall rules drag and drop keyboard interaction
  • Add/Improve comments

Target release date 🗓️

N/A

How to test 🧪

yarn cy:run -s "cypress/e2e/core/firewalls/firewall-rules-drag-and-drop-keyboard.spec.ts"

OR

Test firewall-rules-drag-and-drop-keyboard.spec.ts using

yarn cy:debug
  • Ensure all tests pass.
  • Confirm CustomKeyboardSensor works as expected (both for normal window sizes and when a smaller window with a vertical scrollbar is enabled).
    • This can be tested against both CustomKeyboardSensor and the dnd-kit default KeyboardSensor.
      • To test this scenario, replace CustomKeyboardSensor with the default KeyboardSensor from dnd-kit in the FirewallRuleTable.tsx component, and vice-versa.
      • All the tests should pass when using CustomKeyboardSensor and some of the tests (related to vertical scrollbar) will fail when using the default KeyboardSensor, confirming that CustomKeyboardSensor is functioning correctly.
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 added the e2e Indicates that a PR touches Cypress tests in some way label Nov 29, 2024
@pmakode-akamai pmakode-akamai self-assigned this Nov 29, 2024
@pmakode-akamai pmakode-akamai marked this pull request as ready for review December 2, 2024 14:16
@pmakode-akamai pmakode-akamai requested review from a team as code owners December 2, 2024 14:16
@pmakode-akamai pmakode-akamai requested review from jdamore-linode, hana-akamai, abailly-akamai and subsingh-akamai and removed request for a team December 2, 2024 14:16
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

@jdamore-linode wouldn't such a test belong to our component test suite?

Perhaps both have their use, but worth checking

Copy link

github-actions bot commented Dec 2, 2024

Coverage Report:
Base Coverage: 86.95%
Current Coverage: 86.95%

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 470 passing tests on test run #10 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing470 Passing2 Skipped96m 43s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Indicates that a PR touches Cypress tests in some way Ready for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants