Files
intotheeast-com/tests/ui/nav.spec.js
T
m038 5e954d8adf fix: update paths for trips/japan-korea-2026/dailies restructure
- Update post form parent, Makefile demo targets, and test scripts to use
  new trip-scoped paths (01.trips/japan-korea-2026/01.dailies)
- Rename tracker.spec.js → dailies.spec.js and update all /tracker URLs
  to /trips/japan-korea-2026/dailies across nav.spec.js, post.spec.js,
  helpers.js, and dailies.spec.js
- Add Italy 2025 demo trip to Makefile demo-load/demo-reset targets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 01:49:38 +02:00

49 lines
2.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// @ts-check
// Tests: N1N5 — page loads and navigation links
const { test, expect } = require('@playwright/test');
// ── N1: /trips/japan-korea-2026/dailies renders ───────────────────────────────
test('N1: /trips/japan-korea-2026/dailies page loads with site header', async ({ page }) => {
const errors = [];
page.on('pageerror', e => errors.push(e.message));
await page.goto('/trips/japan-korea-2026/dailies');
await expect(page.locator('.site-header')).toBeVisible();
await expect(page).toHaveTitle(/Into the East/i);
expect(errors).toHaveLength(0);
});
// ── N2: /trips/japan-korea-2026/map renders without JS errors ─────────────────
test('N2: /trips/japan-korea-2026/map page loads without JS errors', async ({ page }) => {
const errors = [];
page.on('pageerror', e => errors.push(e.message));
await page.goto('/trips/japan-korea-2026/map');
await expect(page.locator('.site-header')).toBeVisible();
expect(errors).toHaveLength(0);
});
// ── N3: /trips/japan-korea-2026/stats renders ─────────────────────────────────
test('N3: /trips/japan-korea-2026/stats page loads with site header', async ({ page }) => {
const errors = [];
page.on('pageerror', e => errors.push(e.message));
await page.goto('/trips/japan-korea-2026/stats');
await expect(page.locator('.site-header')).toBeVisible();
expect(errors).toHaveLength(0);
});
// ── N4: "Journal" nav link goes to /dailies ───────────────────────────────────
test('N4: Journal nav link navigates to /dailies', async ({ page }) => {
await page.goto('/');
await page.click('nav a[href*="dailies"]');
await expect(page).toHaveURL(/\/dailies/);
});
// ── N5: "Map" nav link goes to /map ──────────────────────────────────────────
test('N5: Map nav link navigates to /map', async ({ page }) => {
await page.goto('/');
await page.click('nav a[href*="map"]');
await expect(page).toHaveURL(/\/map/);
});