Reposition Gateway traffic summary
This commit is contained in:
@@ -171,6 +171,7 @@ test('Gateway Home reuses the canonical device snapshot for applied route and gl
|
||||
assert.match(overview, /selectedServerId !== appliedServerId[\s\S]*Переключаем на \{desiredServer\.label\}/);
|
||||
assert.match(overview, /formatByteString\(globalTraffic\?\.totalBytes \|\| '0'\)/);
|
||||
assert.match(overview, /samples=\{globalTraffic\?\.history \|\| \[\]\}[\s\S]*capacity=\{deviceSnapshot\?\.trafficHistoryCapacity \|\| 120\}[\s\S]*routeLabel="Gateway"/);
|
||||
assert.match(overview, /<section className="client-power-section"[\s\S]*client-connection-title[\s\S]*client-gateway-route-summary[\s\S]*client-state-detail[\s\S]*<section className="client-gateway-summary"[\s\S]*client-proxies/);
|
||||
assert.doesNotMatch(overview, /<TrafficChart[\s\S]{0,240}scale=/);
|
||||
assert.match(overview, /deviceStatus === 'error' \? deviceError : null/);
|
||||
assert.match(overview, /if \(!isGateway && \(!connected \|\| !state\?\.singboxStartedAt\)\) return undefined/);
|
||||
|
||||
@@ -30,8 +30,9 @@ test('desktop layout keeps the power control on a symmetric center axis', () =>
|
||||
assert.match(styles, /\.client-panel\.has-subscription \{[\s\S]*transform:\s*translateY\(-9vh\)/);
|
||||
assert.match(styles, /\.client-panel\.has-subscription \.client-power-section \{[\s\S]*height:\s*var\(--client-work-height\);[\s\S]*padding-top:\s*var\(--client-power-top\)/);
|
||||
assert.match(styles, /\.client-panel\.has-subscription \.client-form-content \{[\s\S]*padding-top:\s*var\(--client-power-top\)/);
|
||||
assert.match(rule('.client-gateway-summary'), /grid-column:\s*1/);
|
||||
assert.match(rule('.client-gateway-summary'), /justify-self:\s*end/);
|
||||
assert.match(rule('.client-gateway-summary'), /width:\s*min\(300px, 100%\)/);
|
||||
assert.doesNotMatch(rule('.client-gateway-summary'), /grid-column|justify-self|padding-right/);
|
||||
assert.match(rule('.client-gateway-route-slot'), /min-height:\s*16px[\s\S]*overflow:\s*hidden[\s\S]*text-overflow:\s*ellipsis[\s\S]*white-space:\s*nowrap/);
|
||||
assert.match(component, /client-panel\$\{showPower \? '' : ' is-setup'\}[\s\S]*is-gateway-home/);
|
||||
assert.match(component, /const showPower = isGateway \|\| \(hasSubscription && Boolean\(selectedServerId\)\)/);
|
||||
});
|
||||
@@ -72,9 +73,8 @@ test('tablet and mobile regions use normal flow with viewport-safe widths', () =
|
||||
|
||||
assert.match(responsive, /grid-template-columns:\s*minmax\(0, 1fr\)/);
|
||||
assert.match(responsive, /\.client-power-section,[\s\S]*\.client-form,[\s\S]*grid-column:\s*1/);
|
||||
assert.match(responsive, /\.client-gateway-summary/);
|
||||
assert.match(responsive, /\.client-power-section \{[\s\S]*order:\s*1/);
|
||||
assert.match(responsive, /\.client-gateway-summary \{[\s\S]*order:\s*2/);
|
||||
assert.doesNotMatch(responsive, /\.client-gateway-summary/);
|
||||
assert.match(responsive, /width:\s*min\(100%, 380px\)/);
|
||||
assert.match(responsive, /max-height:\s*none/);
|
||||
assert.match(responsive, /overflow-y:\s*visible/);
|
||||
|
||||
Reference in New Issue
Block a user