From ef93622b78b5b4bb261b9cc644e53819776ce3bf Mon Sep 17 00:00:00 2001 From: LekoArts Date: Wed, 15 Feb 2023 10:46:17 +0100 Subject: [PATCH] add test --- .../contentful/cypress/integration/engines.js | 11 +++++++++++ e2e-tests/contentful/src/pages/ssr.js | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 e2e-tests/contentful/cypress/integration/engines.js create mode 100644 e2e-tests/contentful/src/pages/ssr.js diff --git a/e2e-tests/contentful/cypress/integration/engines.js b/e2e-tests/contentful/cypress/integration/engines.js new file mode 100644 index 0000000000000..e68b27dcda88a --- /dev/null +++ b/e2e-tests/contentful/cypress/integration/engines.js @@ -0,0 +1,11 @@ +describe(`Engines (SSR)`, () => { + beforeEach(() => { + cy.visit("/ssr").waitForRouteChange() + }) + it(`should work`, () => { + cy.get('[data-cy-id="getserverdata-result"]').should( + "have.text", + "getServerData used in contentful E2E test" + ) + }) +}) diff --git a/e2e-tests/contentful/src/pages/ssr.js b/e2e-tests/contentful/src/pages/ssr.js new file mode 100644 index 0000000000000..4627d2355afd7 --- /dev/null +++ b/e2e-tests/contentful/src/pages/ssr.js @@ -0,0 +1,14 @@ +import React from "react" +import Layout from "../components/layout" + +const SSRPage = ({ serverData }) => ( + +
{serverData}
+
+) + +export default SSRPage + +export function getServerData() { + return "getServerData used in contentful E2E test" +} \ No newline at end of file