Update VPN proxy client behavior
This commit is contained in:
@@ -9,6 +9,7 @@ const root = path.resolve(import.meta.dirname, '../..');
|
||||
const page = fs.readFileSync(path.join(root, 'src/web/components/ClientOverviewPage.tsx'), 'utf8');
|
||||
const app = fs.readFileSync(path.join(root, 'src/web/App.tsx'), 'utf8');
|
||||
const feature = fs.readFileSync(path.join(root, 'src/web/features/subscription/SubscriptionFeature.tsx'), 'utf8');
|
||||
const styles = fs.readFileSync(path.join(root, 'src/web/styles/features/subscription.css'), 'utf8');
|
||||
const boundary = fs.readFileSync(path.join(root, 'src/web/features/subscription/index.ts'), 'utf8');
|
||||
|
||||
test('subscription feature is the sole always-mounted lifecycle and view owner', () => {
|
||||
@@ -86,3 +87,14 @@ test('feature keeps exact slots, truthy closes and subscription DOM order', () =
|
||||
assert.match(page, /subscriptionFeature\.close\(\)[\s\S]*devicesFeature\.close\(\)[\s\S]*diagnosticsFeature\.close\(\)/);
|
||||
assert.doesNotMatch(feature, /setInterval|copyText|client-live-region/);
|
||||
});
|
||||
|
||||
test('saved subscription stays one clear shared presentation', () => {
|
||||
assert.equal((feature.match(/client-subscription-summary/g) || []).length, 1);
|
||||
assert.match(feature, /client-subscription-heading[\s\S]*client-subscription-status[\s\S]*Сохранена[\s\S]*client-subscription-actions[\s\S]*client-subscription-refresh[\s\S]*client-subscription-delete/);
|
||||
assert.match(feature, /client-subscription-domain-button[\s\S]*client-subscription-label">Подписка[\s\S]*subscriptionDomain\(subscription\?\.host\)/);
|
||||
assert.match(feature, /client-usage-summary[\s\S]*Использовано[\s\S]* из [\s\S]*client-usage-bar[\s\S]*client-usage-details[\s\S]*Действует до[\s\S]*subscriptionDaysLeft/);
|
||||
assert.doesNotMatch(feature, /role="tab"|client-subscription-card|subscriptions\.map\(/);
|
||||
assert.match(styles, /\.client-subscription-heading\s*\{[\s\S]*grid-template-columns:\s*64px minmax\(0, 1fr\) 64px/);
|
||||
assert.match(styles, /\.client-usage\s*\{[\s\S]*min-height:\s*76px/);
|
||||
assert.match(styles, /@media \(prefers-reduced-motion: reduce\)[\s\S]*\.client-usage-summary > strong[\s\S]*transition:\s*none/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user