forked from baron/baron-sso
feat(i18n): apply ORY bypass whitelist policy and add error-code tests
This commit is contained in:
@@ -74,7 +74,7 @@ void main() {
|
||||
);
|
||||
final detail = tr(
|
||||
'msg.userfront.error.whitelist.settings_disabled',
|
||||
fallback: errorWhitelistMessages['settings_disabled']!,
|
||||
fallback: internalErrorWhitelistMessages['settings_disabled']!,
|
||||
);
|
||||
final type = tr(
|
||||
'msg.userfront.error.type',
|
||||
@@ -88,6 +88,34 @@ void main() {
|
||||
expect(find.text(type), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('프로덕션은 ORY 코드를 bypass 처리한다', (WidgetTester tester) async {
|
||||
await _pumpErrorScreen(
|
||||
tester,
|
||||
errorCode: 'access_denied',
|
||||
description: '원문 메시지',
|
||||
isProdOverride: true,
|
||||
);
|
||||
|
||||
final title = tr(
|
||||
'msg.userfront.error.title',
|
||||
fallback: '인증 과정에서 오류가 발생했습니다',
|
||||
);
|
||||
final detail = tr(
|
||||
'msg.userfront.error.ory.access_denied',
|
||||
fallback: '사용자가 동의를 거부했습니다.',
|
||||
);
|
||||
final type = tr(
|
||||
'msg.userfront.error.type',
|
||||
fallback: '오류 종류: {{type}}',
|
||||
params: {'type': 'access_denied'},
|
||||
);
|
||||
|
||||
expect(find.text(title), findsOneWidget);
|
||||
expect(find.text(detail), findsOneWidget);
|
||||
expect(find.text('원문 메시지'), findsNothing);
|
||||
expect(find.text(type), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('프로덕션은 비허용 에러를 unknown_error로 처리한다', (WidgetTester tester) async {
|
||||
await _pumpErrorScreen(
|
||||
tester,
|
||||
|
||||
Reference in New Issue
Block a user