Skip to content

Commit aac7136

Browse files
committed
Update build workflows and improve documentation
1 parent caf9da8 commit aac7136

10 files changed

Lines changed: 44 additions & 148 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: "18"
19+
node-version: "24"
2020
cache: npm
2121
cache-dependency-path: ./package-lock.json
2222

.github/workflows/cf_pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
npm_config_legacy_peer_deps: "true"
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525
with:
2626
fetch-depth: 0
2727

2828
- name: Setup Node
29-
uses: actions/setup-node@v4
29+
uses: actions/setup-node@v6
3030
with:
31-
node-version: "22"
31+
node-version: "24"
3232
cache: npm
3333
cache-dependency-path: ./package-lock.json
3434

src/content/docs/404.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "404"
3+
pagefind: false
4+
editUrl: false
5+
---
6+
7+
The page you requested was not found.
8+
9+
Return to the [overview](/vtbag/).

src/content/docs/tips/css.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,5 +189,5 @@ Same hold for the auto-generated view transition name example: it works for all
189189
## Conclusion
190190
I'm still exploring paths and alternatives but this would be my current recommendations:
191191
1. For complex pages, ensuring the uniqueness of view transition names might be easier if you assign them dynamically in the browser using JavaScript, or in a page global action on the server.
192-
2. Placing your view transition animation definitions in a global CSS file can be a good approach. This ensures that both the old and new pages use the same definitions, so you do not have to worry about where to put them. Just make sure your keyframe and view transition names are either globally unique or intentionally the same.
192+
2. Placing your view transition animation definitions in a global CSS file can be a good approach. This ensures that both the old and new pages use the same definitions, so you do not have to worry about where to put them. Just make sure your keyframe and view transition names are either globally unique or intentionally the same. Just make sure that the @view-transition at-rule occurs in the first few bytes of the CSS file. Otherwise the browser might ignore it.
193193
3. Utilizing [view transition classes and types](/basics/styling/#with-classes) can help decouple usage from definitions, making your code more flexible."

src/pages/auto/Auto1.astro

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/pages/auto/Auto2.astro

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/pages/auto/_Layout.astro

Lines changed: 0 additions & 77 deletions
This file was deleted.

tests/00_tmp.spec.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/01_crossing.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ test.describe("vtbot", () => {
101101
await page.reload();
102102
expect(await page.locator("#p").getAttribute("style")).toBe("color: red");
103103
});
104-
test("astro integration (ott)", async ({ page }) => {
104+
test("astro integration (ott)", async ({ page, browserName }) => {
105+
test.skip(browserName === 'firefox', 'Skipped in Firefox');
105106
await page.goto('http://localhost:4321/tests/x/');
106107
expect(await page.locator("iframe").contentFrame().locator("head title").textContent()).toBe("Test X");
107108
});

tests/02_chamber.spec.ts

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ import { test, expect, type Page } from '@playwright/test';
33
test.skip(({ browserName }) => browserName === 'firefox', 'Skip on Firefox');
44

55

6+
async function openClose(page: Page) {
7+
const app = page.locator('#bar-container > button[data-app-id="vtbot"]');
8+
await expect(app).toBeVisible();
9+
await app.click();
10+
}
11+
async function toolbarAction(page: Page, status: string) {
12+
await openClose(page);
13+
const button = page.locator('#inspection-chamber-button button');
14+
await expect(button).toBeVisible();
15+
await expect(page.locator("#inspection-chamber-status")).toContainText(status);
16+
return button;
17+
}
18+
619
test('has title', async ({ page }) => {
720
await page.goto('http://localhost:4321/inspection-chamber-demo/first-page/');
821
await expect(page).toHaveTitle('🔬 Inspection Chamber Demo | @vtbag');
922
});
1023

1124
test.describe("devToolbar", () => {
12-
async function openClose(page: Page) {
13-
const app = page.locator('#bar-container > button[data-app-id="vtbot"]');
14-
await expect(app).toBeVisible();
15-
await app.click();
16-
}
17-
async function toolbarAction(page: Page, status: string) {
18-
await openClose(page);
19-
const button = page.locator('#inspection-chamber-button button');
20-
await expect(button).toBeVisible();
21-
await expect(page.locator("#inspection-chamber-status")).toContainText(status);
22-
return button;
23-
}
24-
2525
test('can open and close', async ({ page }) => {
2626
await page.goto('http://localhost:4321/');
2727
await expect(page.locator('#inspection-chamber-button')).toBeHidden();
@@ -69,6 +69,11 @@ test.describe("controls", () => {
6969
test('can close', async ({ page }) => {
7070
await page.goto('http://localhost:4321/demo/BasicS/');
7171

72+
let button = await toolbarAction(page, "There is an Inspection Chamber here");
73+
await button.click();
74+
await expect(page.locator('#vtbag-ui-panel')).toBeVisible();
75+
await page.click('#vtbag-ui-standby');
76+
7277
await expect(page.locator('#vtbag-ui-reopen')).toBeVisible();
7378
await page.click('#vtbag-ui-reopen');
7479
await expect(page.locator('#vtbag-ui-reopen')).toBeHidden();
@@ -80,6 +85,11 @@ test.describe("controls", () => {
8085
test('can reopen', async ({ page }) => {
8186
await page.goto('http://localhost:4321/demo/BasicS/');
8287

88+
let button = await toolbarAction(page, "There is an Inspection Chamber here");
89+
await button.click();
90+
await expect(page.locator('#vtbag-ui-panel')).toBeVisible();
91+
await page.click('#vtbag-ui-standby');
92+
8393
await expect(page.locator('#vtbag-ui-panel')).toBeHidden();
8494
await page.click('#vtbag-ui-reopen');
8595
await expect(page.locator('#vtbag-ui-reopen')).toBeHidden();
@@ -89,6 +99,11 @@ test.describe("controls", () => {
8999

90100
test('can really reopen', async ({ page }) => {
91101
await page.goto('http://localhost:4321/demo/BasicC1/');
102+
103+
let button = await toolbarAction(page, "There is an Inspection Chamber here");
104+
await button.click();
105+
await expect(page.locator('#vtbag-ui-panel')).toBeVisible();
106+
await page.click('#vtbag-ui-standby');
92107

93108
await expect(page.locator('#vtbag-ui-panel')).toBeHidden();
94109
await page.click(".right");

0 commit comments

Comments
 (0)