Skip to content

Commit 56a5034

Browse files
committed
add create groups
1 parent 597bd79 commit 56a5034

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

testing/e2e/src/global/global.setup.spec.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { $LoginCredentials } from '@opendatacapture/schemas/auth';
22

3-
import { initAppOptions } from '../helpers/data';
3+
import { groups, initAppOptions } from '../helpers/data';
44
import { expect, test } from '../helpers/fixtures';
55

66
test.describe.serial(() => {
@@ -45,4 +45,18 @@ test.describe.serial(() => {
4545
process.env.ADMIN_PASSWORD = password;
4646
});
4747
});
48+
49+
test.describe.serial('creating groups', () => {
50+
test('creating groups', async ({ request }) => {
51+
for (const key in groups) {
52+
const response = await request.post('/api/v1/groups', {
53+
data: groups[key as keyof typeof groups],
54+
headers: {
55+
Authorization: `Bearer ${process.env.ADMIN_ACCESS_TOKEN}`
56+
}
57+
});
58+
expect(response.status()).toBe(201);
59+
}
60+
});
61+
});
4862
});

0 commit comments

Comments
 (0)