Skip to content

Commit c7f0aea

Browse files
committed
fix: tests where cms groups are created
1 parent 122be17 commit c7f0aea

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

packages/api-headless-cms-ddb-es/__tests__/graphql/index/create.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ const setupGroup = async (context: CmsContext) => {
99
return context.cms.createGroup({
1010
name: "Test Group",
1111
description: "Test Group Description",
12-
icon: "fa/fas",
12+
icon: {
13+
type: "fa/fas",
14+
name: "fa/fas",
15+
value: "fa/fas"
16+
},
1317
slug: "test-group"
1418
});
1519
};
@@ -27,7 +31,7 @@ const modelData = {
2731
const createModelData = (group: CmsGroup): CmsModelCreateInput => {
2832
return {
2933
...modelData,
30-
group: group.id
34+
group: group.slug
3135
};
3236
};
3337

packages/api-headless-cms-tasks/__tests__/tasks/deleteModel/graphql/crud.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useHandler } from "~tests/context/useHandler";
33
import type { IStoreValue } from "~/features/DeleteModelTask/types.js";
44
import { createStoreKey } from "~/helpers/store.js";
55

6-
describe("crud", () => {
6+
describe("headless cms tasks crud", () => {
77
it("should list models being deleted", async () => {
88
const { handler, identity, tenant } = useHandler();
99
const context = await handler();
@@ -42,7 +42,11 @@ describe("crud", () => {
4242
name: "group",
4343
description: "description",
4444
id: "group",
45-
icon: "icon"
45+
icon: {
46+
type: "icon",
47+
name: "icon",
48+
value: "icon"
49+
}
4650
});
4751

4852
const model = await context.cms.createModel({

packages/cli/files/references.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)