-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/137597-word-doc-sponsored' of https://github.co…
…m/DFE-Digital/a2b-internal into feature/137597-word-doc-sponsored
- Loading branch information
Showing
6 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
11 changes: 7 additions & 4 deletions
11
.../Dfe.PrepareConversions.CypressTests/cypress/e2e/Core-journeys/voluntary-conversion.cy.js
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
/// <reference types ='Cypress'/> | ||
import projectList from '../../pages/projectList' | ||
import voluntaryProjectTaskList from '../../pages/voluntaryProjectTaskList' | ||
|
||
var projectName = 'Voluntary Cypress Project' | ||
|
||
describe('Voluntary conversion', { tags: ['@dev', '@stage'] }, () => { | ||
beforeEach(() => { | ||
cy.callAcademisationApi('POST', `cypress-data/add-voluntary-project.cy`, "{}") | ||
.then(() => { | ||
cy.login({ titleFilter: 'Cypress Project' }) | ||
.then(() => { | ||
cy.get('[id="school-name-0"]').click(); | ||
}); | ||
projectList.selectProject(projectName) | ||
}); | ||
}) | ||
|
||
it('TC01: Voluntary conversion journey ', () => { | ||
// Go wild Dan! | ||
voluntaryProjectTaskList.voluntaryProjectElementsVisible() | ||
|
||
}) | ||
}) |
11 changes: 11 additions & 0 deletions
11
Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/cypress/pages/BasePage.js
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,11 @@ | ||
export default class BasePage { | ||
static setDesktopViewport() | ||
{ | ||
cy.viewport('macbook-13') | ||
} | ||
|
||
static setLargeDesktopViewport() | ||
{ | ||
cy.viewport(1980, 1080) | ||
} | ||
} |
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
30 changes: 30 additions & 0 deletions
30
...Conversions/Dfe.PrepareConversions.CypressTests/cypress/pages/voluntaryProjectTaskList.js
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 @@ | ||
import BasePage from './BasePage' | ||
|
||
export default class voluntaryProjectTaskList extends BasePage { | ||
|
||
|
||
static voluntaryProjectElementsVisible() | ||
{ | ||
var projectName = 'Voluntary Cypress Project' | ||
var routeType = 'Voluntary conversion' | ||
var projectOwner = '' | ||
var projectStatus = 'Approved with Conditions' | ||
|
||
// Check Header section of main Project Page | ||
cy.get('h1[data-cy]').contains(projectName) | ||
cy.get('p[class="govuk-body govuk-!-margin-bottom-1"]').contains('Route: ' + routeType) | ||
cy.get('p[class="govuk-body govuk-!-margin-bottom-5"]').contains('Project owner: ' + projectOwner) | ||
cy.get('.empty').contains('Empty') | ||
cy.get('a[class="govuk-link govuk-!-padding-left-50"]').contains('Change') | ||
cy.get('strong[class="govuk-tag govuk-tag--green"]').contains(projectStatus) | ||
|
||
// Check Project Tabs Section of main Project Page | ||
cy.get('ul').eq(0).find('li').should('have.length',4) | ||
|
||
// Check Project details is default tab selected | ||
cy.get('a[aria-Current="page"]').contains('Project details') | ||
|
||
|
||
} | ||
} | ||
|
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