Improve failover controls and preserve manual switching state
This commit is contained in:
@@ -11,6 +11,7 @@ const connection = fs.readFileSync(path.join(root, 'src/web/features/connection/
|
||||
const subscription = fs.readFileSync(path.join(root, 'src/web/features/subscription/SubscriptionFeature.tsx'), 'utf8');
|
||||
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 failover = fs.readFileSync(path.join(root, 'src/web/features/failover/FailoverFeature.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);
|
||||
@@ -54,12 +55,14 @@ test('critical confirmations share one accessible blocking popup', () => {
|
||||
(component.match(/<ConfirmationDialog/g) || []).length
|
||||
+ (connection.match(/<ConfirmationDialog/g) || []).length
|
||||
+ (subscription.match(/<ConfirmationDialog/g) || []).length
|
||||
+ (routing.match(/<ConfirmationDialog/g) || []).length,
|
||||
3,
|
||||
+ (routing.match(/<ConfirmationDialog/g) || []).length
|
||||
+ (failover.match(/<ConfirmationDialog/g) || []).length,
|
||||
4,
|
||||
);
|
||||
assert.match(connection, /id="stop-connection"/);
|
||||
assert.match(routing, /id="discard-local-rules"/);
|
||||
assert.match(subscription, /id="delete-subscription"/);
|
||||
assert.match(failover, /id="discard-failover"/);
|
||||
assert.doesNotMatch(component, /client-local-rules-discard|client-delete-confirmation/);
|
||||
assert.match(dialog, /role="alertdialog"/);
|
||||
assert.match(dialog, /aria-modal="true"/);
|
||||
|
||||
Reference in New Issue
Block a user