mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import postcss, { type Declaration, type Rule } from 'postcss';
|
|
import { describe, expect, it } from 'vitest';
|
|
import { readExpandedIndexCss } from '../helpers/read-expanded-css';
|
|
|
|
describe('plugin detail page scrolling', () => {
|
|
it('owns vertical overflow inside the fixed-height workspace shell', () => {
|
|
const root = postcss.parse(readExpandedIndexCss(), { from: 'src/index.css' });
|
|
const rule = root.nodes.find(
|
|
(node): node is Rule => node.type === 'rule' && node.selector === '.plugin-suite-detail',
|
|
);
|
|
const declarations = new Map(
|
|
rule?.nodes
|
|
.filter((node): node is Declaration => node.type === 'decl')
|
|
.map((declaration) => [declaration.prop, declaration.value]),
|
|
);
|
|
|
|
expect(declarations.get('height')).toBe('100%');
|
|
expect(declarations.get('min-height')).toBe('0');
|
|
expect(declarations.get('overflow-x')).toBe('hidden');
|
|
expect(declarations.get('overflow-y')).toBe('auto');
|
|
expect(declarations.get('scrollbar-gutter')).toBe('stable');
|
|
});
|
|
});
|