test(web): align bot form assertion with responsive grid layout

This commit is contained in:
RockChinQ
2026-09-21 11:35:19 +00:00
parent d3eb7b09e5
commit 44ee0e8d71
+7 -3
View File
@@ -40,10 +40,14 @@ test('hides the entire workspace switcher slot for a singleton local workspace',
);
});
test('keeps compact bot forms vertically spaced while detail forms support columns', () => {
test('keeps bot forms spaced with responsive setup and detail columns', () => {
const fieldset = botFormSource.match(
/<fieldset\s[\s\S]*?disabled=\{isLoading\}/,
)?.[0];
assert.ok(fieldset, 'the form must retain its loading-disabled fieldset');
assert.match(
botFormSource,
/<fieldset[\s\S]*?'space-y-6'[\s\S]*?disabled=\{isLoading\}/,
fieldset,
/initBotId\s*\?\s*'grid gap-4 lg:h-full lg:min-h-0 lg:grid-cols-\[minmax\(0,2fr\)_minmax\(0,3fr\)\] lg:grid-rows-\[minmax\(0,1fr\)\]'\s*:\s*'grid items-start gap-6 lg:grid-cols-\[minmax\(16rem,0\.7fr\)_minmax\(0,2fr\)\]'/,
);
assert.match(kbFormSource, /<form[\s\S]*?className="space-y-6"/);
});