Skip to content

Commit

Permalink
Merge pull request #522 from uktrade/feat/add-omis-landing-page-test
Browse files Browse the repository at this point in the history
add omis landing page e2e testing
  • Loading branch information
bau123 authored Apr 24, 2024
2 parents c4f182e + dffa43d commit 5b56eae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/views/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
{% set heading = 'About this service' %}

{% block main_content %}
<p>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 <a href="https://www.gov.uk/overseas-customers-export-opportunities/trade-specialist-help">getting help from a trade specialist</a>.</p>
<p class="body">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 <a href="https://www.gov.uk/overseas-customers-export-opportunities/trade-specialist-help" class="link">getting help from a trade specialist</a>.</p>
{% endblock %}
19 changes: 19 additions & 0 deletions test/end-to-end/cypress/landingpage-spec.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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();
});
});

0 comments on commit 5b56eae

Please sign in to comment.