diff --git a/integration_test/windows_reset_shot_test.dart b/integration_test/windows_reset_shot_test.dart index afd553b..e0c92a8 100644 --- a/integration_test/windows_reset_shot_test.dart +++ b/integration_test/windows_reset_shot_test.dart @@ -36,7 +36,9 @@ void main() { await t.runAsync(() async { await lock.load(); await lock.setMaster('시험-마스터'); + await lock.setSuper('시험-최상'); }); + lock.unlocked = false; final navKey = GlobalKey(); final shotKey = GlobalKey(); await t.pumpWidget(RepaintBoundary( @@ -66,10 +68,21 @@ void main() { await settle(); } - // ① 최상 비밀번호 - 초기화 (무엇을 초기화할지) - 셋 다 체크해 긴 설명까지 보이게 - unawaited(showSuperReset(navKey.currentContext!, c, lock)); + // ⓪ 관리자 지시 (10/21): 사용자가 가는 길 그대로 - 마스터 입력 창에 최상 비밀번호를 넣으면 초기화 창 (가짜 저장소 · 가짜 비밀번호) + unawaited(askMaster(navKey.currentContext!, c, lock)); await settle(); + await shot('0_master'); + await t.enterText(find.byType(TextField), '시험-최상'); + await t.tap(find.byType(FilledButton).last); + for (var i = 0; i < 100 && find.byType(CheckboxListTile).evaluate().isEmpty; i++) { + await settle(1); + } + // ① 최상 비밀번호 - 초기화 (무엇을 초기화할지): 체크 3개, 처음 체크는 마스터만 + expect(find.byType(CheckboxListTile), findsNWidgets(3), reason: '마스터 창에 최상 비밀번호 → 초기화 창'); + expect([for (final e in find.byType(CheckboxListTile).evaluate()) (e.widget as CheckboxListTile).value], [true, false, false], + reason: '처음 체크는 마스터만'); await shot('1_super'); + // 셋 다 체크해 긴 설명까지 보이게 for (final cb in find.byType(CheckboxListTile).evaluate().toList()) { final tile = cb.widget as CheckboxListTile; if (tile.value != true && tile.onChanged != null) tile.onChanged!(true); @@ -88,6 +101,7 @@ void main() { await shot('4_forgot'); await closeAll(); expect(lock.hasMaster, isTrue, reason: '찍기만 하고 지우지 않음'); + expect(lock.hasSuper, isTrue); }); } }