slice-machine-ui 1.24.2-beta.1 → 1.24.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/components/AppLayout/index.tsx +1 -1
  2. package/components/Button/index.tsx +5 -5
  3. package/components/CustomTypeTable/changesPage.tsx +5 -2
  4. package/components/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +2 -2
  5. package/components/EmptyState/index.tsx +1 -1
  6. package/components/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +3 -3
  7. package/components/Forms/CreateSliceModal/CreateSliceModal.tsx +2 -2
  8. package/components/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +2 -2
  9. package/components/Forms/RenameSliceModal/RenameSliceModal.tsx +3 -3
  10. package/components/Forms/components/InputBox.tsx +4 -4
  11. package/components/Forms/components/SelectRepeatable.tsx +2 -2
  12. package/components/ItemHeader/index.tsx +1 -1
  13. package/components/ListItem/Header.tsx +2 -2
  14. package/components/ListItem/index.tsx +4 -4
  15. package/components/ModalFormCard/index.tsx +10 -8
  16. package/components/Navigation/RunningVersion.tsx +1 -1
  17. package/components/ReviewModal/ReviewForm.tsx +1 -1
  18. package/components/ReviewModal/ReviewFormSelect.tsx +1 -1
  19. package/components/Simulator/components/Header/index.tsx +1 -1
  20. package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +1 -1
  21. package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +1 -1
  22. package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +1 -1
  23. package/lib/builders/SliceBuilder/FieldZones/index.tsx +2 -2
  24. package/lib/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +1 -1
  25. package/lib/builders/common/Zone/Card/components/NewField.tsx +3 -3
  26. package/lib/builders/common/Zone/Card/index.jsx +3 -3
  27. package/lib/builders/common/Zone/components/EmptyState/index.tsx +1 -1
  28. package/lib/builders/common/Zone/index.jsx +4 -4
  29. package/lib/models/common/widgets/Group/ListItem/index.jsx +1 -1
  30. package/out/404.html +1 -1
  31. package/out/_next/static/{fL0LayuU6DO9yacV7F_NS → Ri5Fsf9Uw8sbx2475l_JK}/_buildManifest.js +1 -1
  32. package/out/_next/static/chunks/{25-3aa4d4b24167d340.js → 25-792af14760d9df34.js} +1 -1
  33. package/out/_next/static/chunks/318-2426f74a0d6c3b89.js +1 -0
  34. package/out/_next/static/chunks/727-5e50dd9b10462347.js +1 -0
  35. package/out/_next/static/chunks/799-9bea9069969f5fe0.js +1 -0
  36. package/out/_next/static/chunks/904-b3710ed82582f33b.js +1 -0
  37. package/out/_next/static/chunks/pages/{_app-595ea4cb47d299e3.js → _app-cd77f4bc30fc0e7c.js} +1 -1
  38. package/out/_next/static/chunks/pages/changes-23829ddb11cac992.js +1 -0
  39. package/out/_next/static/chunks/pages/settings-12f209f1d5d42b1c.js +1 -0
  40. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-8343067eddc3a2b4.js +1 -0
  41. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-89c911fd39271b5d.js → [variation]-60858a3cead6dc81.js} +1 -1
  42. package/out/_next/static/chunks/pages/slices-c33645b1828857c4.js +1 -0
  43. package/out/changelog.html +1 -1
  44. package/out/changes.html +1 -1
  45. package/out/custom-types/[customTypeId].html +1 -1
  46. package/out/custom-types.html +1 -1
  47. package/out/index.html +1 -1
  48. package/out/labs.html +1 -1
  49. package/out/page-types/[pageTypeId].html +1 -1
  50. package/out/settings.html +1 -1
  51. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  52. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  53. package/out/slices.html +1 -1
  54. package/package.json +3 -3
  55. package/pages/changes.tsx +7 -8
  56. package/pages/slices.tsx +1 -2
  57. package/src/ErrorBoundary.tsx +8 -4
  58. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +2 -2
  59. package/src/features/changes/PushChangesButton.tsx +83 -0
  60. package/src/features/changes/StatusBadge.tsx +2 -2
  61. package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +5 -1
  62. package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +1 -1
  63. package/src/features/settings/git/GitOwnerSelect.tsx +2 -2
  64. package/src/features/settings/git/GitProviderConnectButtons.tsx +2 -2
  65. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +1 -1
  66. package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +2 -2
  67. package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +1 -1
  68. package/src/features/slices/sliceCards/SharedSliceCard.tsx +1 -2
  69. package/test/pages/slices.test.tsx +2 -4
  70. package/out/_next/static/chunks/318-19dbcae10cdb6408.js +0 -1
  71. package/out/_next/static/chunks/727-ffb4c69fbb971ed7.js +0 -1
  72. package/out/_next/static/chunks/799-0af1215eb2b3c17e.js +0 -1
  73. package/out/_next/static/chunks/904-d9089efa6d974e3e.js +0 -1
  74. package/out/_next/static/chunks/pages/changes-ea6064c1db5ab5e1.js +0 -1
  75. package/out/_next/static/chunks/pages/settings-768fc1a6367d7d03.js +0 -1
  76. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-22770c807a7d7090.js +0 -1
  77. package/out/_next/static/chunks/pages/slices-5dc0c55c386e047a.js +0 -1
  78. /package/out/_next/static/{fL0LayuU6DO9yacV7F_NS → Ri5Fsf9Uw8sbx2475l_JK}/_ssgManifest.js +0 -0
