mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
3b4cba7033
Scrollable plugin-info content was painting over the sidebar seam handle, making the right panel impossible to collapse after interacting inside it. Co-authored-by: xiaoche-hub <298951296+xiaoche-hub@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import postcss, { type Rule } from 'postcss';
|
|
import { describe, expect, it } from 'vitest';
|
|
import { readExpandedIndexCss } from '../helpers/read-expanded-css';
|
|
|
|
describe('plugin info preview pane styles', () => {
|
|
it('keeps plugin preview sidebar content away from the pane edges', () => {
|
|
const css = readExpandedIndexCss();
|
|
const root = postcss.parse(css, { from: 'src/index.css' });
|
|
const topLevelRules = root.nodes.filter(
|
|
(node): node is Rule => node.type === 'rule',
|
|
);
|
|
const topLevelSelectors = topLevelRules.map((rule) => rule.selector);
|
|
|
|
expect(css).toContain('.ds-modal-sidebar');
|
|
expect(css).toContain('.ds-modal-sidebar-body');
|
|
expect(css).toContain('scrollbar-gutter: stable;');
|
|
expect(topLevelSelectors).toContain('.plugin-info-pane');
|
|
expect(css).toContain('padding: 22px 28px 28px 32px;');
|
|
expect(topLevelSelectors).toContain('.plugin-design-sidebar__spec');
|
|
expect(css).toContain('padding: 18px 28px 28px 32px;');
|
|
expect(topLevelSelectors).not.toContain(
|
|
'.plugin-details-modal__stage-num .plugin-info-pane',
|
|
);
|
|
});
|
|
});
|