Skip to content

Commit 091de88

Browse files
authored
chore: release prep for v1.25.11 (#162)
* chore: release prep for v1.25.11 * feat: added "repair" script to package.json
1 parent cd73e42 commit 091de88

File tree

7 files changed

+119
-117
lines changed

7 files changed

+119
-117
lines changed

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
2222

2323
---
2424

25+
## [1.25.11] - 2025-11-12
26+
27+
### Added
28+
29+
- `gotoDesktop(page, path)` and `gotoMobile(page, path)` helper functions to streamline viewport + navigation setup.
30+
- `clickAndWaitForNavigation(page, locator, options)` utility for safe SPA or full-page navigation detection with optional URL pattern matching.
31+
- `DEBUG_LOGS` flag in `helpers.js` to allow toggling of console logs for test diagnostics.
32+
- Navigation debug logs to `getVisibleNav()` to indicate which navigation region was detected (when debugging is enabled).
33+
34+
### Changed
35+
36+
- Refactored all E2E tests to use `gotoDesktop()` and `gotoMobile()` for consistency and DRY principles.
37+
- Replaced brittle direct `waitForNavigation()` usages with `clickAndWaitForNavigation()` helper.
38+
- Updated mobile and desktop tests to improve consistency across specs and improve visibility assertions.
39+
40+
### Removed
41+
42+
- Legacy direct `setViewportSize()` and `page.goto()` calls from individual test blocks (now handled via `goto*()` helpers).
43+
44+
---
45+
2546
## [1.25.10] - 2025-11-12
2647

2748
### Changed
@@ -1855,7 +1876,8 @@ This enables analytics filtering and CSP hardening for the audit environment.
18551876

18561877
<!-- Link references -->
18571878

1858-
[Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.25.10...HEAD
1879+
[Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.25.11...HEAD
1880+
[1.25.11]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.25.11
18591881
[1.25.10]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.25.10
18601882
[1.25.9]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.25.9
18611883
[1.25.8]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.25.8

cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"CCPA",
1515
"CPRA",
1616
"cryptomator",
17+
"domcontentloaded",
1718
"dont",
1819
"elif",
1920
"Embedder",
@@ -28,6 +29,7 @@
2829
"homescreen",
2930
"HREFTOP",
3031
"HSTS",
32+
"interactable",
3133
"Izzy",
3234
"Keybase",
3335
"keypair",
@@ -40,6 +42,7 @@
4042
"lightningcss",
4143
"linksheet",
4244
"linktree",
45+
"LOCALAPPDATA",
4346
"lsheet",
4447
"Mailvelope",
4548
"Maricopa",

package-lock.json

Lines changed: 5 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@networkpro/web",
33
"private": false,
4-
"version": "1.25.10",
4+
"version": "1.25.11",
55
"description": "Locking Down Networks, Unlocking Confidence™ | Security, Networking, Privacy — Network Pro Strategies",
66
"keywords": [
77
"advisory",
@@ -54,6 +54,7 @@
5454
"verify": "npm run checkout",
5555
"delete": "rm -rf .svelte-kit node_modules package-lock.json",
5656
"clean": "npm run delete && npm cache clean --force && npm install",
57+
"repair": "npm run delete && npx playwright uninstall && rm -rf %LOCALAPPDATA%/ms-playwright && npm install && npx playwright install",
5758
"upgrade": "ncu -u --format group --color",
5859
"check:updates": "ncu --format group --color",
5960
"test": "npm run test:all",

tests/e2e/app.spec.js

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ This file is part of Network Pro.
1111
* @description Runs Playwright E2E tests with desktop and root route assertions.
1212
* @module tests/e2e
1313
* @author Scott Lopez
14-
* @updated 2025-10-21
14+
* @updated 2025-11-12
1515
*/
1616

1717
import { expect, test } from '@playwright/test';
1818
import {
19+
clickAndWaitForNavigation,
1920
getFooter,
2021
getVisibleNav,
21-
setDesktopView,
22-
setMobileView,
22+
gotoDesktop,
23+
gotoMobile,
2324
} from './shared/helpers.js';
2425

2526
// Root route should display nav bar and about link
@@ -29,9 +30,7 @@ test.describe('Desktop Tests', () => {
2930
test("should display the navigation bar and 'about' link", async ({
3031
page,
3132
}) => {
32-
await setDesktopView(page);
33-
await page.goto('/');
34-
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
33+
await gotoDesktop(page);
3534

3635
const nav = await getVisibleNav(page);
3736

@@ -42,9 +41,7 @@ test.describe('Desktop Tests', () => {
4241

4342
// Root route should display the footer properly
4443
test('should display the footer correctly', async ({ page }) => {
45-
await setDesktopView(page);
46-
await page.goto('/');
47-
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
44+
await gotoDesktop(page);
4845

4946
const footer = getFooter(page);
5047
await expect(footer).toBeVisible();
@@ -54,44 +51,35 @@ test.describe('Desktop Tests', () => {
5451
test("should render the 'about' page with footer visible", async ({
5552
page,
5653
}) => {
57-
await setDesktopView(page);
58-
await page.goto('/about');
59-
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
54+
await gotoDesktop(page, '/about');
6055

6156
const footer = getFooter(page);
6257
await expect(footer).toBeVisible();
6358
});
6459

6560
// Root route should have a clickable "about" link
6661
test("should ensure the 'about' link is clickable", async ({ page }) => {
67-
await setDesktopView(page);
68-
await page.goto('/');
69-
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
62+
await gotoDesktop(page);
7063

7164
const nav = await getVisibleNav(page);
7265
const aboutLink = nav.getByRole('link', { name: 'about' });
73-
await expect(aboutLink).toBeVisible();
74-
await aboutLink.click();
7566

76-
// safer wait pattern with load state
77-
await Promise.all([
78-
page.waitForLoadState('load'),
79-
page.waitForURL('**/about', { timeout: 60000 }),
80-
]);
67+
await clickAndWaitForNavigation(page, aboutLink, {
68+
urlPattern: /\/about/,
69+
timeout: 60000,
70+
});
71+
8172
await expect(page).toHaveURL(/\/about/);
8273
});
8374
}); // End Desktop Tests
8475

8576
// Root route should display headings properly on mobile
8677
test.describe('Mobile Tests', () => {
8778
test('should display main content correctly on mobile', async ({ page }) => {
88-
await setMobileView(page);
89-
await page.goto('/');
90-
await page.waitForLoadState('domcontentloaded', { timeout: 60000 });
79+
await gotoMobile(page);
9180

92-
const mainHeading = page.locator('h1, h2');
93-
await expect(mainHeading).toBeVisible();
81+
// Ensure main headline is present on mobile
82+
const h2 = page.locator('h2.index-title2');
83+
await expect(h2).toContainText(/security/i);
9484
});
9585
});
96-
97-
// cspell:ignore domcontentloaded

tests/e2e/mobile.spec.js

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,36 @@ This file is part of Network Pro.
1111
* @description Runs Playwright E2E tests with mobile assertions.
1212
* @module tests/e2e
1313
* @author Scott Lopez
14-
* @updated 2025-10-21
14+
* @updated 2025-11-12
1515
*/
1616

1717
import { expect, test } from '@playwright/test';
1818
import {
1919
clickAndWaitForNavigation,
2020
getFooter,
2121
getVisibleNav,
22-
setMobileView,
22+
gotoMobile,
2323
} from './shared/helpers.js';
2424

2525
// ---------------------------------------------------------------------------
2626
// 📱 Mobile viewport smoke tests
2727
// ---------------------------------------------------------------------------
2828

2929
test.describe('Mobile Tests', () => {
30-
// Increase timeout for all mobile tests
3130
test.setTimeout(90_000);
3231

32+
test.beforeEach(({ browserName }) => {
33+
if (browserName === 'webkit')
34+
test.skip('Skipping WebKit: manual validation only');
35+
});
36+
3337
// -------------------------------------------------------------------------
3438
// 🧱 Test 1: Main description text
3539
// -------------------------------------------------------------------------
3640
test('should display the main description text on mobile', async ({
3741
page,
38-
browserName,
3942
}) => {
40-
if (browserName === 'webkit') test.skip();
41-
42-
await setMobileView(page);
43-
await page.goto('/');
44-
await page.waitForLoadState('domcontentloaded', { timeout: 60_000 });
43+
await gotoMobile(page);
4544

4645
const description = page.locator(
4746
'div.index-title1:has-text("Locking Down Networks")',
@@ -52,60 +51,39 @@ test.describe('Mobile Tests', () => {
5251
// -------------------------------------------------------------------------
5352
// 🧱 Test 2: Main content
5453
// -------------------------------------------------------------------------
55-
test('should display main content correctly on mobile', async ({
56-
page,
57-
browserName,
58-
}) => {
59-
if (browserName === 'webkit') test.skip();
60-
61-
await setMobileView(page);
62-
await page.goto('/');
63-
await page.waitForLoadState('domcontentloaded', { timeout: 60_000 });
54+
test('should display main content correctly on mobile', async ({ page }) => {
55+
await gotoMobile(page);
6456

65-
const mainHeading = page.locator('h1, h2');
66-
await expect(mainHeading).toBeVisible();
57+
const mainHeading = page.locator('h2.index-title2');
58+
await expect(mainHeading).toContainText(/security/i);
6759
});
6860

6961
// -------------------------------------------------------------------------
7062
// 🧱 Test 3: "About" link navigation
7163
// -------------------------------------------------------------------------
7264
test("should ensure the 'about' link is clickable on mobile", async ({
7365
page,
74-
browserName,
7566
}) => {
76-
if (browserName === 'webkit') test.skip();
77-
78-
await setMobileView(page);
79-
await page.goto('/', { waitUntil: 'networkidle' });
67+
await gotoMobile(page);
8068

8169
const nav = await getVisibleNav(page);
82-
83-
// Ensure the link exists before interacting
84-
await page.waitForSelector('a[href="/about"]', { timeout: 10_000 });
8570
const aboutLink = nav.getByRole('link', { name: 'about' });
8671

87-
// Use the safe navigation helper
8872
await clickAndWaitForNavigation(page, aboutLink, {
8973
urlPattern: /\/about/,
9074
timeout: 60_000,
9175
});
76+
77+
await expect(page).toHaveURL(/\/about/);
9278
});
9379

9480
// -------------------------------------------------------------------------
9581
// 🧱 Test 4: Footer presence on /about
9682
// -------------------------------------------------------------------------
97-
test('should display the footer on /about (mobile)', async ({
98-
page,
99-
browserName,
100-
}) => {
101-
if (browserName === 'webkit') test.skip();
102-
103-
await setMobileView(page);
104-
await page.goto('/about');
83+
test('should display the footer on /about (mobile)', async ({ page }) => {
84+
await gotoMobile(page, '/about');
10585

10686
const footer = getFooter(page);
10787
await expect(footer).toBeVisible();
10888
});
10989
});
110-
111-
// cspell:ignore domcontentloaded networkidle

0 commit comments

Comments
 (0)