test(phase-0): add foundation_tokens browser test module#184
Merged
Conversation
Closes the Task 14 test-coverage gap from the Phase 0 foundation-shell plan (docs/plans/2026-04-19-ui-phase-0-foundation.md). Three tests: - foundation_palette_tokens_defined — asserts every palette/ink/state token on :root resolves to a non-empty computed value. - legacy_bg_main_aliases_bg_0 — asserts --bg-main (style.css) inherits the same value as --bg-0 (foundation.css), proving the reskin alias layer is live. - data_accent_swap_changes_moss_2 — toggles data-accent on #app-root and asserts the accent-controlled token updates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
intendednull
added a commit
that referenced
this pull request
Apr 21, 2026
Resolves conflict at EOF of crates/web/tests/browser.rs — both sides appended independent test modules (phase_2c_profile_card here, then foundation_tokens from PR #184). Keep both. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
intendednull
added a commit
that referenced
this pull request
Apr 21, 2026
Resolves conflict at EOF of crates/web/tests/browser.rs — both sides appended independent test content (phase 2e top-level tests here, then `mod foundation_tokens` from PR #184). Keep both. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
intendednull
added a commit
that referenced
this pull request
Apr 21, 2026
Takes HEAD's browser.rs (phase-2b sync-queue tests, 10335 lines) and appends the foundation_tokens module from origin/main (PR #184, Task 14) at EOF. Both test modules live independently. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the Task 14 test-coverage gap from the Phase 0 foundation-shell plan (
docs/plans/2026-04-19-ui-phase-0-foundation.md). Adds amod foundation_tokensincrates/web/tests/browser.rswith three tests::rootand asserts every computed value is non-empty.--bg-main(style.css) resolves to the same computed value as--bg-0(foundation.css), proving the Phase 0 alias layer is live.data-accentbetweenmossandwillowon<html>and asserts--moss-2updates then reverts.Followed the existing
ensure_style_css_loadedharness pattern (browser.rs:6979); added module-localensure_foundation_css_loaded+ensure_style_css_loadedhelpers that inject CSS viainclude_str!with dedupe-id guards (wasm-pack does not bundle stylesheets).Test plan
cargo fmt --all --check— clean.just clippy— zero warnings.just test-browser— new tests pass under headless Firefox (not run locally — CI gate).Out of scope
clippy::self_assignmentonbrowser.rs:9193(ancestor commit57f79309) is untouched;just clippydoes not lint--testsso the workspace gate is green.Companion PR:
docs/phase-0-plan-ticks(plan doc-hygiene).🤖 Generated with Claude Code