import { expect } from '@open-wc/testing' import { OxFiltersForm } from '../src/filters/filters-form.js' /* * Filters stand side by side and wrap to the next line on a phone as on a desk. A phone rule stacked them one to a * line, so a ledger's ten filters took half the screen with its right half empty (2026-11-05, 375px). */ const text = (styles: unknown) => (Array.isArray(styles) ? styles : [styles]).map(s => String((s as { cssText?: string }).cssText ?? s)).join('\n') describe('filters on a phone', () => { it('wrap in rows; no phone rule turns the form into a column', () => { const css = text(OxFiltersForm.styles) const form = css.slice(css.indexOf('form {'), css.indexOf('}', css.indexOf('form {'))) expect(form).to.contain('flex-flow: row wrap;') const phone = css.slice(css.indexOf('@media only screen and (max-width: 460px)')) expect(phone).not.to.match(/(^|\s)form \{[^}]*column/) }) })