Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use types in fixtures

dominik-zeglend728fcfc30a9
diff --git a/saleor/static/dashboard-next/staff/fixtures.ts b/saleor/static/dashboard-next/staff/fixtures.ts
index c30a9fc928..361bc6d2ac 100644
--- a/saleor/static/dashboard-next/staff/fixtures.ts
+++ b/saleor/static/dashboard-next/staff/fixtures.ts
@@ -1,4 +1,7 @@
-export const staffMembers = [
+import { StaffList_staffUsers_edges_node } from "./types/StaffList";
+import { StaffMemberDetails_user } from "./types/StaffMemberDetails";
+
+export const staffMembers: StaffList_staffUsers_edges_node[] = [
{
id: "VXNlcjoyMQ==",
@@ -59,8 +62,9 @@ export const staffMembers = [
id: "VXNlcjoyMQ==",
isActive: true
}
-];
-export const staffMember = {
+].map(staffMember => ({ __typename: "User" as "User", ...staffMember }));
+export const staffMember: StaffMemberDetails_user = {
+ __typename: "User",
id: "VXNlcjoyMQ==",
isActive: true,
@@ -789,5 +793,8 @@ export const staffMember = {
code: "social_django.delete_usersocialauth",
name: "Can delete user social auth"
}
- ]
+ ].map(perm => ({
+ __typename: "PermissionDisplay" as "PermissionDisplay",
+ ...perm
+ }))
};