diff --git a/.github/browser-tests/.gitignore b/.github/browser-tests/.gitignore new file mode 100644 index 00000000..d14cea40 --- /dev/null +++ b/.github/browser-tests/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/test-results/ diff --git a/.github/browser-tests/conferences.spec.js b/.github/browser-tests/conferences.spec.js new file mode 100644 index 00000000..8f4d3546 --- /dev/null +++ b/.github/browser-tests/conferences.spec.js @@ -0,0 +1,25 @@ +const { test, expect } = require("@playwright/test"); + +test("readers can browse from Upcoming to Past conferences", async ({ + page, + baseURL, +}) => { + // Keep the journey independent of analytics, fonts, and organizer websites. + await page.route("**/*", (route) => + route.request().url().startsWith(`${baseURL}/`) + ? route.continue() + : route.abort(), + ); + + await page.goto("/"); + await expect( + page.locator(".post-list").getByRole("link").first(), + ).toBeVisible(); + + await page.getByRole("link", { name: "Past", exact: true }).click(); + await expect(page).toHaveURL(/\/past\/$/); + await expect(page).toHaveTitle("Past Software Testing Conferences"); + await expect( + page.locator(".post-list").getByRole("link").first(), + ).toBeVisible(); +}); diff --git a/.github/browser-tests/package-lock.json b/.github/browser-tests/package-lock.json new file mode 100644 index 00000000..5c76c68a --- /dev/null +++ b/.github/browser-tests/package-lock.json @@ -0,0 +1,58 @@ +{ + "name": "tcorg-browser-tests", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "tcorg-browser-tests", + "devDependencies": { + "@playwright/test": "1.65.1" + } + }, + "node_modules/@playwright/test": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.65.1.tgz", + "integrity": "sha512-y+NCIRm2LvY4slUVWvGh1nujJ8RF/hEisIsq2mtUPgdQC4L701bq5hZGMhrpeXjACvwvO9tj5dJqhvM6TP9lbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz", + "integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + } + } +} diff --git a/.github/browser-tests/package.json b/.github/browser-tests/package.json new file mode 100644 index 00000000..1f76c7c0 --- /dev/null +++ b/.github/browser-tests/package.json @@ -0,0 +1,10 @@ +{ + "name": "tcorg-browser-tests", + "private": true, + "scripts": { + "test": "playwright test" + }, + "devDependencies": { + "@playwright/test": "1.65.1" + } +} diff --git a/.github/browser-tests/playwright.config.js b/.github/browser-tests/playwright.config.js new file mode 100644 index 00000000..03c16a30 --- /dev/null +++ b/.github/browser-tests/playwright.config.js @@ -0,0 +1,19 @@ +const path = require("node:path"); +const { defineConfig } = require("@playwright/test"); + +const baseURL = "http://127.0.0.1:4173"; + +module.exports = defineConfig({ + testDir: ".", + use: { + baseURL, + browserName: "chromium", + }, + webServer: { + command: + "bundle exec ruby -run -e httpd -- --bind-address=127.0.0.1 --port=4173 _site", + cwd: path.resolve(__dirname, "../.."), + url: baseURL, + timeout: 15_000, + }, +}); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6ba59bb..b10523c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,3 +33,15 @@ jobs: - name: Validate generated site run: bundle exec htmlproofer ./_site --disable-external --no-enforce-https --allow-missing-href --ignore-urls '/^\/\//' + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Run browser smoke test + working-directory: .github/browser-tests + run: | + npm ci + npx playwright install --with-deps --only-shell chromium + npm test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7034e9b..a2620057 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,21 @@ This is intentionally scoped to the files changed in a PR rather than a full rep - CSS/SCSS: use two-space indentation and keep related selectors grouped logically. - JavaScript: format with Prettier defaults and avoid unrelated refactors in the same change. -The main validation path remains the repo's existing checks: `ruby tools/validate_data.rb`, the valid-data tests, and the Jekyll/htmlproofer build. Additional linting tooling should only be added if it catches real issues without overhead or conflicts with the current workflow. +The main validation path uses `ruby tools/validate_data.rb`, `ruby test/validate_data_test.rb`, the Jekyll build, htmlproofer, and the browser smoke test below. Additional linting tooling should only be added if it catches real issues without overhead or conflicts with the current workflow. + +### Run the browser smoke test + +With the Ruby bundle installed and Node.js 22 available, run these commands from the repository root. + +```sh +bundle exec jekyll build +cd .github/browser-tests +npm ci +npx playwright install --only-shell chromium +npm test +``` + +Playwright serves the generated site on `127.0.0.1:4173`. Rebuild after editing site content. See [Risk coverage](ROADMAP.md#risk-coverage) for the checks and browser journeys. ## Community Guidelines diff --git a/ROADMAP.md b/ROADMAP.md index 120b92c6..f02279b4 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -29,6 +29,27 @@ The July 2026 readiness assessment found the repository ready for supervised con - [x] **Conference Data Validator**: Add a machine-checkable validator for `_data/current.yml`, `_data/past.yml`, and `_data/closed.yml` covering required fields, allowed fields, duplicate names, chronological ordering, URL tracking parameters, and `twitter` formatting. - [x] **PR Validation**: Add a pull request workflow that runs the conference data validator, Jekyll build, and htmlproofer before merge. +### Risk coverage + +| Risk | Primary check | Coverage | +| --- | --- | --- | +| Malformed YAML, missing required fields, or bad URL and handle formats | Validation | The Ruby validator checks the conference files and reports some legacy archive problems as warnings. | +| Duplicate listings or upcoming conferences in the wrong order | Validation | The validator warns on duplicate names and out-of-order parseable dates in the upcoming list. | +| Plausible but stale dates, locations, or CFP and registration statuses | Validation | Contributors verify these fields against official organizer sources during data review. | +| Liquid, Sass, or plugin failures prevent the site from being generated | Build | CI builds the site with Jekyll using the locked Ruby dependencies. | +| Published internal links, anchors, or asset paths break | Link checking | CI runs htmlproofer against the generated site. | +| Organizer, registration, or recording links stop working or point to the wrong event | Link checking | External requests are disabled in CI. Check the destination during data review and track recurring dead links under Link Integrity. | +| A valid build leaves a reader unable to find a listing, navigate the archive, find a recording, or use the newsletter form | Browser testing | CI covers archive navigation in Chromium. The other journeys below record the remaining browser coverage. | + +### Critical browser journeys + +| Journey | What the reader should be able to do | Coverage | +| --- | --- | --- | +| Find an upcoming conference | Open Upcoming, see an event name, dates, and location, and follow the event link to the organizer. | Planned | +| Browse past conferences | Start on Upcoming, click Past, and see linked entries on the archive page. | Chromium smoke test in CI | +| Find conference recordings | Click Videos, find a recent conference under its year, and follow its Watch Event Videos link. | Planned | +| Subscribe to the newsletter | Click Newsletter, find the labeled email and consent fields, and submit the form to the configured mailing-list endpoint. Intercept the submission in automation. | Planned | + ### Proposed implementation - Store one entry per released version in `_data/quality_log.yml`, with stable fields for `version`, `release_date`, `commit_sha`, Lighthouse scores, broken links, build time, and the workflow run URL.