Skip to content

Commit

Permalink
fixed comments raised in review
Browse files Browse the repository at this point in the history
fixed broken playwright test
  • Loading branch information
mikestock-nimble committed Jan 30, 2024
1 parent a80675b commit 3cb9c92
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"parser": "@typescript-eslint/parser",
"plugins": [
"cypress"
],
"rules": {
"cypress/no-assigning-return-values": "warn",
"cypress/no-unnecessary-waiting": "warn",
"cypress/assertion-before-screenshot": "warn",
"cypress/no-force": "warn",
"cypress/no-async-tests": "warn",
"cypress/no-pause": "warn",
"cypress/unsafe-to-chain-command": "warn"
},
"env": {
"cypress/globals": true
},
"extends": [
"plugin:cypress/recommended"
]
}
"parser": "@typescript-eslint/parser",
"plugins": [
"cypress"
],
"rules": {
"cypress/no-assigning-return-values": "warn",
"cypress/no-unnecessary-waiting": "warn",
"cypress/assertion-before-screenshot": "warn",
"cypress/no-force": "warn",
"cypress/no-async-tests": "warn",
"cypress/no-pause": "warn",
"cypress/unsafe-to-chain-command": "warn"
},
"env": {
"cypress/globals": true
},
"extends": [
"plugin:cypress/recommended"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineConfig({
json: true,
},
},
userAgent: 'FindInformationAcademiesTrusts/1.0 Cypress',
userAgent: 'FindInformationAcademiesTrusts/1.0 Cypress',
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
Expand All @@ -30,7 +30,7 @@ export default defineConfig({
})

on('after:run', async () => {
if(process.env.ZAP) {
if (process.env.ZAP) {
await generateZapReport()
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("Testing cookies on the site", () => {

cookiesBanner
.accept()
.notVisible();
.isNotVisible();

Logger.log("Upon accepting the banner it should stay on the same page");
cy.url().should("include", "/privacy");
Expand Down Expand Up @@ -48,7 +48,7 @@ describe("Testing cookies on the site", () => {

cookiesBanner
.reject()
.notVisible();
.isNotVisible();

footerLinks.viewCookies();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Logger } from "../common/logger";

class CookiesBanner {
public accept(): this {
cy.getByTestId("banner-accept-analytics-cookies-button").click();
Expand All @@ -20,7 +18,7 @@ class CookiesBanner {
return this;
}

public notVisible(): this {
public isNotVisible(): this {
cy.getByTestId("cookies-banner").should("not.exist");

return this;
Expand Down
7 changes: 7 additions & 0 deletions tests/playwright/fake-data/trusts.json
Original file line number Diff line number Diff line change
Expand Up @@ -25775,5 +25775,12 @@
"email": "[email protected]"
},
"status": "Open"
},
{
"uid": "1313",
"name": "The empty trust",
"groupId": "TR3943",
"type": "Single-academy trust",
"academies": []
}
]

0 comments on commit 3cb9c92

Please sign in to comment.