slice-machine-ui 1.24.2-beta.2 → 1.24.2-beta.4
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.
- package/components/AppLayout/index.tsx +1 -1
- package/components/Button/index.tsx +5 -5
- package/components/CustomTypeTable/changesPage.tsx +5 -2
- package/components/DeleteDocumentsDrawer/AssociatedDocumentsCard.tsx +2 -2
- package/components/EmptyState/index.tsx +1 -1
- package/components/Forms/CreateCustomTypeModal/CreateCustomTypeModal.tsx +3 -3
- package/components/Forms/CreateSliceModal/CreateSliceModal.tsx +2 -2
- package/components/Forms/RenameCustomTypeModal/RenameCustomTypeModal.tsx +2 -2
- package/components/Forms/RenameSliceModal/RenameSliceModal.tsx +3 -3
- package/components/Forms/components/InputBox.tsx +4 -4
- package/components/Forms/components/SelectRepeatable.tsx +2 -2
- package/components/ItemHeader/index.tsx +1 -1
- package/components/ListItem/Header.tsx +2 -2
- package/components/ListItem/index.tsx +4 -4
- package/components/ModalFormCard/index.tsx +3 -3
- package/components/Navigation/RunningVersion.tsx +1 -1
- package/components/ReviewModal/ReviewForm.tsx +1 -1
- package/components/ReviewModal/ReviewFormSelect.tsx +1 -1
- package/components/Simulator/components/Header/index.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +1 -1
- package/lib/builders/CustomTypeBuilder/TabZone/index.tsx +1 -1
- package/lib/builders/SliceBuilder/FieldZones/index.tsx +2 -2
- package/lib/builders/common/SelectFieldTypeModal/FieldTypeCard.jsx +1 -1
- package/lib/builders/common/Zone/Card/components/NewField.tsx +3 -3
- package/lib/builders/common/Zone/Card/index.jsx +3 -3
- package/lib/builders/common/Zone/components/EmptyState/index.tsx +1 -1
- package/lib/builders/common/Zone/index.jsx +4 -4
- package/lib/models/common/widgets/Group/ListItem/index.jsx +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/{tKfu7OtnTt2Ozu-iQKTxw → A4-HzayguITs-C6fintyy}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/{25-3aa4d4b24167d340.js → 25-792af14760d9df34.js} +1 -1
- package/out/_next/static/chunks/318-2426f74a0d6c3b89.js +1 -0
- package/out/_next/static/chunks/727-df23c133f7cbf952.js +1 -0
- package/out/_next/static/chunks/799-9bea9069969f5fe0.js +1 -0
- package/out/_next/static/chunks/904-b3710ed82582f33b.js +1 -0
- package/out/_next/static/chunks/pages/{_app-9a9317dffa0fea8a.js → _app-b621a0ca0fbf4f9c.js} +1 -1
- package/out/_next/static/chunks/pages/changes-23829ddb11cac992.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-8343067eddc3a2b4.js +1 -0
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-89c911fd39271b5d.js → [variation]-60858a3cead6dc81.js} +1 -1
- package/out/_next/static/chunks/pages/slices-c33645b1828857c4.js +1 -0
- package/out/changelog.html +1 -1
- package/out/changes.html +1 -1
- package/out/custom-types/[customTypeId].html +1 -1
- package/out/custom-types.html +1 -1
- package/out/index.html +1 -1
- package/out/labs.html +1 -1
- package/out/page-types/[pageTypeId].html +1 -1
- package/out/settings.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
- package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
- package/out/slices.html +1 -1
- package/package.json +3 -3
- package/pages/slices.tsx +1 -2
- package/src/components/SideNav/SideNavEnvironmentSelector.tsx +2 -2
- package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +5 -1
- package/src/features/customTypes/customTypesTable/CustomTypesTable.tsx +4 -1
- package/src/features/customTypes/customTypesTable/CustomTypesTablePage.tsx +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewSliceDialog.tsx +1 -1
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceAsNewVariationDialog.tsx +2 -2
- package/src/features/slices/convertLegacySlice/ConvertLegacySliceButton.tsx +1 -1
- package/src/features/slices/sliceCards/SharedSliceCard.tsx +1 -2
- package/test/pages/slices.test.tsx +2 -4
- package/out/_next/static/chunks/318-19dbcae10cdb6408.js +0 -1
- package/out/_next/static/chunks/727-ffb4c69fbb971ed7.js +0 -1
- package/out/_next/static/chunks/799-0af1215eb2b3c17e.js +0 -1
- package/out/_next/static/chunks/904-d9089efa6d974e3e.js +0 -1
- package/out/_next/static/chunks/pages/changes-190caf7972d1aa46.js +0 -1
- package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-22770c807a7d7090.js +0 -1
- package/out/_next/static/chunks/pages/slices-5dc0c55c386e047a.js +0 -1
- /package/out/_next/static/{tKfu7OtnTt2Ozu-iQKTxw → A4-HzayguITs-C6fintyy}/_ssgManifest.js +0 -0
|
@@ -51,7 +51,7 @@ const PageLayoutWithActiveEnvironment: FC<PropsWithChildren> = ({
|
|
|
51
51
|
return (
|
|
52
52
|
<PageLayout
|
|
53
53
|
borderTopColor={borderTopColor}
|
|
54
|
-
data-
|
|
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-
|
|
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
|
|
16
|
+
const testIdBuilder = (testId: string | undefined, id: string) => {
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
18
|
-
if (
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
58
|
+
data-testid={`CustomTypesReferencesCard-${name}`}
|
|
59
59
|
>
|
|
60
60
|
<Flex sx={{ flexDirection: "column" }}>
|
|
61
61
|
<Text>{name}</Text>
|
|
@@ -130,7 +130,7 @@ export const CreateCustomTypeModal: React.FC<CreateCustomTypeModalProps> = ({
|
|
|
130
130
|
|
|
131
131
|
return (
|
|
132
132
|
<ModalFormCard
|
|
133
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
{...(
|
|
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-
|
|
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-
|
|
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-
|
|
42
|
+
data-testid="single-type-radio-btn"
|
|
43
43
|
/>
|
|
44
44
|
<Box
|
|
45
45
|
sx={{
|
|
@@ -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-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
140
|
+
data-testid="field-menu-button"
|
|
141
141
|
style={{
|
|
142
142
|
padding: "0",
|
|
143
143
|
cursor: "pointer",
|
|
@@ -48,7 +48,7 @@ type ModalCardProps<T extends FormikValues> = {
|
|
|
48
48
|
cardProps?: ComponentPropsWithoutRef<typeof Card>;
|
|
49
49
|
omitFooter?: boolean;
|
|
50
50
|
isLoading?: boolean;
|
|
51
|
-
|
|
51
|
+
testId?: string;
|
|
52
52
|
actionMessage?: ((props: FormikProps<T>) => ReactNode) | ReactNode;
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -66,7 +66,7 @@ function ModalCard<Values extends FormikValues>({
|
|
|
66
66
|
omitFooter = false,
|
|
67
67
|
isLoading = false,
|
|
68
68
|
buttonLabel = "Save",
|
|
69
|
-
|
|
69
|
+
testId,
|
|
70
70
|
actionMessage,
|
|
71
71
|
}: ModalCardProps<Values>): JSX.Element {
|
|
72
72
|
Modal.setAppElement("#__next");
|
|
@@ -106,7 +106,7 @@ function ModalCard<Values extends FormikValues>({
|
|
|
106
106
|
return (
|
|
107
107
|
<Form
|
|
108
108
|
id={formId}
|
|
109
|
-
{...(
|
|
109
|
+
{...(testId != null ? { "data-testid": testId } : null)}
|
|
110
110
|
>
|
|
111
111
|
<Card
|
|
112
112
|
borderFooter
|
|
@@ -7,7 +7,7 @@ export const RunningVersion: FC = () => {
|
|
|
7
7
|
const sliceMachineRunningVersion = useSliceMachineRunningVersion();
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
|
-
<RightElement data-
|
|
10
|
+
<RightElement data-testid="slicemachine-version">
|
|
11
11
|
v{sliceMachineRunningVersion}
|
|
12
12
|
</RightElement>
|
|
13
13
|
);
|
|
@@ -45,7 +45,7 @@ const UpdateSliceZoneModal: React.FC<UpdateSliceModalProps> = ({
|
|
|
45
45
|
content={{
|
|
46
46
|
title: "Select existing slices",
|
|
47
47
|
}}
|
|
48
|
-
|
|
48
|
+
testId="update-slices-modal"
|
|
49
49
|
validate={(values) => {
|
|
50
50
|
if (values.sliceKeys.length === 0) {
|
|
51
51
|
return {
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
88
|
+
data-testid="code-snippets-switch"
|
|
89
89
|
/>
|
|
90
90
|
<Button
|
|
91
|
-
data-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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-b621a0ca0fbf4f9c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/A4-HzayguITs-C6fintyy/_buildManifest.js" defer=""></script><script src="/_next/static/A4-HzayguITs-C6fintyy/_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":"A4-HzayguITs-C6fintyy","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,d,f,
|
|
1
|
+
self.__BUILD_MANIFEST=function(s,c,a,e,t,i,b,n,d,u,f,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-23829ddb11cac992.js"],"/custom-types":[a,j,p,"static/chunks/pages/custom-types-3c8e721ec6802127.js"],"/custom-types/[customTypeId]":[s,d,u,f,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,u,f,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,n,"static/css/f8eb526e10bc2441.css","static/chunks/pages/slices-c33645b1828857c4.js"],"/slices/[lib]/[sliceName]/[variation]":[s,t,d,u,f,h,e,b,i,l,c,k,n,"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-df23c133f7cbf952.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();
|