diff --git a/.github/browser-tests/.gitignore b/.github/browser-tests/.gitignore new file mode 100644 index 00000000..2ccbe465 --- /dev/null +++ b/.github/browser-tests/.gitignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/.github/browser-tests/conferences.test.mjs b/.github/browser-tests/conferences.test.mjs new file mode 100644 index 00000000..9b13da18 --- /dev/null +++ b/.github/browser-tests/conferences.test.mjs @@ -0,0 +1,44 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { browser } from "vibium"; + +const baseURL = "http://127.0.0.1:4174"; +const findOptions = { timeout: 5_000 }; + +test( + "readers can browse from Upcoming to Past conferences", + { timeout: 30_000 }, + async (t) => { + const session = await browser.start({ engine: "chrome", headless: true }); + t.after(() => session.stop()); + const page = await session.page(); + + // 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.go(`${baseURL}/`); + const firstListing = { css: ".post-list h2 a" }; + const upcoming = await page.find(firstListing, findOptions); + assert.ok( + await upcoming.isVisible(), + "An upcoming conference link should be visible", + ); + + const navigation = await page.findAll({ css: ".main-nav a" }, findOptions); + const past = navigation.find((link) => /^past$/i.test(link.info.text.trim())); + assert.ok(past, "The main Past link should be present"); + await past.click({ timeout: 5_000 }); + await page.waitForURL(`${baseURL}/past/`, findOptions); + assert.equal(await page.title(), "Past Software Testing Conferences"); + + const archived = await page.find(firstListing, findOptions); + assert.ok( + await archived.isVisible(), + "An archived conference link should be visible", + ); + }, +); diff --git a/.github/browser-tests/package-lock.json b/.github/browser-tests/package-lock.json new file mode 100644 index 00000000..afba5c17 --- /dev/null +++ b/.github/browser-tests/package-lock.json @@ -0,0 +1,144 @@ +{ + "name": "tcorg-browser-tests", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "tcorg-browser-tests", + "devDependencies": { + "vibium": "26.11.16" + } + }, + "node_modules/@vibium/darwin-arm64": { + "version": "26.11.16", + "resolved": "https://registry.npmjs.org/@vibium/darwin-arm64/-/darwin-arm64-26.11.16.tgz", + "integrity": "sha512-vAs7Xl/YPbiM1lJXboQ+LUzjKUarcuORN5nq07a2QCW/cVviPQR3kehFQDMBbdTDcCzpoMYHV0AW1HvVImMotA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@vibium/darwin-x64": { + "version": "26.11.16", + "resolved": "https://registry.npmjs.org/@vibium/darwin-x64/-/darwin-x64-26.11.16.tgz", + "integrity": "sha512-DWkVM24bPBZIg+GchEScf9u3qZdA1bbZgDatE/qJmUOKmTn1FGDhGoLRZ+T3Yz5/lW9olG0WjWFxqurilTlp4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@vibium/linux-arm64": { + "version": "26.11.16", + "resolved": "https://registry.npmjs.org/@vibium/linux-arm64/-/linux-arm64-26.11.16.tgz", + "integrity": "sha512-FkdU8qk2bRUNgNKUpufocsz4b5NeCLx0IBGy1HT2HYCoOOMQnjTaCdUmuIp/4LHd9Jggj7aKD5g2p4rpSrZBZA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@vibium/linux-x64": { + "version": "26.11.16", + "resolved": "https://registry.npmjs.org/@vibium/linux-x64/-/linux-x64-26.11.16.tgz", + "integrity": "sha512-UEeOJ3rFeV92G7B/+bfPALn9DcmpoJApQqIeOsauNAj86n338ODvAyx1fhYJZ1Y6gB/DyGswECjjRvw1reZv1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@vibium/win32-x64": { + "version": "26.11.16", + "resolved": "https://registry.npmjs.org/@vibium/win32-x64/-/win32-x64-26.11.16.tgz", + "integrity": "sha512-yxD8QDD2h1F2Fp3VHIFSwu/Y7lAC5x8UQfle6XVwyraCmGwHxEsOg6rhBgcYkOVSO4qY5RWE4K607rtp2cjDNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vibium": { + "version": "26.11.16", + "resolved": "https://registry.npmjs.org/vibium/-/vibium-26.11.16.tgz", + "integrity": "sha512-5G0RhvLy5/mV/+ZQYC9xDkhRePf4IcQLqMjE/7tpOiF3f/Wjd6wJpuOsocoWDNEv7HjQjFbirX6VdUJsuntDrQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "ws": "^8.18.3" + }, + "bin": { + "vibium": "bin/cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@vibium/darwin-arm64": "26.11.16", + "@vibium/darwin-x64": "26.11.16", + "@vibium/linux-arm64": "26.11.16", + "@vibium/linux-x64": "26.11.16", + "@vibium/win32-x64": "26.11.16" + } + }, + "node_modules/ws": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.0.tgz", + "integrity": "sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/.github/browser-tests/package.json b/.github/browser-tests/package.json new file mode 100644 index 00000000..b1667167 --- /dev/null +++ b/.github/browser-tests/package.json @@ -0,0 +1,10 @@ +{ + "name": "tcorg-browser-tests", + "private": true, + "scripts": { + "test": "bash ./test.sh" + }, + "devDependencies": { + "vibium": "26.11.16" + } +} diff --git a/.github/browser-tests/test.sh b/.github/browser-tests/test.sh new file mode 100644 index 00000000..1e963697 --- /dev/null +++ b/.github/browser-tests/test.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -eu + +cd "$(dirname "$0")/../.." +if [ ! -f _site/index.html ]; then + echo "Run bundle exec jekyll build before the browser test." >&2 + exit 1 +fi + +bundle exec ruby -run -e httpd -- --bind-address=127.0.0.1 --port=4174 _site & +server_pid=$! +trap 'kill "$server_pid" 2>/dev/null || true; wait "$server_pid" 2>/dev/null || true' EXIT + +if ! curl --fail --silent --retry 5 --retry-connrefused --max-time 2 \ + http://127.0.0.1:4174/ >/dev/null || ! kill -0 "$server_pid"; then + echo "Could not start the test site on 127.0.0.1:4174." >&2 + exit 1 +fi +VIBIUM_LOAD_AI_ENV=0 node --test .github/browser-tests/conferences.test.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6ba59bb..2a359ea0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,3 +33,24 @@ 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 Vibium browser smoke test + working-directory: .github/browser-tests + run: | + VIBIUM_SKIP_BROWSER_DOWNLOAD=1 npm ci + npx vibium install + # Let this Chrome binary create the user namespace it needs for its sandbox. + chrome_path=$(npx vibium paths --json | jq -er '.result.chrome') + sudo apparmor_parser -r <, + include + profile tcorg-vibium-chrome "$chrome_path" flags=(unconfined) { + userns, + } + EOF + npm test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7034e9b..7a929321 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,23 @@ 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 +VIBIUM_SKIP_BROWSER_DOWNLOAD=1 npm ci +npx vibium install +npm test +``` + +The test uses Vibium to drive headless Chrome for Testing. Its runner serves the generated site on `127.0.0.1:4174`. Rebuild after editing site content. See [Risk coverage](ROADMAP.md#risk-coverage) for the checks and browser journeys. + +The npm lockfile records the Vibium version for reproducing results. See the [Vibium releases](https://github.com/VibiumDev/vibium/releases) and [upstream contributing guide](https://github.com/VibiumDev/vibium/blob/main/CONTRIBUTING.md). ## Community Guidelines diff --git a/ROADMAP.md b/ROADMAP.md index 120b92c6..53e8a330 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 Chrome for Testing with Vibium. 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. | Vibium 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.