From 836c862888c202584463ff802a9c853b13ac1d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Poujade?= <lois.poujade@tetras-libre.fr> Date: Mon, 28 Nov 2022 15:42:32 +0100 Subject: [PATCH] duplicate tests to trigger a fail --- __tests__/main.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/__tests__/main.js b/__tests__/main.js index 9ba064d..c5d2cd9 100644 --- a/__tests__/main.js +++ b/__tests__/main.js @@ -23,3 +23,29 @@ describe('Open local HTTP server', () => { await expect(page).toMatchElement('a[href="./jest.json"]'); }); }); + +describe('Open example', () => { + beforeAll(async () => { + await page.goto('https://example.org'); + }); + it('has the correct page title', async () => { + const title = await page.title(); + expect(title).toBe('Example Domain'); + }); + it('has the main text', async () => { + await expect(page).toMatchElement('a[href="https://www.iana.org/domains/example"]'); + }); +}); + +describe('Open local HTTP server', () => { + beforeAll(async () => { + await page.goto('http://127.0.0.1:4488'); + }); + it('has the correct page title', async () => { + const title = await page.title(); + expect(title).toBe('Index of /'); + }); + it('has the correct link', async () => { + await expect(page).toMatchElement('a[href="./jest.json"]'); + }); +}); -- GitLab