Skip to content

Commit

Permalink
add small tests to check that notes pages from theme render (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillkyle committed Sep 16, 2020
1 parent d2a1387 commit 1ddd07c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cypress/e2e/note.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
describe(`a note`, () => {
it(`should render inside the layout`, () => {
cy.visit(`/notes/hello`)
cy.contains(`Shadowed Site Title`).should(`exist`)
})

it(`should render markdown link`, () => {
cy.contains(`homepage`).click()
})
})
10 changes: 10 additions & 0 deletions cypress/e2e/notes-listing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
describe(`notes listing page`, () => {
it(`should render a list of notes`, () => {
cy.visit(`/notes/`)
cy.findByText(`example-dir`).should(`exist`)
})

it(`should render inside the layout`, () => {
cy.contains(`Shadowed Site Title`).should(`exist`)
})
})
18 changes: 18 additions & 0 deletions starters/theme/content/notes/hello.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Hello!

Here is some content written in MDX.

See the [homepage](/)

- here are
- a few
- bullet points

---

Some **bold** and _underlined_ text.

A numbered list:

1. one
2. two
3. three

0 comments on commit 1ddd07c

Please sign in to comment.