diff --git a/.github/workflows/android_ci.yaml b/.github/workflows/android_ci.yaml new file mode 100644 index 0000000000..b65ceec608 --- /dev/null +++ b/.github/workflows/android_ci.yaml @@ -0,0 +1,126 @@ +# name: Android CI + +# on: +# push: +# branches: +# - "main" +# paths: +# - ".github/workflows/mobile_ci.yaml" +# - "frontend/**" +# - "!frontend/appflowy_tauri/**" + +# pull_request: +# branches: +# - "main" +# paths: +# - ".github/workflows/mobile_ci.yaml" +# - "frontend/**" +# - "!frontend/appflowy_tauri/**" + +# env: +# CARGO_TERM_COLOR: always +# FLUTTER_VERSION: "3.19.0" +# RUST_TOOLCHAIN: "1.75" +# CARGO_MAKE_VERSION: "0.36.6" + +# concurrency: +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} +# cancel-in-progress: true + +# jobs: +# build: +# if: github.event.pull_request.draft != true +# strategy: +# fail-fast: true +# matrix: +# os: [macos-14] +# runs-on: ${{ matrix.os }} + +# steps: +# - name: Check storage space +# run: df -h + +# # the following step is required to avoid running out of space +# - name: Maximize build space +# if: matrix.os == 'ubuntu-latest' +# run: | +# sudo rm -rf /usr/share/dotnet +# sudo rm -rf /opt/ghc +# sudo rm -rf "/usr/local/share/boost" +# sudo rm -rf "$AGENT_TOOLSDIRECTORY" +# sudo docker image prune --all --force +# sudo rm -rf /opt/hostedtoolcache/codeQL +# sudo rm -rf ${GITHUB_WORKSPACE}/.git +# sudo rm -rf $ANDROID_HOME/ndk + +# - name: Check storage space +# run: df -h + +# - name: Checkout source code +# uses: actions/checkout@v4 + +# - uses: actions/setup-java@v4 +# with: +# distribution: temurin +# java-version: 11 + +# - name: Install Rust toolchain +# id: rust_toolchain +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: ${{ env.RUST_TOOLCHAIN }} +# override: true +# profile: minimal + +# - name: Install flutter +# id: flutter +# uses: subosito/flutter-action@v2 +# with: +# channel: "stable" +# flutter-version: ${{ env.FLUTTER_VERSION }} + +# - uses: gradle/gradle-build-action@v3 +# with: +# gradle-version: 7.4.2 + +# - uses: davidB/rust-cargo-make@v1 +# with: +# version: "0.36.6" + +# - name: Install prerequisites +# working-directory: frontend +# run: | +# rustup target install aarch64-linux-android +# rustup target install x86_64-linux-android +# cargo install --force duckscript_cli +# cargo install cargo-ndk +# if [ "$RUNNER_OS" == "Linux" ]; then +# sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub +# sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list +# sudo apt-get update +# sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev +# sudo apt-get install keybinder-3.0 libnotify-dev +# sudo apt-get install gcc-multilib +# elif [ "$RUNNER_OS" == "Windows" ]; then +# vcpkg integrate install +# elif [ "$RUNNER_OS" == "macOS" ]; then +# echo 'do nothing' +# fi +# cargo make appflowy-flutter-deps-tools +# shell: bash + +# - name: Build AppFlowy +# working-directory: frontend +# run: | +# cargo make --profile development-android appflowy-android-dev-ci + + +# - name: Run integration tests +# # https://github.com/ReactiveCircus/android-emulator-runner +# uses: reactivecircus/android-emulator-runner@v2 +# with: +# api-level: 32 +# arch: arm64-v8a +# disk-size: 2048M +# working-directory: frontend/appflowy_flutter +# script: flutter test integration_test/runner.dart \ No newline at end of file diff --git a/.github/workflows/ios_ci.yaml b/.github/workflows/ios_ci.yaml new file mode 100644 index 0000000000..e679841a1b --- /dev/null +++ b/.github/workflows/ios_ci.yaml @@ -0,0 +1,91 @@ +name: iOS CI + +on: + push: + branches: + - "main" + paths: + - ".github/workflows/mobile_ci.yaml" + - "frontend/**" + - "!frontend/appflowy_tauri/**" + + pull_request: + branches: + - "main" + paths: + - ".github/workflows/mobile_ci.yaml" + - "frontend/**" + - "!frontend/appflowy_tauri/**" + +env: + FLUTTER_VERSION: "3.19.0" + RUST_TOOLCHAIN: "1.75" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build: + if: github.event.pull_request.draft != true + strategy: + fail-fast: true + matrix: + os: [macos-14] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout source code + uses: actions/checkout@v2 + + - name: Install Rust toolchain + id: rust_toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_TOOLCHAIN }} + target: aarch64-apple-ios-sim + override: true + profile: minimal + + - name: Install flutter + id: flutter + uses: subosito/flutter-action@v2 + with: + channel: "stable" + flutter-version: ${{ env.FLUTTER_VERSION }} + cache: true + + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: ${{ matrix.os }} + workspaces: | + frontend/rust-lib + + - uses: davidB/rust-cargo-make@v1 + with: + version: "0.36.6" + + - name: Install prerequisites + working-directory: frontend + run: | + rustup target install aarch64-apple-ios-sim + cargo install --force duckscript_cli + cargo install cargo-lipo + cargo make appflowy-flutter-deps-tools + shell: bash + + - name: Build AppFlowy + working-directory: frontend + run: | + cargo make --profile development-ios-arm64-sim appflowy-core-dev-ios + cargo make --profile development-ios-arm64-sim code_generation + + - uses: futureware-tech/simulator-action@v3 + id: simulator-action + with: + model: 'iPhone 15' + shutdown_after_job: false + + - name: Run integration tests + working-directory: frontend/appflowy_flutter + run: flutter test integration_test/runner.dart -d ${{ steps.simulator-action.outputs.udid }} diff --git a/.github/workflows/mobile_ci.yaml b/.github/workflows/mobile_ci.yaml deleted file mode 100644 index edb5b93f1e..0000000000 --- a/.github/workflows/mobile_ci.yaml +++ /dev/null @@ -1,117 +0,0 @@ -name: Mobile-CI - -on: - push: - branches: - - "main" - paths: - - ".github/workflows/mobile_ci.yaml" - - "frontend/**" - - "!frontend/appflowy_tauri/**" - - pull_request: - branches: - - "main" - paths: - - ".github/workflows/mobile_ci.yaml" - - "frontend/**" - - "!frontend/appflowy_tauri/**" - -env: - FLUTTER_VERSION: "3.19.0" - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - if: github.event.pull_request.draft != true - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - include: - - os: ubuntu-latest - target: aarch64-linux-android - runs-on: ${{ matrix.os }} - - steps: - - name: Check storage space - run: df -h - - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 2048 - swap-size-mb: 1024 - remove-dotnet: 'true' - - # the following step is required to avoid running out of space - - name: Maximize build space - if: matrix.os == 'ubuntu-latest' - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - sudo docker image prune --all --force - sudo rm -rf /opt/hostedtoolcache/codeQL - sudo rm -rf ${GITHUB_WORKSPACE}/.git - sudo rm -rf $ANDROID_HOME/ndk - - - name: Check storage space - run: df -h - - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Install flutter - id: flutter - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - - - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: "r24" - add-to-path: true - - - uses: gradle/gradle-build-action@v3 - with: - gradle-version: 7.6.3 - - - uses: davidB/rust-cargo-make@v1 - with: - version: "0.36.6" - - - name: Install prerequisites - working-directory: frontend - run: | - rustup target install aarch64-linux-android - rustup target install x86_64-linux-android - cargo install --force duckscript_cli - cargo install cargo-ndk - if [ "$RUNNER_OS" == "Linux" ]; then - sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub - sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list - sudo apt-get update - sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev - sudo apt-get install keybinder-3.0 libnotify-dev - sudo apt-get install gcc-multilib - elif [ "$RUNNER_OS" == "Windows" ]; then - vcpkg integrate install - elif [ "$RUNNER_OS" == "macOS" ]; then - echo 'do nothing' - fi - cargo make appflowy-flutter-deps-tools - shell: bash - - - name: Build AppFlowy - working-directory: frontend - env: - ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | - cargo make --profile development-android appflowy-android-dev-ci diff --git a/frontend/appflowy_flutter/integration_test/cloud/anon_user_continue_test.dart b/frontend/appflowy_flutter/integration_test/cloud/anon_user_continue_test.dart index 4d72154053..6f58ba6354 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/anon_user_continue_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/anon_user_continue_test.dart @@ -16,9 +16,9 @@ import 'package:flowy_infra/uuid.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart' as p; import 'package:integration_test/integration_test.dart'; -import '../util/dir.dart'; -import '../util/mock/mock_file_picker.dart'; -import '../util/util.dart'; +import '../shared/dir.dart'; +import '../shared/mock/mock_file_picker.dart'; +import '../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/cloud/appflowy_cloud_auth_test.dart b/frontend/appflowy_flutter/integration_test/cloud/appflowy_cloud_auth_test.dart index 11a09b2b47..6abdb968a1 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/appflowy_cloud_auth_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/appflowy_cloud_auth_test.dart @@ -11,10 +11,11 @@ import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_v import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/uuid.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:path/path.dart' as p; import 'package:integration_test/integration_test.dart'; -import '../util/mock/mock_file_picker.dart'; -import '../util/util.dart'; +import 'package:path/path.dart' as p; + +import '../shared/mock/mock_file_picker.dart'; +import '../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -47,13 +48,13 @@ void main() { tester.expectToSeeGoogleLoginButton(); }); - testWidgets('sign in as annoymous', (tester) async { + testWidgets('sign in as anonymous', (tester) async { await tester.initializeAppFlowy( cloudType: AuthenticatorType.appflowyCloudSelfHost, ); await tester.tapSignInAsGuest(); - // should not see the sync setting page when sign in as annoymous + // should not see the sync setting page when sign in as anonymous await tester.openSettings(); await tester.openSettingsPage(SettingsPage.user); tester.expectToSeeGoogleLoginButton(); diff --git a/frontend/appflowy_flutter/integration_test/cloud/collaborative_workspace_test.dart b/frontend/appflowy_flutter/integration_test/cloud/collaborative_workspace_test.dart index c2ed1cf049..56d9f2bb2c 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/collaborative_workspace_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/collaborative_workspace_test.dart @@ -23,11 +23,11 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:path/path.dart' as p; -import '../util/database_test_op.dart'; -import '../util/dir.dart'; -import '../util/emoji.dart'; -import '../util/mock/mock_file_picker.dart'; -import '../util/util.dart'; +import '../shared/database_test_op.dart'; +import '../shared/dir.dart'; +import '../shared/emoji.dart'; +import '../shared/mock/mock_file_picker.dart'; +import '../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart b/frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart index 5ad38e49e2..e727e0bcec 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart @@ -16,9 +16,9 @@ import 'package:flowy_infra/uuid.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart' as p; import 'package:integration_test/integration_test.dart'; -import '../util/dir.dart'; -import '../util/mock/mock_file_picker.dart'; -import '../util/util.dart'; +import '../shared/dir.dart'; +import '../shared/mock/mock_file_picker.dart'; +import '../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/cloud/empty_test.dart b/frontend/appflowy_flutter/integration_test/cloud/empty_test.dart index 0ec336ae51..9f7d3ce9ed 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/empty_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/empty_test.dart @@ -2,7 +2,7 @@ import 'package:appflowy/env/cloud_env.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../shared/util.dart'; // This test is meaningless, just for preventing the CI from failing. void main() { diff --git a/frontend/appflowy_flutter/integration_test/cloud/supabase_auth_test.dart b/frontend/appflowy_flutter/integration_test/cloud/supabase_auth_test.dart index 2a3b0bd3f8..283e55ce4e 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/supabase_auth_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/supabase_auth_test.dart @@ -6,7 +6,8 @@ import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_v import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; + +import '../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -35,11 +36,11 @@ void main() { tester.expectToSeeGoogleLoginButton(); }); - testWidgets('sign in as annoymous', (tester) async { + testWidgets('sign in as anonymous', (tester) async { await tester.initializeAppFlowy(cloudType: AuthenticatorType.supabase); await tester.tapSignInAsGuest(); - // should not see the sync setting page when sign in as annoymous + // should not see the sync setting page when sign in as anonymous await tester.openSettings(); await tester.openSettingsPage(SettingsPage.user); tester.expectToSeeGoogleLoginButton(); diff --git a/frontend/appflowy_flutter/integration_test/cloud/user_setting_sync_test.dart b/frontend/appflowy_flutter/integration_test/cloud/user_setting_sync_test.dart index b83d0f3cf4..1727669876 100644 --- a/frontend/appflowy_flutter/integration_test/cloud/user_setting_sync_test.dart +++ b/frontend/appflowy_flutter/integration_test/cloud/user_setting_sync_test.dart @@ -18,11 +18,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart' as p; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/dir.dart'; -import '../util/emoji.dart'; -import '../util/mock/mock_file_picker.dart'; -import '../util/util.dart'; +import '../shared/database_test_op.dart'; +import '../shared/dir.dart'; +import '../shared/emoji.dart'; +import '../shared/mock/mock_file_picker.dart'; +import '../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/board/board_add_row_test.dart b/frontend/appflowy_flutter/integration_test/desktop/board/board_add_row_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/board/board_add_row_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/board/board_add_row_test.dart index e6e098f000..4159f679ad 100644 --- a/frontend/appflowy_flutter/integration_test/board/board_add_row_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/board/board_add_row_test.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; const defaultFirstCardName = 'Card 1'; const defaultLastCardName = 'Card 3'; diff --git a/frontend/appflowy_flutter/integration_test/board/board_group_test.dart b/frontend/appflowy_flutter/integration_test/desktop/board/board_group_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/board/board_group_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/board/board_group_test.dart index 1ee1778e9c..314da581d9 100644 --- a/frontend/appflowy_flutter/integration_test/board/board_group_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/board/board_group_test.dart @@ -6,7 +6,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:appflowy_board/appflowy_board.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/board/board_hide_groups_test.dart b/frontend/appflowy_flutter/integration_test/desktop/board/board_hide_groups_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/board/board_hide_groups_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/board/board_hide_groups_test.dart index 0271a2b559..27c8efb511 100644 --- a/frontend/appflowy_flutter/integration_test/board/board_hide_groups_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/board/board_hide_groups_test.dart @@ -7,8 +7,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/board/board_row_test.dart b/frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/board/board_row_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart index fae4e53482..3916730b2f 100644 --- a/frontend/appflowy_flutter/integration_test/board/board_row_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/board/board_row_test.dart @@ -7,8 +7,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; -import '../util/database_test_op.dart'; +import '../../shared/util.dart'; +import '../../shared/database_test_op.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/board/board_test_runner.dart b/frontend/appflowy_flutter/integration_test/desktop/board/board_test_runner.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/board/board_test_runner.dart rename to frontend/appflowy_flutter/integration_test/desktop/board/board_test_runner.dart diff --git a/frontend/appflowy_flutter/integration_test/database/database_calendar_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_calendar_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/database/database_calendar_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_calendar_test.dart index 33f06557be..adfb670fe2 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_calendar_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_calendar_test.dart @@ -5,8 +5,8 @@ import 'package:flowy_infra_ui/style_widget/icon_button.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_cell_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_cell_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/database/database_cell_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_cell_test.dart index d98e063bcc..1ce8a8a3fa 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_cell_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_cell_test.dart @@ -4,8 +4,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:intl/intl.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_field_settings_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_field_settings_test.dart similarity index 96% rename from frontend/appflowy_flutter/integration_test/database/database_field_settings_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_field_settings_test.dart index 1dc39838a5..a7b92e7a0e 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_field_settings_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_field_settings_test.dart @@ -4,8 +4,8 @@ import 'package:appflowy_backend/protobuf/flowy-folder/view.pbenum.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_field_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/database/database_field_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart index 5a41bbd9d5..22838adddd 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_field_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart @@ -8,8 +8,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:intl/intl.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_filter_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_filter_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/database/database_filter_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_filter_test.dart index a7f5726842..4dfc64ff62 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_filter_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_filter_test.dart @@ -4,7 +4,7 @@ import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum. import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; +import '../../shared/database_test_op.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_reminder_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_reminder_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/database/database_reminder_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_reminder_test.dart index 33b6eb67c7..35ff31d30f 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_reminder_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_reminder_test.dart @@ -5,8 +5,8 @@ import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_row_page_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_row_page_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/database/database_row_page_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_row_page_test.dart index 6bc5da5c5f..23dabda97c 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_row_page_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_row_page_test.dart @@ -7,9 +7,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/emoji.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/emoji.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_row_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_row_test.dart similarity index 96% rename from frontend/appflowy_flutter/integration_test/database/database_row_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_row_test.dart index 61d90e72a9..93674ca52f 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_row_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_row_test.dart @@ -2,8 +2,8 @@ import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_setting_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_setting_test.dart similarity index 95% rename from frontend/appflowy_flutter/integration_test/database/database_setting_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_setting_test.dart index caa5791e4c..0830a960c7 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_setting_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_setting_test.dart @@ -3,8 +3,8 @@ import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_share_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_share_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/database/database_share_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_share_test.dart index 51ede61930..bd3adff7cc 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_share_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_share_test.dart @@ -2,7 +2,7 @@ import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum. import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; +import '../../shared/database_test_op.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_sort_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_sort_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/database/database_sort_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_sort_test.dart index 6b4d53d5bc..e28072cebc 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_sort_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_sort_test.dart @@ -2,7 +2,7 @@ import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum. import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; +import '../../shared/database_test_op.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/database/database_view_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_view_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/database/database_view_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/database/database_view_test.dart index 1a2e101763..e107f608f0 100644 --- a/frontend/appflowy_flutter/integration_test/database/database_view_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_view_test.dart @@ -3,8 +3,8 @@ import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_alignment_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_alignment_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/document/document_alignment_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_alignment_test.dart index 2bf621dda0..99cc3e7b39 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_alignment_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_alignment_test.dart @@ -5,8 +5,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/keyboard.dart'; -import '../util/util.dart'; +import '../../shared/keyboard.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_codeblock_paste_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_codeblock_paste_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_codeblock_paste_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_codeblock_paste_test.dart index 3ebe006961..cd6d960ee0 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_codeblock_paste_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_codeblock_paste_test.dart @@ -7,7 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_copy_and_paste_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/document_copy_and_paste_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart index aab5f41b5b..6b4512c348 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_copy_and_paste_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_copy_and_paste_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_create_and_delete_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_create_and_delete_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_create_and_delete_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_create_and_delete_test.dart index d0939d9557..65a5c50fe2 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_create_and_delete_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_create_and_delete_test.dart @@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_inline_page_reference_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_inline_page_reference_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_inline_page_reference_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_inline_page_reference_test.dart index 7104e7e7bc..4c3937ce54 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_inline_page_reference_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_inline_page_reference_test.dart @@ -1,14 +1,13 @@ -import 'package:flutter/services.dart'; - import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_page_block.dart'; import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart'; import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart'; import 'package:flowy_infra/uuid.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/keyboard.dart'; -import '../util/util.dart'; +import '../../shared/keyboard.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_option_action_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_option_action_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_option_action_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_option_action_test.dart index da09508936..6912ffff85 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_option_action_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_option_action_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_test_runner.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_test_runner.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/document/document_test_runner.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_test_runner.dart diff --git a/frontend/appflowy_flutter/integration_test/document/document_text_direction_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_text_direction_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_text_direction_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_text_direction_test.dart index 688dba2894..d7e710c52f 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_text_direction_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_text_direction_test.dart @@ -2,7 +2,7 @@ import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_cover_image_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_with_cover_image_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart index 5c8f4cf184..7d7d437418 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_cover_image_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_cover_image_test.dart @@ -7,8 +7,8 @@ import 'package:flutter_emoji_mart/flutter_emoji_mart.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/emoji.dart'; -import '../util/util.dart'; +import '../../shared/emoji.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_database_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_database_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/document_with_database_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_database_test.dart index 6f4fe79d4c..593977b159 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_database_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_database_test.dart @@ -1,9 +1,9 @@ import 'package:appflowy/generated/locale_keys.g.dart'; -import 'package:appflowy/plugins/database/widgets/cell/editable_cell_skeleton/text.dart'; -import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart'; import 'package:appflowy/plugins/database/board/presentation/board_page.dart'; import 'package:appflowy/plugins/database/calendar/presentation/calendar_page.dart'; import 'package:appflowy/plugins/database/grid/presentation/grid_page.dart'; +import 'package:appflowy/plugins/database/widgets/cell/editable_cell_skeleton/text.dart'; +import 'package:appflowy/plugins/inline_actions/widgets/inline_actions_handler.dart'; import 'package:appflowy/workspace/presentation/home/menu/view/view_item.dart'; import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart'; import 'package:appflowy_editor/appflowy_editor.dart'; @@ -12,7 +12,7 @@ import 'package:flowy_infra/uuid.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_image_block_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_with_image_block_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart index f3dbf3948e..ca93ac1677 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_image_block_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart @@ -22,8 +22,8 @@ import 'package:path/path.dart' as p; import 'package:path_provider/path_provider.dart'; import 'package:run_with_network_images/run_with_network_images.dart'; -import '../util/mock/mock_file_picker.dart'; -import '../util/util.dart'; +import '../../shared/mock/mock_file_picker.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test.dart index c1a7fef063..a1d1d0e335 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test_1.png b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test_1.png similarity index 100% rename from frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test_1.png rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test_1.png diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test_2.png b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test_2.png similarity index 100% rename from frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test_2.png rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_math_equation_test_2.png diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_inline_page_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_page_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/document_with_inline_page_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_page_test.dart index 414ffa250d..0078c22b62 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_inline_page_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_inline_page_test.dart @@ -5,7 +5,7 @@ import 'package:flowy_infra_ui/widget/error_page.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_link_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_link_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/document/document_with_link_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_link_test.dart index 400d130666..0673977567 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_link_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_link_test.dart @@ -5,7 +5,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_outline_block_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_outline_block_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/document_with_outline_block_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_outline_block_test.dart index f45eafbad6..2264067f1c 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_outline_block_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_outline_block_test.dart @@ -7,7 +7,7 @@ import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; const String heading1 = "Heading 1"; const String heading2 = "Heading 2"; diff --git a/frontend/appflowy_flutter/integration_test/document/document_with_toggle_list_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_toggle_list_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/document_with_toggle_list_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/document_with_toggle_list_test.dart index e6ce6baff1..786b02ded0 100644 --- a/frontend/appflowy_flutter/integration_test/document/document_with_toggle_list_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/document_with_toggle_list_test.dart @@ -7,7 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/edit_document_test.dart b/frontend/appflowy_flutter/integration_test/desktop/document/edit_document_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/document/edit_document_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/document/edit_document_test.dart index 84579b1ea7..3d2d039e92 100644 --- a/frontend/appflowy_flutter/integration_test/document/edit_document_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/document/edit_document_test.dart @@ -5,7 +5,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/document/edit_document_test.png b/frontend/appflowy_flutter/integration_test/desktop/document/edit_document_test.png similarity index 100% rename from frontend/appflowy_flutter/integration_test/document/edit_document_test.png rename to frontend/appflowy_flutter/integration_test/desktop/document/edit_document_test.png diff --git a/frontend/appflowy_flutter/integration_test/grid/grid_calculations_test.dart b/frontend/appflowy_flutter/integration_test/desktop/grid/grid_calculations_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/grid/grid_calculations_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/grid/grid_calculations_test.dart index c49d399c62..ad9cffd304 100644 --- a/frontend/appflowy_flutter/integration_test/grid/grid_calculations_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/grid/grid_calculations_test.dart @@ -4,8 +4,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/database_test_op.dart'; -import '../util/util.dart'; +import '../../shared/database_test_op.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/reminder/document_reminder_test.dart b/frontend/appflowy_flutter/integration_test/desktop/reminder/document_reminder_test.dart similarity index 96% rename from frontend/appflowy_flutter/integration_test/reminder/document_reminder_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/reminder/document_reminder_test.dart index 85c3d68265..2fc8708890 100644 --- a/frontend/appflowy_flutter/integration_test/reminder/document_reminder_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/reminder/document_reminder_test.dart @@ -1,5 +1,3 @@ -import 'package:flutter/services.dart'; - import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/document/presentation/editor_plugins/mention/mention_block.dart'; import 'package:appflowy/user/application/user_settings_service.dart'; @@ -11,14 +9,15 @@ import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:calendar_view/calendar_view.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra_ui/style_widget/text_field.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/base.dart'; -import '../util/common_operations.dart'; -import '../util/editor_test_operations.dart'; -import '../util/expectation.dart'; -import '../util/keyboard.dart'; +import '../../shared/base.dart'; +import '../../shared/common_operations.dart'; +import '../../shared/editor_test_operations.dart'; +import '../../shared/expectation.dart'; +import '../../shared/keyboard.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/settings/notifications_settings_test.dart b/frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/settings/notifications_settings_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart index ab7458b250..039b250b66 100644 --- a/frontend/appflowy_flutter/integration_test/settings/notifications_settings_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/settings/notifications_settings_test.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/settings/settings_runner.dart b/frontend/appflowy_flutter/integration_test/desktop/settings/settings_runner.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/settings/settings_runner.dart rename to frontend/appflowy_flutter/integration_test/desktop/settings/settings_runner.dart diff --git a/frontend/appflowy_flutter/integration_test/settings/user_language_test.dart b/frontend/appflowy_flutter/integration_test/desktop/settings/user_language_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/settings/user_language_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/settings/user_language_test.dart index 32be781749..9904d92e9e 100644 --- a/frontend/appflowy_flutter/integration_test/settings/user_language_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/settings/user_language_test.dart @@ -1,10 +1,11 @@ import 'dart:ui'; -import 'package:appflowy/workspace/presentation/settings/widgets/settings_language_view.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:flutter_test/flutter_test.dart'; -import '../util/util.dart'; import 'package:appflowy/workspace/application/settings/prelude.dart'; +import 'package:appflowy/workspace/presentation/settings/widgets/settings_language_view.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/sidebar/rename_current_item_test.dart b/frontend/appflowy_flutter/integration_test/desktop/sidebar/rename_current_item_test.dart similarity index 93% rename from frontend/appflowy_flutter/integration_test/sidebar/rename_current_item_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/sidebar/rename_current_item_test.dart index 0740b76aa7..4ed430f77f 100644 --- a/frontend/appflowy_flutter/integration_test/sidebar/rename_current_item_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/sidebar/rename_current_item_test.dart @@ -6,9 +6,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/base.dart'; -import '../util/common_operations.dart'; -import '../util/keyboard.dart'; +import '../../shared/keyboard.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_expand_test.dart b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_expand_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/sidebar/sidebar_expand_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_expand_test.dart index 76d183d625..7568a81def 100644 --- a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_expand_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_expand_test.dart @@ -6,7 +6,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_favorites_test.dart b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_favorites_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/sidebar/sidebar_favorites_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_favorites_test.dart index 81bee64689..aa4f151ab8 100644 --- a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_favorites_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_favorites_test.dart @@ -6,9 +6,9 @@ import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/base.dart'; -import '../util/common_operations.dart'; -import '../util/expectation.dart'; +import '../../shared/base.dart'; +import '../../shared/common_operations.dart'; +import '../../shared/expectation.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_icon_test.dart b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_icon_test.dart similarity index 93% rename from frontend/appflowy_flutter/integration_test/sidebar/sidebar_icon_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_icon_test.dart index a2a641ec8c..36690b1a09 100644 --- a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_icon_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_icon_test.dart @@ -2,9 +2,9 @@ import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/base.dart'; -import '../util/common_operations.dart'; -import '../util/expectation.dart'; +import '../../shared/base.dart'; +import '../../shared/common_operations.dart'; +import '../../shared/expectation.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_test.dart b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test.dart similarity index 99% rename from frontend/appflowy_flutter/integration_test/sidebar/sidebar_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test.dart index 1da433559c..eb62736022 100644 --- a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test.dart @@ -12,7 +12,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import '../util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/sidebar/sidebar_test_runner.dart b/frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test_runner.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/sidebar/sidebar_test_runner.dart rename to frontend/appflowy_flutter/integration_test/desktop/sidebar/sidebar_test_runner.dart diff --git a/frontend/appflowy_flutter/integration_test/appearance_settings_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/appearance_settings_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/appearance_settings_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/appearance_settings_test.dart index 4d01a07ab9..60aed323d0 100644 --- a/frontend/appflowy_flutter/integration_test/appearance_settings_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/appearance_settings_test.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/board_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/board_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/board_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/board_test.dart index a5d329515d..5e88b38697 100644 --- a/frontend/appflowy_flutter/integration_test/board_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/board_test.dart @@ -1,7 +1,8 @@ import 'package:appflowy_board/appflowy_board.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/util.dart'; + +import '../../shared/util.dart'; /// Integration tests for an empty board. The [TestWorkspaceService] will load /// a workspace from an empty board `assets/test/workspaces/board.zip` for all diff --git a/frontend/appflowy_flutter/integration_test/emoji_shortcut_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/emoji_shortcut_test.dart similarity index 94% rename from frontend/appflowy_flutter/integration_test/emoji_shortcut_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/emoji_shortcut_test.dart index 4bc15dd214..aaf6a69adb 100644 --- a/frontend/appflowy_flutter/integration_test/emoji_shortcut_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/emoji_shortcut_test.dart @@ -1,4 +1,5 @@ import 'dart:io'; + import 'package:appflowy/workspace/presentation/settings/widgets/emoji_picker/emoji_picker.dart'; import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor/src/editor/editor_component/service/editor.dart'; @@ -6,8 +7,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/keyboard.dart'; -import 'util/util.dart'; +import '../../shared/keyboard.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -17,7 +18,7 @@ void main() { (tester) async { await tester.initializeAppFlowy(); await tester.tapGoButton(); - + final Finder editor = find.byType(AppFlowyEditor); await tester.tap(editor); await tester.pumpAndSettle(); diff --git a/frontend/appflowy_flutter/integration_test/empty_document_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/empty_document_test.dart similarity index 98% rename from frontend/appflowy_flutter/integration_test/empty_document_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/empty_document_test.dart index 273e7bb73a..6712e6959d 100644 --- a/frontend/appflowy_flutter/integration_test/empty_document_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/empty_document_test.dart @@ -3,8 +3,9 @@ import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/keyboard.dart'; -import 'util/util.dart'; + +import '../../shared/keyboard.dart'; +import '../../shared/util.dart'; /// Integration tests for an empty document. The [TestWorkspaceService] will load a workspace from an empty document `assets/test/workspaces/empty_document.zip` for all tests. /// diff --git a/frontend/appflowy_flutter/integration_test/empty_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/empty_test.dart similarity index 92% rename from frontend/appflowy_flutter/integration_test/empty_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/empty_test.dart index 0b66c41213..86d44add0e 100644 --- a/frontend/appflowy_flutter/integration_test/empty_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/empty_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/util.dart'; +import '../../shared/util.dart'; // This test is meaningless, just for preventing the CI from failing. void main() { diff --git a/frontend/appflowy_flutter/integration_test/hotkeys_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/hotkeys_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/hotkeys_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/hotkeys_test.dart index cf55e183ca..cfe1e80ce8 100644 --- a/frontend/appflowy_flutter/integration_test/hotkeys_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/hotkeys_test.dart @@ -1,4 +1,5 @@ import 'dart:io'; + import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/workspace/application/settings/prelude.dart'; import 'package:appflowy/workspace/presentation/home/menu/sidebar/sidebar.dart'; @@ -8,8 +9,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/keyboard.dart'; -import 'util/util.dart'; +import '../../shared/keyboard.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/import_files_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/import_files_test.dart similarity index 94% rename from frontend/appflowy_flutter/integration_test/import_files_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/import_files_test.dart index 8fe3113354..58d8cc75be 100644 --- a/frontend/appflowy_flutter/integration_test/import_files_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/import_files_test.dart @@ -3,11 +3,11 @@ import 'dart:io'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; - -import 'util/mock/mock_file_picker.dart'; -import 'util/util.dart'; import 'package:path/path.dart' as p; +import '../../shared/mock/mock_file_picker.dart'; +import '../../shared/util.dart'; + void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/language_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/language_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/language_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/language_test.dart index 94aeef0e9d..c48fcd8028 100644 --- a/frontend/appflowy_flutter/integration_test/language_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/language_test.dart @@ -2,7 +2,7 @@ import 'package:appflowy/workspace/presentation/settings/widgets/settings_langua import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/util.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/open_ai_smart_menu_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/open_ai_smart_menu_test.dart index 969f9ec60b..f739820d04 100644 --- a/frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/open_ai_smart_menu_test.dart @@ -7,8 +7,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/mock/mock_openai_repository.dart'; -import 'util/util.dart'; +import '../../shared/mock/mock_openai_repository.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/share_markdown_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/share_markdown_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/share_markdown_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/share_markdown_test.dart index 689ec4d0ed..7ba09445a9 100644 --- a/frontend/appflowy_flutter/integration_test/share_markdown_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/share_markdown_test.dart @@ -5,8 +5,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:path/path.dart' as p; -import 'util/mock/mock_file_picker.dart'; -import 'util/util.dart'; +import '../../shared/mock/mock_file_picker.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/switch_folder_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/switch_folder_test.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/switch_folder_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/switch_folder_test.dart index 9cd9c9a374..e2a343d4f1 100644 --- a/frontend/appflowy_flutter/integration_test/switch_folder_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/switch_folder_test.dart @@ -7,8 +7,8 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:path/path.dart' as p; -import 'util/mock/mock_file_picker.dart'; -import 'util/util.dart'; +import '../../shared/mock/mock_file_picker.dart'; +import '../../shared/util.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/frontend/appflowy_flutter/integration_test/tabs_test.dart b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/tabs_test.dart similarity index 93% rename from frontend/appflowy_flutter/integration_test/tabs_test.dart rename to frontend/appflowy_flutter/integration_test/desktop/uncategorized/tabs_test.dart index 4c3d2fed16..87a28dc923 100644 --- a/frontend/appflowy_flutter/integration_test/tabs_test.dart +++ b/frontend/appflowy_flutter/integration_test/desktop/uncategorized/tabs_test.dart @@ -8,10 +8,10 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'util/base.dart'; -import 'util/common_operations.dart'; -import 'util/expectation.dart'; -import 'util/keyboard.dart'; +import '../../shared/base.dart'; +import '../../shared/common_operations.dart'; +import '../../shared/expectation.dart'; +import '../../shared/keyboard.dart'; const _documentName = 'First Doc'; const _documentTwoName = 'Second Doc'; diff --git a/frontend/appflowy_flutter/integration_test/desktop_runner.dart b/frontend/appflowy_flutter/integration_test/desktop_runner.dart new file mode 100644 index 0000000000..66532d947c --- /dev/null +++ b/frontend/appflowy_flutter/integration_test/desktop_runner.dart @@ -0,0 +1,68 @@ +import 'desktop/uncategorized/appearance_settings_test.dart' as appearance_test_runner; +import 'desktop/board/board_test_runner.dart' as board_test_runner; +import 'desktop/database/database_calendar_test.dart' as database_calendar_test; +import 'desktop/database/database_cell_test.dart' as database_cell_test; +import 'desktop/database/database_field_settings_test.dart' + as database_field_settings_test; +import 'desktop/database/database_field_test.dart' as database_field_test; +import 'desktop/database/database_filter_test.dart' as database_filter_test; +import 'desktop/database/database_row_page_test.dart' as database_row_page_test; +import 'desktop/database/database_row_test.dart' as database_row_test; +import 'desktop/database/database_setting_test.dart' as database_setting_test; +import 'desktop/database/database_share_test.dart' as database_share_test; +import 'desktop/database/database_sort_test.dart' as database_sort_test; +import 'desktop/database/database_view_test.dart' as database_view_test; +import 'desktop/document/document_test_runner.dart' as document_test_runner; +import 'desktop/uncategorized/emoji_shortcut_test.dart' as emoji_shortcut_test; +import 'desktop/uncategorized/empty_test.dart' as first_test; +import 'desktop/uncategorized/hotkeys_test.dart' as hotkeys_test; +import 'desktop/uncategorized/import_files_test.dart' as import_files_test; +import 'desktop/settings/settings_runner.dart' as settings_test_runner; +import 'desktop/uncategorized/share_markdown_test.dart' as share_markdown_test; +import 'desktop/sidebar/sidebar_test_runner.dart' as sidebar_test_runner; +import 'desktop/uncategorized/switch_folder_test.dart' as switch_folder_test; +import 'desktop/uncategorized/tabs_test.dart' as tabs_test; + +Future runIntegrationOnDesktop() async { + // This test must be run first, otherwise the CI will fail. + first_test.main(); + + switch_folder_test.main(); + share_markdown_test.main(); + import_files_test.main(); + + // Document integration tests + document_test_runner.startTesting(); + + // Sidebar integration tests + sidebar_test_runner.startTesting(); + + // Board integration test + board_test_runner.startTesting(); + + // Database integration tests + database_cell_test.main(); + database_field_test.main(); + database_field_settings_test.main(); + database_share_test.main(); + database_row_page_test.main(); + database_row_test.main(); + database_setting_test.main(); + database_filter_test.main(); + database_sort_test.main(); + database_view_test.main(); + database_calendar_test.main(); + + // Tabs + tabs_test.main(); + + // Others + hotkeys_test.main(); + emoji_shortcut_test.main(); + + // Appearance integration test + appearance_test_runner.main(); + + // User settings + settings_test_runner.main(); +} diff --git a/frontend/appflowy_flutter/integration_test/mobile/sign_in/anonymous_sign_in_test.dart b/frontend/appflowy_flutter/integration_test/mobile/sign_in/anonymous_sign_in_test.dart new file mode 100644 index 0000000000..f90b151372 --- /dev/null +++ b/frontend/appflowy_flutter/integration_test/mobile/sign_in/anonymous_sign_in_test.dart @@ -0,0 +1,44 @@ +// ignore_for_file: unused_import + +import 'dart:io'; + +import 'package:appflowy/env/cloud_env.dart'; +import 'package:appflowy/generated/locale_keys.g.dart'; +import 'package:appflowy/mobile/presentation/home/home.dart'; +import 'package:appflowy/startup/startup.dart'; +import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart'; +import 'package:appflowy/user/application/auth/auth_service.dart'; +import 'package:appflowy/user/presentation/screens/sign_in_screen/widgets/widgets.dart'; +import 'package:appflowy/workspace/application/settings/prelude.dart'; +import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart'; +import 'package:appflowy/workspace/presentation/settings/widgets/settings_user_view.dart'; +import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart'; +import 'package:easy_localization/easy_localization.dart'; +import 'package:flowy_infra/uuid.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:path/path.dart' as p; + +import '../../shared/dir.dart'; +import '../../shared/mock/mock_file_picker.dart'; +import '../../shared/util.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('anonymous sign in on mobile', () { + testWidgets('anon user and then sign in', (tester) async { + await tester.initializeAppFlowy( + cloudType: AuthenticatorType.local, + ); + + // click the anonymousSignInButton + final anonymousSignInButton = find.byType(SignInAnonymousButton); + expect(anonymousSignInButton, findsOneWidget); + await tester.tapButton(anonymousSignInButton); + + // expect to see the home page + expect(find.byType(MobileHomeScreen), findsOneWidget); + }); + }); +} diff --git a/frontend/appflowy_flutter/integration_test/mobile_runner.dart b/frontend/appflowy_flutter/integration_test/mobile_runner.dart new file mode 100644 index 0000000000..daab343060 --- /dev/null +++ b/frontend/appflowy_flutter/integration_test/mobile_runner.dart @@ -0,0 +1,5 @@ +import 'mobile/sign_in/anonymous_sign_in_test.dart' as anonymous_sign_in_test; + +Future runIntegrationOnMobile() async { + anonymous_sign_in_test.main(); +} diff --git a/frontend/appflowy_flutter/integration_test/runner.dart b/frontend/appflowy_flutter/integration_test/runner.dart index 51abc6de7b..39f0bf45e1 100644 --- a/frontend/appflowy_flutter/integration_test/runner.dart +++ b/frontend/appflowy_flutter/integration_test/runner.dart @@ -1,30 +1,9 @@ +import 'dart:io'; + import 'package:integration_test/integration_test.dart'; -import 'appearance_settings_test.dart' as appearance_test_runner; -import 'board/board_test_runner.dart' as board_test_runner; -import 'database/database_calendar_test.dart' as database_calendar_test; -import 'database/database_cell_test.dart' as database_cell_test; -import 'database/database_field_settings_test.dart' - as database_field_settings_test; -import 'database/database_field_test.dart' as database_field_test; -import 'database/database_filter_test.dart' as database_filter_test; -import 'database/database_row_page_test.dart' as database_row_page_test; -import 'database/database_row_test.dart' as database_row_test; -import 'database/database_setting_test.dart' as database_setting_test; -import 'database/database_share_test.dart' as database_share_test; -import 'database/database_sort_test.dart' as database_sort_test; -import 'database/database_view_test.dart' as database_view_test; -import 'document/document_test_runner.dart' as document_test_runner; -import 'empty_test.dart' as first_test; -import 'hotkeys_test.dart' as hotkeys_test; -import 'import_files_test.dart' as import_files_test; -import 'settings/settings_runner.dart' as settings_test_runner; -import 'share_markdown_test.dart' as share_markdown_test; -import 'sidebar/sidebar_test_runner.dart' as sidebar_test_runner; -import 'switch_folder_test.dart' as switch_folder_test; -import 'tabs_test.dart' as tabs_test; -import 'emoji_shortcut_test.dart' as emoji_shortcut_test; -// import 'auth/supabase_auth_test.dart' as supabase_auth_test_runner; +import 'desktop_runner.dart'; +import 'mobile_runner.dart'; /// The main task runner for all integration tests in AppFlowy. /// @@ -35,50 +14,11 @@ import 'emoji_shortcut_test.dart' as emoji_shortcut_test; /// as the test target. Future main() async { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - // This test must be run first, otherwise the CI will fail. - first_test.main(); - - switch_folder_test.main(); - share_markdown_test.main(); - import_files_test.main(); - - // Document integration tests - document_test_runner.startTesting(); - - // Sidebar integration tests - sidebar_test_runner.startTesting(); - - // Board integration test - board_test_runner.startTesting(); - - // Database integration tests - database_cell_test.main(); - database_field_test.main(); - database_field_settings_test.main(); - database_share_test.main(); - database_row_page_test.main(); - database_row_test.main(); - database_setting_test.main(); - database_filter_test.main(); - database_sort_test.main(); - database_view_test.main(); - database_calendar_test.main(); - - // Tabs - tabs_test.main(); - - // Others - hotkeys_test.main(); - emoji_shortcut_test.main(); - - // Appearance integration test - appearance_test_runner.main(); - - // User settings - settings_test_runner.main(); - - // board_test.main(); - // empty_document_test.main(); - // smart_menu_test.main(); + if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) { + await runIntegrationOnDesktop(); + } else if (Platform.isIOS || Platform.isAndroid) { + await runIntegrationOnMobile(); + } else { + throw Exception('Unsupported platform'); + } } diff --git a/frontend/appflowy_flutter/integration_test/util/auth_operation.dart b/frontend/appflowy_flutter/integration_test/shared/auth_operation.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/auth_operation.dart rename to frontend/appflowy_flutter/integration_test/shared/auth_operation.dart diff --git a/frontend/appflowy_flutter/integration_test/util/base.dart b/frontend/appflowy_flutter/integration_test/shared/base.dart similarity index 97% rename from frontend/appflowy_flutter/integration_test/util/base.dart rename to frontend/appflowy_flutter/integration_test/shared/base.dart index df5b40f93a..0feb050188 100644 --- a/frontend/appflowy_flutter/integration_test/util/base.dart +++ b/frontend/appflowy_flutter/integration_test/shared/base.dart @@ -37,9 +37,10 @@ extension AppFlowyTestBase on WidgetTester { AuthenticatorType? cloudType, String? email, }) async { - // view.physicalSize = windowsSize; - await binding.setSurfaceSize(windowSize); - // addTearDown(() => binding.setSurfaceSize(null)); + if (Platform.isLinux || Platform.isWindows || Platform.isMacOS) { + // Set the window size + await binding.setSurfaceSize(windowSize); + } mockHotKeyManagerHandlers(); final applicationDataDirectory = dataDirectory ?? @@ -118,7 +119,7 @@ extension AppFlowyTestBase on WidgetTester { Future waitUntilSignInPageShow() async { if (isAuthEnabled) { final finder = find.byType(SignInAnonymousButton); - await pumpUntilFound(finder); + await pumpUntilFound(finder, timeout: const Duration(seconds: 30)); expect(finder, findsOneWidget); } else { final finder = find.byType(GoButton); diff --git a/frontend/appflowy_flutter/integration_test/util/common_operations.dart b/frontend/appflowy_flutter/integration_test/shared/common_operations.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/common_operations.dart rename to frontend/appflowy_flutter/integration_test/shared/common_operations.dart diff --git a/frontend/appflowy_flutter/integration_test/util/data.dart b/frontend/appflowy_flutter/integration_test/shared/data.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/data.dart rename to frontend/appflowy_flutter/integration_test/shared/data.dart diff --git a/frontend/appflowy_flutter/integration_test/util/database_test_op.dart b/frontend/appflowy_flutter/integration_test/shared/database_test_op.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/database_test_op.dart rename to frontend/appflowy_flutter/integration_test/shared/database_test_op.dart diff --git a/frontend/appflowy_flutter/integration_test/util/dir.dart b/frontend/appflowy_flutter/integration_test/shared/dir.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/dir.dart rename to frontend/appflowy_flutter/integration_test/shared/dir.dart diff --git a/frontend/appflowy_flutter/integration_test/util/editor_test_operations.dart b/frontend/appflowy_flutter/integration_test/shared/editor_test_operations.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/editor_test_operations.dart rename to frontend/appflowy_flutter/integration_test/shared/editor_test_operations.dart diff --git a/frontend/appflowy_flutter/integration_test/util/emoji.dart b/frontend/appflowy_flutter/integration_test/shared/emoji.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/emoji.dart rename to frontend/appflowy_flutter/integration_test/shared/emoji.dart diff --git a/frontend/appflowy_flutter/integration_test/util/expectation.dart b/frontend/appflowy_flutter/integration_test/shared/expectation.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/expectation.dart rename to frontend/appflowy_flutter/integration_test/shared/expectation.dart diff --git a/frontend/appflowy_flutter/integration_test/util/ime.dart b/frontend/appflowy_flutter/integration_test/shared/ime.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/ime.dart rename to frontend/appflowy_flutter/integration_test/shared/ime.dart diff --git a/frontend/appflowy_flutter/integration_test/util/keyboard.dart b/frontend/appflowy_flutter/integration_test/shared/keyboard.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/keyboard.dart rename to frontend/appflowy_flutter/integration_test/shared/keyboard.dart diff --git a/frontend/appflowy_flutter/integration_test/util/mock/mock_file_picker.dart b/frontend/appflowy_flutter/integration_test/shared/mock/mock_file_picker.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/mock/mock_file_picker.dart rename to frontend/appflowy_flutter/integration_test/shared/mock/mock_file_picker.dart diff --git a/frontend/appflowy_flutter/integration_test/util/mock/mock_openai_repository.dart b/frontend/appflowy_flutter/integration_test/shared/mock/mock_openai_repository.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/mock/mock_openai_repository.dart rename to frontend/appflowy_flutter/integration_test/shared/mock/mock_openai_repository.dart diff --git a/frontend/appflowy_flutter/integration_test/util/mock/mock_url_launcher.dart b/frontend/appflowy_flutter/integration_test/shared/mock/mock_url_launcher.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/mock/mock_url_launcher.dart rename to frontend/appflowy_flutter/integration_test/shared/mock/mock_url_launcher.dart diff --git a/frontend/appflowy_flutter/integration_test/util/settings.dart b/frontend/appflowy_flutter/integration_test/shared/settings.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/settings.dart rename to frontend/appflowy_flutter/integration_test/shared/settings.dart diff --git a/frontend/appflowy_flutter/integration_test/util/util.dart b/frontend/appflowy_flutter/integration_test/shared/util.dart similarity index 100% rename from frontend/appflowy_flutter/integration_test/util/util.dart rename to frontend/appflowy_flutter/integration_test/shared/util.dart diff --git a/frontend/scripts/code_generation/flowy_icons/generate_flowy_icons.sh b/frontend/scripts/code_generation/flowy_icons/generate_flowy_icons.sh index f20f1b72c3..30538def96 100755 --- a/frontend/scripts/code_generation/flowy_icons/generate_flowy_icons.sh +++ b/frontend/scripts/code_generation/flowy_icons/generate_flowy_icons.sh @@ -1,13 +1,5 @@ #!/bin/bash -no_pub_get=false - -while getopts 's' flag; do - case "${flag}" in - s) no_pub_get=true ;; - esac -done - echo "Generating flowy icon files" # Store the current working directory diff --git a/frontend/scripts/code_generation/freezed/generate_freezed.sh b/frontend/scripts/code_generation/freezed/generate_freezed.sh index 1cf5f0fe49..24c90650d2 100755 --- a/frontend/scripts/code_generation/freezed/generate_freezed.sh +++ b/frontend/scripts/code_generation/freezed/generate_freezed.sh @@ -1,13 +1,5 @@ #!/bin/bash -no_pub_get=false - -while getopts 's' flag; do - case "${flag}" in - s) no_pub_get=true ;; - esac -done - # Store the current working directory original_dir=$(pwd) @@ -19,9 +11,7 @@ cd ../../../appflowy_flutter # Navigate to the appflowy_flutter directory and generate files echo "Generating files for appflowy_flutter" -if [ "$no_pub_get" = false ]; then - flutter packages pub get >/dev/null 2>&1 -fi +flutter packages pub get >/dev/null 2>&1 dart run build_runner build -d echo "Done generating files for appflowy_flutter" @@ -36,9 +26,7 @@ for d in */; do if [ -f "pubspec.yaml" ]; then echo "Generating freezed files in $d..." echo "Please wait while we clean the project and fetch the dependencies." - if [ "$no_pub_get" = false ]; then - flutter packages pub get >/dev/null 2>&1 - fi + flutter packages pub get >/dev/null 2>&1 dart run build_runner build -d echo "Done running build command in $d" else diff --git a/frontend/scripts/code_generation/language_files/generate_language_files.sh b/frontend/scripts/code_generation/language_files/generate_language_files.sh index 41abe4217a..8aa403d1f2 100755 --- a/frontend/scripts/code_generation/language_files/generate_language_files.sh +++ b/frontend/scripts/code_generation/language_files/generate_language_files.sh @@ -1,13 +1,5 @@ #!/bin/bash -no_pub_get=false - -while getopts 's' flag; do - case "${flag}" in - s) no_pub_get=true ;; - esac -done - echo "Generating language files" # Store the current working directory @@ -24,6 +16,9 @@ rm -rf assets/translations/ mkdir -p assets/translations/ cp -f ../resources/translations/*.json assets/translations/ +# the ci alwayas return a 'null check operator used on a null value' error. +# so we force to exec the below command to avoid the error. +# https://github.com/dart-lang/pub/issues/3314 flutter pub get flutter packages pub get diff --git a/frontend/scripts/makefile/flutter.toml b/frontend/scripts/makefile/flutter.toml index 6e6c8957c5..4203ce678d 100644 --- a/frontend/scripts/makefile/flutter.toml +++ b/frontend/scripts/makefile/flutter.toml @@ -82,10 +82,10 @@ run_task = { name = [ script_runner = "@shell" [tasks.appflowy-android-dev-ci] -dependencies = ["appflowy-core-dev-android"] +dependencies = ["appflowy-core-dev-android-ci"] run_task = { name = [ "code_generation", - "flutter-build-android", + "flutter-build-android-ci", ] } script_runner = "@shell" diff --git a/frontend/scripts/makefile/mobile.toml b/frontend/scripts/makefile/mobile.toml index 62214d7541..41d6888281 100644 --- a/frontend/scripts/makefile/mobile.toml +++ b/frontend/scripts/makefile/mobile.toml @@ -27,11 +27,11 @@ script = [ """ cd rust-lib/ rustup show - if [ "${BUILD_FLAG}" == "debug" ]; then - echo "🚀 🚀 🚀 Building for debug" + if [ "${BUILD_FLAG}" = "debug" ]; then + echo "🚀 🚀 🚀 Building iOS SDK for debug" cargo lipo --targets ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi else - echo "🚀 🚀 🚀 Building for release" + echo "🚀 🚀 🚀 Building iOS SDK for release" cargo lipo --release --targets ${RUST_COMPILE_TARGET} --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi fi cd ../ @@ -49,18 +49,28 @@ run_task = { name = [ "restore-crate-type", ] } +# only use in CI job +[tasks.appflowy-core-dev-android-ci] +category = "Build" +dependencies = ["env_check", "set-app-version"] +run_task = { name = [ + "setup-crate-type", + "sdk-build-android-ci", + "post-mobile-android", + "restore-crate-type", +] } + [tasks.sdk-build-android] dependencies = ["set-app-version"] private = true script = [ """ cd rust-lib/ - rustup show if [ "${BUILD_FLAG}" = "debug" ]; then - echo "🚀 🚀 🚀 Building for debug" - cargo ndk -t arm64-v8a -t x86_64 -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi + echo "🚀 🚀 🚀 Building Android SDK for debug" + cargo ndk -t arm64-v8a -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi else - echo "🚀 🚀 🚀 Building for release" + echo "🚀 🚀 🚀 Building Android SDK for release" cargo ndk -t arm64-v8a -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi --release fi cd ../ @@ -68,6 +78,19 @@ script = [ ] script_runner = "@shell" +# only use in CI job +[tasks.sdk-build-android-ci] +dependencies = ["set-app-version"] +private = true +script = [ + """ + cd rust-lib/ + cargo ndk -t arm64-v8a -o ./jniLibs build --features "${FLUTTER_DESKTOP_FEATURES}" --package=dart-ffi + cd ../ + """, +] +script_runner = "@shell" + [tasks.post-mobile-ios] private = true script = [ @@ -76,6 +99,9 @@ script = [ dart_ffi_dir= set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/packages/appflowy_backend/${TARGET_OS} lib = set lib${LIB_NAME}.${LIB_EXT} + ls -a ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG} + + echo "💻 💻 💻 Copying ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/${lib} to ${dart_ffi_dir}/${lib}" rm -f ${dart_ffi_dir}/${lib} cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/target/${RUST_COMPILE_TARGET}/${BUILD_FLAG}/${lib} \