mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-01 18:43:22 +00:00
parent
7bef698f03
commit
d3362bf96a
@ -38,7 +38,7 @@ void main() {
|
||||
cloudType: AuthenticatorType.appflowyCloudSelfHost,
|
||||
);
|
||||
|
||||
tester.expectToSeeText(LocaleKeys.signIn_loginStartWithAnonymous.tr());
|
||||
await tester.tapContinousAnotherWay();
|
||||
await tester.tapAnonymousSignInButton();
|
||||
await tester.expectToSeeHomePageWithGetStartedPage();
|
||||
|
||||
@ -75,18 +75,6 @@ void main() {
|
||||
|
||||
await tester.logout();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
// tap the continue as anonymous button
|
||||
await tester
|
||||
.tapButton(find.text(LocaleKeys.signIn_loginStartWithAnonymous.tr()));
|
||||
await tester.expectToSeeHomePage();
|
||||
|
||||
// New anon user name
|
||||
await tester.openSettings();
|
||||
await tester.openSettingsPage(SettingsPage.account);
|
||||
final userNameInput =
|
||||
tester.widget(find.byType(AccountUserProfile)) as AccountUserProfile;
|
||||
expect(userNameInput.name, 'Me');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -57,6 +57,14 @@ extension CommonOperations on WidgetTester {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> tapContinousAnotherWay() async {
|
||||
// local version
|
||||
await tapButtonWithName(LocaleKeys.signIn_continueAnotherWay.tr());
|
||||
if (Platform.isWindows) {
|
||||
await pumpAndSettle(const Duration(milliseconds: 200));
|
||||
}
|
||||
}
|
||||
|
||||
/// Tap the + button on the home page.
|
||||
Future<void> tapAddViewButton({
|
||||
String name = gettingStarted,
|
||||
|
||||
@ -12,6 +12,8 @@ class Log {
|
||||
// ignore: unused_field
|
||||
late Logger _logger;
|
||||
|
||||
bool _enabled = false;
|
||||
|
||||
Log() {
|
||||
_logger = Logger(
|
||||
printer: PrettyPrinter(
|
||||
@ -25,12 +27,14 @@ class Log {
|
||||
);
|
||||
}
|
||||
|
||||
static void enableFlutterLog() {
|
||||
shared._enabled = true;
|
||||
}
|
||||
|
||||
// Generic internal logging function to reduce code duplication
|
||||
static void _log(Level level, int rustLevel, dynamic msg,
|
||||
[dynamic error, StackTrace? stackTrace]) {
|
||||
final enableFlutterLog = false;
|
||||
// ignore: dead_code
|
||||
if (enableFlutterLog) {
|
||||
if (shared._enabled) {
|
||||
switch (level) {
|
||||
case Level.info:
|
||||
shared._logger.i(msg, stackTrace: stackTrace);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user