Skip to content

Remove hard-coded halos.local references from E2E tests #168

@mairas

Description

@mairas

Overview

Remove hard-coded halos.local hostname references from E2E test files to comply with the workspace hostname policy.

Tracking issue: hatlabs/halos-distro#61

Violations

Multiple E2E test files have hard-coded URLs:

  • compare-layouts.js
  • frontend/playwright.config.ts
  • frontend/test/e2e/simple-screenshot.mjs
  • frontend/test/e2e/test-css-loading.mjs
  • inspect-html.js
  • test-dark-theme.js
  • test-fresh.js
  • test-layout.js
  • test-storage-layout.js
  • test-tabs.js

Fix

  1. playwright.config.ts: Read baseURL from environment variable HALOS_TEST_URL
  2. All test files: Use the configured baseURL from Playwright config or read from environment

Example fix for playwright.config.ts:

export default defineConfig({
  use: {
    baseURL: process.env.HALOS_TEST_URL || 'https://localhost:9090',
  },
});

Enforcement

A pre-commit hook has been added. Run .github/scripts/check-hardcoded-hostnames.sh to verify.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions