test: add document sync test on appflowy cloud (#4163)

* test: add document sync test on appflowy cloud

* chore: add runner

* test: Stream has already been listened to.

* fix: using singleton subscription

* fix: using singleton subscription
This commit is contained in:
Nathan.fooo 2023-12-21 08:12:40 +08:00 committed by GitHub
parent f5a9f2bf4d
commit 6ecc3c9076
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 560 additions and 381 deletions

View file

@ -111,6 +111,10 @@ class _DocumentPageState extends State<DocumentPage> {
return Column(
children: [
// Only show the indicator in integration test mode
// if (FlowyRunner.currentMode.isIntegrationTest)
// const DocumentSyncIndicator(),
if (state.isDeleted) _buildBanner(context),
Expanded(child: appflowyEditorPage),
],
@ -177,3 +181,20 @@ class _DocumentPageState extends State<DocumentPage> {
}
}
}
class DocumentSyncIndicator extends StatelessWidget {
const DocumentSyncIndicator({super.key});
@override
Widget build(BuildContext context) {
return BlocBuilder<DocumentBloc, DocumentState>(
builder: (context, state) {
if (state.isSyncing) {
return const SizedBox(height: 1, child: LinearProgressIndicator());
} else {
return const SizedBox(height: 1);
}
},
);
}
}