rusackas commented on code in PR #44858:
URL: https://github.com/apache/superset/pull/44858#discussion_r4179041458


##########
superset-frontend/src/components/Datasource/components/CollectionTable/CollectionTable.test.tsx:
##########
@@ -27,10 +28,242 @@ const props = {
   sortColumns: [],
 };
 
+test('keeps tie order stable when pagination reapplies a descending sort', () 
=> {
+  const collection = Array.from({ length: 30 }, (_, i) => ({
+    id: i + 1,
+    column_name: `col_${i + 1}`,
+    verbose_name: '',
+  }));
+
+  const { container } = render(
+    <CollectionTable
+      collection={collection}
+      tableColumns={['column_name', 'verbose_name']}
+      sortColumns={['verbose_name']}
+      pagination={{ pageSize: 25 }}
+    />,
+  );
+
+  const sorters = container.querySelectorAll('.ant-table-column-sorters');
+  // ascend -> descend on the all-blank verbose_name column.
+  fireEvent.click(sorters[1]);

Review Comment:
   Good catch, @sadpandajoe. Switched to selecting the sole sorter, so the test 
reaches the pagination assertions now.



-- 
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