EnxDev commented on code in PR #45176:
URL: https://github.com/apache/superset/pull/45176#discussion_r4256175798


##########
superset-frontend/src/pages/DatasetList/DatasetList.test.tsx:
##########
@@ -650,3 +636,36 @@ test.each([false, true])(
     }
   },
 );
+
+const listRequestUrls = (pattern: RegExp) =>
+  fetchMock.callHistory
+    .calls()
+    .map(call => call.url)
+    .filter(url => pattern.test(url));
+
+test('lists datasets through the dataset API when semantic layers are off', 
async () => {
+  renderDatasetList(mockAdminUser);
+
+  await waitFor(() => {
+    expect(listRequestUrls(/\/api\/v1\/dataset\/\?q=/).length).toBeGreaterThan(
+      0,
+    );
+  });
+  expect(listRequestUrls(/\/api\/v1\/datasource\/\?q=/)).toHaveLength(0);
+});
+
+test('lists datasets through the combined datasource API when semantic layers 
are on', async () => {

Review Comment:
   After the rename, this is the only test that runs the page against the 
combined endpoint. Sorting, filtering and the refresh after delete or duplicate 
are now only asserted on the dataset endpoint.
   
   Worth keeping one or two of those running with the flag on? That path is 
where the regressions in #45174 came from.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to