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-8948] Added cypress component test for firewall inbound and outbound rules for mouse drag and drop #11344

Conversation

subsingh-akamai
Copy link
Contributor

@subsingh-akamai subsingh-akamai commented Dec 2, 2024

Description 📝

This PR is part of adding test for firewall drag and drop with mouse and keyboard. (M3-8862)

In this PR cypress component test is added for firewall inbound and outbound rules for mouse drag and drop

Changes 🔄

Cypress Test for Linode Firewall Inbound & Outbound Rules Table Mouse Drag and Drop Functionality

image

In this PR, I implemented and tested the drag-and-drop functionality in Cypress. Below is the approach I followed:

  1. Using cypress trigger events: Attempted to simulate drag-and-drop actions using native Cypress trigger events, but this approach did not work as expected.
  2. Using cypress-real-events:Tried using cypress-real-events to replicate drag-and-drop functionality. However, it also failed to work for this specific use case.
  3. Using 4teamwork/cypress-drag-drop:Adopted the 4teamwork/cypress-drag-drop library, which successfully enabled the drag-and-drop functionality.

This implementation uses the 4teamwork/cypress-drag-drop plugin to ensure reliable and consistent test execution for drag-and-drop scenarios.

Jira

  • M3-8948

How to test 🧪

yarn cy:component:run -s "cypress/component/features/firewalls/firewall-rule-table.spec.tsx"

Verification steps

When test executed using this command yarn cy:component:run -s "cypress/component/features/firewalls/firewall-rule-table.spec.tsx"all tests should pass successfully and you should see new test added as per below screenshot

image

As an Author I have considered 🤔

Check all that apply

  • 👀 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

@subsingh-akamai subsingh-akamai requested review from a team as code owners December 2, 2024 08:09
@subsingh-akamai subsingh-akamai requested review from cliu-akamai, abailly-akamai and pmakode-akamai and removed request for a team December 2, 2024 08:09
@subsingh-akamai subsingh-akamai self-assigned this Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Coverage Report:
Base Coverage: 86.78%
Current Coverage: 86.78%

@abailly-akamai abailly-akamai added Testing e2e Indicates that a PR touches Cypress tests in some way labels Dec 4, 2024
@abailly-akamai abailly-akamai removed their request for review December 4, 2024 16:35
@subsingh-akamai subsingh-akamai marked this pull request as draft December 9, 2024 05:42
@subsingh-akamai subsingh-akamai marked this pull request as ready for review December 10, 2024 05:59
@subsingh-akamai subsingh-akamai requested review from jdamore-linode and removed request for cliu-akamai December 10, 2024 05:59
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 @subsingh-akamai! Confirmed that the tests run nicely. Nice job!

I did notice that we're missing the changes to yarn.lock from installing the new dependency, and posted some thoughts about the spec filename, but otherwise this is looking nice!

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 for the quick changes Subodh! Tests look good and are passing reliably for me 👍

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.

✅ confirm test passes

thank you! 🚀

@coliu-akamai coliu-akamai added the Approved Multiple approvals and ready to merge! label Dec 11, 2024
Copy link
Contributor

@pmakode-akamai pmakode-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 @subsingh-akamai -- Once this PR is merged, I'll update the other PR to refactor and consolidate these changes

All tests pass ✅

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 469 passing tests on test run #11 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing469 Passing2 Skipped93m 45s

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 for the last minute touch-ups @subsingh-akamai! Looks great!

@subsingh-akamai subsingh-akamai changed the title test: [M3-8948] Added test for firewall inbound and outbound rules for mouse drag and drop test: [M3-8948] Added cypress component test for firewall inbound and outbound rules for mouse drag and drop Dec 13, 2024
@subsingh-akamai subsingh-akamai merged commit bfbd822 into linode:develop Dec 13, 2024
22 of 23 checks passed
Copy link

cypress bot commented Dec 13, 2024

Cloud Manager E2E    Run #6965

Run Properties:  status check failed Failed #6965  •  git commit bfbd8222cc: test: [M3-8948] Added cypress component test for firewall inbound and outbound r...
Project Cloud Manager E2E
Branch Review develop
Run status status check failed Failed #6965
Run duration 32m 28s
Commit git commit bfbd8222cc: test: [M3-8948] Added cypress component test for firewall inbound and outbound r...
Committer subsingh-akamai
View all properties for this run ↗︎

Test results
Tests that failed  Failures 2
Tests that were flaky  Flaky 4
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 467
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/core/linodes/rebuild-linode.spec.ts • 2 failed tests

View Output Video

Test Artifacts
rebuild linode > rebuilds a linode from Community StackScript Screenshots Video
rebuild linode > rebuilds a linode from Account StackScript Screenshots Video
Flakiness  linodes/switch-linode-state.spec.ts • 1 flaky test

View Output Video

Test Artifacts
switch linode state > powers off a linode from details page Screenshots Video
Flakiness  linodes/clone-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
clone linode > can clone a Linode from Linode details page Screenshots Video
Flakiness  linodes/rebuild-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
rebuild linode > rebuilds a linode from Image Screenshots Video
Flakiness  parentChild/account-switching.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Parent/Child account switching > From Parent to Child > can switch from Parent account user to Proxy account user from Billing page Screenshots Video

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 Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants