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-8756] - Fix Cypress SMTP support ticket test failure #11106

Conversation

jdamore-linode
Copy link
Contributor

Description 📝

This is a quick fix to get the support ticket can create an SMTP support ticket test passing. With today's API release, we introduced a new SMTP Linode capability, and because our test creates a real Linode (which now has this new capability), the SMTP support ticket banner stopped appearing.

This change fixes the test by using a mock Linode that is lacking the SMTP capability.

Changes 🔄

  • Use mock Linode for SMTP support ticket test

How to test 🧪

This test is currently failing 100% of the time across all branches, so we can rely on CI for this. The test can be run locally, however, with this command:

yarn cy:run -s "cypress/e2e/core/helpAndSupport/open-support-ticket.spec.ts"

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

@jdamore-linode jdamore-linode requested a review from a team as a code owner October 15, 2024 21:34
@jdamore-linode jdamore-linode requested review from cliu-akamai and removed request for a team October 15, 2024 21:34
cy.visitWithLogin('/support/tickets');
cy.visitWithLogin(`/linodes/${mockLinode.id}`);
cy.findByText('open a support ticket').should('be.visible').click();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Beyond this point, the only real change is replacing linode with mockLinode in a few places -- the diff is only big because of the whitespace change stemming from the removal of cy.defer().then(() => {...})

@jdamore-linode jdamore-linode requested a review from a team as a code owner October 15, 2024 21:38
@jdamore-linode jdamore-linode requested review from hana-akamai and cpathipa and removed request for a team October 15, 2024 21:38
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

While we await CI, I can confirm that the change to mock the linode makes sense and fixes the failure:

image

Thanks for reaching out about this one and for the quick fix. Apologies again we didn't catch it before it became an issue.

@mjac0bs mjac0bs added the Add'tl Approval Needed Waiting on another approval! label Oct 15, 2024
Copy link

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

Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a comment

Choose a reason for hiding this comment

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

Looks good! Sorry, should have made these changes as part of the original PR!

@hkhalil-akamai hkhalil-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Oct 15, 2024
@mjac0bs mjac0bs merged commit 671d716 into linode:develop Oct 15, 2024
21 of 23 checks passed
Copy link

cypress bot commented Oct 15, 2024

Cloud Manager E2E    Run #6678

Run Properties:  status check failed Failed #6678  •  git commit 671d716133: test: [M3-8756] - Fix Cypress SMTP support ticket test failure (#11106)
Project Cloud Manager E2E
Run status status check failed Failed #6678
Run duration 27m 49s
Commit git commit 671d716133: test: [M3-8756] - Fix Cypress SMTP support ticket test failure (#11106)
Committer jdamore-linode
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 5
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 434

Tests for review

Failed  cypress/e2e/core/oneClickApps/one-click-apps.spec.ts • 1 failed test

View Output Video

Test Artifacts
OneClick Apps (OCA) > Lists all the OneClick Apps Screenshots Video
Flakiness  objectStorageGen2/bucket-create-gen2.spec.ts • 2 flaky tests

View Output Video

Test Artifacts
Object Storage Gen2 create bucket tests > can create a bucket with E2 endpoint type Screenshots Video
Object Storage Gen2 create bucket tests > can create a bucket with E3 endpoint type Screenshots Video
Flakiness  linodes/rebuild-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
rebuild linode > cannot rebuild a provisioning linode Screenshots Video
Flakiness  placementGroups/delete-placement-groups.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Placement Group deletion > can delete with Linodes assigned when unexpected error show up and retry Screenshots Video
Flakiness  kubernetes/smoke-lke-create.spec.ts • 1 flaky test

View Output Video

Test Artifacts
LKE Create Cluster > Simple Page Check 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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants