Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Feb 15, 2023
1 parent 493ac1e commit ef93622
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions e2e-tests/contentful/cypress/integration/engines.js
Original file line number Diff line number Diff line change
@@ -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"
)
})
})
14 changes: 14 additions & 0 deletions e2e-tests/contentful/src/pages/ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react"
import Layout from "../components/layout"

const SSRPage = ({ serverData }) => (
<Layout>
<div data-cy-id="getserverdata-result">{serverData}</div>
</Layout>
)

export default SSRPage

export function getServerData() {
return "getServerData used in contentful E2E test"
}

0 comments on commit ef93622

Please sign in to comment.