Handle rejected subscriptions and add local client compose
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 14s
Build and Deploy Gateway / deploy (push) Successful in 6s

This commit is contained in:
2026-07-13 20:23:37 +03:00
parent 8c19f2cba9
commit 56f5e408e3
10 changed files with 306 additions and 443 deletions

View File

@@ -9,6 +9,7 @@ import {
formatConnectionDurationWords,
isSubscriptionUrlValid,
localProxyUrls,
routePresentation,
subscriptionDomain,
subscriptionDaysLeft,
subscriptionUsage,
@@ -74,6 +75,14 @@ test('gateway proxy URLs use its network address', () => {
});
});
test('route copy distinguishes found, stale, lost, disabled and local states', () => {
assert.equal(routePresentation({ mode: 'gateway-direct', reason: 'gateway-found' }).title, 'Через Harbor Gateway');
assert.equal(routePresentation({ mode: 'gateway-direct', reason: 'gateway-stale' }).tone, 'stale');
assert.match(routePresentation({ mode: 'local-vpn', reason: 'gateway-lost' }).title, /Gateway недоступен/);
assert.match(routePresentation({ mode: 'local-vpn', reason: 'disabled' }).detail, /выключен/);
assert.equal(routePresentation({ mode: 'local-vpn', reason: 'local' }).title, 'Локальный VPN');
});
test('copy uses the synchronous native path available on gateway HTTP', async () => {
const textarea = {
style: {},