Skip to content

Commit

Permalink
Merge pull request #926 from DFE-Digital/141777-cypress-remove-old-tests
Browse files Browse the repository at this point in the history
141777 cypress remove old tests
  • Loading branch information
nwarms authored Oct 5, 2023
2 parents 0361035 + 5d8da72 commit a1e8aa6
Show file tree
Hide file tree
Showing 49 changed files with 31 additions and 7,221 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import LocalAuthorityInfomation from "../../pages/localAuthorityInformation";
import Performance from "../../pages/performance";


describe('Sponsored conversion', { tags: ['@dev', '@stage'] }, () => {
describe('Sponsored conversion journey', { tags: ['@dev', '@stage'] }, () => {

const currentDate = new Date();
const nextYearDate = new Date();
Expand Down Expand Up @@ -57,30 +57,25 @@ describe('Sponsored conversion', { tags: ['@dev', '@stage'] }, () => {
performanceInfo: 'Additional Information',
keyStages: [4, 5]
}
beforeEach(() => {

before(() => {
cy.callAcademisationApi('POST', `cypress-data/add-sponsored-project.cy`, "{}")
.then(() => {
projectList.selectProject(testData.projectName)
});
})

it('TC01: Sponsored conversion journey ', () => {
// ---------------------------
// - Assign Delivery Officer -
// ---------------------------
beforeEach(() => {
projectList.selectProject(testData.projectName)
})

it('TC01: Assign Project', () => {
projectTaskList.selectAssignProject();
projectAssignment.assignProject(testData.projectAssignment.deliveryOfficer)
projectTaskList.getNotificationMessage().should('contain.text', testData.projectAssignment.assignedOfficerMessage);
projectTaskList.getAssignedUser().should('contain.text', testData.projectAssignment.deliveryOfficer);
projectList.filterProjectList(testData.projectName);
projectList.getNthProjectDeliveryOfficer().should('contain.text', testData.projectAssignment.deliveryOfficer);
})

// -------------------
// - School Overview -
// -------------------

it('TC02: School Overview', () => {
projectList.selectProject(testData.projectName);
projectTaskList.selectSchoolOverview();
//PAN
Expand Down Expand Up @@ -111,11 +106,9 @@ describe('Sponsored conversion', { tags: ['@dev', '@stage'] }, () => {
schoolOverview.markComplete();
cy.confirmContinueBtn().click();
projectTaskList.getSchoolOverviewStatus().should('contain.text', testData.completedText);
})

// ----------
// - Budget -
// ----------

it('TC03: Budget ', () => {
projectTaskList.selectBudget();
budget.updateBudgetInfomation(testData.budget);

Expand All @@ -134,21 +127,16 @@ describe('Sponsored conversion', { tags: ['@dev', '@stage'] }, () => {
budget.markComplete();
cy.confirmContinueBtn().click();
projectTaskList.getBudgetStatus().should('contain.text', testData.completedText);
});


// ------------------
// - Pupil Forecast -
// ------------------

it('TC04: Pupil Forecast ', () => {
projectTaskList.selectPupilForecast();
PupilForecast.enterAditionalInfomation(testData.pupilForecast.additionalInfomation);
PupilForecast.getAdditionalInfomation().should('contain.text', testData.pupilForecast.additionalInfomation);
cy.confirmContinueBtn().click();
});

// ----------------------
// - Conversion Details -
// ----------------------

it('TC05: Conversion Details ', () => {
projectTaskList.selectConversionDetails();

// Form 7
Expand Down Expand Up @@ -201,33 +189,27 @@ describe('Sponsored conversion', { tags: ['@dev', '@stage'] }, () => {
ConversionDetails.markComplete();
cy.confirmContinueBtn().click();
projectTaskList.getConversionDetailsStatus().should('contain.text', testData.completedText);
});

// -------------
// - Rationale -
// -------------

it('TC06: Rationale ', () => {
projectTaskList.selectRationale();
Rationale.changeRationale(testData.rationale);
Rationale.getRationale().should('contain.text', testData.rationale);
Rationale.markComplete();
cy.confirmContinueBtn().click();
projectTaskList.getRationaleStatus().should('contain.text', testData.completedText);
});

// --------------------
// - Risks and issues -
// --------------------

it('TC07: Risks and issues ', () => {
projectTaskList.selectRisksAndIssues();
RisksAndIssues.changeRisksAndIssues(testData.risksAndIssues);
RisksAndIssues.getRisksAndIssues().should('contain.text', testData.risksAndIssues);
RisksAndIssues.markComplete();
cy.confirmContinueBtn().click();
projectTaskList.getRisksAndIssuesStatus().should('contain.text', testData.completedText);
});

// -------------------
// - Local Authority -
// -------------------

it('TC08: Local authority ', () => {
projectTaskList.selectLA();
LocalAuthorityInfomation.changeTemplateDates(oneMonthAgoDate, nextMonthDate);
LocalAuthorityInfomation.getTemplateSentDate().should('contain.text', oneMonthAgoDate.getDate());
Expand All @@ -247,22 +229,20 @@ describe('Sponsored conversion', { tags: ['@dev', '@stage'] }, () => {
cy.confirmContinueBtn().click();
projectTaskList.getLAStatus().should('contain.text', testData.completedText);

});

// --------------------
// - Performance Info -
// --------------------

it('TC09: Performance Info ', () => {
projectTaskList.selectOfsted();
Performance.changeOfstedInfo(testData.performanceInfo);
Performance.getOfstedInfo().should('contain.text', testData.performanceInfo);
cy.confirmContinueBtn().click();

for(const keyStage of testData.keyStages){
for (const keyStage of testData.keyStages) {
console.log(keyStage)
projectTaskList.selectKeyStage(keyStage);
Performance.changeKeyStageInfo(keyStage, testData.performanceInfo);
Performance.getKeyStageInfo(keyStage).should('contain.text', testData.performanceInfo);
cy.confirmContinueBtn().click();
}
})
});
})

This file was deleted.

This file was deleted.

Loading

0 comments on commit a1e8aa6

Please sign in to comment.