Skip to content

Commit

Permalink
test: [M3-8864] - Cypress tests to validate errors in Linode Create B…
Browse files Browse the repository at this point in the history
…ackups tab (linode#11422)

* Add tests to validate errors in Linode Create Backups tab

* Update test title

* Added changeset: Cypress tests to validate errors in Linode Create Backups tab
  • Loading branch information
pmakode-akamai authored Dec 19, 2024
1 parent 2867d82 commit cbc317e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11422-tests-1734356272451.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Cypress tests to validate errors in Linode Create Backups tab ([#11422](https://github.com/linode/manager/pull/11422))
21 changes: 21 additions & 0 deletions packages/manager/cypress/e2e/core/linodes/create-linode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,25 @@ describe('Create Linode', () => {
// Confirm the createLinodeErrorMessage disappears.
cy.findByText(`${createLinodeErrorMessage}`).should('not.exist');
});

it('shows correct validation errors if no backup or plan is selected', () => {
cy.visitWithLogin('/linodes/create');

// Navigate to Linode Create page "Backups" tab
cy.get('[role="tablist"]')
.should('be.visible')
.findByText('Backups')
.click();

// Submit without selecting any options
ui.button
.findByTitle('Create Linode')
.should('be.visible')
.should('be.enabled')
.click();

// Confirm the correct validation errors show up on the page.
cy.findByText('You must select a Backup.').should('be.visible');
cy.findByText('Plan is required.').should('be.visible');
});
});

0 comments on commit cbc317e

Please sign in to comment.