generated from DTS-STN/next-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #66 from DTS-STN/80959_E2E_TCs
80959_TestCases
- Loading branch information
Showing
3 changed files
with
110 additions
and
1 deletion.
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
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,30 @@ | ||
/// <reference types="cypress" /> | ||
|
||
|
||
function securitySettingsHeader(){ | ||
|
||
return cy.get('#my-dashboard-heading') | ||
} | ||
|
||
function breadcrumbs() { | ||
|
||
return cy.get("[class='ds-container'] >nav>ul") | ||
} | ||
|
||
function breadcrumbsLink1() { | ||
|
||
return cy.get("[class='ds-container'] >nav>ul>li:nth-child(1)>a") | ||
} | ||
|
||
function breadcrumbsLink2() { | ||
|
||
return cy.get("[class='ds-container'] >nav>ul>li:nth-child(2)>a") | ||
} | ||
|
||
module.exports = {securitySettingsHeader, | ||
breadcrumbs, | ||
breadcrumbsLink1, | ||
breadcrumbsLink2 | ||
|
||
|
||
} |
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,64 @@ | ||
/// <reference types="cypress" /> | ||
const dashboardPo = require("../e2e/PageObjects/dashboardPO.cy") | ||
const securityPo = require("../e2e/PageObjects/securitySettingsPO.cy") | ||
|
||
|
||
beforeEach(() => { | ||
cy.visit('/security') }) | ||
|
||
describe('Validate Security Settings page',() =>{ | ||
|
||
|
||
it('Validate Security Settings Page header in English', () =>{ | ||
|
||
securityPo.securitySettingsHeader().should('be.visible') | ||
.and('have.text','Security Settings'); | ||
|
||
}) | ||
|
||
it('Validate French button click goes to fr/Security page', () =>{ | ||
|
||
dashboardPo.FrenchButton().click() | ||
cy.url().should("contains", "/fr/security"); | ||
|
||
}) | ||
|
||
it('Validate Security Settings Page header in French', () =>{ | ||
|
||
dashboardPo.FrenchButton().click() | ||
securityPo.securitySettingsHeader().should('be.visible') | ||
.and('have.text','Paramètres de sécurité'); | ||
|
||
}) | ||
|
||
it('Validate that user can select "Security settings" from Menu dropdown options', () =>{ | ||
cy.visit('/home') | ||
dashboardPo.Menu().click() | ||
dashboardPo.SecuritySettingsMenu().click() | ||
cy.url().should("contains", "/security"); | ||
securityPo.securitySettingsHeader().should('be.visible') | ||
.and('have.text','Security Settings'); | ||
|
||
}) | ||
|
||
it('validate the breadcrumbs are present on Security settings page', () =>{ | ||
|
||
securityPo.breadcrumbs().should('be.visible') | ||
|
||
|
||
}) | ||
|
||
it('validate that user is navigated to /fr/security page from /fr/dashboard', () =>{ | ||
|
||
cy.visit('/home') | ||
dashboardPo.FrenchButton().click() | ||
dashboardPo.Menu().click() | ||
dashboardPo.SecuritySettingsMenu().click() | ||
cy.url().should("contains", "/fr/security") | ||
securityPo.securitySettingsHeader().should('be.visible') | ||
.and('have.text','Paramètres de sécurité'); | ||
|
||
|
||
}) | ||
|
||
}) |