@truedat/qx 7.5.7 → 7.5.10
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/package.json +45 -64
- package/src/components/QxRoutes.js +38 -19
- package/src/components/__tests__/QxRoutes.spec.js +73 -0
- package/src/components/__tests__/__fixtures__/helper.js +6 -7
- package/src/components/__tests__/__snapshots__/QxRoutes.spec.js.snap +60 -0
- package/src/components/common/ClauseViewer.js +6 -6
- package/src/components/common/DescriptionInput.js +0 -1
- package/src/components/common/ResourceSelector.js +2 -3
- package/src/components/common/TestFormWrapper.js +2 -13
- package/src/components/common/TypeSelector.js +0 -1
- package/src/components/common/__tests__/DescriptionInput.spec.js +12 -21
- package/src/components/common/__tests__/ResourceSelector.spec.js +42 -87
- package/src/components/common/__tests__/TypeSelector.spec.js +0 -1
- package/src/components/common/__tests__/__snapshots__/ResourceSelector.spec.js.snap +32 -22
- package/src/components/common/expressions/Clauses.js +5 -6
- package/src/components/common/expressions/Condition.js +8 -9
- package/src/components/common/expressions/ConstantSelector.js +2 -2
- package/src/components/common/expressions/Expression.js +2 -2
- package/src/components/common/expressions/FieldSelector.js +2 -2
- package/src/components/common/expressions/FunctionArgs.js +5 -6
- package/src/components/common/expressions/FunctionSelector.js +2 -2
- package/src/components/common/expressions/ParamSelector.js +2 -2
- package/src/components/common/expressions/ShapeSelector.js +7 -16
- package/src/components/common/expressions/__tests__/Clauses.spec.js +10 -9
- package/src/components/common/expressions/__tests__/Condition.spec.js +6 -26
- package/src/components/common/expressions/__tests__/ConstantSelector.spec.js +14 -30
- package/src/components/common/expressions/__tests__/Expression.spec.js +36 -62
- package/src/components/common/expressions/__tests__/FieldSelector.spec.js +2 -7
- package/src/components/common/expressions/__tests__/FunctionArgs.spec.js +18 -44
- package/src/components/common/expressions/__tests__/FunctionSelector.spec.js +19 -27
- package/src/components/common/expressions/__tests__/ParamSelector.spec.js +28 -58
- package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +34 -47
- package/src/components/common/expressions/__tests__/__snapshots__/Condition.spec.js.snap +6 -6
- package/src/components/common/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +6 -7
- package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +20 -20
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +8 -9
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +670 -8
- package/src/components/common/expressions/__tests__/__snapshots__/ParamSelector.spec.js.snap +5 -5
- package/src/components/common/expressions/__tests__/__snapshots__/ShapeSelector.spec.js.snap +9 -9
- package/src/components/common/expressions/__tests__/useWatchParams.spec.js +1 -4
- package/src/components/common/expressions/constantInputs/AnySelector.js +5 -6
- package/src/components/common/expressions/constantInputs/BooleanSelector.js +2 -2
- package/src/components/common/expressions/constantInputs/DefaultSelector.js +2 -2
- package/src/components/common/expressions/constantInputs/__tests__/AnySelector.spec.js +16 -37
- package/src/components/common/expressions/constantInputs/__tests__/BooleanSelector.spec.js +14 -17
- package/src/components/common/expressions/constantInputs/__tests__/DefaultSelector.spec.js +12 -27
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +11 -11
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/DefaultSelector.spec.js.snap +0 -1
- package/src/components/common/resourceSelectors/DataStructureSelector.js +2 -2
- package/src/components/common/resourceSelectors/DataViewSelector.js +2 -2
- package/src/components/common/resourceSelectors/ReferenceDatasetSelector.js +2 -2
- package/src/components/common/resourceSelectors/__tests__/DataStructureSelector.spec.js +5 -29
- package/src/components/common/resourceSelectors/__tests__/DataViewSelector.spec.js +23 -25
- package/src/components/common/resourceSelectors/__tests__/ReferenceDatasetSelector.spec.js +21 -32
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataStructureSelector.spec.js.snap +3 -4
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataViewSelector.spec.js.snap +1 -1
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/ReferenceDatasetSelector.spec.js.snap +1 -1
- package/src/components/dataViews/DataViewEditor.js +5 -6
- package/src/components/dataViews/DataViewSelect.js +4 -5
- package/src/components/dataViews/DataViews.js +1 -2
- package/src/components/dataViews/Queryable.js +4 -4
- package/src/components/dataViews/Queryables.js +0 -1
- package/src/components/dataViews/__tests__/DataViewEditor.spec.js +36 -111
- package/src/components/dataViews/__tests__/DataViewSelect.spec.js +0 -1
- package/src/components/dataViews/__tests__/DataViews.spec.js +15 -16
- package/src/components/dataViews/__tests__/Queryable.spec.js +0 -1
- package/src/components/dataViews/__tests__/Queryables.spec.js +35 -74
- package/src/components/dataViews/__tests__/__snapshots__/DataViewEditor.spec.js.snap +61 -55
- package/src/components/dataViews/__tests__/__snapshots__/DataViews.spec.js.snap +5 -5
- package/src/components/dataViews/__tests__/__snapshots__/Queryables.spec.js.snap +59 -59
- package/src/components/dataViews/queryableProperties/From.js +4 -4
- package/src/components/dataViews/queryableProperties/GroupBy.js +6 -6
- package/src/components/dataViews/queryableProperties/Join.js +6 -6
- package/src/components/dataViews/queryableProperties/JoinTypeIcon.js +8 -9
- package/src/components/dataViews/queryableProperties/Select.js +4 -5
- package/src/components/dataViews/queryableProperties/SelectField.js +4 -4
- package/src/components/dataViews/queryableProperties/Where.js +4 -4
- package/src/components/dataViews/queryableProperties/__tests__/From.spec.js +0 -1
- package/src/components/dataViews/queryableProperties/__tests__/GroupBy.spec.js +16 -42
- package/src/components/dataViews/queryableProperties/__tests__/Join.spec.js +6 -29
- package/src/components/dataViews/queryableProperties/__tests__/JoinTypeIcon.spec.js +0 -1
- package/src/components/dataViews/queryableProperties/__tests__/Select.spec.js +26 -50
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +19 -44
- package/src/components/dataViews/queryableProperties/__tests__/Where.spec.js +6 -17
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/GroupBy.spec.js.snap +309 -9
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Join.spec.js.snap +12 -12
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap +192 -18
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/SelectField.spec.js.snap +6 -8
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Where.spec.js.snap +2 -2
- package/src/components/functions/FunctionEditor.js +3 -5
- package/src/components/functions/FunctionParams.js +2 -3
- package/src/components/functions/Functions.js +3 -4
- package/src/components/functions/__tests__/FunctionEditor.spec.js +61 -57
- package/src/components/functions/__tests__/FunctionParams.spec.js +50 -47
- package/src/components/functions/__tests__/Functions.spec.js +5 -12
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +11 -11
- package/src/components/functions/__tests__/__snapshots__/Functions.spec.js.snap +4 -5
- package/src/components/qualityControls/ControlProperties.js +8 -7
- package/src/components/qualityControls/ControlPropertiesView.js +5 -5
- package/src/components/qualityControls/EditQualityControl.js +5 -5
- package/src/components/qualityControls/IconPopup.js +0 -1
- package/src/components/qualityControls/NewDraftQualityControl.js +8 -6
- package/src/components/qualityControls/NewQualityControl.js +5 -6
- package/src/components/qualityControls/QualityBadge.js +29 -21
- package/src/components/qualityControls/QualityControl.js +4 -7
- package/src/components/qualityControls/QualityControlActions.js +7 -7
- package/src/components/qualityControls/QualityControlCrumbs.js +1 -3
- package/src/components/qualityControls/QualityControlEditor.js +6 -12
- package/src/components/qualityControls/QualityControlHeader.js +4 -6
- package/src/components/qualityControls/QualityControlHistory.js +3 -3
- package/src/components/qualityControls/QualityControlManageDomain.js +2 -2
- package/src/components/qualityControls/QualityControlQueryModal.js +1 -1
- package/src/components/qualityControls/QualityControlRoutes.js +27 -54
- package/src/components/qualityControls/QualityControlRow.js +0 -2
- package/src/components/qualityControls/QualityControlScores.js +7 -5
- package/src/components/qualityControls/QualityControlTabs.js +2 -2
- package/src/components/qualityControls/QualityControls.js +10 -8
- package/src/components/qualityControls/QualityControlsLabelResults.js +0 -2
- package/src/components/qualityControls/QualityControlsPagination.js +0 -1
- package/src/components/qualityControls/QualityControlsTable.js +1 -2
- package/src/components/qualityControls/ScoreCriteria.js +8 -4
- package/src/components/qualityControls/ScoreCriteriaView.js +34 -54
- package/src/components/qualityControls/__tests__/ControlProperties.spec.js +16 -21
- package/src/components/qualityControls/__tests__/ControlPropertiesView.spec.js +5 -6
- package/src/components/qualityControls/__tests__/EditQualityControl.spec.js +28 -70
- package/src/components/qualityControls/__tests__/IconPopup.spec.js +10 -11
- package/src/components/qualityControls/__tests__/NewDraftQualityControl.spec.js +33 -70
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +88 -107
- package/src/components/qualityControls/__tests__/QualityBadge.spec.js +55 -63
- package/src/components/qualityControls/__tests__/QualityControl.spec.js +19 -31
- package/src/components/qualityControls/__tests__/QualityControlActions.spec.js +49 -46
- package/src/components/qualityControls/__tests__/QualityControlCrumbs.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +68 -107
- package/src/components/qualityControls/__tests__/QualityControlHeader.spec.js +22 -25
- package/src/components/qualityControls/__tests__/QualityControlHistory.spec.js +6 -6
- package/src/components/qualityControls/__tests__/QualityControlManageDomain.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlQueryModal.spec.js +13 -12
- package/src/components/qualityControls/__tests__/QualityControlRow.spec.js +4 -8
- package/src/components/qualityControls/__tests__/QualityControlScores.spec.js +23 -19
- package/src/components/qualityControls/__tests__/QualityControlTabs.spec.js +2 -3
- package/src/components/qualityControls/__tests__/QualityControls.spec.js +69 -53
- package/src/components/qualityControls/__tests__/QualityControlsLabelResults.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlsPagination.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlsTable.spec.js +2 -3
- package/src/components/qualityControls/__tests__/ScoreCriteria.spec.js +3 -4
- package/src/components/qualityControls/__tests__/ScoreCriteriaView.spec.js +18 -3
- package/src/components/qualityControls/__tests__/__fixtures__/qualityControlHelper.js +2 -2
- package/src/components/qualityControls/__tests__/__snapshots__/ControlProperties.spec.js.snap +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/ControlPropertiesView.spec.js.snap +53 -53
- package/src/components/qualityControls/__tests__/__snapshots__/EditQualityControl.spec.js.snap +45 -34
- package/src/components/qualityControls/__tests__/__snapshots__/NewDraftQualityControl.spec.js.snap +44 -33
- package/src/components/qualityControls/__tests__/__snapshots__/NewQualityControl.spec.js.snap +30 -19
- package/src/components/qualityControls/__tests__/__snapshots__/QualityBadge.spec.js.snap +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControl.spec.js.snap +11 -19
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlActions.spec.js.snap +5 -4
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlCrumbs.spec.js.snap +1 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlEditor.spec.js.snap +28 -5
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHeader.spec.js.snap +16 -11
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHistory.spec.js.snap +2 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlRow.spec.js.snap +2 -1
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlScores.spec.js.snap +3 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlTabs.spec.js.snap +3 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControls.spec.js.snap +11 -21
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlsTable.spec.js.snap +2 -0
- package/src/components/qualityControls/__tests__/__snapshots__/ScoreCriteria.spec.js.snap +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/ScoreCriteriaView.spec.js.snap +2 -4
- package/src/components/qualityControls/__tests__/qualityByControlMode.spec.js +16 -16
- package/src/components/qualityControls/controlProperties/{ErrorCount.js → Count.js} +7 -7
- package/src/components/qualityControls/controlProperties/Ratio.js +6 -8
- package/src/components/qualityControls/controlProperties/__tests__/{ErrorCount.spec.js → Count.spec.js} +9 -25
- package/src/components/qualityControls/controlProperties/__tests__/Ratio.spec.js +9 -27
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/{ErrorCount.spec.js.snap → Count.spec.js.snap} +5 -5
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/Ratio.spec.js.snap +10 -10
- package/src/components/qualityControls/qualityByControlMode.js +39 -16
- package/src/components/qualityControls/qualityControlScoresColumns.js +1 -2
- package/src/components/qualityControls/scoreCriterias/Count.js +88 -0
- package/src/components/qualityControls/scoreCriterias/Deviation.js +2 -2
- package/src/components/qualityControls/scoreCriterias/ErrorCount.js +4 -4
- package/src/components/qualityControls/scoreCriterias/Percentage.js +2 -2
- package/src/components/qualityControls/scoreCriterias/__tests__/Count.spec.js +62 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/Deviation.spec.js +0 -1
- package/src/components/qualityControls/scoreCriterias/__tests__/ErrorCount.spec.js +39 -31
- package/src/components/qualityControls/scoreCriterias/__tests__/Percentage.spec.js +23 -19
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/Count.spec.js.snap +58 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/ErrorCount.spec.js.snap +4 -7
- package/src/components/scores/MyScoreGroups.js +0 -1
- package/src/components/scores/QualityBar.js +24 -22
- package/src/components/scores/Score.js +4 -5
- package/src/components/scores/ScoreCrumbs.js +3 -5
- package/src/components/scores/ScoreDetails.js +2 -2
- package/src/components/scores/ScoreEvents.js +2 -2
- package/src/components/scores/ScoreGroup.js +5 -4
- package/src/components/scores/ScoreGroupBreadcrumbs.js +1 -2
- package/src/components/scores/ScoreGroupForm.js +2 -4
- package/src/components/scores/ScoreGroupLink.js +1 -2
- package/src/components/scores/ScoreGroupMessage.js +0 -1
- package/src/components/scores/ScoreGroupPopup.js +1 -1
- package/src/components/scores/ScoreGroupsRoutes.js +19 -0
- package/src/components/scores/ScoreGroupsTable.js +15 -48
- package/src/components/scores/ScoreRoutes.js +9 -24
- package/src/components/scores/ScoreStatusDecorator.js +1 -2
- package/src/components/scores/ScoreTabs.js +2 -2
- package/src/components/scores/__tests__/MyScoreGroups.spec.js +2 -3
- package/src/components/scores/__tests__/QualityBar.spec.js +19 -26
- package/src/components/scores/__tests__/Score.spec.js +2 -3
- package/src/components/scores/__tests__/ScoreCrumbs.spec.js +4 -5
- package/src/components/scores/__tests__/ScoreDetails.spec.js +4 -5
- package/src/components/scores/__tests__/ScoreEvents.spec.js +2 -3
- package/src/components/scores/__tests__/ScoreGroup.spec.js +15 -14
- package/src/components/scores/__tests__/ScoreGroupBreadcrumbs.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupForm.spec.js +18 -34
- package/src/components/scores/__tests__/ScoreGroupLink.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupMessage.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupPopup.spec.js +0 -2
- package/src/components/scores/__tests__/ScoreGroupsRoutes.spec.js +32 -0
- package/src/components/scores/__tests__/ScoreGroupsTable.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreStatusDecorator.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreTabs.spec.js +3 -4
- package/src/components/scores/__tests__/__snapshots__/MyScoreGroups.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/Score.spec.js.snap +4 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreCrumbs.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreDetails.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroup.spec.js.snap +39 -10
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupBreadcrumbs.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupForm.spec.js.snap +10 -10
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupLink.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsRoutes.spec.js.snap +19 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsTable.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreStatusDecorator.spec.js.snap +5 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreTabs.spec.js.snap +4 -0
- package/src/hooks/__tests__/useDataViews.spec.js +1 -1
- package/src/hooks/__tests__/useFunctions.spec.js +5 -5
- package/src/hooks/useDataViews.js +2 -2
- package/src/hooks/useExecutionGroups.js +1 -1
- package/src/hooks/useFunctions.js +4 -4
- package/src/hooks/useQualityControls.js +13 -7
- package/src/hooks/useScoreGroups.js +1 -1
- package/src/hooks/useScores.js +2 -2
- package/src/styles/scores.less +21 -21
- package/src/types.js +1 -4
package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap
CHANGED
|
@@ -6,6 +6,186 @@ exports[`<Select /> handles add all fields 1`] = `
|
|
|
6
6
|
class="ui list"
|
|
7
7
|
role="list"
|
|
8
8
|
>
|
|
9
|
+
<div
|
|
10
|
+
class="item"
|
|
11
|
+
role="listitem"
|
|
12
|
+
>
|
|
13
|
+
<div>
|
|
14
|
+
<div
|
|
15
|
+
class="ui grid"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="row"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="column"
|
|
22
|
+
/>
|
|
23
|
+
<div
|
|
24
|
+
class="nine wide column"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
class="ui grid"
|
|
28
|
+
>
|
|
29
|
+
<div
|
|
30
|
+
class="sixteen wide column"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
class="expression-container"
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
aria-expanded="false"
|
|
37
|
+
class="ui top left pointing dropdown"
|
|
38
|
+
role="listbox"
|
|
39
|
+
tabindex="0"
|
|
40
|
+
>
|
|
41
|
+
<div
|
|
42
|
+
class="shape-selector-trigger"
|
|
43
|
+
>
|
|
44
|
+
[F]
|
|
45
|
+
</div>
|
|
46
|
+
<div
|
|
47
|
+
class="menu transition"
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
aria-checked="false"
|
|
51
|
+
aria-selected="false"
|
|
52
|
+
class="item"
|
|
53
|
+
role="option"
|
|
54
|
+
style="pointer-events: all;"
|
|
55
|
+
>
|
|
56
|
+
<div
|
|
57
|
+
class="text flex-center"
|
|
58
|
+
>
|
|
59
|
+
<small
|
|
60
|
+
style="margin-right: 5px;"
|
|
61
|
+
>
|
|
62
|
+
<b>
|
|
63
|
+
<code>
|
|
64
|
+
[π]
|
|
65
|
+
</code>
|
|
66
|
+
</b>
|
|
67
|
+
</small>
|
|
68
|
+
functions.expression.shape.constant
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div
|
|
72
|
+
aria-checked="false"
|
|
73
|
+
aria-selected="false"
|
|
74
|
+
class="item"
|
|
75
|
+
role="option"
|
|
76
|
+
style="pointer-events: all;"
|
|
77
|
+
>
|
|
78
|
+
<div
|
|
79
|
+
class="text flex-center"
|
|
80
|
+
>
|
|
81
|
+
<small
|
|
82
|
+
style="margin-right: 5px;"
|
|
83
|
+
>
|
|
84
|
+
<b>
|
|
85
|
+
<code>
|
|
86
|
+
f(x)
|
|
87
|
+
</code>
|
|
88
|
+
</b>
|
|
89
|
+
</small>
|
|
90
|
+
functions.expression.shape.function
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div
|
|
94
|
+
aria-checked="true"
|
|
95
|
+
aria-selected="true"
|
|
96
|
+
class="active selected item"
|
|
97
|
+
role="option"
|
|
98
|
+
style="pointer-events: all;"
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
class="text flex-center"
|
|
102
|
+
>
|
|
103
|
+
<small
|
|
104
|
+
style="margin-right: 5px;"
|
|
105
|
+
>
|
|
106
|
+
<b>
|
|
107
|
+
<code>
|
|
108
|
+
[F]
|
|
109
|
+
</code>
|
|
110
|
+
</b>
|
|
111
|
+
</small>
|
|
112
|
+
functions.expression.shape.field
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<div
|
|
118
|
+
aria-expanded="false"
|
|
119
|
+
class="ui fluid selection scrolling pointing dropdown select-field-dropdown"
|
|
120
|
+
role="listbox"
|
|
121
|
+
tabindex="0"
|
|
122
|
+
>
|
|
123
|
+
<div
|
|
124
|
+
aria-atomic="true"
|
|
125
|
+
aria-live="polite"
|
|
126
|
+
class="divider text"
|
|
127
|
+
role="alert"
|
|
128
|
+
>
|
|
129
|
+
<div
|
|
130
|
+
class="ui label"
|
|
131
|
+
/>
|
|
132
|
+
abc
|
|
133
|
+
</div>
|
|
134
|
+
<i
|
|
135
|
+
aria-hidden="true"
|
|
136
|
+
class="dropdown icon"
|
|
137
|
+
/>
|
|
138
|
+
<div
|
|
139
|
+
class="menu transition"
|
|
140
|
+
>
|
|
141
|
+
<div
|
|
142
|
+
aria-checked="true"
|
|
143
|
+
aria-selected="true"
|
|
144
|
+
class="active selected item"
|
|
145
|
+
role="option"
|
|
146
|
+
style="pointer-events: all;"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
class="ui label"
|
|
150
|
+
/>
|
|
151
|
+
<span
|
|
152
|
+
class="text"
|
|
153
|
+
>
|
|
154
|
+
abc
|
|
155
|
+
</span>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div
|
|
164
|
+
class="six wide column"
|
|
165
|
+
>
|
|
166
|
+
<div
|
|
167
|
+
class="inline fields no-margin"
|
|
168
|
+
>
|
|
169
|
+
<div
|
|
170
|
+
class="field"
|
|
171
|
+
>
|
|
172
|
+
<div
|
|
173
|
+
class="ui input"
|
|
174
|
+
>
|
|
175
|
+
<input
|
|
176
|
+
autocomplete="off"
|
|
177
|
+
placeholder="queryables.select.form.alias"
|
|
178
|
+
type="text"
|
|
179
|
+
value="abc"
|
|
180
|
+
/>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
9
189
|
<div
|
|
10
190
|
class="item"
|
|
11
191
|
role="listitem"
|
|
@@ -13,12 +193,7 @@ exports[`<Select /> handles add all fields 1`] = `
|
|
|
13
193
|
<button
|
|
14
194
|
class="ui button"
|
|
15
195
|
>
|
|
16
|
-
add_select_field
|
|
17
|
-
</button>
|
|
18
|
-
<button
|
|
19
|
-
class="ui button"
|
|
20
|
-
>
|
|
21
|
-
add_all_select_fields
|
|
196
|
+
queryables.select.form.add_select_field
|
|
22
197
|
</button>
|
|
23
198
|
</div>
|
|
24
199
|
</div>
|
|
@@ -38,14 +213,14 @@ exports[`<Select /> matches the latest snapshot 1`] = `
|
|
|
38
213
|
<button
|
|
39
214
|
class="ui button"
|
|
40
215
|
>
|
|
41
|
-
add_select_field
|
|
216
|
+
queryables.select.form.add_select_field
|
|
42
217
|
</button>
|
|
43
218
|
<button
|
|
44
219
|
class="ui disabled button"
|
|
45
220
|
disabled=""
|
|
46
221
|
tabindex="-1"
|
|
47
222
|
>
|
|
48
|
-
add_all_select_fields
|
|
223
|
+
queryables.select.form.add_all_select_fields
|
|
49
224
|
</button>
|
|
50
225
|
</div>
|
|
51
226
|
</div>
|
|
@@ -117,7 +292,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
117
292
|
</code>
|
|
118
293
|
</b>
|
|
119
294
|
</small>
|
|
120
|
-
constant
|
|
295
|
+
functions.expression.shape.constant
|
|
121
296
|
</div>
|
|
122
297
|
</div>
|
|
123
298
|
<div
|
|
@@ -139,7 +314,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
139
314
|
</code>
|
|
140
315
|
</b>
|
|
141
316
|
</small>
|
|
142
|
-
function
|
|
317
|
+
functions.expression.shape.function
|
|
143
318
|
</div>
|
|
144
319
|
</div>
|
|
145
320
|
<div
|
|
@@ -161,7 +336,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
161
336
|
</code>
|
|
162
337
|
</b>
|
|
163
338
|
</small>
|
|
164
|
-
field
|
|
339
|
+
functions.expression.shape.field
|
|
165
340
|
</div>
|
|
166
341
|
</div>
|
|
167
342
|
</div>
|
|
@@ -215,9 +390,8 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
215
390
|
>
|
|
216
391
|
<input
|
|
217
392
|
autocomplete="off"
|
|
218
|
-
placeholder="alias"
|
|
393
|
+
placeholder="queryables.select.form.alias"
|
|
219
394
|
type="text"
|
|
220
|
-
value=""
|
|
221
395
|
/>
|
|
222
396
|
</div>
|
|
223
397
|
</div>
|
|
@@ -286,7 +460,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
286
460
|
</code>
|
|
287
461
|
</b>
|
|
288
462
|
</small>
|
|
289
|
-
constant
|
|
463
|
+
functions.expression.shape.constant
|
|
290
464
|
</div>
|
|
291
465
|
</div>
|
|
292
466
|
<div
|
|
@@ -308,7 +482,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
308
482
|
</code>
|
|
309
483
|
</b>
|
|
310
484
|
</small>
|
|
311
|
-
function
|
|
485
|
+
functions.expression.shape.function
|
|
312
486
|
</div>
|
|
313
487
|
</div>
|
|
314
488
|
<div
|
|
@@ -330,7 +504,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
330
504
|
</code>
|
|
331
505
|
</b>
|
|
332
506
|
</small>
|
|
333
|
-
field
|
|
507
|
+
functions.expression.shape.field
|
|
334
508
|
</div>
|
|
335
509
|
</div>
|
|
336
510
|
</div>
|
|
@@ -384,7 +558,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
384
558
|
>
|
|
385
559
|
<input
|
|
386
560
|
autocomplete="off"
|
|
387
|
-
placeholder="alias"
|
|
561
|
+
placeholder="queryables.select.form.alias"
|
|
388
562
|
type="text"
|
|
389
563
|
value=""
|
|
390
564
|
/>
|
|
@@ -403,7 +577,7 @@ exports[`<Select /> matches the latest snapshot with content 1`] = `
|
|
|
403
577
|
<button
|
|
404
578
|
class="ui button"
|
|
405
579
|
>
|
|
406
|
-
add_select_field
|
|
580
|
+
queryables.select.form.add_select_field
|
|
407
581
|
</button>
|
|
408
582
|
</div>
|
|
409
583
|
</div>
|
|
@@ -55,7 +55,7 @@ exports[`<SelectField /> matches the latest snapshot for group_by 1`] = `
|
|
|
55
55
|
</code>
|
|
56
56
|
</b>
|
|
57
57
|
</small>
|
|
58
|
-
constant
|
|
58
|
+
functions.expression.shape.constant
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
<div
|
|
@@ -77,7 +77,7 @@ exports[`<SelectField /> matches the latest snapshot for group_by 1`] = `
|
|
|
77
77
|
</code>
|
|
78
78
|
</b>
|
|
79
79
|
</small>
|
|
80
|
-
function
|
|
80
|
+
functions.expression.shape.function
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
</div>
|
|
@@ -100,9 +100,8 @@ exports[`<SelectField /> matches the latest snapshot for group_by 1`] = `
|
|
|
100
100
|
>
|
|
101
101
|
<input
|
|
102
102
|
autocomplete="off"
|
|
103
|
-
placeholder="alias"
|
|
103
|
+
placeholder="queryables.select.form.alias"
|
|
104
104
|
type="text"
|
|
105
|
-
value=""
|
|
106
105
|
/>
|
|
107
106
|
</div>
|
|
108
107
|
</div>
|
|
@@ -169,7 +168,7 @@ exports[`<SelectField /> matches the latest snapshot for select 1`] = `
|
|
|
169
168
|
</code>
|
|
170
169
|
</b>
|
|
171
170
|
</small>
|
|
172
|
-
constant
|
|
171
|
+
functions.expression.shape.constant
|
|
173
172
|
</div>
|
|
174
173
|
</div>
|
|
175
174
|
<div
|
|
@@ -191,7 +190,7 @@ exports[`<SelectField /> matches the latest snapshot for select 1`] = `
|
|
|
191
190
|
</code>
|
|
192
191
|
</b>
|
|
193
192
|
</small>
|
|
194
|
-
function
|
|
193
|
+
functions.expression.shape.function
|
|
195
194
|
</div>
|
|
196
195
|
</div>
|
|
197
196
|
</div>
|
|
@@ -214,9 +213,8 @@ exports[`<SelectField /> matches the latest snapshot for select 1`] = `
|
|
|
214
213
|
>
|
|
215
214
|
<input
|
|
216
215
|
autocomplete="off"
|
|
217
|
-
placeholder="alias"
|
|
216
|
+
placeholder="queryables.select.form.alias"
|
|
218
217
|
type="text"
|
|
219
|
-
value=""
|
|
220
218
|
/>
|
|
221
219
|
</div>
|
|
222
220
|
</div>
|
package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Where.spec.js.snap
CHANGED
|
@@ -6,7 +6,7 @@ exports[`<Where /> matches the latest snapshot 1`] = `
|
|
|
6
6
|
class="field"
|
|
7
7
|
>
|
|
8
8
|
<label>
|
|
9
|
-
|
|
9
|
+
expression.form.clause
|
|
10
10
|
</label>
|
|
11
11
|
<div
|
|
12
12
|
class="ui horizontal divider"
|
|
@@ -14,7 +14,7 @@ exports[`<Where /> matches the latest snapshot 1`] = `
|
|
|
14
14
|
<button
|
|
15
15
|
class="ui mini button"
|
|
16
16
|
>
|
|
17
|
-
|
|
17
|
+
expression.clause.action.addGroup
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fragment, useEffect } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import {
|
|
@@ -118,18 +118,16 @@ export default function FunctionEditor({
|
|
|
118
118
|
</Grid.Row>
|
|
119
119
|
</GridColumn>
|
|
120
120
|
</Grid>
|
|
121
|
-
|
|
122
121
|
<Header as="h5" dividing>
|
|
123
122
|
{formatMessage({ id: "functions.form.params" })}
|
|
124
123
|
</Header>
|
|
125
124
|
<FunctionParams />
|
|
126
|
-
|
|
127
125
|
<Header as="h5" dividing>
|
|
128
126
|
{formatMessage({ id: "functions.form.output" })}
|
|
129
127
|
</Header>
|
|
130
|
-
<QxContext
|
|
128
|
+
<QxContext value={{ functions, type, field: "expression" }}>
|
|
131
129
|
<Expression />
|
|
132
|
-
</QxContext
|
|
130
|
+
</QxContext>
|
|
133
131
|
<Divider hidden />
|
|
134
132
|
<Container textAlign="right">
|
|
135
133
|
<Button
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { Controller, useFormContext, useFieldArray } from "react-hook-form";
|
|
@@ -12,7 +12,6 @@ export default function FunctionParams() {
|
|
|
12
12
|
name: "params",
|
|
13
13
|
keyName: "key",
|
|
14
14
|
});
|
|
15
|
-
|
|
16
15
|
const maxParamId = _.flow(_.map("id"), _.max)(fields) || 0;
|
|
17
16
|
const newParam = () => ({
|
|
18
17
|
name: "",
|
|
@@ -48,7 +47,7 @@ const ParamItem = ({ index, onDelete }) => {
|
|
|
48
47
|
>
|
|
49
48
|
<Grid>
|
|
50
49
|
<Grid.Row>
|
|
51
|
-
<Grid.Column
|
|
50
|
+
<Grid.Column />
|
|
52
51
|
<Grid.Column width={15}>
|
|
53
52
|
<Grid.Row>
|
|
54
53
|
<Form.Group inline className="no-margin">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
4
|
import {
|
|
5
5
|
Button,
|
|
@@ -85,7 +85,6 @@ export default function Functions() {
|
|
|
85
85
|
</Header.Subheader>
|
|
86
86
|
</Header.Content>
|
|
87
87
|
</Header>
|
|
88
|
-
|
|
89
88
|
<Grid>
|
|
90
89
|
<GridColumn width={4}>
|
|
91
90
|
<Button fluid onClick={setStateNewFunction} disabled={isDirty}>
|
|
@@ -100,8 +99,8 @@ export default function Functions() {
|
|
|
100
99
|
>
|
|
101
100
|
<List.Content>
|
|
102
101
|
<List.Header>
|
|
103
|
-
{typeLabel(func.type)}
|
|
104
|
-
{func.params.length}
|
|
102
|
+
{typeLabel(func.type)}
|
|
103
|
+
{func.name || "Function"}/{func.params.length}
|
|
105
104
|
</List.Header>
|
|
106
105
|
</List.Content>
|
|
107
106
|
</List.Item>
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
-
import { render } from "@truedat/test/render";
|
|
4
1
|
import userEvent from "@testing-library/user-event";
|
|
2
|
+
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
5
4
|
import { messages } from "@truedat/qx/components/__tests__/__fixtures__/helper";
|
|
6
5
|
import FunctionEditor from "../FunctionEditor";
|
|
7
6
|
|
|
8
7
|
const renderOpts = {
|
|
9
8
|
messages,
|
|
10
|
-
fallback: "lazy",
|
|
11
9
|
};
|
|
12
10
|
|
|
13
11
|
const props = {
|
|
@@ -36,120 +34,126 @@ const props = {
|
|
|
36
34
|
};
|
|
37
35
|
|
|
38
36
|
describe("<FunctionEditor />", () => {
|
|
39
|
-
it("matches the latest snapshot", () => {
|
|
40
|
-
const
|
|
41
|
-
|
|
37
|
+
it("matches the latest snapshot", async () => {
|
|
38
|
+
const rendered = render(<FunctionEditor {...props} />, renderOpts);
|
|
39
|
+
await waitForLoad(rendered);
|
|
40
|
+
expect(rendered.container).toMatchSnapshot();
|
|
42
41
|
});
|
|
43
42
|
|
|
44
43
|
it("matches snapshot without selected function", async () => {
|
|
45
44
|
const props = { setDirty: jest.fn() };
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
);
|
|
50
|
-
await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
|
|
51
|
-
expect(container).toMatchSnapshot();
|
|
45
|
+
const rendered = render(<FunctionEditor {...props} />, renderOpts);
|
|
46
|
+
await waitForLoad(rendered);
|
|
47
|
+
expect(rendered.container).toMatchSnapshot();
|
|
52
48
|
});
|
|
53
49
|
|
|
54
|
-
it("matches snapshot without onDelete", () => {
|
|
50
|
+
it("matches snapshot without onDelete", async () => {
|
|
55
51
|
const thisProps = {
|
|
56
52
|
...props,
|
|
57
53
|
onDelete: null,
|
|
58
54
|
};
|
|
59
|
-
const
|
|
60
|
-
|
|
55
|
+
const rendered = render(<FunctionEditor {...thisProps} />, renderOpts);
|
|
56
|
+
await waitForLoad(rendered);
|
|
57
|
+
expect(rendered.container).toMatchSnapshot();
|
|
61
58
|
});
|
|
62
59
|
|
|
63
|
-
it("test cancel button", () => {
|
|
60
|
+
it("test cancel button", async () => {
|
|
61
|
+
const user = userEvent.setup({ delay: null });
|
|
64
62
|
const onCancel = jest.fn();
|
|
65
63
|
const thisProps = { ...props, onCancel };
|
|
66
|
-
const
|
|
64
|
+
const rendered = render(<FunctionEditor {...thisProps} />, renderOpts);
|
|
65
|
+
await waitForLoad(rendered);
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
await user.click(rendered.getByRole("button", { name: /cancel/i }));
|
|
69
68
|
expect(onCancel).toHaveBeenCalled();
|
|
70
69
|
});
|
|
71
70
|
|
|
72
71
|
it("test cancel button with confirm", async () => {
|
|
72
|
+
const user = userEvent.setup({ delay: null });
|
|
73
73
|
const onCancel = jest.fn();
|
|
74
74
|
const thisProps = { ...props, onCancel };
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
renderOpts
|
|
78
|
-
);
|
|
75
|
+
const rendered = render(<FunctionEditor {...thisProps} />, renderOpts);
|
|
76
|
+
await waitForLoad(rendered);
|
|
79
77
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
await user.type(rendered.getAllByRole("textbox")[0], "name");
|
|
79
|
+
await user.click(rendered.getByRole("option", { name: /string/i }));
|
|
80
|
+
await user.click(rendered.getAllByRole("listitem")[0]);
|
|
81
|
+
await user.type(rendered.getAllByRole("textbox")[1], "description");
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
await user.click(rendered.getByRole("option", { name: /boolean/i }));
|
|
84
|
+
await user.click(rendered.getByRole("option", { name: /constant/i }));
|
|
85
|
+
await user.click(rendered.getByRole("option", { name: /true/i }));
|
|
88
86
|
|
|
89
87
|
await waitFor(() =>
|
|
90
|
-
expect(getByRole("button", { name: /save/i })).toBeEnabled()
|
|
88
|
+
expect(rendered.getByRole("button", { name: /save/i })).toBeEnabled()
|
|
91
89
|
);
|
|
92
90
|
|
|
93
|
-
|
|
91
|
+
await user.click(rendered.getByRole("button", { name: /cancel/i }));
|
|
94
92
|
expect(onCancel).toHaveBeenCalledTimes(0);
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
await user.click(
|
|
95
|
+
rendered.getByRole("button", { name: /modal-negative-action/i })
|
|
96
|
+
);
|
|
97
97
|
expect(onCancel).toHaveBeenCalledTimes(0);
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
await user.click(rendered.getByRole("button", { name: /cancel/i }));
|
|
100
100
|
expect(onCancel).toHaveBeenCalledTimes(0);
|
|
101
101
|
|
|
102
|
-
expect(container).toMatchSnapshot();
|
|
102
|
+
expect(rendered.container).toMatchSnapshot();
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
await user.click(
|
|
105
|
+
rendered.getByRole("button", { name: /modal-affirmative-action/i })
|
|
106
|
+
);
|
|
105
107
|
expect(onCancel).toHaveBeenCalledTimes(1);
|
|
106
108
|
});
|
|
107
109
|
|
|
108
|
-
it("test delete button", () => {
|
|
110
|
+
it("test delete button", async () => {
|
|
111
|
+
const user = userEvent.setup({ delay: null });
|
|
109
112
|
const onDelete = jest.fn();
|
|
110
113
|
const thisProps = { ...props, onDelete };
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
renderOpts
|
|
114
|
-
);
|
|
114
|
+
const rendered = render(<FunctionEditor {...thisProps} />, renderOpts);
|
|
115
|
+
await waitForLoad(rendered);
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
await user.click(rendered.getByRole("button", { name: /delete/i }));
|
|
117
118
|
expect(onDelete).toHaveBeenCalledTimes(0);
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
await user.click(
|
|
121
|
+
rendered.getByRole("button", { name: /modal-negative-action/i })
|
|
122
|
+
);
|
|
120
123
|
expect(onDelete).toHaveBeenCalledTimes(0);
|
|
121
124
|
|
|
122
|
-
|
|
125
|
+
await user.click(rendered.getByRole("button", { name: /delete/i }));
|
|
123
126
|
expect(onDelete).toHaveBeenCalledTimes(0);
|
|
124
127
|
|
|
125
|
-
expect(container).toMatchSnapshot();
|
|
128
|
+
expect(rendered.container).toMatchSnapshot();
|
|
126
129
|
|
|
127
|
-
|
|
130
|
+
await user.click(
|
|
131
|
+
rendered.getByRole("button", { name: /modal-affirmative-action/i })
|
|
132
|
+
);
|
|
128
133
|
expect(onDelete).toHaveBeenCalledTimes(1);
|
|
129
134
|
});
|
|
130
135
|
|
|
131
136
|
it("test submit", async () => {
|
|
137
|
+
const user = userEvent.setup({ delay: null });
|
|
132
138
|
const onSubmit = jest.fn();
|
|
133
139
|
const thisProps = { ...props, onSubmit };
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
renderOpts
|
|
137
|
-
);
|
|
140
|
+
const rendered = render(<FunctionEditor {...thisProps} />, renderOpts);
|
|
141
|
+
await waitForLoad(rendered);
|
|
138
142
|
|
|
139
|
-
expect(getByRole("button", { name: /save/i })).toBeDisabled();
|
|
143
|
+
expect(rendered.getByRole("button", { name: /save/i })).toBeDisabled();
|
|
140
144
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
await user.type(rendered.getAllByRole("textbox")[0], "name");
|
|
146
|
+
await user.click(rendered.getByRole("option", { name: /constant/i }));
|
|
147
|
+
await user.click(rendered.getByRole("option", { name: /true/i }));
|
|
144
148
|
|
|
145
149
|
await waitFor(() =>
|
|
146
|
-
expect(getByRole("button", { name: /save/i })).toBeEnabled()
|
|
150
|
+
expect(rendered.getByRole("button", { name: /save/i })).toBeEnabled()
|
|
147
151
|
);
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
await user.click(rendered.getByRole("button", { name: /save/i }));
|
|
150
154
|
|
|
151
155
|
await waitFor(() =>
|
|
152
|
-
expect(getByRole("button", { name: /save/i })).toBeEnabled()
|
|
156
|
+
expect(rendered.getByRole("button", { name: /save/i })).toBeEnabled()
|
|
153
157
|
);
|
|
154
158
|
|
|
155
159
|
expect(onSubmit.mock.calls[0][0]).toEqual({
|