You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 264b16f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterConfigurationLink/useFilterConfigModal.test.tsx
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -137,17 +137,18 @@ test.each([
137
137
);
138
138
139
139
test.each([false,true])(
140
-
'names the unavailable dataset from a validation dict, display controls=%s',
140
+
'renders the endpoint validation dict, display controls=%s',
141
141
asyncfailControls=>{
142
-
// Dataset validation returns normalized_messages() via response_422.
142
+
// Both endpoints return 400 for schema errors and 422 for dataset validation.
143
+
constdetail=failControls
144
+
? 'Field may not be null.'
145
+
: 'The native filters reference datasets that are not available: 42';
143
146
constfailure={
144
-
status: 422,
147
+
status: failControls ? 400 : 422,
145
148
body: {
146
-
message: {
147
-
native_filter_configuration: [
148
-
'The native filters reference datasets that are not available: 42',
149
-
],
150
-
},
149
+
message: failControls
150
+
? {modified: [detail]}
151
+
: {native_filter_configuration: [detail]},
151
152
},
152
153
};
153
154
fetchMock.route(
@@ -162,7 +163,7 @@ test.each([false, true])(
162
163
expect(store.getState()).toMatchObject({
163
164
messageToasts: [
164
165
{
165
-
text: `Your ${failControls ? 'display control' : 'filter'} changes were not saved: The native filters reference datasets that are not available: 42`,
166
+
text: `Your ${failControls ? 'display control' : 'filter'} changes were not saved: ${detail}`,
0 commit comments