Repository navigation
test(dashboard): integration wiring asserts opaque card surfaces through the kit token bridge (KEA-7886) - #17325
Merged
Conversation
…ugh the kit token bridge (KEA-7886) Track A (#17279) replaced the :root/.dark hex values in globals.css with the CI UI Kit token bridge, so the pinned #ffffff/#161b22 assertions went red. The test now follows --color-card and --color-surface to their --ci-* kit token and asserts the light and dark values in packages/ui-kit/src/ci-tokens.css are opaque colours.
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.
What was red
tests/integration/integration-wiring.test.ts› "keeps request log surfaces on opaque theme colors" fails on thefeat/new-uikittip (1051165):Track A (#17279) replaced every hex value in the
:root/.darkblocks ofsrc/app/globals.csswith the CI UI Kit token bridge. The card colour is now--color-card: var(--ci-color-surface), and the kit switches the--ci-*values itself ondata-theme="dark". The two pinned hex literals (#fffffflight,#161b22dark) no longer appear anywhere inglobals.css.Realigned intent
The intent stays the same: request-log surfaces sit on an opaque colour in both themes. The test now checks it through the bridge:
--color-card/--color-surfacedeclaration inglobals.cssis eithervar(--ci-…)or the@themeself-reference. The--color-card: var(--color-card)assertion is kept unchanged.--ci-*token each one bridges to and follows thevar()chain inpackages/ui-kit/src/ci-tokens.css: the light block (:root, .ci-theme), then the dark block (:root[data-theme="dark"], …), which falls back to the light primitives.#rgb,#rrggbborrgb(r, g, b).rgba, 8-digit hex andcolor-mixare rejected.Today both tokens resolve to
--ci-color-surface, which is--ci-neutral-0=#ffffffin light and--ci-neutral-900=#0d191cin dark.--color-surfaceis included becauseRequestLoggerV2paints withbg-surface. That is the surface the existing#4233comment in the test refers to.The PR only changes the test. Nothing in
src/orpackages/changes.Validation
node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test --test-force-exit tests/integration/integration-wiring.test.tsci-tokens.css, reverted afterwards). Both mutants fail the test as expected:--ci-color-surface: rgba(13, 25, 28, 0.6)→--color-card → --ci-color-surface must be opaque in dark--ci-neutral-0: #ffffff80→--color-card → --ci-color-surface must be opaque in lightnpx eslint tests/integration/integration-wiring.test.ts: exit 0npx prettier --check tests/integration/integration-wiring.test.ts: clean#ffffff/#161b22/#0d1117/globals.cssundertests/integrationandtests/unit, excludingdesign-kit-bridge. These are already green on the tip, so they are untouched:provider-connection-row-mobile-layout,sidebar-nav-contrast-aa,connection-row-rtl-margin,dev-bundler-boundaries-12074,run-next-node-env,dashboard-sidebar-desktop-visible,dashboard/material-icons-self-hosted(node:test)ui/flowCanvas.test.tsx,ui/rtl-logical-classes.test.tsx(vitest, 23/23)