@jskit-ai/shell-web 0.2.53 → 0.2.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/shell-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jskit test"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@jskit-ai/architecture-inspector": "0.1.34"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@jskit-ai/material-web": "0.1.
|
|
54
|
+
"@jskit-ai/material-web": "0.1.13",
|
|
55
55
|
"@vue/compiler-sfc": "3.5.44"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
@@ -124,23 +124,27 @@ test("a menu mounted while closed covers nothing, and still opens and closes wit
|
|
|
124
124
|
await items.evaluate((element) => Promise.all(element.closest(".v-overlay__content").getAnimations().map((animation) => animation.finished)));
|
|
125
125
|
|
|
126
126
|
// Frame by frame from Escape until the overlay is gone: its content animates out while the overlay is still drawn.
|
|
127
|
-
|
|
127
|
+
// The page takes the first frame before Escape is pressed: a sampler started beside the key press ran only after a
|
|
128
|
+
// second round trip, which the press overtook, and on a busy host found the menu already closed.
|
|
129
|
+
await items.evaluate((element) => {
|
|
128
130
|
const content = element.closest(".v-overlay__content");
|
|
129
131
|
const overlay = content.parentElement;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
globalThis.closingMenuFrames = (async () => {
|
|
133
|
+
const seen = [];
|
|
134
|
+
const started = performance.now();
|
|
135
|
+
while (performance.now() - started < 3000) {
|
|
136
|
+
const animating = content.getAnimations().some((animation) => animation.playState === "running");
|
|
137
|
+
seen.push({ overlay: getComputedStyle(overlay).display, content: content.style.display || "shown", animating });
|
|
138
|
+
if (seen.at(-1).overlay === "none") {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
137
142
|
}
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
return seen;
|
|
143
|
+
return seen;
|
|
144
|
+
})();
|
|
141
145
|
});
|
|
142
146
|
await page.keyboard.press("Escape");
|
|
143
|
-
const seen = await
|
|
147
|
+
const seen = await page.evaluate(() => globalThis.closingMenuFrames);
|
|
144
148
|
assert.ok(seen.some((frame) => frame.overlay !== "none" && frame.content === "shown" && frame.animating),
|
|
145
149
|
`the menu animates out while its overlay is drawn: ${JSON.stringify(seen.filter((_, index) => index % 4 === 0))}`);
|
|
146
150
|
assert.equal(seen.at(-1).overlay, "none", "once closed, the menu's overlay is gone again");
|