Improve failover status feedback and controls
Build and Deploy Gateway / build-and-push (push) Successful in 26s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-20 01:32:03 +03:00
parent 9055934e92
commit 74227ae38c
7 changed files with 174 additions and 87 deletions
+14 -9
View File
@@ -16,19 +16,22 @@ test('reserve is a Gateway-only drawer immediately after subscriptions', () => {
assert.match(feature, /Уже открытые соединения Harbor не закрывает/);
});
test('failover settings use Harbor switches, two pair pickers and added check rows', () => {
test('failover settings use Harbor switches, a two-column channel table and plain-language controls', () => {
assert.match(feature, /client-failover-heading[\s\S]*<h2>Резервный канал<\/h2>[\s\S]*<HarborSwitch/);
assert.match(feature, /role="switch"[\s\S]*aria-checked=\{checked\}/);
assert.doesNotMatch(feature, /type="checkbox"|<select/);
assert.match(feature, /\['primary', 'reserve'\][\s\S]*client-failover-\$\{channel\}-options[\s\S]*updateTarget\(channel, optionId\)/);
assert.match(feature, /profile\.label} · \$\{server\.label/);
assert.match(feature, /channelLabel[\s\S]*profile\.trim\(\) === server\.trim\(\)[\s\S]*`\$\{profile} · \$\{server}`/);
assert.match(feature, /client-failover-channels[\s\S]*<article className="client-failover-channel"[\s\S]*<h3>\{channel === 'primary' \? 'Основной' : 'Резервный'}/);
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, /min="2"[\s\S]*max="30"[\s\S]*Таймаут проверки:/);
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, /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, /label="Добавить проверку"/);
assert.match(feature, /Новый HTTPS-сервис…/);
assert.match(feature, /Убрать проверку:/);
@@ -40,12 +43,14 @@ test('failover settings use Harbor switches, two pair pickers and added check ro
assert.doesNotMatch(feature, /<details|<summary|Нет данных|текущий канал вне настроенной пары/);
assert.doesNotMatch(page, /Текущий канал вне резервной пары/);
assert.match(page, /Резерв применится после перезапуска VPN/);
assert.match(feature, /Проверить оба канала/);
assert.match(feature, /Приостановить автоматику[\s\S]*Проверить основной и резервный[\s\S]*Переключить новые соединения на/);
assert.match(feature, /beforeunload/);
assert.match(styles, /\.client-failover-switch\[aria-checked='true'\][\s\S]*translateX\(20px\)/);
assert.match(styles, /\.client-failover-switch\[aria-checked='true'\][\s\S]*translateX\(22px\)/);
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, /appearance:\s*textfield[\s\S]*text-align:\s*center/);
assert.match(styles, /\.client-failover-number-setting input \{[^}]*text-align:\s*center[^}]*appearance:\s*textfield/);
});
test('runtime status keeps fixed geometry and explains active traffic without motion dependence', () => {