Update VPN client and gateway behavior
This commit is contained in:
@@ -12,6 +12,7 @@ const subscription = fs.readFileSync(path.join(root, 'src/web/features/subscript
|
||||
const routing = fs.readFileSync(path.join(root, 'src/web/features/routing/RoutingFeature.tsx'), 'utf8');
|
||||
const instructions = fs.readFileSync(path.join(root, 'src/web/features/instructions/InstructionsFeature.tsx'), 'utf8');
|
||||
const dialog = fs.readFileSync(path.join(root, 'src/web/ui/ConfirmationDialog.tsx'), 'utf8');
|
||||
const copyButton = fs.readFileSync(path.join(root, 'src/web/ui/CopyButton.tsx'), 'utf8');
|
||||
const styles = readStyleSource(root);
|
||||
|
||||
test('rule editor add latency stays constant and dirty exits are guarded', () => {
|
||||
@@ -31,7 +32,7 @@ test('rule editor add latency stays constant and dirty exits are guarded', () =>
|
||||
assert.match(routing, /client-deletable-row/);
|
||||
assert.match(routing, /className="client-delete-strike"[\s\S]*onAnimationEnd/);
|
||||
assert.doesNotMatch(routing, /client-rule-delete-cross/);
|
||||
assert.match(routing, /className="client-local-rule-delete"/);
|
||||
assert.match(routing, /className="client-row-delete"/);
|
||||
assert.match(styles, /\.client-deletable-row\.is-removing > \.client-delete-strike[\s\S]*client-delete-strike/);
|
||||
assert.match(styles, /\.client-delete-strike \{[\s\S]*z-index: 100[\s\S]*background: transparent/);
|
||||
assert.match(styles, /\.client-deletable-row\.is-removing > :not\(\.client-delete-strike\)[\s\S]*z-index: 0/);
|
||||
@@ -40,7 +41,7 @@ test('rule editor add latency stays constant and dirty exits are guarded', () =>
|
||||
assert.doesNotMatch(styles, /client-local-rule > button:last-child/);
|
||||
assert.match(styles, /@keyframes client-delete-strike[\s\S]*scaleX\(0\)[\s\S]*scaleX\(1\)/);
|
||||
assert.match(styles, /53%[\s\S]*transform-origin: right center[\s\S]*100%[\s\S]*scaleX\(0\)/);
|
||||
assert.match(styles, /@keyframes client-local-rule-leave[\s\S]*translateX\(28px\)/);
|
||||
assert.match(styles, /@keyframes client-row-leave[\s\S]*translateX\(28px\)/);
|
||||
assert.match(styles, /@keyframes client-delete-content-dim[\s\S]*opacity: 0\.58[\s\S]*blur\(1\.4px\)[\s\S]*opacity: 0/);
|
||||
assert.match(styles, /\.client-local-rule:has\(\.client-rule-type\.is-open\)[\s\S]*z-index: 5/);
|
||||
});
|
||||
@@ -84,16 +85,16 @@ test('copy feedback, drawers and Gateway access actions expose complete semantic
|
||||
assert.match(component, /className="client-live-region" role="status" aria-live="polite" aria-atomic="true"/);
|
||||
assert.match(component, /Не удалось скопировать/);
|
||||
assert.match(component, /Скопировано/);
|
||||
assert.match(connection, /client-copy-feedback[^\n]*\{feedback\.failed \? 'Ошибка' : 'Скопировано'\}/);
|
||||
assert.match(copyButton, /client-copy-feedback[\s\S]*feedback\.failed \? 'Ошибка' : 'Скопировано'/);
|
||||
assert.doesNotMatch(component, /ГОТОВО/);
|
||||
assert.doesNotMatch(component, />Error<|>Copied</);
|
||||
assert.match(instructions, /aria-label="Закрыть инструкции"/);
|
||||
assert.match(routing, /aria-label="Закрыть локальные правила"/);
|
||||
assert.match(instructions, /closeLabel="Закрыть инструкции"/);
|
||||
assert.match(routing, /closeLabel="Закрыть локальные правила"/);
|
||||
assert.match(instructions, /closeRef\.current\?\.focus\(\)/);
|
||||
assert.match(routing, /closeRef\.current\?\.focus\(\)/);
|
||||
assert.match(connection, /aria-label={`Скопировать \$\{label\}: \$\{kind === 'gateway' \? gatewayAddress : proxyUrls\[kind\]\}`}/);
|
||||
assert.match(connection, /ariaLabel={`Скопировать \$\{label\}: \$\{kind === 'gateway' \? gatewayAddress : proxyUrls\[kind\]\}`}/);
|
||||
assert.doesNotMatch(component, /client-access-tabs|role="tab"|role="tabpanel"/);
|
||||
assert.match(styles, /\.client-drawer-close \{[\s\S]*width: 44px;[\s\S]*height: 44px/);
|
||||
assert.match(styles, /@media \(max-width: 560px\)[\s\S]*\.client-copy-button \{[\s\S]*min-height: 44px/);
|
||||
assert.match(styles, /@media \(max-width: 560px\)[\s\S]*\.client-local-rule-enabled,[\s\S]*\.client-local-rule-delete \{[\s\S]*width: 44px;[\s\S]*height: 44px/);
|
||||
assert.match(styles, /@media \(max-width: 560px\)[\s\S]*\.client-local-rule-enabled,[\s\S]*\.client-row-delete \{[\s\S]*width: 44px;[\s\S]*height: 44px/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user