waygraph 0.15.46 → 0.15.47
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/dist/pilot-overlay/fixtures.js +14 -34
- package/dist/runner/inpage/banner.d.ts +13 -0
- package/dist/runner/inpage/banner.js +2 -2
- package/examples/saucedemo/.waygraph-auto/02f7dd22.log +20 -0
- package/examples/saucedemo/.waygraph-auto/1c58a174.log +0 -0
- package/examples/saucedemo/.waygraph-auto/41e6feae.log +0 -0
- package/examples/saucedemo/.waygraph-auto/61333142.log +5 -0
- package/examples/saucedemo/.waygraph-auto/61937e83.log +22 -0
- package/examples/saucedemo/.waygraph-auto/8d960d31.log +1 -0
- package/examples/saucedemo/.waygraph-auto/ae3a9b06.log +0 -0
- package/examples/saucedemo/.waygraph-auto/ded5511a.log +6 -0
- package/package.json +1 -1
|
@@ -104,37 +104,21 @@ export async function showPilotFixtures(page, fixtures) {
|
|
|
104
104
|
const bannerPos = fixtures.clear ? undefined : fixtures.titlePos;
|
|
105
105
|
const bannerHidden = !!fixtures.clear || !!fixtures.bannerUi?.hidden;
|
|
106
106
|
const bannerCollision = fixtures.bannerUi?.collision !== false;
|
|
107
|
+
// Same #wg-banner installer the demo runner uses (runner/inpage/banner.js) - not a separate
|
|
108
|
+
// re-implementation. `tag: "waygraph pilot"` is the only Pilot-specific bit.
|
|
109
|
+
if (bannerTitle !== undefined || bannerHidden) {
|
|
110
|
+
const { installBanner } = await import("../runner/inpage/banner.js");
|
|
111
|
+
await page
|
|
112
|
+
.evaluate(installBanner, {
|
|
113
|
+
title: bannerTitle,
|
|
114
|
+
bannerPos: bannerPos || "left",
|
|
115
|
+
bannerUi: { hidden: bannerHidden, collision: bannerCollision, ...(bannerPos ? { pos: bannerPos } : {}) },
|
|
116
|
+
tag: "waygraph pilot",
|
|
117
|
+
})
|
|
118
|
+
.catch(() => { });
|
|
119
|
+
}
|
|
107
120
|
return page
|
|
108
|
-
.evaluate(({ rings, todoGroups, todoPos, holdMs, zoom, zoomSelector, zoomOut, clearAll, todoUi,
|
|
109
|
-
// Same #wg-banner element/CSS the demo runner paints (ui/css/banner.css, already in the
|
|
110
|
-
// shared bundle) - so ctx.title / ctx.titlePos / ctx.bannerUi behave identically on a Pilot
|
|
111
|
-
// session, not a separate re-implementation.
|
|
112
|
-
if (bannerHidden) {
|
|
113
|
-
const b = __wgById("wg-banner");
|
|
114
|
-
if (b)
|
|
115
|
-
b.style.display = "none";
|
|
116
|
-
}
|
|
117
|
-
else if (bannerTitle) {
|
|
118
|
-
let banner = __wgById("wg-banner");
|
|
119
|
-
if (!banner) {
|
|
120
|
-
banner = document.createElement("div");
|
|
121
|
-
banner.id = "wg-banner";
|
|
122
|
-
const tag = document.createElement("span");
|
|
123
|
-
tag.className = "wg-banner-tag";
|
|
124
|
-
tag.textContent = "waygraph pilot";
|
|
125
|
-
const text = document.createElement("span");
|
|
126
|
-
text.className = "wg-banner-text";
|
|
127
|
-
banner.appendChild(tag);
|
|
128
|
-
banner.appendChild(text);
|
|
129
|
-
__wgAdd(banner);
|
|
130
|
-
}
|
|
131
|
-
banner.style.display = "";
|
|
132
|
-
banner.dataset.pos = bannerPos || banner.dataset.pos || "left";
|
|
133
|
-
banner.dataset.collision = bannerCollision ? "1" : "0";
|
|
134
|
-
const textEl = banner.querySelector(".wg-banner-text");
|
|
135
|
-
if (textEl)
|
|
136
|
-
textEl.textContent = bannerTitle;
|
|
137
|
-
}
|
|
121
|
+
.evaluate(({ rings, todoGroups, todoPos, holdMs, zoom, zoomSelector, zoomOut, clearAll, todoUi, }) => {
|
|
138
122
|
const w = window;
|
|
139
123
|
if (w.__wgPilotFxHideTimer)
|
|
140
124
|
clearTimeout(w.__wgPilotFxHideTimer);
|
|
@@ -346,10 +330,6 @@ export async function showPilotFixtures(page, fixtures) {
|
|
|
346
330
|
zoomOut,
|
|
347
331
|
clearAll: fixtures.clear === true,
|
|
348
332
|
todoUi,
|
|
349
|
-
bannerTitle,
|
|
350
|
-
bannerPos,
|
|
351
|
-
bannerHidden,
|
|
352
|
-
bannerCollision,
|
|
353
333
|
})
|
|
354
334
|
.catch(() => ({ painted: 0, missing: rings.map((r) => r.selector) }));
|
|
355
335
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** In-page installer (page.evaluate target) - see banner.js's own header. Creates/updates #wg-banner
|
|
2
|
+
* (click-to-move position, localStorage-persisted, authored titlePos/bannerUi support). `tag`
|
|
3
|
+
* overrides the small caption above the title (default "waygraph demo"). */
|
|
4
|
+
export function installBanner(args: {
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
favicon?: string | undefined;
|
|
7
|
+
bannerPos?: string | undefined;
|
|
8
|
+
todoPos?: string | undefined;
|
|
9
|
+
envAutoplay?: boolean | undefined;
|
|
10
|
+
todoDockUi?: unknown;
|
|
11
|
+
bannerUi?: { hidden?: boolean | undefined; collision?: boolean | undefined; pos?: string | undefined } | undefined;
|
|
12
|
+
tag?: string | undefined;
|
|
13
|
+
}): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// In-page installer (runs inside the browser via page.evaluate): must stay self-contained - no module-scope closure.
|
|
2
2
|
// Split out of the former single installOverlay evaluate (see src/ARCHITECTURE.md). Shares state only via window.__wg*.
|
|
3
3
|
/* eslint-disable no-unused-vars */
|
|
4
|
-
export function installBanner({ title, favicon, bannerPos, todoPos, envAutoplay, todoDockUi, bannerUi }) {
|
|
4
|
+
export function installBanner({ title, favicon, bannerPos, todoPos, envAutoplay, todoDockUi, bannerUi, tag: bannerTag }) {
|
|
5
5
|
const POSITIONS = ["left", "center", "right"];
|
|
6
6
|
const applyPos = (el, pos) => {
|
|
7
7
|
el.dataset.pos = pos;
|
|
@@ -34,7 +34,7 @@ export function installBanner({ title, favicon, bannerPos, todoPos, envAutoplay,
|
|
|
34
34
|
});
|
|
35
35
|
const tag = document.createElement("span");
|
|
36
36
|
tag.className = "wg-banner-tag";
|
|
37
|
-
tag.textContent = "waygraph demo";
|
|
37
|
+
tag.textContent = bannerTag || "waygraph demo";
|
|
38
38
|
const text = document.createElement("span");
|
|
39
39
|
text.className = "wg-banner-text";
|
|
40
40
|
text.textContent = title;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[13:39:10.711] waygraph pilot: stub.before ctx.title("Signing in · mobile")
|
|
2
|
+
[13:39:10.717] waygraph pilot: stub.before ctx.todos n=6 index=0
|
|
3
|
+
[13:39:10.719] waygraph pilot: stub.before ctx.device(mobile)
|
|
4
|
+
[13:39:10.719] waygraph pilot: stub.before ctx.zoom(1.35)
|
|
5
|
+
[13:39:10.719] waygraph pilot: stub.before ring #user-name tone=info label="Username"
|
|
6
|
+
[13:39:11.863] waygraph pilot: stub.after ctx.todos n=6 index=1
|
|
7
|
+
[13:39:13.470] waygraph pilot: stub.before ring #password tone=planned label="Password"
|
|
8
|
+
[13:39:13.668] waygraph pilot: stub.after ctx.todos n=6 index=2
|
|
9
|
+
[13:39:15.550] waygraph pilot: stub.before ring #login-button tone=warning label="Login"
|
|
10
|
+
[13:39:15.936] waygraph pilot: stub.after ctx.title("Inventory · landscape")
|
|
11
|
+
[13:39:15.936] waygraph pilot: stub.after ctx.todos n=6 index=3
|
|
12
|
+
[13:39:15.936] waygraph pilot: stub.after ctx.device(mobile)
|
|
13
|
+
[13:39:15.936] waygraph pilot: stub.after ring .inventory_list tone=success label="Product shelf"
|
|
14
|
+
[13:39:20.251] waygraph pilot: stub.before ctx.title("Open cart · landscape")
|
|
15
|
+
[13:39:20.252] waygraph pilot: stub.before ctx.todos n=6 index=5
|
|
16
|
+
[13:39:20.252] waygraph pilot: stub.before ctx.device(mobile)
|
|
17
|
+
[13:39:20.252] waygraph pilot: stub.before ctx.zoom(1.4)
|
|
18
|
+
[13:39:20.252] waygraph pilot: stub.before ring .shopping_cart_link tone=planned label="Cart"
|
|
19
|
+
[13:39:20.880] waygraph pilot: stub.after ctx.title("Your cart · desktop")
|
|
20
|
+
[13:39:20.880] waygraph pilot: stub.after ring .cart_item tone=success label="Cart items"
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
[13:38:59.878] waygraph pilot: highlight ctx.todos n=3 index=0
|
|
2
|
+
[13:38:59.879] waygraph pilot: highlight ring #user-name tone=planned label="Username"
|
|
3
|
+
[13:38:59.879] waygraph pilot: highlight ring #password tone=info label="Password"
|
|
4
|
+
[13:39:04.334] waygraph pilot: highlight ring #no-such-element-waygraph tone=danger label="Gone"
|
|
5
|
+
[13:39:07.137] waygraph pilot: highlight ring #login-button tone=success label="Login"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[13:39:08.704] waygraph pilot: stub.before ctx.title("Signing in · mobile")
|
|
2
|
+
[13:39:08.704] waygraph pilot: stub.before ctx.todos n=6 index=0
|
|
3
|
+
[13:39:08.704] waygraph pilot: stub.before ctx.device(mobile)
|
|
4
|
+
[13:39:08.704] waygraph pilot: stub.before ctx.zoom(1.35)
|
|
5
|
+
[13:39:08.704] waygraph pilot: stub.before ring #user-name tone=info label="Username"
|
|
6
|
+
[13:39:10.099] waygraph pilot: stub.after ctx.todos n=6 index=1
|
|
7
|
+
[13:39:12.713] waygraph pilot: stub.before ring #password tone=planned label="Password"
|
|
8
|
+
[13:39:12.931] waygraph pilot: stub.after ctx.todos n=6 index=2
|
|
9
|
+
[13:39:16.082] waygraph pilot: stub.before ring #login-button tone=warning label="Login"
|
|
10
|
+
[13:39:16.398] waygraph pilot: stub.after ctx.title("Inventory · landscape")
|
|
11
|
+
[13:39:16.398] waygraph pilot: stub.after ctx.todos n=6 index=3
|
|
12
|
+
[13:39:16.398] waygraph pilot: stub.after ctx.device(mobile)
|
|
13
|
+
[13:39:16.398] waygraph pilot: stub.after ring .inventory_list tone=success label="Product shelf"
|
|
14
|
+
[13:39:23.208] waygraph pilot: stub.before ctx.title("Pick a product · tablet")
|
|
15
|
+
[13:39:23.209] waygraph pilot: stub.before ctx.todos n=6 index=3
|
|
16
|
+
[13:39:23.209] waygraph pilot: stub.before ctx.device(tablet)
|
|
17
|
+
[13:39:23.209] waygraph pilot: stub.before ctx.zoom(1.35)
|
|
18
|
+
[13:39:23.209] waygraph pilot: stub.before ring div.inventory_item:has(button[data-test="add-to-cart-sauce-labs-backpack"], button[data-test="remove-sauce-labs-backpack"]) .inventory_item_name tone=info label="Sauce Labs Backpack"
|
|
19
|
+
[13:39:23.209] waygraph pilot: stub.before ring [data-test="add-to-cart-sauce-labs-backpack"] tone=success label="Add to cart"
|
|
20
|
+
[13:39:24.455] waygraph pilot: stub.after ctx.title("In the cart")
|
|
21
|
+
[13:39:24.456] waygraph pilot: stub.after ctx.todos n=6 index=4
|
|
22
|
+
[13:39:24.456] waygraph pilot: stub.after ring .shopping_cart_badge tone=success label="Cart badge"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[13:38:18.838] waygraph pilot: highlight ctx.title("Pilot demo") pos=right
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[13:39:57.044] waygraph pilot: stub.before ctx.title("Signing in · mobile")
|
|
2
|
+
[13:39:57.044] waygraph pilot: stub.before ctx.todos n=6 index=0
|
|
3
|
+
[13:39:57.045] waygraph pilot: stub.before ctx.device(mobile)
|
|
4
|
+
[13:39:57.045] waygraph pilot: stub.before ctx.zoom(1.35)
|
|
5
|
+
[13:39:57.045] waygraph pilot: stub.before ring #user-name tone=info label="Username"
|
|
6
|
+
[13:39:58.588] waygraph pilot: stub.after ctx.todos n=6 index=1
|