@networkpro/web 1.26.19 → 1.26.20

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/CHANGELOG.md CHANGED
@@ -24,6 +24,23 @@ version increments reflecting both user-visible and operational impact.
24
24
 
25
25
  ---
26
26
 
27
+ ## [1.26.20] - 2026-04-10
28
+
29
+ ### Changed
30
+
31
+ - Bumped project version to `v1.26.20`.
32
+ - Updated dependencies:
33
+ - `prettier` `3.8.1` → `3.8.2`
34
+ - `svelte` `5.55.2` → `5.55.3`
35
+
36
+ ### Fixed
37
+
38
+ - Removed an unused `window` mock from the UTM unit test to better reflect the current `appendUTM` implementation.
39
+ - Stabilized SPA navigation E2E helpers by relying on Playwright click actionability instead of a separate `scrollIntoViewIfNeeded()` call, with a single retry for transient no-op clicks.
40
+ - Updated the navigation link assertion to compare the resolved `pathname` instead of the raw `href` attribute for better cross-browser consistency.
41
+
42
+ ---
43
+
27
44
  ## [1.26.19] - 2026-04-09
28
45
 
29
46
  ### Changed
@@ -2654,7 +2671,8 @@ This enables analytics filtering and CSP hardening for the audit environment.
2654
2671
 
2655
2672
  <!-- Link references -->
2656
2673
 
2657
- [Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.26.19...HEAD
2674
+ [Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.26.20...HEAD
2675
+ [1.26.20]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.26.20
2658
2676
  [1.26.19]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.26.19
2659
2677
  [1.26.18]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.26.18
2660
2678
  [1.26.17]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.26.17
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@networkpro/web",
3
3
  "private": false,
4
- "version": "1.26.19",
4
+ "version": "1.26.20",
5
5
  "description": "Locking Down Networks, Unlocking Confidence™ | Security, Networking, Privacy — Network Pro Strategies",
6
6
  "keywords": [
7
7
  "advocacy",
@@ -92,7 +92,7 @@
92
92
  "dompurify": "^3.3.3",
93
93
  "posthog-js": "^1.367.0",
94
94
  "semver": "^7.7.4",
95
- "svelte": "5.55.2"
95
+ "svelte": "5.55.3"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@eslint/compat": "^2.0.5",
@@ -121,7 +121,7 @@
121
121
  "npm-run-all": "^4.1.5",
122
122
  "playwright": "^1.59.1",
123
123
  "postcss": "^8.5.9",
124
- "prettier": "3.8.1",
124
+ "prettier": "3.8.2",
125
125
  "prettier-plugin-svelte": "^3.5.1",
126
126
  "simple-git-hooks": "^2.13.1",
127
127
  "stylelint": "^17.6.0",
@@ -56,12 +56,12 @@ export default defineConfig({
56
56
  },
57
57
  },
58
58
  // FIXME: Webkit and Safari consistently failing, disabled for now
59
- // {
60
- // name: "webkit",
61
- // use: {
62
- // ...devices["Desktop Safari"], // Use default WebKit settings
63
- // },
64
- // },
59
+ //{
60
+ // name: 'webkit',
61
+ // use: {
62
+ // ...devices['Desktop Safari'], // Use default WebKit settings
63
+ // },
64
+ //},
65
65
 
66
66
  // Mobile Browsers
67
67
  {
@@ -72,12 +72,12 @@ export default defineConfig({
72
72
  },
73
73
  },
74
74
  // FIXME: Webkit and Safari consistently failing, disabled for now
75
- // {
76
- // name: "Mobile Safari",
77
- // use: {
78
- // ...devices["iPhone 14"], // Use the iPhone 14 device profile
79
- // },
80
- // },
75
+ //{
76
+ // name: 'Mobile Safari',
77
+ // use: {
78
+ // ...devices['iPhone 14'], // Use the iPhone 14 device profile
79
+ // },
80
+ //},
81
81
  ],
82
82
 
83
83
  /* Run your local preview server before starting the tests */
@@ -142,7 +142,7 @@ export async function handle({ event, resolve }) {
142
142
  if (!isTest) {
143
143
  response.headers.set(
144
144
  'Strict-Transport-Security',
145
- 'max-age=31536000; includeSubDomains;',
145
+ 'max-age=31536000; includeSubDomains',
146
146
  );
147
147
  }
148
148
 
@@ -36,7 +36,7 @@ test.describe('Desktop Tests', () => {
36
36
 
37
37
  const aboutLink = nav.getByRole('link', { name: 'about' });
38
38
  await expect(aboutLink).toBeVisible();
39
- await expect(aboutLink).toHaveAttribute('href', '/about');
39
+ await expect(aboutLink).toHaveJSProperty('pathname', '/about');
40
40
  });
41
41
 
42
42
  // Root route should display the footer properly
@@ -101,17 +101,23 @@ export function getFooter(page) {
101
101
  */
102
102
  export async function clickAndWaitForNavigation(page, locator, options = {}) {
103
103
  const { urlPattern = /\/.*/, timeout = 60000 } = options;
104
-
105
- await locator.scrollIntoViewIfNeeded();
106
- await locator.waitFor({ state: 'visible', timeout });
107
-
108
104
  const previousURL = page.url();
105
+ let lastError;
106
+
107
+ for (let attempt = 1; attempt <= 2; attempt += 1) {
108
+ await expect(locator).toBeVisible({ timeout });
109
+ await locator.click({ timeout });
110
+
111
+ try {
112
+ // SPA-stable URL wait (polling) - does not depend on navigation lifecycle
113
+ await expect(page).toHaveURL(urlPattern, { timeout: timeout / 2 });
114
+ const newURL = page.url();
115
+ console.log(`Navigation from ${previousURL} to ${newURL}`);
116
+ return;
117
+ } catch (error) {
118
+ lastError = error;
119
+ }
120
+ }
109
121
 
110
- await locator.click();
111
-
112
- // SPA-stable URL wait (polling) — does not depend on navigation lifecycle
113
- await expect(page).toHaveURL(urlPattern, { timeout });
114
-
115
- const newURL = page.url();
116
- console.log(`✅ Navigation from ${previousURL} → ${newURL}`);
122
+ throw lastError;
117
123
  }
@@ -11,11 +11,11 @@ This file is part of Network Pro.
11
11
  * @description Unit test for UTM parameters
12
12
  * @module tests/unit/client/lib/utils
13
13
  * @author Scott Lopez
14
- * @updated 2026-01-15
14
+ * @updated 2026-04-10
15
15
  */
16
16
 
17
17
  import { writable } from 'svelte/store';
18
- import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
18
+ import { describe, expect, it, vi } from 'vitest';
19
19
 
20
20
  // Mock SvelteKit environment and store
21
21
  vi.mock('$app/environment', () => ({ browser: true }));
@@ -36,16 +36,6 @@ vi.mock('$app/stores', () => {
36
36
  import { appendUTM } from '$lib/utils/utm.js';
37
37
 
38
38
  describe('appendUTM', () => {
39
- const originalWindow = globalThis.window;
40
-
41
- beforeEach(() => {
42
- globalThis.window = { location: { search: '' } };
43
- });
44
-
45
- afterEach(() => {
46
- globalThis.window = originalWindow;
47
- });
48
-
49
39
  it('should return URL with utm parameters for /contact', () => {
50
40
  const url = 'https://example.com';
51
41
  const result = appendUTM(url);