feat: custom server url in application (#3996)

* chore:test

* chore: update ui

* feat: set appflowy cloud url

* chore: add self host docs

* fix: save user

* fix: sign out when authenticator not match

* fix: sign out when authenticator not match

* fix: db lock

* chore: remove unuse env file

* test: disable supabase cloud test

* test: disable supabase cloud test

* chore: fix save
This commit is contained in:
Nathan.fooo
2023-11-24 11:54:47 +08:00
committed by GitHub
parent e18e031710
commit 1fad713477
63 changed files with 1758 additions and 721 deletions

View File

@ -1,8 +1,6 @@
import 'package:appflowy/env/env.dart';
import 'package:integration_test/integration_test.dart';
import 'appearance_settings_test.dart' as appearance_test_runner;
import 'auth/auth_test.dart' as auth_test_runner;
import 'board/board_test_runner.dart' as board_test_runner;
import 'database_calendar_test.dart' as database_calendar_test;
import 'database_cell_test.dart' as database_cell_test;
@ -32,7 +30,7 @@ import 'tabs_test.dart' as tabs_test;
/// If flutter/flutter#101031 is resolved, this file can be removed completely.
/// Once removed, the integration_test.yaml must be updated to exclude this as
/// as the test target.
void main() {
Future<void> main() async {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
// This test must be run first, otherwise the CI will fail.
@ -76,9 +74,10 @@ void main() {
// User settings
settings_test_runner.main();
if (isCloudEnabled) {
auth_test_runner.main();
}
// final cloudType = await getCloudType();
// if (cloudType == CloudType.supabase) {
// auth_test_runner.main();
// }
// board_test.main();
// empty_document_test.main();

View File

@ -1,5 +1,5 @@
import 'package:appflowy/user/presentation/screens/sign_in_screen/widgets/widgets.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_cloud_view.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_supabase_cloud.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
@ -37,7 +37,7 @@ extension AppFlowyAuthTest on WidgetTester {
void assertEnableSyncSwitchValue(bool value) {
assertSwitchValue(
find.descendant(
of: find.byType(EnableSync),
of: find.byType(SupabaseEnableSync),
matching: find.byWidgetPredicate((widget) => widget is Switch),
),
value,
@ -55,7 +55,7 @@ extension AppFlowyAuthTest on WidgetTester {
Future<void> toggleEnableSync() async {
final finder = find.descendant(
of: find.byType(EnableSync),
of: find.byType(SupabaseEnableSync),
matching: find.byWidgetPredicate((widget) => widget is Switch),
);

View File

@ -83,7 +83,7 @@ extension AppFlowyTestBase on WidgetTester {
}
Future<void> waitUntilSignInPageShow() async {
if (isCloudEnabled) {
if (isAuthEnabled) {
final finder = find.byType(SignInAnonymousButton);
await pumpUntilFound(finder);
expect(finder, findsOneWidget);

View File

@ -303,7 +303,7 @@ extension CommonOperations on WidgetTester {
KVKeys.showRenameDialogWhenCreatingNewFile,
(value) => bool.parse(value),
);
final showRenameDialog = settingsOrFailure.fold((l) => false, (r) => r);
final showRenameDialog = settingsOrFailure.fold(() => false, (r) => r);
if (showRenameDialog) {
await tapOKButton();
}