Skip to content

Commit b1986a3

Browse files
committed
playwright: stop expecting git-scm.com to be the Rails app
Now that we are really close to switching over https://git-scm.com/ from the Rails app to the Hugo/Pagefind-generated static site, it is time to stop assuming that it is the former. Indeed, I have just changed the `deploy` workflow to ensure that the site works as expected when being deployed as `http://git-scm.com/`. So let's just change the `playwright` workflow to have another input that specifies whether the person triggering that workflow expects the URL to resolve to a Rails app variant of the site or not, and stop trying to determine that automatically. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent cd3b524 commit b1986a3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: .github/workflows/playwright.yml

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
description: 'URL to test'
77
required: true
88
default: 'https://git-scm.com'
9+
assume-rails-app:
10+
description: 'Whether the URL points to the original Rails app variant of the site'
11+
required: false
12+
default: 'false'
913
jobs:
1014
test:
1115
timeout-minutes: 60
@@ -20,6 +24,7 @@ jobs:
2024
- name: Run Playwright tests
2125
env:
2226
PLAYWRIGHT_TEST_URL: ${{ github.event.inputs.url }}
27+
PLAYWRIGHT_ASSUME_RAILS_APP: ${{ github.event.inputs.assume-rails-app }}
2328
run: npx playwright test --project=chrome
2429
- uses: actions/upload-artifact@v4
2530
if: always()

Diff for: tests/git-scm.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { test, expect, selectors } = require('@playwright/test')
33
const url = process.env.PLAYWRIGHT_TEST_URL
44
? process.env.PLAYWRIGHT_TEST_URL.replace(/[^/]$/, '$&/')
55
: 'https://git-scm.com/'
6-
const isRailsApp = url === 'https://git-scm.com/'
6+
const isRailsApp = process.env.PLAYWRIGHT_ASSUME_RAILS_APP === 'true'
77

88
// Whenever a test fails, attach a screenshot to diagnose failures better
99
test.afterEach(async ({ page }, testInfo) => {

0 commit comments

Comments
 (0)