Skip to content

Commit

Permalink
Add basic end-to-end test
Browse files Browse the repository at this point in the history
Per the last commit, this is to ensure automated dependency PRs don't
get merged and silently bring the app down
  • Loading branch information
yndajas committed Nov 1, 2024
1 parent 46d86b1 commit 5d50e86
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions e2e/app.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// @ts-check
const { test, expect } = require('@playwright/test');

test('homepage loads', async ({ page }) => {
await page.goto('/');

// Expect a title "to contain" a substring.
await expect(page).toHaveTitle("Home – dxw Prototype Library");
await expect(page.getByRole('heading', { name: "dxw Prototype Gallery" })).toBeVisible();
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"scripts": {
"dev": "govuk-prototype-kit dev",
"serve": "govuk-prototype-kit serve",
"start": "govuk-prototype-kit start"
"start": "govuk-prototype-kit start",
"test": "npx playwright test"
},
"name": "govuk-prototype-kit",
"dependencies": {
Expand Down

0 comments on commit 5d50e86

Please sign in to comment.