/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/css/test/display.e2e.ts
48 строк
1 KB
Brandy Smith
feat(css): add new css utility classes for display and flex utils (#30567)
30 июл 2025, 23:45
30 июл 2025, 23:45
75f6c05
Код
Авторство
О чём код?
import { test, expect } from '@playwright/test'; import fs from 'fs'; import path from 'path'; test.describe('display css utility classes', () => { let css: string; test.beforeAll(() => { css = fs.readFileSync(path.resolve(__dirname, '../../../css/display.css'), 'utf8'); }); const INFIXES = ['', '-sm', '-md', '-lg', '-xl']; // TODO(FW-6697): remove `ion-hide classes` test test('ion-hide classes', () => { expect(css).toContain('.ion-hide'); const values = ['up', 'down']; for (const value of values) { for (const infix of INFIXES) { expect(css).toContain(`.ion-hide${infix}-${value}`); } } }); test('ion-display classes', () => { const values = [ 'none', 'inline', 'inline-block', 'block', 'flex', 'inline-flex', 'grid', 'inline-grid', 'table', 'table-cell', 'table-row', ]; for (const value of values) { for (const infix of INFIXES) { expect(css).toContain(`.ion-display${infix}-${value}`); } } }); });