28 lines
1.5 KiB
JavaScript
28 lines
1.5 KiB
JavaScript
|
|
import assert from 'node:assert/strict'
|
||
|
|
import { readFileSync } from 'node:fs'
|
||
|
|
import test from 'node:test'
|
||
|
|
import { fileURLToPath } from 'node:url'
|
||
|
|
|
||
|
|
const responsiveStyles = readFileSync(
|
||
|
|
fileURLToPath(new URL('../src/assets/styles/components/personal-workbench-responsive.css', import.meta.url)),
|
||
|
|
'utf8'
|
||
|
|
)
|
||
|
|
|
||
|
|
test('personal workbench compacts hero input and capability cards on laptop screens', () => {
|
||
|
|
assert.match(
|
||
|
|
responsiveStyles,
|
||
|
|
/@media \(min-width: 961px\) and \(max-width: 1440px\),\s*\n\s*\(min-width: 961px\) and \(max-height: 820px\)/
|
||
|
|
)
|
||
|
|
assert.match(responsiveStyles, /--hero-padding-top:\s*14px;/)
|
||
|
|
assert.match(responsiveStyles, /--hero-padding-bottom:\s*14px;/)
|
||
|
|
assert.match(responsiveStyles, /--hero-title-size:\s*24px;/)
|
||
|
|
assert.match(responsiveStyles, /--composer-min-height:\s*92px;/)
|
||
|
|
assert.match(responsiveStyles, /--composer-textarea-height:\s*38px;/)
|
||
|
|
assert.match(responsiveStyles, /--capability-row-height:\s*82px;/)
|
||
|
|
assert.match(responsiveStyles, /\.assistant-copy h1\s*\{[\s\S]*font-size:\s*var\(--hero-title-size\);/)
|
||
|
|
assert.match(responsiveStyles, /\.assistant-composer\s*\{[\s\S]*padding:\s*var\(--composer-padding-block\) 14px 8px;/)
|
||
|
|
assert.match(responsiveStyles, /\.quick-prompts button\s*\{[\s\S]*min-height:\s*24px;/)
|
||
|
|
assert.match(responsiveStyles, /\.capability-card\s*\{[\s\S]*grid-template-columns:\s*34px minmax\(0,\s*1fr\) 14px;[\s\S]*padding:\s*12px 12px 12px 16px;/)
|
||
|
|
assert.match(responsiveStyles, /@media \(max-width: 760px\)[\s\S]*\.workbench\s*\{[\s\S]*grid-template-rows:\s*none;/)
|
||
|
|
})
|