@jskit-ai/shell-web 0.1.120 → 0.1.121

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.
@@ -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.120",
4
+ version: "0.1.121",
5
5
  kind: "runtime",
6
6
  description: "Web shell layout runtime with outlet-based placement contributions.",
7
7
  dependsOn: [],
@@ -313,7 +313,9 @@ export default Object.freeze({
313
313
  "@mdi/js": "^7.4.47",
314
314
  "@jskit-ai/kernel": "0.1.121"
315
315
  },
316
- dev: {}
316
+ dev: {
317
+ "@playwright/test": "1.61.1"
318
+ }
317
319
  },
318
320
  packageJson: {
319
321
  scripts: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/shell-web",
3
- "version": "0.1.120",
3
+ "version": "0.1.121",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -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(`${baseUrl}${smokePath}`);
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);
@@ -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
+ });