Выровнять шкалу шагов мастера
This commit is contained in:
@@ -1860,9 +1860,9 @@
|
||||
}
|
||||
|
||||
.steps-list::before {
|
||||
left: calc(10% + 16px);
|
||||
right: calc(10% + 16px);
|
||||
top: 31px;
|
||||
left: calc((100% - 32px) / 10);
|
||||
right: calc((100% - 32px) / 10);
|
||||
top: 27px;
|
||||
bottom: auto;
|
||||
width: auto;
|
||||
height: 1px;
|
||||
|
||||
@@ -1,6 +1,29 @@
|
||||
const { test, expect } = require('@playwright/test');
|
||||
const { getCurrentWorkspace, login, localized } = require('./helpers');
|
||||
|
||||
test('mobile wizard progress connector crosses the indicator centers', async ({ page }) => {
|
||||
await page.setViewportSize({ width: 720, height: 900 });
|
||||
await login(page);
|
||||
await page.goto('/wizard/');
|
||||
|
||||
const geometry = await page.locator('.steps-list').evaluate((list) => {
|
||||
const indicators = [...list.querySelectorAll('.step-indicator')];
|
||||
const first = indicators[0].getBoundingClientRect();
|
||||
const last = indicators.at(-1).getBoundingClientRect();
|
||||
const listRect = list.getBoundingClientRect();
|
||||
const line = getComputedStyle(list, '::before');
|
||||
return {
|
||||
leftDelta: Math.abs(listRect.left + Number.parseFloat(line.left) - (first.left + first.width / 2)),
|
||||
rightDelta: Math.abs(listRect.right - Number.parseFloat(line.right) - (last.left + last.width / 2)),
|
||||
topDelta: Math.abs(listRect.top + Number.parseFloat(line.top) - (first.top + first.height / 2)),
|
||||
};
|
||||
});
|
||||
|
||||
expect(geometry.leftDelta).toBeLessThan(1);
|
||||
expect(geometry.rightDelta).toBeLessThan(1);
|
||||
expect(geometry.topDelta).toBeLessThan(1);
|
||||
});
|
||||
|
||||
test('wizard loads and protocol selection updates flow', async ({ page }) => {
|
||||
await login(page);
|
||||
await page.goto('/wizard/');
|
||||
|
||||
Reference in New Issue
Block a user