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-8661] - Cypress test to validate CAA record are editable #11440

Conversation

hasyed-akamai
Copy link
Contributor

@hasyed-akamai hasyed-akamai commented Dec 19, 2024

Description 📝

Added Cypress test to validate CAA record are editable

Changes 🔄

Added below cypress tests under in spec file - cypress/e2e/core/domains/smoke-create-domain-records.spec.ts

TC_ID TC_NAME Steps Expected Result
TC_1 Verify CAA record are editable with iodef tag 1. Prerequites -  Prerequites - use createDomain() to create domain.
2. Navigate to Domain details Landing page.
1. Button "Add a CAA Record" is present.
2. Validate creation of the CAA record with iodef tag.
3. Validate that it should update valid record and not allow invalid record.
4. Validate that it should throw a error "You have entered an invalid target" when update with invalid record.
  • checks CAA record should update valid record and not allow invalid record

How to test 🧪

yarn cy:run -s cypress/e2e/core/domains/smoke-create-domain-records.spec.ts

Verification steps

When test executed using this command yarn cy:run -s cypress/e2e/core/domains/smoke-create-domain-records.spec.ts all tests should pass successfully.

Tests

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

@hasyed-akamai hasyed-akamai self-assigned this Dec 19, 2024
@hasyed-akamai hasyed-akamai added the e2e Indicates that a PR touches Cypress tests in some way label Dec 19, 2024
Copy link
Contributor

@subsingh-akamai subsingh-akamai left a comment

Choose a reason for hiding this comment

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

Please also update test case with error message and actual validation in jira and this PR

Copy link
Contributor

@subsingh-akamai subsingh-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 changes. Approved and confirmed that tests are passing.

@hasyed-akamai hasyed-akamai marked this pull request as ready for review December 26, 2024 11:18
@hasyed-akamai hasyed-akamai requested review from a team as code owners December 26, 2024 11:18
@hasyed-akamai hasyed-akamai requested review from jdamore-linode, hkhalil-akamai and coliu-akamai and removed request for a team December 26, 2024 11:18
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.

Nice start @hasyed-akamai! Left some feedback, feel free to reach out if you have any questions!

Edit: sorry, meant to wait for feedback to be addressed before approving!

@jdamore-linode jdamore-linode self-requested a review January 2, 2025 20:49
@hasyed-akamai
Copy link
Contributor Author

Thank you, @jdamore-linode, for your valuable feedback. I’ve implemented all the changes you suggested. Please feel free to review them again when you have a chance. 😊

Copy link

github-actions bot commented Jan 6, 2025

Coverage Report:
Base Coverage: 86.97%
Current Coverage: 86.97%

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.

Nice work, thanks @hasyed-akamai!

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.

awesome, thank you! 🚀

@@ -0,0 +1,5 @@
---
"@linode/manager": Added
Copy link
Contributor

Choose a reason for hiding this comment

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

changeset should be for Tests category

@coliu-akamai coliu-akamai added the Approved Multiple approvals and ready to merge! label Jan 6, 2025
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 1 failing test on test run #7 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing472 Passing2 Skipped90m 54s

Details

Failing Tests
SpecTest
create-linode-region-select.spec.tsLinode Create Region Select » region select

Troubleshooting

Use this command to re-run the failing tests:

yarn cy:run -s "cypress/e2e/core/linodes/create-linode-region-select.spec.ts"

@hasyed-akamai hasyed-akamai merged commit 3febaa0 into linode:develop Jan 7, 2025
22 of 23 checks passed
Copy link

cypress bot commented Jan 7, 2025

Cloud Manager E2E    Run #7041

Run Properties:  status check passed Passed #7041  •  git commit 3febaa03ae: test: [M3-8661] - Cypress test to validate CAA record are editable (#11440)
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #7041
Run duration 27m 27s
Commit git commit 3febaa03ae: test: [M3-8661] - Cypress test to validate CAA record are editable (#11440)
Committer hasyed-akamai
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 473
View all changes introduced in this branch ↗︎

dmcintyr-akamai pushed a commit to dmcintyr-akamai/manager that referenced this pull request Jan 9, 2025
…inode#11440)

* test: [M3-8661] - Cypress test to validate CAA record are editable

* Added changeset: Cypress test to validate CAA records are editable

* Splitting the test cases for valid and invalid records

* Move`createCaaRecord` and `verifyRecordInTable` function calls in `beforeEach` block

* Add cleanup, use @example.com for emails, and replace `cy.get()` for stability.

* Update Changeset type
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.

6 participants