Site: read the newest version from Gitea; links follow releases/latest [skip ci]
A worker answers /release.json from the Gitea API (Gitea sends no CORS headers, so the page cannot ask it directly). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
48306fcd16
commit
87c42fde0e
14 files changed
+76
-16
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { test as base } from "@playwright/test";
|
||||
|
||||
export { expect, type Page } from "@playwright/test";
|
||||
|
||||
export const VERSION = "9.9.9";
|
||||
|
||||
// Every page reads this version.
|
||||
export const test = base.extend<{ release: void }>({
|
||||
release: [
|
||||
async ({ context }, use) => {
|
||||
await context.route("**/release.json", (r) => r.fulfill({ json: { version: VERSION } }));
|
||||
await use();
|
||||
},
|
||||
{ auto: true },
|
||||
],
|
||||
});
|
||||
Reference in new issue
Block a user