-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bcfa27
commit 402db9f
Showing
18 changed files
with
416 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
|
||
mixin WidgetKeyUtils { | ||
String getKey(); | ||
|
||
Key toKey() { | ||
return Key(getKey()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ture/account/domain/entity/auth_code_verification/auth_code_verification_entity.mock.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
part of 'auth_code_verification_entity.dart'; | ||
|
||
extension AuthCodeVerificationEntityMock on AuthCodeVerificationEntity { | ||
static AuthCodeVerificationEntity validMock() { | ||
return AuthCodeVerificationEntity( | ||
phone: '01012345678', | ||
authCode: '123456', | ||
); | ||
} | ||
|
||
static AuthCodeVerificationEntity invalidMock() { | ||
return AuthCodeVerificationEntity( | ||
phone: '01012345678', | ||
authCode: '1234', | ||
); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
lib/feature/account/domain/entity/send_auth_code/send_auth_code_result_entity.mock.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
lib/feature/account/presentation/widget/phone_auth/phone_auth.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export 'phone_auth_widget.dart'; | ||
export 'phone_auth_widget_key.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
lib/feature/account/presentation/widget/phone_auth/phone_auth_widget_key.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:withu_app/core/utils/mixins/widget_key_utils.dart'; | ||
|
||
enum PhoneAuthWidgetKey with WidgetKeyUtils { | ||
phoneInput, | ||
sendAuthBtn, | ||
authCodeInput; | ||
|
||
@override | ||
String getKey() { | ||
return name; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export 'login_tab/tab.dart'; | ||
export 'phone_auth/phone_auth_widget.dart'; | ||
export 'phone_auth/phone_auth.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:withu_app/core/utils/mixins/widget_key_utils.dart'; | ||
|
||
extension WidgetKeyUtilsExt on WidgetKeyUtils { | ||
Finder toFinder() { | ||
return find.byKey(toKey()); | ||
} | ||
|
||
/// Widget으로 변경 | ||
T toWidget<T extends Widget>(WidgetTester tester) { | ||
return tester.widget<T>(toFinder()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.