From dffa43dfa8e7d82a934fcc11bda2c70ad5daa056 Mon Sep 17 00:00:00 2001 From: Bau Nguyen Date: Wed, 24 Apr 2024 16:32:18 +0100 Subject: [PATCH] add extra test --- src/app/views/index.njk | 2 +- test/end-to-end/cypress/landingpage-spec.cy.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/views/index.njk b/src/app/views/index.njk index b5f07e6..ebb0474 100644 --- a/src/app/views/index.njk +++ b/src/app/views/index.njk @@ -5,5 +5,5 @@ {% set heading = 'About this service' %} {% block main_content %} -

The Overseas Market Introduction Service (OMIS) can help you find overseas customers using the Department for Business & Trade’s (DBT) network of trade specialists. Find out more about getting help from a trade specialist.

+

The Overseas Market Introduction Service (OMIS) can help you find overseas customers using the Department for Business & Trade’s (DBT) network of trade specialists. Find out more about getting help from a trade specialist.

{% endblock %} diff --git a/test/end-to-end/cypress/landingpage-spec.cy.js b/test/end-to-end/cypress/landingpage-spec.cy.js index 886aec3..d962b4a 100644 --- a/test/end-to-end/cypress/landingpage-spec.cy.js +++ b/test/end-to-end/cypress/landingpage-spec.cy.js @@ -2,5 +2,18 @@ describe("landing page spec", () => { it("visits OMIS landing page", () => { cy.visit("http://localhost:4000"); cy.get("h1").should("exist").and("have.text", "About this service"); + cy.get('[class="body"]') + .should("exist") + .and( + "have.text", + "The Overseas Market Introduction Service (OMIS) can help you find overseas customers using the Department for Business & Trade’s (DBT) network of trade specialists. Find out more about getting help from a trade specialist." + ); + }); + it("should click on the help link", () => { + cy.visit("http://localhost:4000"); + cy.get('[class="link"]') + .should("exist") + .and("contain", "getting help from a trade specialist"); + cy.get('[class="link"]').click(); }); });