mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test: проверять минимум Sections на RU и DE (#648)
Issue: #648 User-Visible: no
This commit is contained in:
committed by
claude[bot]
parent
180239f44c
commit
8f13325c52
@@ -88,17 +88,20 @@ const out = await page.evaluate(async () => {
|
||||
card.layout = 'grid';
|
||||
await setRows(10);
|
||||
|
||||
const minimumGeometry = await (async () => {
|
||||
const minimumGeometry = [];
|
||||
for (const language of ['ru', 'de']) {
|
||||
card.setConfig(Object.freeze({ ...config, language }));
|
||||
await settle();
|
||||
host.style.width = '390px';
|
||||
const sample = await setRows(6);
|
||||
const header = root.querySelector('.hdr');
|
||||
return {
|
||||
sample,
|
||||
minimumGeometry.push({
|
||||
language, sample,
|
||||
headerContained: header.scrollHeight - header.clientHeight <= 1,
|
||||
menuReachable: !!root.querySelector('[data-hp="header-menu"]')
|
||||
|| !!root.querySelector('[data-hp="mode-tab"]'),
|
||||
};
|
||||
})();
|
||||
});
|
||||
}
|
||||
host.style.width = '780px';
|
||||
await setRows(10);
|
||||
|
||||
@@ -193,8 +196,9 @@ const out = await page.evaluate(async () => {
|
||||
gridSignalReflectsForScopedCss: card.getAttribute('layout') === 'grid',
|
||||
gridUsesContainerOwnedInlineHeight: defaultGeometry.stageStyle === 'auto',
|
||||
defaultTenRowsFillTheSlot: fillsSlot(defaultGeometry, rowHeight(10)),
|
||||
minimumSixRowsStayContained: fillsSlot(minimumGeometry.sample, rowHeight(6))
|
||||
&& minimumGeometry.headerContained && minimumGeometry.menuReachable,
|
||||
minimumSixRowsStayContainedInRuAndDe: minimumGeometry.length === 2
|
||||
&& minimumGeometry.every((entry) => fillsSlot(entry.sample, rowHeight(6))
|
||||
&& entry.headerContained && entry.menuReachable),
|
||||
ordinaryCardKeepsViewportHeight: ordinary.stageStyle.includes('100dvh'),
|
||||
explicitGridOptionsStayExternal: JSON.stringify(config) === configBefore
|
||||
&& card._config.grid_options === config.grid_options,
|
||||
|
||||
Reference in New Issue
Block a user