@@ -51,7 +51,7 @@ const PageLayoutWithActiveEnvironment: FC<PropsWithChildren> = ({
51
51
  return (
52
52
  <PageLayout
53
53
  borderTopColor={borderTopColor}
54
- data-cy={`app-layout-top-border-color-${borderTopColor}`}
54
+ data-testid={`app-layout-top-border-color-${borderTopColor}`}
55
55
  {...otherProps}
56
56
  >
57
57
  {children}
@@ -7,15 +7,15 @@ export interface SmButtonProps extends ButtonProps {
7
7
  label: string;
8
8
  Icon?: IconType;
9
9
  isLoading?: boolean;
10
- "data-cy"?: string;
10
+ "data-testid"?: string;
11
11
  iconSize?: number;
12
12
  iconFill?: string;
13
13
  }
14
14
 
15
15
  // Small helper to allow us to target spinner and icon in the CY
16
- const cyIdBuilder = (dataCy: string | undefined, id: string) => {
16
+ const testIdBuilder = (testId: string | undefined, id: string) => {
17
17
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
18
- if (dataCy) return `${dataCy}-${id}`;
18
+ if (testId) return `${testId}-${id}`;
19
19
  return "";
20
20
  };
21
21
 
@@ -72,7 +72,7 @@ export const Button = forwardRef<HTMLButtonElement, SmButtonProps>(
72
72
  <Spinner
73
73
  size={iconSize}
74
74
  color={spinnerColor(variant)}
75
- data-cy={cyIdBuilder(rest["data-cy"], "spinner")}
75
+ data-testid={testIdBuilder(rest["data-testid"], "spinner")}
76
76
  />
77
77
  {Icon && label}
78
78
  </>
@@ -82,7 +82,7 @@ export const Button = forwardRef<HTMLButtonElement, SmButtonProps>(
82
82
  <Icon
83
83
  size={iconSize}
84
84
  fill={iconFill}
85
- data-cy={cyIdBuilder(rest["data-cy"], "icon")}
85
+ data-testid={testIdBuilder(rest["data-testid"], "icon")}
86
86
  />
87
87
  )}
88
88
  {label}
@@ -81,7 +81,10 @@ export const CustomTypeTable: React.FC<CustomTypeTableProps> = ({
81
81
  key={customType.local.id}
82
82
  legacyBehavior
83
83
  >
84
- <tr tabIndex={0} data-cy={`custom-type-${customType.local.id}`}>
84
+ <tr
85
+ tabIndex={0}
86
+ data-testid={`custom-type-${customType.local.id}`}
87
+ >
85
88
  <CustomTypeChangeRow
86
89
  ct={customType.local}
87
90
  status={modelsStatuses.customTypes[customType.local.id]}
@@ -95,7 +98,7 @@ export const CustomTypeTable: React.FC<CustomTypeTableProps> = ({
95
98
  <tr
96
99
  tabIndex={0}
97
100
  className="disabled"
98
- data-cy={`custom-type-${customType.remote.id}`}
101
+ data-testid={`custom-type-${customType.remote.id}`}
99
102
  key={customType.remote.id}
100
103
  >
101
104
  <CustomTypeChangeRow
@@ -20,7 +20,7 @@ export const AssociatedDocumentsCard: React.FC<
20
20
  mb: 12,
21
21
  }}
22
22
  variant="drawerCard"
23
- data-cy={`AssociatedDocumentsCard-${ctName}`}
23
+ data-testid={`AssociatedDocumentsCard-${ctName}`}
24
24
  >
25
25
  <Flex sx={{ flexDirection: "column" }}>
26
26
  <Text>{ctName}</Text>
@@ -55,7 +55,7 @@ export const CustomTypesReferencesCard: React.FC<{
55
55
  mb: 12,
56
56
  }}
57
57
  variant="drawerCard"
58
- data-cy={`CustomTypesReferencesCard-${name}`}
58
+ data-testid={`CustomTypesReferencesCard-${name}`}
59
59
  >
60
60
  <Flex sx={{ flexDirection: "column" }}>
61
61
  <Text>{name}</Text>
@@ -94,7 +94,7 @@ const EmptyState: React.FunctionComponent<Props> = ({
94
94
  >
95
95
  <Button
96
96
  onClick={onCreateNew}
97
- data-cy="empty-state-main-button"
97
+ data-testid="empty-state-main-button"
98
98
  sx={{
99
99
  display: "flex",
100
100
  justifyContent: "center",
@@ -130,7 +130,7 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
130
130
 
131
131
  return (
132
132
  <ModalFormCard
133
- dataCy="create-ct-modal"
133
+ testId="create-ct-modal"
134
134
  isOpen={isOpen}
135
135
  widthInPx="530px"
136
136
  formId="create-custom-type"
@@ -204,7 +204,7 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
204
204
  start: true,
205
205
  plural: false,
206
206
  })} Name`}
207
- dataCy="ct-name-input"
207
+ testId="ct-name-input"
208
208
  placeholder={`A display name for the ${customTypesMessages.name({
209
209
  start: false,
210
210
  plural: false,
@@ -215,7 +215,7 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
215
215
  />
216
216
  <InputBox
217
217
  name="id"
218
- dataCy="ct-id-input"
218
+ testId="ct-id-input"
219
219
  label={`${customTypesMessages.name({
220
220
  start: true,
221
221
  plural: false,
@@ -55,7 +55,7 @@ export const CreateSliceModal: FC<CreateSliceModalProps> = ({
55
55
 
56
56
  return (
57
57
  <ModalFormCard
58
- dataCy="create-slice-modal"
58
+ testId="create-slice-modal"
59
59
  isOpen
60
60
  widthInPx="530px"
61
61
  isLoading={isCreatingSlice}
@@ -84,7 +84,7 @@ export const CreateSliceModal: FC<CreateSliceModalProps> = ({
84
84
  placeholder="Pascalised Slice API ID (e.g. TextBlock)"
85
85
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
86
86
  error={touched.sliceName ? errors.sliceName : undefined}
87
- dataCy="slice-name-input"
87
+ testId="slice-name-input"
88
88
  />
89
89
  <Label htmlFor="from" sx={{ mb: 2 }}>
90
90
  Target Library
@@ -67,7 +67,7 @@ export const RenameCustomTypeModal: React.FC<RenameCustomTypeModalProps> = ({
67
67
  return (
68
68
  <ModalFormCard
69
69
  isOpen
70
- dataCy="rename-custom-type-modal"
70
+ testId="rename-custom-type-modal"
71
71
  widthInPx="530px"
72
72
  formId={`rename-custom-type-modal-${customTypeId}`}
73
73
  buttonLabel="Rename"
@@ -119,7 +119,7 @@ export const RenameCustomTypeModal: React.FC<RenameCustomTypeModalProps> = ({
119
119
  plural: false,
120
120
  })}`}
121
121
  error={errors.customTypeName}
122
- dataCy="custom-type-name-input"
122
+ testId="custom-type-name-input"
123
123
  />
124
124
  </Box>
125
125
  )}
@@ -51,7 +51,7 @@ export const RenameSliceModal: React.FC<RenameSliceModalProps> = ({
51
51
 
52
52
  return (
53
53
  <ModalFormCard<SliceModalValues>
54
- dataCy="rename-slice-modal"
54
+ testId="rename-slice-modal"
55
55
  isOpen={isOpen}
56
56
  widthInPx="530px"
57
57
  formId={`rename-slice-modal-${slice?.model.id ?? ""}`}
@@ -73,11 +73,11 @@ export const RenameSliceModal: React.FC<RenameSliceModalProps> = ({
73
73
  <InputBox
74
74
  name="sliceName"
75
75
  label="Slice Name"
76
- data-cy="slice-name-input"
76
+ data-testid="slice-name-input"
77
77
  placeholder="Pascalised Slice API ID (e.g. TextBlock)"
78
78
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
79
79
  error={touched.sliceName ? errors.sliceName : undefined}
80
- dataCy="slice-name-input"
80
+ testId="slice-name-input"
81
81
  />
82
82
  </Box>
83
83
  )}
@@ -7,7 +7,7 @@ type InputBoxProps = {
7
7
  label: string;
8
8
  placeholder: string;
9
9
  error?: string;
10
- dataCy?: string;
10
+ testId?: string;
11
11
  onChange?: (input: React.ChangeEvent<HTMLInputElement>) => void;
12
12
  };
13
13
 
@@ -16,7 +16,7 @@ export const InputBox: React.FunctionComponent<InputBoxProps> = ({
16
16
  label,
17
17
  placeholder,
18
18
  error,
19
- dataCy,
19
+ testId,
20
20
  onChange,
21
21
  }) => (
22
22
  <Box mb={3}>
@@ -31,13 +31,13 @@ export const InputBox: React.FunctionComponent<InputBoxProps> = ({
31
31
  autoComplete="off"
32
32
  {...(onChange ? { onChange } : null)}
33
33
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
34
- {...(dataCy ? { "data-cy": dataCy } : null)}
34
+ {...(testId ? { "data-testid": testId } : null)}
35
35
  />
36
36
  {/* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions */}
37
37
  {error ? (
38
38
  <Text
39
39
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
40
- data-cy={dataCy ? `${dataCy}-error` : "input-error"}
40
+ data-testid={testId ? `${testId}-error` : "input-error"}
41
41
  sx={{ color: "error", mt: 1 }}
42
42
  >
43
43
  {error}
@@ -21,7 +21,7 @@ export const SelectRepeatable: FC<SelectRepeatableProps> = ({ format }) => {
21
21
  checked={field.value}
22
22
  // eslint-disable-next-line @typescript-eslint/no-empty-function
23
23
  onChange={() => {}}
24
- data-cy="repeatable-type-radio-btn"
24
+ data-testid="repeatable-type-radio-btn"
25
25
  />
26
26
  <Box
27
27
  sx={{
@@ -39,7 +39,7 @@ export const SelectRepeatable: FC<SelectRepeatableProps> = ({ format }) => {
39
39
  checked={!field.value}
40
40
  // eslint-disable-next-line @typescript-eslint/no-empty-function
41
41
  onChange={() => {}}
42
- data-cy="single-type-radio-btn"
42
+ data-testid="single-type-radio-btn"
43
43
  />
44
44
  <Box
45
45
  sx={{
@@ -22,7 +22,7 @@ const ItemHeader: React.FC<{
22
22
  />
23
23
  <Text
24
24
  as="p"
25
- data-cy="item-header-text"
25
+ data-testid="item-header-text"
26
26
  sx={{
27
27
  py: 0,
28
28
  px: 1,
@@ -32,7 +32,7 @@ const ItemHeader: React.FC<ItemHeaderProps> = ({
32
32
  text={text}
33
33
  as="p"
34
34
  sx={{ py: 0, px: 1, fontWeight: "label", fontSize: "15px" }}
35
- data-cy="field-name"
35
+ data-testid="field-name"
36
36
  />
37
37
  <Text
38
38
  as="p"
@@ -42,7 +42,7 @@ const ItemHeader: React.FC<ItemHeaderProps> = ({
42
42
  ml: 1,
43
43
  color: "textClear",
44
44
  }}
45
- data-cy="field-id"
45
+ data-testid="field-id"
46
46
  >
47
47
  {sliceFieldName}
48
48
  </Text>
@@ -34,7 +34,7 @@ interface ListItemProps<F extends TabField, S extends AnyObjectSchema> {
34
34
  CustomEditElements?: JSX.Element[];
35
35
  widget: Widget<F, S>;
36
36
  draggableId: string;
37
- dataCy: string;
37
+ testId: string;
38
38
  isRepeatableCustomType?: boolean;
39
39
  children: React.ReactNode;
40
40
  }
@@ -51,7 +51,7 @@ function ListItem<F extends TabField, S extends AnyObjectSchema>({
51
51
  CustomEditElements,
52
52
  widget,
53
53
  draggableId,
54
- dataCy,
54
+ testId,
55
55
  isRepeatableCustomType,
56
56
  children,
57
57
  }: ListItemProps<F, S>): JSX.Element {
@@ -68,7 +68,7 @@ function ListItem<F extends TabField, S extends AnyObjectSchema>({
68
68
  {(provided) => (
69
69
  <Fragment>
70
70
  <Li
71
- data-cy={dataCy}
71
+ data-testid={testId}
72
72
  ref={provided.innerRef}
73
73
  {...provided.draggableProps}
74
74
  Component={Box}
@@ -137,7 +137,7 @@ function ListItem<F extends TabField, S extends AnyObjectSchema>({
137
137
  <Menu>
138
138
  <MenuButton
139
139
  className="sliceMenuButton"
140
- data-cy="field-menu-button"
140
+ data-testid="field-menu-button"
141
141
  style={{
142
142
  padding: "0",
143
143
  cursor: "pointer",
@@ -8,7 +8,11 @@ import {
8
8
  FormikValues,
9
9
  FormikProps,
10
10
  } from "formik";
11
- import { SetStateAction } from "react";
11
+ import type {
12
+ ComponentPropsWithoutRef,
13
+ ReactNode,
14
+ SetStateAction,
15
+ } from "react";
12
16
  import { Flex, Heading, Close, Button as ThemeButton } from "theme-ui";
13
17
 
14
18
  import { Button } from "@components/Button";
@@ -41,13 +45,11 @@ type ModalCardProps<T extends FormikValues> = {
41
45
  onSubmit: (values: T) => void;
42
46
  initialValues: T;
43
47
  content: { title: string };
44
- cardProps?: React.ComponentProps<typeof Card>;
48
+ cardProps?: ComponentPropsWithoutRef<typeof Card>;
45
49
  omitFooter?: boolean;
46
50
  isLoading?: boolean;
47
- dataCy?: string;
48
- actionMessage?:
49
- | ((props: FormikProps<T>) => React.ReactNode)
50
- | React.ReactNode;
51
+ testId?: string;
52
+ actionMessage?: ((props: FormikProps<T>) => ReactNode) | ReactNode;
51
53
  };
52
54
 
53
55
  function ModalCard<Values extends FormikValues>({
@@ -64,7 +66,7 @@ function ModalCard<Values extends FormikValues>({
64
66
  omitFooter = false,
65
67
  isLoading = false,
66
68
  buttonLabel = "Save",
67
- dataCy,
69
+ testId,
68
70
  actionMessage,
69
71
  }: ModalCardProps<Values>): JSX.Element {
70
72
  Modal.setAppElement("#__next");
@@ -104,7 +106,7 @@ function ModalCard<Values extends FormikValues>({
104
106
  return (
105
107
  <Form
106
108
  id={formId}
107
- {...(dataCy != null ? { "data-cy": dataCy } : null)}
109
+ {...(testId != null ? { "data-testid": testId } : null)}
108
110
  >
109
111
  <Card
110
112
  borderFooter
@@ -7,7 +7,7 @@ export const RunningVersion: FC = () => {
7
7
  const sliceMachineRunningVersion = useSliceMachineRunningVersion();
8
8
 
9
9
  return (
10
- <RightElement data-cy="slicemachine-version">
10
+ <RightElement data-testid="slicemachine-version">
11
11
  v{sliceMachineRunningVersion}
12
12
  </RightElement>
13
13
  );
@@ -157,7 +157,7 @@ export const ReviewForm: FC<ReviewFormProps> = (props) => {
157
157
  as={Textarea}
158
158
  autoComplete="off"
159
159
  sx={{ height: 80, mb: 3 }}
160
- data-cy="review-form-comment"
160
+ data-testid="review-form-comment"
161
161
  />
162
162
  <Button
163
163
  form={"review-form"}
@@ -25,7 +25,7 @@ export const ReviewFormSelect: FC<FieldProps> = (props) => {
25
25
  color: "white",
26
26
  },
27
27
  }}
28
- data-cy={`review-form-score-${rating}`}
28
+ data-testid={`review-form-score-${rating}`}
29
29
  >
30
30
  {rating}
31
31
  </Button>
@@ -110,7 +110,7 @@ const Header: React.FunctionComponent<PropTypes> = ({
110
110
  </Flex>
111
111
  </Flex>
112
112
  <Button
113
- data-cy="save-mock"
113
+ data-testid="save-mock"
114
114
  onClick={onSaveMock}
115
115
  label="Save mock content"
116
116
  disabled={savingMock || actionsDisabled}
@@ -45,7 +45,7 @@ const UpdateSliceZoneModal: React.FC<UpdateSliceModalProps> = ({
45
45
  content={{
46
46
  title: "Select existing slices",
47
47
  }}
48
- dataCy="update-slices-modal"
48
+ testId="update-slices-modal"
49
49
  validate={(values) => {
50
50
  if (values.sliceKeys.length === 0) {
51
51
  return {
@@ -255,7 +255,7 @@ const SliceZone: React.FC<SliceZoneProps> = ({
255
255
  }
256
256
  }}
257
257
  size="small"
258
- data-cy="slice-zone-switch"
258
+ data-testid="slice-zone-switch"
259
259
  />
260
260
  ) : undefined
261
261
  }
@@ -237,7 +237,7 @@ const TabZone: FC<TabZoneProps> = ({ tabId }) => {
237
237
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument
238
238
  `data${transformKeyAccessor(key)}`
239
239
  }
240
- dataCy="static-zone-content"
240
+ testId="static-zone-content"
241
241
  isRepeatableCustomType={customType.repeatable}
242
242
  />
243
243
  ) : undefined}
@@ -166,7 +166,7 @@ const FieldZones: FC = () => {
166
166
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
167
167
  `slice.primary${transformKeyAccessor(key)}`
168
168
  }
169
- dataCy="static-zone-content"
169
+ testId="static-zone-content"
170
170
  isRepeatableCustomType={undefined}
171
171
  />
172
172
  <Zone
@@ -191,7 +191,7 @@ const FieldZones: FC = () => {
191
191
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
192
192
  `slice.items[i]${transformKeyAccessor(key)}`
193
193
  }
194
- dataCy="slice-repeatable-zone"
194
+ testId="slice-repeatable-zone"
195
195
  isRepeatableCustomType={undefined}
196
196
  />
197
197
  </List>
@@ -19,7 +19,7 @@ const FieldTypeCard = ({ title, description, icon: WidgetIcon, onSelect }) => {
19
19
  },
20
20
  }}
21
21
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
22
- data-cy={title}
22
+ data-testid={title}
23
23
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
24
24
  onClick={onSelect}
25
25
  >
@@ -119,7 +119,7 @@ const NewField: React.FC<NewField> = ({
119
119
  initialValues={initialValues}
120
120
  >
121
121
  {({ errors, values, setValues, setFieldValue, submitForm }) => (
122
- <Form data-cy="new-field-form">
122
+ <Form data-testid="new-field-form">
123
123
  <Flex
124
124
  as="li"
125
125
  sx={{
@@ -192,7 +192,7 @@ const NewField: React.FC<NewField> = ({
192
192
  width: "initial",
193
193
  }}
194
194
  aria-label="label-input"
195
- data-cy="new-field-name-input"
195
+ data-testid="new-field-name-input"
196
196
  />
197
197
  <ErrorTooltip error={errors.label} />
198
198
  </Flex>
@@ -242,7 +242,7 @@ const NewField: React.FC<NewField> = ({
242
242
  minWidth: "128px",
243
243
  width: "initial",
244
244
  }}
245
- data-cy="new-field-id-input"
245
+ data-testid="new-field-id-input"
246
246
  />
247
247
  <ErrorTooltip error={errors.id} />
248
248
  </Flex>
@@ -21,7 +21,7 @@ const FieldZone = ({
21
21
  newField,
22
22
  renderHintBase,
23
23
  isRepeatable,
24
- dataCy,
24
+ testId,
25
25
  isRepeatableCustomType,
26
26
  }) => {
27
27
  return (
@@ -39,7 +39,7 @@ const FieldZone = ({
39
39
  ref={provided.innerRef}
40
40
  {...provided.droppableProps}
41
41
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
42
- data-cy={dataCy}
42
+ data-testid={testId}
43
43
  sx={{ paddingInline: "16px !important" }}
44
44
  >
45
45
  {
@@ -87,7 +87,7 @@ const FieldZone = ({
87
87
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
88
88
  isRepeatableCustomType,
89
89
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access
90
- dataCy: `list-item-${item.key}`,
90
+ testId: `list-item-${item.key}`,
91
91
  };
92
92
 
93
93
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
@@ -21,7 +21,7 @@ const ZoneEmptyState = ({
21
21
  color="grey"
22
22
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
23
23
  onClick={() => onEnterSelectMode()}
24
- data-cy={`add-${zoneName}-field`}
24
+ data-testid={`add-${zoneName}-field`}
25
25
  startIcon="add"
26
26
  >
27
27
  Add a new field
@@ -26,7 +26,7 @@ const Zone = ({
26
26
  dataTip /* text info to display as tip */,
27
27
  renderHintBase /* render base (eg. path to slice) content for hints */,
28
28
  renderFieldAccessor /* render field accessor (eg. slice.primary.title) */,
29
- dataCy,
29
+ testId,
30
30
  isRepeatableCustomType,
31
31
  }) => {
32
32
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -85,10 +85,10 @@ const Zone = ({
85
85
  size="small"
86
86
  // TODO(DT-1710): add the missing `flexShrink: 0` property to the Editor's Switch component.
87
87
  style={{ flexShrink: 0 }}
88
- data-cy="code-snippets-switch"
88
+ data-testid="code-snippets-switch"
89
89
  />
90
90
  <Button
91
- data-cy={`add-${
91
+ data-testid={`add-${
92
92
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
93
93
  isRepeatable ? "Repeatable" : "Static"
94
94
  }-field`}
@@ -141,7 +141,7 @@ const Zone = ({
141
141
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
142
142
  onDeleteItem={onDeleteItem}
143
143
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
144
- dataCy={dataCy}
144
+ testId={testId}
145
145
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
146
146
  isRepeatableCustomType={isRepeatableCustomType}
147
147
  newField={
@@ -209,7 +209,7 @@ const CustomListItem = ({
209
209
  `data.${groupItem.key}.${key}`,
210
210
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions
211
211
  draggableId: `group-${groupItem.key}-${item.key}-${index}`,
212
- dataCy: `list-item-group-${groupItem.key}-${item.key}`,
212
+ testId: `list-item-group-${groupItem.key}-${item.key}`,
213
213
  };
214
214
 
215
215
  const HintElement = (
package/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/75711e840ea6c200.css" as="style"/><link rel="stylesheet" href="/_next/static/css/75711e840ea6c200.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-595ea4cb47d299e3.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/fL0LayuU6DO9yacV7F_NS/_buildManifest.js" defer=""></script><script src="/_next/static/fL0LayuU6DO9yacV7F_NS/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"fL0LayuU6DO9yacV7F_NS","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/75711e840ea6c200.css" as="style"/><link rel="stylesheet" href="/_next/static/css/75711e840ea6c200.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-cd77f4bc30fc0e7c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/Ri5Fsf9Uw8sbx2475l_JK/_buildManifest.js" defer=""></script><script src="/_next/static/Ri5Fsf9Uw8sbx2475l_JK/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"Ri5Fsf9Uw8sbx2475l_JK","runtimeConfig":{"sentryEnvironment":"beta"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,d,f,u,h,l,k,j,p,g,o,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[a,j,p,"static/chunks/pages/index-cf93d16e9c63b6db.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":[s,e,"static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-57289ca6bc99702b.js"],"/changes":[s,t,"static/chunks/8eec4907-b712959d9f984b68.js",i,"static/chunks/918-5bb55fb464e34768.js",c,n,"static/css/838fd8bb5a7c32b0.css","static/chunks/pages/changes-ea6064c1db5ab5e1.js"],"/custom-types":[a,j,p,"static/chunks/pages/custom-types-3c8e721ec6802127.js"],"/custom-types/[customTypeId]":[s,d,f,u,h,e,b,i,l,g,c,a,k,o,r,"static/chunks/pages/custom-types/[customTypeId]-97ab3b90b85d645d.js"],"/labs":["static/chunks/pages/labs-85d5c752dd5148b6.js"],"/page-types/[pageTypeId]":[s,d,f,u,h,e,b,i,l,g,c,a,k,o,r,"static/chunks/pages/page-types/[pageTypeId]-84a22c5e480d3fa9.js"],"/settings":["static/css/ca32882a5d2d8d88.css","static/chunks/pages/settings-768fc1a6367d7d03.js"],"/slices":[s,t,b,c,n,"static/css/f8eb526e10bc2441.css","static/chunks/pages/slices-5dc0c55c386e047a.js"],"/slices/[lib]/[sliceName]/[variation]":[s,t,d,f,u,h,e,b,i,l,c,k,n,"static/css/b22c0750c14cc089.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-89c911fd39271b5d.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[t,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-a5a5d48f20a7b261.js","static/chunks/777-7bc4ca95c82802e5.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-22770c807a7d7090.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/settings","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/59b4e022-7a3b5554b806349f.js","static/chunks/25-3aa4d4b24167d340.js","static/chunks/799-0af1215eb2b3c17e.js","static/chunks/183-4feb6bb3eddbc768.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/543-f8766685f7f451e2.js","static/chunks/50-cfc2514205b86001.js","static/chunks/286-877cd7b96660f95f.js","static/chunks/f36c6662-03bb5e9d9aa0b0aa.js","static/chunks/4c744e84-e3161d754618373f.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-2c5b6c0367fcde86.js","static/chunks/696-b12edad30a3617e5.js","static/chunks/318-19dbcae10cdb6408.js","static/chunks/727-ffb4c69fbb971ed7.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-5a072e6fac61f703.js","static/chunks/904-d9089efa6d974e3e.js","static/css/72465cc1225f28a2.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,d,n,f,u,h,l,k,j,p,g,o,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[a,j,p,"static/chunks/pages/index-cf93d16e9c63b6db.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":[s,e,"static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-57289ca6bc99702b.js"],"/changes":[s,t,"static/chunks/8eec4907-b712959d9f984b68.js",i,"static/chunks/918-5bb55fb464e34768.js",c,d,"static/css/838fd8bb5a7c32b0.css","static/chunks/pages/changes-23829ddb11cac992.js"],"/custom-types":[a,j,p,"static/chunks/pages/custom-types-3c8e721ec6802127.js"],"/custom-types/[customTypeId]":[s,n,f,u,h,e,b,i,l,g,c,a,k,o,r,"static/chunks/pages/custom-types/[customTypeId]-97ab3b90b85d645d.js"],"/labs":["static/chunks/pages/labs-85d5c752dd5148b6.js"],"/page-types/[pageTypeId]":[s,n,f,u,h,e,b,i,l,g,c,a,k,o,r,"static/chunks/pages/page-types/[pageTypeId]-84a22c5e480d3fa9.js"],"/settings":["static/css/ca32882a5d2d8d88.css","static/chunks/pages/settings-12f209f1d5d42b1c.js"],"/slices":[s,t,b,c,d,"static/css/f8eb526e10bc2441.css","static/chunks/pages/slices-c33645b1828857c4.js"],"/slices/[lib]/[sliceName]/[variation]":[s,t,n,f,u,h,e,b,i,l,c,k,d,"static/css/b22c0750c14cc089.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-60858a3cead6dc81.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[t,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-a5a5d48f20a7b261.js","static/chunks/777-7bc4ca95c82802e5.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-8343067eddc3a2b4.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/settings","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/59b4e022-7a3b5554b806349f.js","static/chunks/25-792af14760d9df34.js","static/chunks/799-9bea9069969f5fe0.js","static/chunks/183-4feb6bb3eddbc768.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/543-f8766685f7f451e2.js","static/chunks/50-cfc2514205b86001.js","static/chunks/286-877cd7b96660f95f.js","static/chunks/f36c6662-03bb5e9d9aa0b0aa.js","static/chunks/4c744e84-e3161d754618373f.js","static/chunks/065a3ddb-9a38ca0d60f0bf2f.js","static/chunks/1cc2734a-2c5b6c0367fcde86.js","static/chunks/696-b12edad30a3617e5.js","static/chunks/318-2426f74a0d6c3b89.js","static/chunks/727-5e50dd9b10462347.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-5a072e6fac61f703.js","static/chunks/904-b3710ed82582f33b.js","static/css/72465cc1225f28a2.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();