mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-14 09:27:55 +00:00
parent
7bef698f03
commit
d3362bf96a
@ -38,7 +38,7 @@ void main() {
|
|||||||
cloudType: AuthenticatorType.appflowyCloudSelfHost,
|
cloudType: AuthenticatorType.appflowyCloudSelfHost,
|
||||||
);
|
);
|
||||||
|
|
||||||
tester.expectToSeeText(LocaleKeys.signIn_loginStartWithAnonymous.tr());
|
await tester.tapContinousAnotherWay();
|
||||||
await tester.tapAnonymousSignInButton();
|
await tester.tapAnonymousSignInButton();
|
||||||
await tester.expectToSeeHomePageWithGetStartedPage();
|
await tester.expectToSeeHomePageWithGetStartedPage();
|
||||||
|
|
||||||
@ -75,18 +75,6 @@ void main() {
|
|||||||
|
|
||||||
await tester.logout();
|
await tester.logout();
|
||||||
await tester.pumpAndSettle();
|
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.
|
/// Tap the + button on the home page.
|
||||||
Future<void> tapAddViewButton({
|
Future<void> tapAddViewButton({
|
||||||
String name = gettingStarted,
|
String name = gettingStarted,
|
||||||
|
|||||||
@ -12,6 +12,8 @@ class Log {
|
|||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
late Logger _logger;
|
late Logger _logger;
|
||||||
|
|
||||||
|
bool _enabled = false;
|
||||||
|
|
||||||
Log() {
|
Log() {
|
||||||
_logger = Logger(
|
_logger = Logger(
|
||||||
printer: PrettyPrinter(
|
printer: PrettyPrinter(
|
||||||
@ -25,12 +27,14 @@ class Log {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void enableFlutterLog() {
|
||||||
|
shared._enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Generic internal logging function to reduce code duplication
|
// Generic internal logging function to reduce code duplication
|
||||||
static void _log(Level level, int rustLevel, dynamic msg,
|
static void _log(Level level, int rustLevel, dynamic msg,
|
||||||
[dynamic error, StackTrace? stackTrace]) {
|
[dynamic error, StackTrace? stackTrace]) {
|
||||||
final enableFlutterLog = false;
|
if (shared._enabled) {
|
||||||
// ignore: dead_code
|
|
||||||
if (enableFlutterLog) {
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case Level.info:
|
case Level.info:
|
||||||
shared._logger.i(msg, stackTrace: stackTrace);
|
shared._logger.i(msg, stackTrace: stackTrace);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user