Fix profile server selection activation state
Build and Deploy Gateway / build-and-push (push) Successful in 20s
Build and Deploy Gateway / deploy (push) Successful in 7s

This commit is contained in:
2026-08-11 10:11:13 +03:00
parent 17849ffd73
commit 7e4da4bdcf
11 changed files with 60 additions and 62 deletions
@@ -111,7 +111,10 @@ test('profiles render as flat accordion groups with scoped controls', () => {
assert.match(feature, /feature\.operations\.profileRefresh\?\.target === profile\.id/);
assert.match(feature, /\{visibleServer && <button[\s\S]*client-profile-selected-server[\s\S]*aria-expanded=\{expanded\}/);
assert.match(feature, /anchorServerId: visibleServer\?\.id \|\| ''/);
assert.match(feature, /const visibleServerId = applied \? feature\.selection\.appliedServerId : profile\.desiredServerId/);
assert.match(feature, /const visibleServerId = applied[\s\S]*feature\.selection\.appliedServerId[\s\S]*desired \? profile\.desiredServerId : ''/);
assert.match(feature, /selectedServerId: visibleServerId/);
assert.doesNotMatch(feature, /Сделать активной|client-profile-activate|onActivate/);
assert.doesNotMatch(page, /onActivateProfile/);
assert.match(feature, /const desired = !feature\.connected[\s\S]*&& !feature\.gatewayDirect/);
assert.match(feature, /const profileDomain = subscriptionDomain\(profile\.subscription\.host\)/);
assert.match(feature, /const profileDetails = `Серверов: \$\{profile\.servers\.length\}/);
@@ -122,6 +125,7 @@ test('profiles render as flat accordion groups with scoped controls', () => {
assert.match(styles, /@media \(prefers-reduced-motion: reduce\)[\s\S]*\.client-profile-body \*/);
assert.match(styles, /\.client-profile-refresh\.is-refreshing/);
assert.match(styles, /\.client-profile-refresh,[\s\S]*\.client-profile-delete\s*\{[\s\S]*width:\s*36px;[\s\S]*height:\s*36px;[\s\S]*display:\s*grid;[\s\S]*place-items:\s*center/);
assert.match(styles, /\.client-profile-activate\s*\{[\s\S]*font:\s*var\(--type-micro\)/);
assert.match(styles, /\.client-profile-refresh\s*\{[\s\S]*grid-column:\s*3/);
assert.match(styles, /\.client-profile-delete\s*\{[\s\S]*grid-column:\s*4/);
assert.doesNotMatch(feature, /client-subscription-card|role="tab"/);
});