Skip to content

Commit

Permalink
Merge pull request #719 from DFE-Digital/check-for-unknown-tests
Browse files Browse the repository at this point in the history
add unknown check tests
  • Loading branch information
CMurrell148 authored Feb 6, 2025
2 parents 12fcd8f + b480ec6 commit 6e2fff0
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ import academiesPage from "../../../pages/trusts/academiesPage";
import navigation from "../../../pages/navigation";
import commonPage from "../../../pages/commonPage";

const testTrustData = [
{
typeOfTrust: "single academy trust with contacts",
uid: 5527
},
{
typeOfTrust: "multi academy trust with contacts",
uid: 5712
}
];

describe("Testing the components of the Academies page", () => {

describe("Details tab", () => {
Expand Down Expand Up @@ -192,4 +203,20 @@ describe("Testing the components of the Academies page", () => {
});
});
});

describe("Testing that no unown entries are found for an academies various tables/pages", () => {
testTrustData.forEach(({ typeOfTrust, uid }) => {
beforeEach(() => {
cy.login();
});

[`/trusts/academies/details?uid=${uid}`, `/trusts/academies/pupil-numbers?uid=${uid}`, `/trusts/academies/free-school-meals?uid=${uid}`].forEach((url) => {
it(`Should have no unknown entries on ${url} for a ${typeOfTrust}`, () => {
cy.visit(url);
commonPage
.checkNoUnknownEntries();
});
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,21 @@ describe("Testing the components of the Governance page", () => {
governancePage
.checkSubNavNotPresent();
});

describe("Testing that no unown entries are found for an academies governance tables/pages", () => {
trustsWithGovernanceData.forEach(({ typeOfTrust, uid }) => {
beforeEach(() => {
cy.login();
});

[`/trusts/governance/trust-leadership?uid=${uid}`, `/trusts/governance/trustees?uid=${uid}`, `/trusts/governance/members?uid=${uid}`, `/trusts/governance/historic-members?uid=${uid}`].forEach((url) => {
it(`Should have no unknown entries on ${url} for a ${typeOfTrust}`, () => {
cy.visit(url);
commonPage
.checkNoUnknownEntries();
});
});
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,20 @@ describe("Testing the Ofsted page and its subpages ", () => {
});
});
});

describe("Testing that no unown entries are found for ofsteds various tables/pages", () => {
testTrustOfstedData.forEach(({ typeOfTrust, uid }) => {
beforeEach(() => {
cy.login();
});

[`trusts/ofsted/single-headline-grades?uid=${uid}`, `trusts/ofsted/current-ratings?uid=${uid}`, `trusts/ofsted/previous-ratings?uid=${uid}`, `/trusts/ofsted/safeguarding-and-concerns?uid=${uid}`].forEach((url) => {
it(`Should have no unknown entries on ${url} for a ${typeOfTrust}`, () => {
cy.visit(url);
commonPage
.checkNoUnknownEntries();
});
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ class CommonPage {
}).as('allRequests');
}

public checkNoUnknownEntries() {
cy.get('body')
.should('not.contain', 'unknown');
}

}

const commonPage = new CommonPage();
Expand Down

0 comments on commit 6e2fff0

Please sign in to comment.