From 4abdcd9478e8e0d265c312843bb8c13d07e3bdea Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Thu, 25 Jul 2024 12:02:18 +0800 Subject: [PATCH] fix: integration test (reset to default location) (#5804) * fix: integration test (reset to default location) * fix: unit test (appflowy cloud anon user and then sign in) * Revert "fix: unit test (appflowy cloud anon user and then sign in)" This reverts commit 2635aa42f013318a4395216b126b2e3d9336ab0b. * fix: unit test (appflowy cloud anon user and then sign in) --- .../integration_test/shared/auth_operation.dart | 7 +++---- .../settings/pages/settings_manage_data_view.dart | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/appflowy_flutter/integration_test/shared/auth_operation.dart b/frontend/appflowy_flutter/integration_test/shared/auth_operation.dart index e2c926fcfe..56815714c0 100644 --- a/frontend/appflowy_flutter/integration_test/shared/auth_operation.dart +++ b/frontend/appflowy_flutter/integration_test/shared/auth_operation.dart @@ -1,5 +1,3 @@ -import 'package:flutter/material.dart'; - import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/user/presentation/screens/sign_in_screen/widgets/widgets.dart'; import 'package:appflowy/workspace/presentation/settings/pages/settings_account_view.dart'; @@ -7,6 +5,7 @@ import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflow import 'package:appflowy/workspace/presentation/settings/widgets/setting_supabase_cloud.dart'; import 'package:appflowy/workspace/presentation/widgets/toggle/toggle.dart'; import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'util.dart'; @@ -29,8 +28,8 @@ extension AppFlowyAuthTest on WidgetTester { await tapButton(find.byType(SignInOutButton)); - expectToSeeText(LocaleKeys.button_confirm.tr()); - await tapButtonWithName(LocaleKeys.button_confirm.tr()); + expectToSeeText(LocaleKeys.button_ok.tr()); + await tapButtonWithName(LocaleKeys.button_ok.tr()); } Future tapSignInAsGuest() async { diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart index 180aee2848..fe5afb5a46 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/settings_manage_data_view.dart @@ -1,8 +1,5 @@ import 'dart:async'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; - import 'package:appflowy/core/helpers/url_launcher.dart'; import 'package:appflowy/generated/flowy_svgs.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart'; @@ -29,6 +26,8 @@ import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:fluttertoast/fluttertoast.dart'; @@ -71,6 +70,7 @@ class SettingsManageDataView extends StatelessWidget { description: LocaleKeys .settings_manageDataPage_dataStorage_resetDialog_description .tr(), + confirmLabel: LocaleKeys.button_confirm.tr(), onConfirm: () async { final directory = await appFlowyApplicationDataDirectory();