Improve failover startup handling and status UI
Build and Deploy Gateway / build-and-push (push) Successful in 25s
Build and Deploy Gateway / deploy (push) Successful in 6s

This commit is contained in:
2026-08-19 20:24:04 +03:00
parent cedd31cc16
commit 3b515ee355
10 changed files with 190 additions and 63 deletions
+9 -2
View File
@@ -29,16 +29,23 @@ test('failover settings use Harbor switches, two pair pickers and added check ro
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, /\+ Добавить проверку/);
assert.match(feature, /label="Добавить проверку"/);
assert.match(feature, /Новый HTTPS-сервис…/);
assert.match(feature, /Убрать проверку:/);
assert.match(feature, /client-failover-remove-lid/);
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, /Проверить оба канала/);
assert.match(feature, /beforeunload/);
assert.match(styles, /\.client-failover-switch\[aria-checked='true'\][\s\S]*translateX\(20px\)/);
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 180ms[\s\S]*@media \(prefers-reduced-motion: reduce\)/);
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/);
});
test('runtime status keeps fixed geometry and explains active traffic without motion dependence', () => {
+16 -16
View File
@@ -39,26 +39,26 @@ const expectedImports = [
const sha256 = (value) => crypto.createHash('sha256').update(value).digest('hex');
const acceptedLedger = {
counts: {
cascadeEdges: 1015,
cascadeEdges: 1053,
customProperties: 106,
declarations: 3987,
declarations: 4094,
important: 0,
keyframes: 50,
keyframes: 52,
media: 17,
rules: 1085,
variableReferences: 1011,
rules: 1111,
variableReferences: 1030,
},
hashes: {
cascadeEdges: 'f90d8086d1e3e30462b4c7b9c293069940006ab2ac2be069c7e3f293b411d390',
cascadeEdges: '6e645a4af9c0d5631f2d20723648f863cd90fe05e08a7c38466ad1ddf37a18de',
customProperties: 'fd6f16069f9fe3526f09d4d574431ddae67150d8e7a8a40e04c9fd2d179ec7ac',
declarations: 'dffddfea7b28b9de1a4af74f16d25920974879c9cecff19141841691e63468dd',
declarations: 'b5060e6b480cc565390095950396af40e1e593eca6b0d50543e58d8db7cb89c1',
duplicateKeyframes: '4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945',
duplicateSelectors: '8982145dba05b33bf1c93b2d54cfbe76305b276ff3c657aa020144016ada5848',
keyframes: '21e640e8d2bf5921d346563823dd332cb4c0fc376292b555d10e1670cd81d74c',
ruleDeclarationSequences: '144d9f148f8fa2b57bd7d40a02f75f6d6894d7d1e0b6a44ec6f18b22eb876055',
selectors: '279ee9d08e470259ee573e063d8dec8aabb7c43fc49f3c7942cc8d5af46e4828',
variableReferences: '00358fb265ec9e847a36fbf157224d01b634477c546f1a6b72a70e8d05394a57',
witnesses: 'c45f872c163e079f58d28c481db0b9cf919d5d4e1d053ddfdc00103bd20ae737',
keyframes: 'afdfc9691f8ef629fd5f263f3eebecf2373b54f0940d8deedd5e74497d55d0f3',
ruleDeclarationSequences: '7853d3fa55954dc279c0a8788280bea6079b8c39e8a809e3508f673e0e25ee85',
selectors: '12d7e3921cd5ebddbe3a0fb10a1113ca3165a7c5597c8e80d3917d19df5737e9',
variableReferences: 'e70f638b46142b1cf78cc9d82410735d9f72a32a9711bc1f0eac34e13fd653c4',
witnesses: 'a033ac2b7b6c297c6876e68818a6566a0eb95095494d45af6423c85476918061',
},
};
@@ -211,7 +211,7 @@ test('client typography uses the shared semantic scale outside the token owner',
test('accepted stylesheet has pinned declaration, selector, keyframe, variable, and cascade ledgers', () => {
const witnesses = readStyleWitnesses(root);
assert.equal(witnesses.length, 1024);
assert.equal(witnesses.length, 1031);
assert.equal(witnesses.filter((witness) => witness.unknown || witness.ancestorUnknown).length, 0);
const ledger = createStyleLedger(readStyleSource(root), { witnesses });
assert.deepEqual(ledger.counts, acceptedLedger.counts);
@@ -407,8 +407,8 @@ test('main owns one public stylesheet and the regrouped production CSS is determ
assert.equal((main.match(/import ['"][^'"]+\.css['"]/g) || []).length, 1);
const assets = fs.readdirSync(path.join(root, 'dist/assets')).filter((file) => file.endsWith('.css'));
assert.deepEqual(assets, ['index-CWWRFYvR.css']);
assert.deepEqual(assets, ['index-egC2pF0y.css']);
const built = fs.readFileSync(path.join(root, 'dist/assets', assets[0]));
assert.equal(built.byteLength, 151327);
assert.equal(sha256(built), '95bdf0125b40fe1349abd6396a40462a9c6bee40ff258078d3787b62e9213028');
assert.equal(built.byteLength, 155655);
assert.equal(sha256(built), '08abd35b2cb28ad64a637a3ae45cbccb65ddba803184cd6f65bcb9bf59101a8a');
});