Skip to content

Commit

Permalink
test: [M3-7464] - Add Cypress test FW landing page empty state (#10000)
Browse files Browse the repository at this point in the history
* test: [M3-7464] - Add Cypress test FW landing page empty state

* Add changeset
  • Loading branch information
carrillo-erik authored Dec 19, 2023
1 parent 83eab63 commit 879bb03
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-10000-tests-1702591069388.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Introduce Cypress test for the Firewalls landing page empty state ([#10000](https://github.com/linode/manager/pull/10000))
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { ui } from 'support/ui';
import { mockGetFirewalls } from 'support/intercepts/firewalls';

describe('confirms Firewalls landing page empty state is shown when no Firewalls exist', () => {
/*
* - Confirms that Getting Started Guides is listed on landing page.
* - Confirms that Video Playlist is listed on landing page.
* - Confirms that clicking on Create Firewall button navigates user to firewall create page.
*/
it('shows the empty state when no Firewalls exist', () => {
mockGetFirewalls([]).as('getFirewalls');

cy.visitWithLogin('/firewalls');
cy.wait(['@getFirewalls']);

cy.findByText('Secure cloud-based firewall').should('be.visible');
cy.findByText(
'Control network traffic to and from Linode Compute Instances with a simple management interface'
).should('be.visible');
cy.findByText('Getting Started Guides').should('be.visible');
cy.findByText('Video Playlist').should('be.visible');

// Create Firewall button exists and clicking it navigates user to create firewall page.
ui.button
.findByTitle('Create Firewall')
.should('be.visible')
.should('be.enabled')
.click();

cy.url().should('endWith', '/firewalls/create');
});
});

0 comments on commit 879bb03

Please sign in to comment.