test(security): env-gated proof shot of the auth-policy panel (Settings -> Security)
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
c81bc16eb9
commit
9cc330fca0
1 changed files with 25 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:chain_client_sdk/chain_client_sdk.dart' show HubEndpoint;
|
import 'package:chain_client_sdk/chain_client_sdk.dart' show HubEndpoint;
|
||||||
import 'package:chain_studio/data/hub.dart';
|
import 'package:chain_studio/data/hub.dart';
|
||||||
import 'package:chain_studio/main.dart';
|
import 'package:chain_studio/main.dart';
|
||||||
|
import 'package:chain_studio/widgets/hub_auth_policy_panel.dart';
|
||||||
import 'package:chain_studio/widgets/widgets.dart';
|
import 'package:chain_studio/widgets/widgets.dart';
|
||||||
|
|
||||||
import '../test/integration/hub_fixture.dart';
|
import '../test/integration/hub_fixture.dart';
|
||||||
|
|
@ -263,5 +264,29 @@ void main() {
|
||||||
await tester.sendKeyEvent(LogicalKeyboardKey.escape); // settings too
|
await tester.sendKeyEvent(LogicalKeyboardKey.escape); // settings too
|
||||||
await _pumpFrames(tester, 5);
|
await _pumpFrames(tester, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Proof shot (not in the guide's image set, hence env-gated —
|
||||||
|
// the regen script keeps its stable 01–11 output): Settings →
|
||||||
|
// Security with the live auth-policy panel loaded from the
|
||||||
|
// fixture hub.
|
||||||
|
if (Platform.environment['GUIDE_SHOTS_SECURITY'] == '1') {
|
||||||
|
await tester.sendKeyEvent(LogicalKeyboardKey.escape);
|
||||||
|
await _pumpFrames(tester, 5);
|
||||||
|
ChainSettingsDialog.show(tester.element(find.byType(StudioShell)));
|
||||||
|
await _pumpFrames(tester);
|
||||||
|
final securityTab = find.text(
|
||||||
|
_locale.languageCode == 'en' ? 'Security' : 'Sicherheit',
|
||||||
|
);
|
||||||
|
await _pumpUntil(tester, securityTab);
|
||||||
|
await tester.tap(securityTab.first);
|
||||||
|
await _pumpFrames(tester);
|
||||||
|
final policyPanel = find.byType(HubAuthPolicyPanel);
|
||||||
|
await _pumpUntil(tester, policyPanel);
|
||||||
|
await tester.ensureVisible(policyPanel.first);
|
||||||
|
await _pumpFrames(tester, 10);
|
||||||
|
await _shot(tester, '12-sicherheit');
|
||||||
|
await tester.sendKeyEvent(LogicalKeyboardKey.escape);
|
||||||
|
await _pumpFrames(tester, 5);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue