mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-12 04:26:57 +00:00
fix(properties): harden recovery and window chrome
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { getWindowControlRevealOffset, resolveWindowControlStyle } from './windowControlStyle';
|
||||
import {
|
||||
getWindowControlRevealOffset,
|
||||
resolveWindowControlSide,
|
||||
resolveWindowControlStyle,
|
||||
} from './windowControlStyle';
|
||||
|
||||
describe('resolveWindowControlStyle', () => {
|
||||
it('uses the platform convention for automatic style', () => {
|
||||
@@ -32,4 +36,11 @@ describe('resolveWindowControlStyle', () => {
|
||||
expect(getWindowControlRevealOffset('gnome')).toBe(134);
|
||||
expect(getWindowControlRevealOffset('minimal')).toBe(104);
|
||||
});
|
||||
|
||||
it('resolves automatic control placement from the effective document direction', () => {
|
||||
expect(resolveWindowControlSide('auto', 'ltr')).toBe('left');
|
||||
expect(resolveWindowControlSide('auto', 'rtl')).toBe('right');
|
||||
expect(resolveWindowControlSide('left', 'rtl')).toBe('left');
|
||||
expect(resolveWindowControlSide('right', 'ltr')).toBe('right');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user