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.

tests: add 34 tests

tzhangchi069d2f7c2871
diff --git a/packages/data-center/__tests__/attachment.spec.ts b/packages/data-center/__tests__/attachment.spec.ts
new file mode 100644
index 0000000000..61343d9685
--- /dev/null
+++ b/packages/data-center/__tests__/attachment.spec.ts
@@ -0,0 +1,13 @@
+import { test, expect } from '@playwright/test';
+
+import { getDataCenter } from './utils.js';
+
+import 'fake-indexeddb/auto';
+
+test.describe('attachment', () => {
+ test('upload blob', async () => {});
+
+ test('get blob', async () => {});
+
+ test('remove blob', async () => {});
+});
diff --git a/packages/data-center/__tests__/auth.spec.ts b/packages/data-center/__tests__/auth.spec.ts
new file mode 100644
index 0000000000..fd7e56d78c
--- /dev/null
+++ b/packages/data-center/__tests__/auth.spec.ts
@@ -0,0 +1,15 @@
+import { test, expect } from '@playwright/test';
+
+import { getDataCenter } from './utils.js';
+
+import 'fake-indexeddb/auto';
+
+test.describe('auth', () => {
+ test('signin', async () => {});
+
+ test('signout', async () => {});
+
+ test('isLogin', async () => {});
+
+ test('getUserInfo', async () => {});
+});
diff --git a/packages/data-center/__tests__/cloud-sync.spec.ts b/packages/data-center/__tests__/cloud-sync.spec.ts
new file mode 100644
index 0000000000..0b14361993
--- /dev/null
+++ b/packages/data-center/__tests__/cloud-sync.spec.ts
@@ -0,0 +1,17 @@
+import { test, expect } from '@playwright/test';
+
+import { getDataCenter } from './utils.js';
+
+import 'fake-indexeddb/auto';
+
+test.describe('cloud-sync', () => {
+ test('get cloud sync flag of workspace ', async () => {});
+
+ test('enable cloud sync feature', async () => {});
+
+ test('close cloud sync feature', async () => {});
+
+ test('editor collaborate', async () => {});
+
+ test('editor cloud storage', async () => {});
+});
diff --git a/packages/data-center/__tests__/import-export.spec.ts b/packages/data-center/__tests__/import-export.spec.ts
new file mode 100644
index 0000000000..416150ffbc
--- /dev/null
+++ b/packages/data-center/__tests__/import-export.spec.ts
@@ -0,0 +1,11 @@
+import { test, expect } from '@playwright/test';
+
+import { getDataCenter } from './utils.js';
+
+import 'fake-indexeddb/auto';
+
+test.describe('import export', () => {
+ test('import workspace', async () => {});
+
+ test('export workspace', async () => {});
+});
diff --git a/packages/data-center/tests/init.spec.ts b/packages/data-center/__tests__/init.spec.ts
similarity index 100%
rename from packages/data-center/tests/init.spec.ts
rename to packages/data-center/__tests__/init.spec.ts
diff --git a/packages/data-center/__tests__/search.spec.ts b/packages/data-center/__tests__/search.spec.ts
new file mode 100644
index 0000000000..5973fb880c
--- /dev/null
+++ b/packages/data-center/__tests__/search.spec.ts
@@ -0,0 +1,9 @@
+import { test, expect } from '@playwright/test';
+
+import { getDataCenter } from './utils.js';
+
+import 'fake-indexeddb/auto';
+
+test.describe('search', () => {
+ test('search service', async () => {});
+});
diff --git a/packages/data-center/__tests__/share.spec.ts b/packages/data-center/__tests__/share.spec.ts
new file mode 100644
index 0000000000..cba8689fd5
--- /dev/null
+++ b/packages/data-center/__tests__/share.spec.ts
@@ -0,0 +1,19 @@
+import { test, expect } from '@playwright/test';
+
+import { getDataCenter } from './utils.js';
+
+import 'fake-indexeddb/auto';
+
+test.describe('share', () => {
+ test('get the public of workspace', async () => {});
+
+ test('make workspace public', async () => {});
+
+ test('make workspace private', async () => {});
+
+ test('invite member by email', async () => {});
+
+ test('accept invite member link', async () => {});
+
+ test('members list', async () => {});
+});
diff --git a/packages/data-center/tests/utils.ts b/packages/data-center/__tests__/utils.ts
similarity index 100%
rename from packages/data-center/tests/utils.ts
rename to packages/data-center/__tests__/utils.ts
diff --git a/packages/data-center/tests/workspace.spec.ts b/packages/data-center/__tests__/workspace.spec.ts
similarity index 84%
rename from packages/data-center/tests/workspace.spec.ts
rename to packages/data-center/__tests__/workspace.spec.ts
index 99f47abf54..3278fe10e4 100644
--- a/packages/data-center/tests/workspace.spec.ts
+++ b/packages/data-center/__tests__/workspace.spec.ts
@@ -48,4 +48,14 @@ test.describe('workspace', () => {
await dataCenter.delete('test9');
expect(await dataCenter.list()).toStrictEqual(['test10']);
});
+
+ test('create workspace', async () => {});
+ test('get the workspace', async () => {});
+
+ test('get workspace name', async () => {});
+ test('set workspace name', async () => {});
+
+ test('get workspace avatar', async () => {});
+
+ test('set workspace avatar', async () => {});
});