fix(ui): widen and center workspace switcher

This commit is contained in:
dadachann
2026-07-25 23:44:49 +08:00
parent 5ac1ab3eac
commit 741c20af07
2 changed files with 6 additions and 3 deletions
@@ -92,8 +92,11 @@ test('moves Cloud plan upgrades into Workspace Settings', () => {
assert.ok(toolbarEnd < membersHeading && membersHeading < cloudInvite);
});
test('keeps the workspace trigger compact and truncates long names', () => {
assert.match(homeSidebarSource, /<WorkspaceSwitcher className="w-1\/2/);
test('fills 80 percent of the sidebar, centers the trigger, and truncates long names', () => {
assert.match(
homeSidebarSource,
/<WorkspaceSwitcher className="mx-auto w-4\/5/,
);
assert.match(workspaceSwitcherSource, /h-9/);
assert.match(workspaceSwitcherSource, /w-64/);
assert.doesNotMatch(workspaceSwitcherSource, /min-w-80/);