aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/api/static/features.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/api/static/features.spec.ts')
-rw-r--r--tests/functional/api/static/features.spec.ts29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/functional/api/static/features.spec.ts b/tests/functional/api/static/features.spec.ts
new file mode 100644
index 0000000..1050fcf
--- /dev/null
+++ b/tests/functional/api/static/features.spec.ts
@@ -0,0 +1,29 @@
1import { test } from '@japa/runner';
2import { apiVersion } from '../../../config';
3
4const defaultResponse = {
5 isServiceProxyEnabled: true,
6 isWorkspaceEnabled: true,
7 isAnnouncementsEnabled: true,
8 isSettingsWSEnabled: false,
9 isMagicBarEnabled: true,
10 isTodosEnabled: true,
11};
12
13test.group('API / Static / Features', () => {
14 test('returns a 200 response with empty array', async ({ client }) => {
15 const response = await client.get(`/${apiVersion}/features`);
16
17 response.assertStatus(200);
18 response.assertBody(defaultResponse);
19 });
20
21 test('returns a 200 response with expected object when calling with :mode', async ({
22 client,
23 }) => {
24 const response = await client.get(`/${apiVersion}/features/random`);
25
26 response.assertStatus(200);
27 response.assertBody(defaultResponse);
28 });
29});