1
0
forked from baron/baron-sso

로컬/CI 테스트 동기화

This commit is contained in:
Lectom C Han
2026-02-24 16:42:55 +09:00
parent 8a074f16e7
commit 7fee9c597a
11 changed files with 277 additions and 92 deletions

View File

@@ -143,4 +143,54 @@ void main() {
expect(find.text('원문 메시지'), findsNothing);
expect(find.text(type), findsOneWidget);
});
testWidgets('프로덕션은 not_found 코드를 whitelist 메시지로 노출한다 (404 매핑)', (
WidgetTester tester,
) async {
await _pumpErrorScreen(
tester,
errorCode: 'not_found',
description: '원문 메시지',
isProdOverride: true,
);
final detail = tr(
'msg.userfront.error.whitelist.not_found',
fallback: internalErrorWhitelistMessages['not_found']!,
);
final type = tr(
'msg.userfront.error.type',
fallback: '오류 종류: {{type}}',
params: {'type': 'not_found'},
);
expect(find.text(detail), findsOneWidget);
expect(find.text(type), findsOneWidget);
expect(find.text('원문 메시지'), findsNothing);
});
testWidgets('프로덕션은 rate_limited 코드를 whitelist 메시지로 노출한다 (429 매핑)', (
WidgetTester tester,
) async {
await _pumpErrorScreen(
tester,
errorCode: 'rate_limited',
description: '원문 메시지',
isProdOverride: true,
);
final detail = tr(
'msg.userfront.error.whitelist.rate_limited',
fallback: internalErrorWhitelistMessages['rate_limited']!,
);
final type = tr(
'msg.userfront.error.type',
fallback: '오류 종류: {{type}}',
params: {'type': 'rate_limited'},
);
expect(find.text(detail), findsOneWidget);
expect(find.text(type), findsOneWidget);
expect(find.text('원문 메시지'), findsNothing);
});
}