forked from firebase/FirebaseUI-Flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui_auth): add showPasswordVisibilityToggle to the SignInScreen (f…
…irebase#114) * fix(ui_auth): add showPasswordVisibilityToggle to the SignInScreen * add license header
- Loading branch information
Showing
12 changed files
with
110 additions
and
3 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
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
47 changes: 47 additions & 0 deletions
47
packages/firebase_ui_auth/test/screens/sign_in_screen_test.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,47 @@ | ||
// Copyright 2023, the Chromium project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:firebase_ui_auth/firebase_ui_auth.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
import '../test_utils.dart'; | ||
|
||
void main() { | ||
group("$SignInScreen", () { | ||
setUpAll(() { | ||
setFirebaseUiIsTestMode(true); | ||
}); | ||
|
||
testWidgets( | ||
"doesn't have password visibility toggle by default", | ||
(tester) async { | ||
await tester.pumpWidget( | ||
TestMaterialApp( | ||
child: SignInScreen( | ||
auth: MockAuth(), | ||
providers: [EmailAuthProvider()], | ||
), | ||
), | ||
); | ||
|
||
expect(find.byIcon(Icons.visibility), findsNothing); | ||
}, | ||
); | ||
|
||
testWidgets('allows to add password visibility toggle', (tester) async { | ||
await tester.pumpWidget( | ||
TestMaterialApp( | ||
child: SignInScreen( | ||
auth: MockAuth(), | ||
providers: [EmailAuthProvider()], | ||
showPasswordVisibilityToggle: true, | ||
), | ||
), | ||
); | ||
|
||
expect(find.byIcon(Icons.visibility), findsOneWidget); | ||
}); | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
list(APPEND FLUTTER_PLUGIN_LIST | ||
desktop_webview_auth | ||
firebase_auth | ||
firebase_core | ||
) | ||
|
||
|
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