diff --git a/src/app/views/cookies.njk b/src/app/views/cookies.njk index 5f2d2bbb..836713c3 100644 --- a/src/app/views/cookies.njk +++ b/src/app/views/cookies.njk @@ -18,13 +18,13 @@
You’ll normally see a message on the site before we store a cookie on your computer.
-Find out more about how to manage cookies.
+Find out more about how to manage cookies.
-We use Google Analytics software to collect information about how you use GOV.UK. We do this to help make sure the site is meeting the needs of its users and to help us make improvements, for example improving site search.
+We use Google Analytics software to collect information about how you use GOV.UK. We do this to help make sure the site is meeting the needs of its users and to help us make improvements, for example improving site search.
Google Analytics stores information about:
diff --git a/test/end-to-end/cypress/cookies-spec.cy.js b/test/end-to-end/cypress/cookies-spec.cy.js new file mode 100644 index 00000000..d18e1a69 --- /dev/null +++ b/test/end-to-end/cypress/cookies-spec.cy.js @@ -0,0 +1,25 @@ +describe("Omis Cookie Spec", () => { + context("cookies spec", () => { + beforeEach(() => { + cy.visit("http://localhost:4000/cookies"); + }); + it("visits cookies page", () => { + cy.get("h1").should("exist").and("have.text", "Cookies"); + }); + it("should click the 'How to manage cookies link'", () => { + cy.get('[class="header-cookies"]') + .should("exist") + .and("have.text", "How cookies are used on GOV.UK"); + cy.get('[class="cookies-link"]') + .should("exist") + .and("contain", "how to manage cookies") + .click(); + }); + it("should click the Google analytics external link", () => { + cy.get('[class="google-analytics-link"]') + .should("exist") + .and("contain", "improving site search") + .click(); + }); + }); +});