Simplify failover settings UI
Build and Deploy Gateway / build-and-push (push) Successful in 25s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-20 01:47:27 +03:00
parent 74227ae38c
commit c27c898ad5
5 changed files with 62 additions and 92 deletions
+10 -6
View File
@@ -26,12 +26,13 @@ test('failover settings use Harbor switches, a two-column channel table and plai
assert.match(feature, /snapshot\.reason === 'checking-channels'[\s\S]*Проверяется \{checkingRole === 'primary' \? 'основной' : 'резервный'} канал/);
assert.match(feature, /ArrowDown[\s\S]*Home[\s\S]*End[\s\S]*Escape/);
assert.match(feature, /role="listbox"[\s\S]*role="option"/);
assert.match(feature, /Что проверять/);
assert.match(feature, /Проверка доступности[\s\S]*открывает эти адреса через оба канала/);
assert.match(feature, /before="Ждать ответ не дольше"[\s\S]*min=\{2}[\s\S]*max=\{30}/);
assert.match(feature, /Проверять каналы каждые[\s\S]*Считать основной недоступным после[\s\S]*Вернуться на основной после/);
assert.match(feature, /Не переключать во время активной работы[\s\S]*Переключать после[\s\S]*без активной передачи данных[\s\S]*Считать работу активной при скорости от/);
assert.match(feature, /Защита от повторных сбоев[\s\S]*Считать повторными сбои за последние[\s\S]*Не возвращаться на основной после карантина/);
assert.match(feature, /client-failover-number-steps[\s\S]*уменьшить на[\s\S]*увеличить на/);
assert.match(feature, /Когда переключать канал[\s\S]*сначала подтверждает сбой[\s\S]*Защита от частых переключений[\s\S]*остаётся на резервном/);
assert.match(feature, /client-failover-number-input[\s\S]*Math\.max\(2, String\(value\)\.length \+ 0\.6\)/);
assert.doesNotMatch(feature, /client-failover-number-steps|уменьшить на|увеличить на|advancedOpen|advancedClosing|toggleAdvanced|aria-controls="client-failover-advanced-options"/);
assert.match(feature, /label="Добавить проверку"/);
assert.match(feature, /Новый HTTPS-сервис…/);
assert.match(feature, /Убрать проверку:/);
@@ -39,18 +40,21 @@ test('failover settings use Harbor switches, a two-column channel table and plai
assert.match(feature, /finishRemoveCheck/);
assert.match(feature, /startViewTransition/);
assert.match(feature, /onInput=\{pulseNumber\}/);
assert.match(feature, /aria-controls="client-failover-advanced-options"/);
assert.doesNotMatch(feature, /<details|<summary|Нет данных|текущий канал вне настроенной пары/);
assert.doesNotMatch(page, /Текущий канал вне резервной пары/);
assert.match(page, /Резерв применится после перезапуска VPN/);
assert.match(feature, /Приостановить автоматику[\s\S]*Проверить основной и резервный[\s\S]*Переключить новые соединения на/);
assert.match(feature, /beforeunload/);
assert.match(styles, /\.client-failover-switch\[aria-checked='true'\][\s\S]*translateX\(22px\)/);
assert.match(styles, /\.client-failover-heading \{[^}]*justify-content:\s*space-between[^}]*}/);
assert.doesNotMatch(styles, /\.client-failover-heading \{[^}]*padding-right/);
assert.match(styles, /\.client-failover-channels \{[^}]*grid-template-columns:\s*repeat\(2, minmax\(0, 1fr\)\)/);
assert.match(styles, /@media \(max-width: 560px\)[\s\S]*\.client-failover-channels \{ grid-template-columns:\s*minmax\(0, 1fr\)/);
assert.match(styles, /\.client-failover-picker-list[\s\S]*opacity:\s*0[\s\S]*\.client-failover-picker\.is-open[\s\S]*opacity:\s*1/);
assert.match(styles, /failover-service-out 300ms[\s\S]*failover-advanced-out[\s\S]*@media \(prefers-reduced-motion: reduce\)/);
assert.match(styles, /\.client-failover-number-setting input \{[^}]*text-align:\s*center[^}]*appearance:\s*textfield/);
assert.match(styles, /failover-service-out 300ms[\s\S]*@media \(prefers-reduced-motion: reduce\)/);
assert.match(styles, /\.client-failover-number-setting \{[^}]*display:\s*flex[^}]*flex-wrap:\s*wrap/);
assert.match(styles, /\.client-failover-number-setting input \{[^}]*border:\s*0[^}]*text-align:\s*center[^}]*appearance:\s*textfield/);
assert.doesNotMatch(styles, /client-failover-number-steps|client-failover-advanced|failover-advanced-in|failover-advanced-out/);
});
test('runtime status keeps fixed geometry and explains active traffic without motion dependence', () => {