@jskit-ai/shell-web 0.1.120 → 0.1.123
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.descriptor.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Object.freeze({
|
|
2
2
|
packageVersion: 1,
|
|
3
3
|
packageId: "@jskit-ai/shell-web",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.123",
|
|
5
5
|
kind: "runtime",
|
|
6
6
|
description: "Web shell layout runtime with outlet-based placement contributions.",
|
|
7
7
|
dependsOn: [],
|
|
@@ -311,9 +311,11 @@ export default Object.freeze({
|
|
|
311
311
|
dependencies: {
|
|
312
312
|
runtime: {
|
|
313
313
|
"@mdi/js": "^7.4.47",
|
|
314
|
-
"@jskit-ai/kernel": "0.1.
|
|
314
|
+
"@jskit-ai/kernel": "0.1.122"
|
|
315
315
|
},
|
|
316
|
-
dev: {
|
|
316
|
+
dev: {
|
|
317
|
+
"@playwright/test": "1.61.1"
|
|
318
|
+
}
|
|
317
319
|
},
|
|
318
320
|
packageJson: {
|
|
319
321
|
scripts: {
|
|
@@ -456,7 +458,11 @@ export default Object.freeze({
|
|
|
456
458
|
expectedExistingFrom: "templates/expected-existing/src/pages/home.vue",
|
|
457
459
|
reason: "Install shell-driven home wrapper page.",
|
|
458
460
|
category: "shell-web",
|
|
459
|
-
id: "shell-web-page-home-wrapper"
|
|
461
|
+
id: "shell-web-page-home-wrapper",
|
|
462
|
+
when: {
|
|
463
|
+
config: "surfaceDefinitions.home.enabled",
|
|
464
|
+
equals: "true"
|
|
465
|
+
}
|
|
460
466
|
},
|
|
461
467
|
{
|
|
462
468
|
from: "templates/src/pages/home/index.vue",
|
|
@@ -466,7 +472,11 @@ export default Object.freeze({
|
|
|
466
472
|
expectedExistingFrom: "templates/expected-existing/src/pages/home/index.vue",
|
|
467
473
|
reason: "Install shell-driven home surface starter page.",
|
|
468
474
|
category: "shell-web",
|
|
469
|
-
id: "shell-web-page-home"
|
|
475
|
+
id: "shell-web-page-home",
|
|
476
|
+
when: {
|
|
477
|
+
config: "surfaceDefinitions.home.enabled",
|
|
478
|
+
equals: "true"
|
|
479
|
+
}
|
|
470
480
|
},
|
|
471
481
|
{
|
|
472
482
|
from: "templates/src/pages/home/settings.vue",
|
|
@@ -475,7 +485,11 @@ export default Object.freeze({
|
|
|
475
485
|
ownership: "app",
|
|
476
486
|
reason: "Install shell-driven home settings shell route with section navigation.",
|
|
477
487
|
category: "shell-web",
|
|
478
|
-
id: "shell-web-page-home-settings-shell"
|
|
488
|
+
id: "shell-web-page-home-settings-shell",
|
|
489
|
+
when: {
|
|
490
|
+
config: "surfaceDefinitions.home.enabled",
|
|
491
|
+
equals: "true"
|
|
492
|
+
}
|
|
479
493
|
},
|
|
480
494
|
{
|
|
481
495
|
from: "templates/src/pages/home/settings/index.vue",
|
|
@@ -484,7 +498,11 @@ export default Object.freeze({
|
|
|
484
498
|
ownership: "app",
|
|
485
499
|
reason: "Install shell-driven home settings redirect so the starter settings shell lands on a real child page.",
|
|
486
500
|
category: "shell-web",
|
|
487
|
-
id: "shell-web-page-home-settings"
|
|
501
|
+
id: "shell-web-page-home-settings",
|
|
502
|
+
when: {
|
|
503
|
+
config: "surfaceDefinitions.home.enabled",
|
|
504
|
+
equals: "true"
|
|
505
|
+
}
|
|
488
506
|
},
|
|
489
507
|
{
|
|
490
508
|
from: "templates/src/pages/home/settings/general/index.vue",
|
|
@@ -493,7 +511,11 @@ export default Object.freeze({
|
|
|
493
511
|
ownership: "app",
|
|
494
512
|
reason: "Install shell-driven general settings child page with a tiny browser-local shell preference example.",
|
|
495
513
|
category: "shell-web",
|
|
496
|
-
id: "shell-web-page-home-settings-general"
|
|
514
|
+
id: "shell-web-page-home-settings-general",
|
|
515
|
+
when: {
|
|
516
|
+
config: "surfaceDefinitions.home.enabled",
|
|
517
|
+
equals: "true"
|
|
518
|
+
}
|
|
497
519
|
},
|
|
498
520
|
{
|
|
499
521
|
from: "templates/tests/e2e/adaptive-shell.spec.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/shell-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.123",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@mdi/js": "^7.4.47",
|
|
31
|
-
"@jskit-ai/kernel": "0.1.
|
|
31
|
+
"@jskit-ai/kernel": "0.1.122"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"pinia": "^3.0.4",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const DEFAULT_BASE_URL = String(process.env.PLAYWRIGHT_BASE_URL || "http://127.0.0.1:5173").replace(/\/+$/u, "");
|
|
2
1
|
const DEFAULT_SMOKE_PATH = String(process.env.JSKIT_PLAYWRIGHT_SMOKE_PATH || "/home");
|
|
3
2
|
const DEFAULT_VIEWPORTS = Object.freeze([
|
|
4
3
|
Object.freeze({ name: "compact", width: 390, height: 844 }),
|
|
@@ -72,7 +71,6 @@ async function isElementVisibleInViewport(page, testId) {
|
|
|
72
71
|
function runAdaptiveShellSmoke({
|
|
73
72
|
test,
|
|
74
73
|
expect,
|
|
75
|
-
baseUrl = DEFAULT_BASE_URL,
|
|
76
74
|
smokePath = DEFAULT_SMOKE_PATH,
|
|
77
75
|
viewports = DEFAULT_VIEWPORTS
|
|
78
76
|
} = {}) {
|
|
@@ -84,7 +82,7 @@ function runAdaptiveShellSmoke({
|
|
|
84
82
|
for (const viewport of viewports) {
|
|
85
83
|
test(`${viewport.name} layout has reachable navigation and no horizontal overflow`, async ({ page }) => {
|
|
86
84
|
await page.setViewportSize({ width: viewport.width, height: viewport.height });
|
|
87
|
-
await page.goto(
|
|
85
|
+
await page.goto(smokePath);
|
|
88
86
|
await expect(page.locator("body")).toBeVisible();
|
|
89
87
|
await expectGeneratedScreenContract(page, expect);
|
|
90
88
|
await expectNoHorizontalOverflow(page, expect);
|
|
@@ -34,7 +34,11 @@ test("shell-web claims starter shell files as app-owned scaffolds", () => {
|
|
|
34
34
|
expectedExistingFrom: "templates/expected-existing/src/pages/home.vue",
|
|
35
35
|
reason: "Install shell-driven home wrapper page.",
|
|
36
36
|
category: "shell-web",
|
|
37
|
-
id: "shell-web-page-home-wrapper"
|
|
37
|
+
id: "shell-web-page-home-wrapper",
|
|
38
|
+
when: {
|
|
39
|
+
config: "surfaceDefinitions.home.enabled",
|
|
40
|
+
equals: "true"
|
|
41
|
+
}
|
|
38
42
|
});
|
|
39
43
|
assert.deepEqual(findFileMutation("shell-web-page-home"), {
|
|
40
44
|
from: "templates/src/pages/home/index.vue",
|
|
@@ -44,7 +48,11 @@ test("shell-web claims starter shell files as app-owned scaffolds", () => {
|
|
|
44
48
|
expectedExistingFrom: "templates/expected-existing/src/pages/home/index.vue",
|
|
45
49
|
reason: "Install shell-driven home surface starter page.",
|
|
46
50
|
category: "shell-web",
|
|
47
|
-
id: "shell-web-page-home"
|
|
51
|
+
id: "shell-web-page-home",
|
|
52
|
+
when: {
|
|
53
|
+
config: "surfaceDefinitions.home.enabled",
|
|
54
|
+
equals: "true"
|
|
55
|
+
}
|
|
48
56
|
});
|
|
49
57
|
});
|
|
50
58
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import test from "node:test";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
|
|
9
|
+
test("shell-web owns the exact Playwright dependency used by its generated smoke", async () => {
|
|
10
|
+
const descriptor = (await import(`${path.join(PACKAGE_ROOT, "package.descriptor.mjs")}?test=${Date.now()}`)).default;
|
|
11
|
+
const rootPackage = JSON.parse(await readFile(path.resolve(PACKAGE_ROOT, "../../package.json"), "utf8"));
|
|
12
|
+
|
|
13
|
+
assert.equal(descriptor.mutations.dependencies.dev["@playwright/test"], "1.61.1");
|
|
14
|
+
assert.equal(
|
|
15
|
+
descriptor.mutations.dependencies.dev["@playwright/test"],
|
|
16
|
+
rootPackage.devDependencies["@playwright/test"]
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test("adaptive shell smoke navigates through Playwright baseURL", async () => {
|
|
21
|
+
const source = await readFile(path.join(PACKAGE_ROOT, "src/test/adaptiveShellSmoke.js"), "utf8");
|
|
22
|
+
|
|
23
|
+
assert.match(source, /page\.goto\(smokePath\)/u);
|
|
24
|
+
assert.doesNotMatch(source, /PLAYWRIGHT_BASE_URL/u);
|
|
25
|
+
assert.doesNotMatch(source, /http:\/\/127\.0\.0\.1/u);
|
|
26
|
+
});
|
|
@@ -359,6 +359,20 @@ test("shell-web descriptor pre-optimizes package subpaths reached only through d
|
|
|
359
359
|
});
|
|
360
360
|
|
|
361
361
|
test("shell-web descriptor metadata advertises adaptive shell outlets, default links, and installs the scaffold page", () => {
|
|
362
|
+
const homePageMutationIds = [
|
|
363
|
+
"shell-web-page-home-wrapper",
|
|
364
|
+
"shell-web-page-home",
|
|
365
|
+
"shell-web-page-home-settings-shell",
|
|
366
|
+
"shell-web-page-home-settings",
|
|
367
|
+
"shell-web-page-home-settings-general"
|
|
368
|
+
];
|
|
369
|
+
for (const mutationId of homePageMutationIds) {
|
|
370
|
+
assert.deepEqual(findFileMutation(mutationId)?.when, {
|
|
371
|
+
config: "surfaceDefinitions.home.enabled",
|
|
372
|
+
equals: "true"
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
|
|
362
376
|
assert.deepEqual(readClientContainerTokens(), [
|
|
363
377
|
"runtime.web-placement.client",
|
|
364
378
|
"runtime.web-bootstrap.client",
|
|
@@ -481,7 +495,11 @@ test("shell-web descriptor metadata advertises adaptive shell outlets, default l
|
|
|
481
495
|
ownership: "app",
|
|
482
496
|
reason: "Install shell-driven home settings shell route with section navigation.",
|
|
483
497
|
category: "shell-web",
|
|
484
|
-
id: "shell-web-page-home-settings-shell"
|
|
498
|
+
id: "shell-web-page-home-settings-shell",
|
|
499
|
+
when: {
|
|
500
|
+
config: "surfaceDefinitions.home.enabled",
|
|
501
|
+
equals: "true"
|
|
502
|
+
}
|
|
485
503
|
});
|
|
486
504
|
|
|
487
505
|
assert.deepEqual(findFileMutation("shell-web-page-home-settings"), {
|
|
@@ -491,7 +509,11 @@ test("shell-web descriptor metadata advertises adaptive shell outlets, default l
|
|
|
491
509
|
ownership: "app",
|
|
492
510
|
reason: "Install shell-driven home settings redirect so the starter settings shell lands on a real child page.",
|
|
493
511
|
category: "shell-web",
|
|
494
|
-
id: "shell-web-page-home-settings"
|
|
512
|
+
id: "shell-web-page-home-settings",
|
|
513
|
+
when: {
|
|
514
|
+
config: "surfaceDefinitions.home.enabled",
|
|
515
|
+
equals: "true"
|
|
516
|
+
}
|
|
495
517
|
});
|
|
496
518
|
|
|
497
519
|
assert.deepEqual(findFileMutation("shell-web-page-home-settings-general"), {
|
|
@@ -501,7 +523,11 @@ test("shell-web descriptor metadata advertises adaptive shell outlets, default l
|
|
|
501
523
|
ownership: "app",
|
|
502
524
|
reason: "Install shell-driven general settings child page with a tiny browser-local shell preference example.",
|
|
503
525
|
category: "shell-web",
|
|
504
|
-
id: "shell-web-page-home-settings-general"
|
|
526
|
+
id: "shell-web-page-home-settings-general",
|
|
527
|
+
when: {
|
|
528
|
+
config: "surfaceDefinitions.home.enabled",
|
|
529
|
+
equals: "true"
|
|
530
|
+
}
|
|
505
531
|
});
|
|
506
532
|
|
|
507
533
|
assert.deepEqual(findFileMutation("shell-web-test-adaptive-shell-smoke"), {
|