forked from linode/manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: [M3-7464] - Add Cypress test FW landing page empty state (linod…
…e#10000) * test: [M3-7464] - Add Cypress test FW landing page empty state * Add changeset
- Loading branch information
1 parent
83eab63
commit 879bb03
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
32 changes: 32 additions & 0 deletions
32
packages/manager/cypress/e2e/core/firewalls/landing-page-empty-state.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
}); |