Skip to content

Setup Playwright UI monitoring to stabilise automated dependency updates#11

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/setup-playwright-testing-ui
Draft

Setup Playwright UI monitoring to stabilise automated dependency updates#11
Copilot wants to merge 2 commits into
masterfrom
copilot/setup-playwright-testing-ui

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 22, 2026

Dependabot was misconfigured (empty package-ecosystem) and there were no real Playwright tests — only a stale template test checking for a Vue scaffold element that doesn't exist in the app. This meant dependency updates had no UI safety net.

Changes

Playwright tests (e2e/vue.spec.ts)

Replaced the broken placeholder with tests covering both routes:

  • Home page: asserts header, logo link, city search input (placeholder text), and geolocation button are present
  • About page: asserts back-nav, all four setting sections (Models, Forecast length, Build date, Source code), and GitHub link are present
  • Both pages include toHaveScreenshot() visual regression tests with committed baselines

Playwright config (playwright.config.ts)

  • updateSnapshots: 'missing' — auto-creates baselines on first run without failing
  • snapshotPathTemplate — snapshots stored alongside spec files for discoverability
  • Reporter set to html with open: 'never' to avoid spurious browser launches in CI

CI workflow (.github/workflows/playwright.yml)

New workflow triggered on push to master and all PRs (including Dependabot). Builds with vite preview, runs Chromium, uploads the HTML report as an artifact.

on:
  push:
    branches: ["master"]
  pull_request:

Dependabot (.github/dependabot.yml)

Fixed invalid package-ecosystem: """npm", interval set to weekly.

With this in place, every Dependabot PR is gated by the Playwright suite: structural failures surface broken DOM contracts; screenshot diffs catch visual regressions.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…abot

Co-authored-by: artonge <6653109+artonge@users.noreply.github.com>
Copilot AI changed the title [WIP] Setup Playwright testing for UI change monitoring Setup Playwright UI monitoring to stabilise automated dependency updates Feb 22, 2026
Copilot AI requested a review from artonge February 22, 2026 18:13
Comment on lines +15 to +16
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those needs to be pined

- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to pin the node version?

Comment thread e2e/vue.spec.ts
Comment on lines +5 to +6
await context.clearCookies();
await context.addInitScript(() => localStorage.clear());
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Comment thread package-lock.json
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed?

Comment thread e2e/vue.spec.ts
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the file to better suite the content.

Comment thread e2e/vue.spec.ts
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also test the content and snapshot after a city has been searched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants