test: wait for theme transitions before comparing glass styles
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

The Linux full suite sampled a window-control color during its transition. Wait for CSS transitions to finish while retaining exact style, contrast, geometry, and native interaction assertions.
This commit is contained in:
mesalogo
2026-10-01 00:48:35 +08:00
parent cc451f698d
commit 8201c9c27e
3 changed files with 15 additions and 1 deletions
+4 -1
View File
@@ -33,7 +33,7 @@ app.whenReady().then(async () => {
let off
for (const state of [null, 'true', null, 'false']) {
const label = `${theme}/${state ?? 'absent'}`
const result = await win.webContents.executeJavaScript(`(() => {
const result = await win.webContents.executeJavaScript(`(async () => {
document.documentElement.dataset.theme = ${JSON.stringify(theme)};
const shell = document.querySelector('.app-shell');
const state = ${JSON.stringify(state)};
@@ -41,6 +41,9 @@ app.whenReady().then(async () => {
if (state === null) node.removeAttribute('data-frosted-glass');
else node.dataset.frostedGlass = state;
}
await Promise.all(document.getAnimations()
.filter(animation => animation instanceof CSSTransition)
.map(animation => animation.finished));
const panel = document.querySelector('.runtime-checklist__content');
if (shell.contains(panel) || !panel.closest('.floating-portal').matches(':popover-open'))
throw new Error('Checklist must render outside app-shell in the top layer');