Files
Wegwichtel/test/bootstrap-screen-layout.test.js
T
Florian Zumpe aff88eba1b
Sonarqube Scanner / Prepare environment (push) Successful in 20s
Sonarqube Scanner / Build and test (push) Failing after 36s
Sonarqube Scanner / SonarQube analysis (push) Skipped
Sonarqube Scanner / Deploy to Server (push) Successful in 9s
Internationalization
2026-10-01 09:41:01 +02:00

25 lines
1003 B
JavaScript

import { readAppFile } from '../test-support/i18n.js';
import assert from 'node:assert/strict';
import fs from 'node:fs/promises';
import path from 'node:path';
import test from 'node:test';
const root = path.resolve(import.meta.dirname, '..');
async function read(relativePath) {
return readAppFile(relativePath);
}
test('bootstrap screen remains vertically scrollable on small displays', async () => {
const css = await read('public/css/bootstrap.css');
const bootstrapRule = css.match(/#bootstrap-screen\s*\{([\s\S]*?)\}/)?.[1] ?? '';
const cardRule = css.match(/#bootstrap-screen\s*>\s*\.bootstrap-card\s*\{([\s\S]*?)\}/)?.[1] ?? '';
assert.match(bootstrapRule, /overflow-y:\s*auto/);
assert.match(bootstrapRule, /overflow-x:\s*hidden/);
assert.match(bootstrapRule, /touch-action:\s*pan-y/);
assert.match(bootstrapRule, /-webkit-overflow-scrolling:\s*touch/);
assert.match(bootstrapRule, /align-items:\s*safe center/);
assert.match(cardRule, /box-sizing:\s*border-box/);
});