+
+
Welcome!
+ About page
+
+
+
+
diff --git a/examples/jest-puppeteer/test/__snapshots__/index.spec.js.snap b/examples/jest-puppeteer/test/__snapshots__/index.spec.js.snap
new file mode 100755
index 0000000000..7ad881e3b1
--- /dev/null
+++ b/examples/jest-puppeteer/test/__snapshots__/index.spec.js.snap
@@ -0,0 +1,5 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Index page test index title: index.title 1`] = `"Home page"`;
+
+exports[`Index page test navigation to about page: about.msg 1`] = `"Hi from client"`;
diff --git a/examples/jest-puppeteer/test/index.spec.js b/examples/jest-puppeteer/test/index.spec.js
new file mode 100755
index 0000000000..00aa5f16ff
--- /dev/null
+++ b/examples/jest-puppeteer/test/index.spec.js
@@ -0,0 +1,32 @@
+const devices = require('puppeteer/DeviceDescriptors')
+const iPhone = devices['iPhone 6']
+
+const BASE_URL = 'http://127.0.0.1:3000'
+
+describe('Index page', () => {
+ let page
+ beforeAll(async () => {
+ // eslint-disable-next-line no-undef
+ page = await browser.newPage()
+ await page.emulate(iPhone)
+ await page.goto(BASE_URL)
+ })
+
+ afterAll(async () => {
+ await page.close()
+ })
+
+ it('test index title', async () => {
+ expect.assertions(1)
+ const title = await page.evaluate(() => document.title)
+ expect(title).toMatchSnapshot('index.title')
+ })
+
+ it('test navigation to about page', async () => {
+ expect.assertions(1)
+ await page.click('a#about-link')
+ await page.waitForSelector('p#hello-msg')
+ const msg = await page.$eval('p#hello-msg', e => e.textContent)
+ expect(msg).toMatchSnapshot('about.msg')
+ })
+})