Skip to content

Conversation

@dmcintyr-akamai
Copy link
Contributor

@dmcintyr-akamai dmcintyr-akamai commented Jul 18, 2025

Description 📝

Replacement PR for #12394 bc the test setup changed significantly after i'd already rec'd approvals.
Test the UI and POST payload for linode creation when the region is and is not enabled for alerts. I've tried to implement tests for all the requirements in M3-10076. If i'm missing any, pls let me know. Test create flow for legacy and beta alerts, and that user can toggle between legacy and beta mode.

Changes 🔄

Tests added to new file at packages/manager/cypress/e2e/core/linodes/alerts-create.spec.ts.
For the first set of tests, the aclpBetaServices.linode.alerts feature flag is enabled. The create flow defaults to displaying the legacy alerts but these alerts are readonly. If the user switches to beta alerts, then the user can select the alerts from the alerts table, and the selected alerts are included in the POST payload.
The first and last test demonstrate that if a region that does not support alerts is selected, then it does not matter what the feature flag is, alerts will not be visible in the form.
I added 5 integration tests, and this is the purpose of each:

If a region is initially selected which does not support alerts, then alerts are not visible in the UI. If the user selects a new region w/ alerts enabled, then the alerts UI appears.

  • If the user selects a region where alerts are not enabled, then the Alerts panel is not displayed. If the user changes the region to one that does support alerts, then the Alerts panel appears.
  • The page defaults to displaying legacy alerts, and this test tests the create flow for legacy alerts.
  • Given a region where alerts are enabled, the page defaults to displaying legacy alerts, but the user can switch to beta alerts. This test tests the create flow for beta alerts.
  • The user can toggle back and forth between legacy and beta.

Alerts are readonly in the legacy form. Legacy alerts are NOT included code snippet displayed in the "View Codde Snippet" modal or in the POST payload.
Selected beta alerts are included in the code snippet and POST payload.

  • If region does not support alerts, then alerts do not appear in the UI and do not appear in the POST payload for linode creation.
  • If the feature flag is off, then Alerts are not present in the UI even if the region and user preference supports alerts.

How to test 🧪

pnpm run cy:run -s cypress/e2e/core/linodes/alerts-create.spec.ts
  • I have read and considered all applicable items listed above.

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

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

…ithub.com:dmcintyr-akamai/manager into M3-10076_aclp_alerts
@dmcintyr-akamai dmcintyr-akamai marked this pull request as ready for review July 22, 2025 14:37
@dmcintyr-akamai dmcintyr-akamai requested review from a team as code owners July 22, 2025 14:37
@dmcintyr-akamai dmcintyr-akamai requested review from bnussman-akamai, jdamore-linode and mjac0bs and removed request for a team July 22, 2025 14:37
@mjac0bs mjac0bs changed the title test [M3-10076]: Tests for ACLP alerts in Linode create flow test: [M3-10076]- Add tests for ACLP alerts in Linode create flow Jul 23, 2025
Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Tests look good!

Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Jul 29, 2025
@jaalah-akamai jaalah-akamai added e2e Indicates that a PR touches Cypress tests in some way ACLP Integration CI (Cloud Interfaces) Support for CC (Core Compute) CloudPulse Integration Approved Multiple approvals and ready to merge! labels Jul 29, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 2 failing tests on test run #12 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
2 Failing699 Passing4 Skipped149m 46s

Details

Failing Tests
SpecTest
nodebalancers-create-in-complex-form.spec.tsCloud Manager Cypress Tests→create NodeBalancer to test the submission of multiple nodes and multiple configs » create NodeBalancer to test the submission of multiple nodes and multiple configs
nodebalancers-create-in-complex-form.spec.tsCloud Manager Cypress Tests→create NodeBalancer to test the submission of multiple nodes and multiple configs » create NodeBalancer to test the submission of multiple nodes and multiple configs

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/nodebalancers/nodebalancers-create-in-complex-form.spec.ts"

@dmcintyr-akamai dmcintyr-akamai merged commit a4f0004 into linode:develop Jul 29, 2025
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ACLP Integration CI (Cloud Interfaces) Support for CC (Core Compute) CloudPulse Integration Approved Multiple approvals and ready to merge! e2e Indicates that a PR touches Cypress tests in some way

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants