-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from webvisum/cypress-tests-24
Cypress tests 24
- Loading branch information
Showing
9 changed files
with
72 additions
and
9 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 @@ | ||
{ | ||
"wrongPageUrl": "/abc", | ||
"cmsTitles": ["Customer Login", "Orders and Returns", "Contact Us"], | ||
"errorPageTitle": "Whoops, our bad..." | ||
} |
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
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,7 @@ | ||
{ | ||
"infocenter": ".bg-white > .wrapper > .order-3", | ||
"cmsListItem": "nav > ul > li", | ||
"cmsItemLink": "li > a", | ||
"pageTitle": "h1.page-title", | ||
"cmsDefaultPages": [":nth-child(1) > ul.mt-4 > :nth-child(2) > .text-base", "ul.mt-4 > :nth-child(3) > .text-base", "ul.mt-4 > :nth-child(4) > .text-base"] | ||
} |
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
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
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
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
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,16 @@ | ||
import selectors from "../../../../fixtures/hyva/selectors/cms.json"; | ||
import cms from "../../../../fixtures/hyva/cms.json"; | ||
|
||
describe('CMS tests', () => { | ||
it('Can display the default 404 page', () => { | ||
cy.visit(cms.wrongPageUrl, {failOnStatusCode: false}); | ||
cy.get(selectors.pageTitle).should('contain.text', cms.errorPageTitle) | ||
}) | ||
|
||
it('Can open default CMS pages', () => { | ||
cy.get(selectors.cmsDefaultPages).each((cmsPage, i) => { | ||
cy.get(cmsPage).click() | ||
cy.get(selectors.pageTitle).should('contain.text', cms.cmsTitles[i]) | ||
}) | ||
}) | ||
}) |
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