Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

Merge branch 'origin/feat/cloud-sync' into 'feat/cloud-sync'

DarkSky4b464e89af56
diff --cc packages/data-center/tests/auth.spec.ts
index 63b35c0343,a82f0e7b6d..74b0f871bd
--- a/packages/data-center/tests/auth.spec.ts
+++ b/packages/data-center/tests/auth.spec.ts
@@@ -4,10 -4,10 +4,10 @@@ import { getDataCenter } from './utils.
import 'fake-indexeddb/auto';
-test.describe('auth', () => {
+test.describe('Auth', () => {
- test('signin', async () => {});
+ test('sign in', async () => {});
- test('signout', async () => {});
+ test('sign out', async () => {});
test('isLogin', async () => {});
diff --cc packages/data-center/tests/cloud-sync.spec.ts
index 5e427b9890,0b5ca23473..fa73cd1b2f
--- a/packages/data-center/tests/cloud-sync.spec.ts
+++ b/packages/data-center/tests/cloud-sync.spec.ts
@@@ -4,20 -4,12 +4,20 @@@ import { getDataCenter } from './utils.
import 'fake-indexeddb/auto';
-test.describe('cloud-sync', () => {
+test.describe('Cloud Sync', () => {
- test('get cloud the sync flag of workspace ', async () => {});
+ test('get cloud the sync flag of workspace', async () => {});
test('enable [cloud sync feature]', async () => {});
test('close [cloud sync feature]', async () => {});
test('editor cloud storage', async () => {});
+
- test('cloud sync is in-progresss', async () => {});
++ test('cloud sync is in-progress', async () => {});
+
+ test('cloud sync is completed', async () => {});
+
+ test('cloud sync is error', async () => {});
+
+ test('cloud storage is right', async () => {});
});
diff --cc packages/data-center/tests/search.spec.ts
index b3da112c60,a2bb3cb9a1..2d7345799e
--- a/packages/data-center/tests/search.spec.ts
+++ b/packages/data-center/tests/search.spec.ts
@@@ -4,6 -5,22 +5,22 @@@ import { getDataCenter, waitOnce } fro
import 'fake-indexeddb/auto';
-test.describe('search', () => {
- test('search service', async () => {
+test.describe('Search', () => {
- test('search result', async () => {});
++ test('search result', async () => {
+ const dc = await getDataCenter();
+ const workspace = await dc.load('test');
+
+ assert(workspace);
+ workspace.createPage('test');
+ await waitOnce(workspace.signals.pageAdded);
+ const page = workspace.getPage('test');
+ assert(page);
+
+ const text = new page.Text(page, 'hello world');
+ const blockId = page.addBlock({ flavour: 'affine:paragraph', text });
+
+ expect(workspace.search('hello')).toStrictEqual(
+ new Map([[blockId, 'test']])
+ );
+ });
});