mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
e2009c063b
* feat: add archive for compression * feat: add service to manage zipped work spaces * feat: export service in barrel file * feat: ignore .ephemeral directory * feat: add first compressed workspace file * fix: directory path was wrong * feat: add a somewhat useful test * fix: move to same file (delete later) * fix: use script path vs. working directory for CI * fix: read from asset bundle instead of file system * fix: workaround to run integration in multiple files on desktop (flutter/flutter#101031 * feat: remove .ephemeral from .gitignore, no longer created * feat: document test changes * fix: lucas suggestion * feat: mark assets as excluded in pubspec.yaml * feat: add class for build utilities * feat: add script runner for release builds * feat: add build script as task in flowy project * fix: typo in pubspec.yaml * chore: use constants for exclude tag * feat: add appversion as argument to build tool * feat: use dart script in release.yml * chore: remove task * fix: careless error Co-authored-by: Mihir <84044317+squidrye@users.noreply.github.com> * feat: add translations for view of * fix: typo in getAllDatabase * feat: add view of database * fix: remove unused import * fix: use effective dart typing * fix: insertPage marked as async, should return future * fix: Remove multi-line string * fix: ref can be null * fix: unused imports caused analyzer to fail * feat: also fix. Add empty document as option and change name to _name * chore: move referenced database tests to empty document test file * feat: add test utilities * feat: add new integration test on an empty document * feat: register test in runner * fix: missing reference in insert_page_command * fix: analyzer errors --------- Co-authored-by: Mihir <84044317+squidrye@users.noreply.github.com>
44 lines
1.7 KiB
Dart
44 lines
1.7 KiB
Dart
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';
|
|
|
|
/// Integration tests for an empty board. The [TestWorkspaceService] will load
|
|
/// a workspace from an empty board `assets/test/workspaces/board.zip` for all
|
|
/// tests.
|
|
///
|
|
/// To create another integration test with a preconfigured workspace.
|
|
/// Use the following steps.
|
|
/// 1. Create a new workspace from the AppFlowy launch screen.
|
|
/// 2. Modify the workspace until it is suitable as the starting point for
|
|
/// the integration test you need to land.
|
|
/// 3. Use a zip utility program to zip the workspace folder that you created.
|
|
/// 4. Add the zip file under `assets/test/workspaces/`
|
|
/// 5. Add a new enumeration to [TestWorkspace] in `integration_test/utils/data.dart`.
|
|
/// For example, if you added a workspace called `empty_calendar.zip`,
|
|
/// then [TestWorkspace] should have the following value:
|
|
/// ```dart
|
|
/// enum TestWorkspace {
|
|
/// board('board'),
|
|
/// empty_calendar('empty_calendar');
|
|
///
|
|
/// /* code */
|
|
/// }
|
|
/// ```
|
|
/// 6. Double check that the .zip file that you added is included as an asset in
|
|
/// the pubspec.yaml file under appflowy_flutter.
|
|
void main() {
|
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
const service = TestWorkspaceService(TestWorkspace.board);
|
|
|
|
group('board', () {
|
|
setUpAll(() async => await service.setUpAll());
|
|
setUp(() async => await service.setUp());
|
|
|
|
testWidgets('integration test unzips the proper workspace and loads it correctly.', (tester) async {
|
|
await tester.initializeAppFlowy();
|
|
expect(find.byType(AppFlowyBoard), findsOneWidget);
|
|
});
|
|
});
|
|
}
|