Repository navigation
🧭 test: Cover ClickHouse Control Boundaries on the Sidebar Surface #17197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
berry-13
merged 2 commits into
dev
from
followup/291-pr-16821-cover-clickhouse-control-boundaries-on-
Oct 18, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
e2e/specs/mock/scenarios/clickhouse-sidebar-boundaries.spec.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { resolve } from 'node:path'; | ||
| import { expect, test } from '@playwright/test'; | ||
| import { stripVTControlCharacters } from 'node:util'; | ||
| import { inOneProject, repoRoot, run } from './lint.helpers'; | ||
|
|
||
| /** | ||
| * Controls sit on the sidebar as well as the page, the panels and the dialog, so | ||
| * the ClickHouse boundary check measures `surface-sidebar` too. The sidebar holds | ||
| * Click UI's background, so its sub-floor boundary pairs are the page's, pinned by | ||
| * the same owner decision. The check runs the whole spec, so the pinning test | ||
| * compares the pins against the full matrix with the sidebar in it. | ||
| */ | ||
|
|
||
| const clientRoot = resolve(repoRoot, 'packages/client'); | ||
| const JEST = resolve(repoRoot, 'node_modules/.bin/jest'); | ||
| const SPEC = 'src/theme/themes/clickhouse.spec.tsx'; | ||
|
|
||
| test.describe('ClickHouse control boundaries on the sidebar', () => { | ||
| test('the boundary and pinning checks hold with the sidebar canvas measured @scenario:clickhouse-sidebar-boundaries-measured', () => { | ||
| inOneProject(); | ||
| test.setTimeout(180_000); | ||
|
|
||
| const result = run(JEST, [SPEC, '--maxWorkers=1', '--ci', '--verbose'], { cwd: clientRoot }); | ||
| const output = stripVTControlCharacters(result.output); | ||
| expect(result.status, output).toBe(0); | ||
| expect(output.match(/✓ keeps control boundaries and rings at the 3:1 floor/g)).toHaveLength(2); | ||
| expect(output.match(/✓ pins every pair that sits below its floor/g)).toHaveLength(2); | ||
| expect( | ||
| output.match( | ||
| /✓ measures control boundaries on the sidebar, below the floor only in its two/g, | ||
| ), | ||
| ).toHaveLength(2); | ||
| }); | ||
| }); | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This scenario also passes against the parent revision: both matched Jest titles already existed and passed before
rgb-surface-sidebarwas added to the boundary background list. Removing the sidebar entry together with its four pins would therefore still produce two matches for each title, so this scenario cannot catch the exact regression it claims to cover; assert a sidebar-specific measured pair or fixture instead.AGENTS.md reference: AGENTS.md:L53-L53
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a714e8c: a sidebar-only test now measures the boundary tokens on
rgb-surface-sidebarand requires exactly its two pinned pairs, and the scenario asserts that title in both modes; dropping the sidebar entry and pins makes it fail.