msyavuz commented on code in PR #37445:
URL: https://github.com/apache/superset/pull/37445#discussion_r2797832318
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx:
##########
@@ -549,13 +553,8 @@ test('reorders filters via drag and drop', async () => {
onSave,
});
- const filterContainer = screen.getByTestId('filter-title-container');
- const draggableFilters = within(filterContainer).getAllByRole('tab');
-
- fireEvent.dragStart(draggableFilters[0]);
- fireEvent.dragOver(draggableFilters[2]);
- fireEvent.drop(draggableFilters[2]);
- fireEvent.dragEnd(draggableFilters[0]);
+ // TODO: Implement drag simulation when dnd-kit testing utilities are
available
+ // or move this test to Playwright E2E tests
Review Comment:
Should we create an e2e test now?
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx:
##########
@@ -576,7 +575,8 @@ test('reorders filters via drag and drop', async () => {
);
});
-test('rearranges three filters and deletes one of them', async () => {
+// eslint-disable-next-line jest/no-disabled-tests
+test.skip('rearranges three filters and deletes one of them', async () => {
Review Comment:
Let's not skip and also remove relevant code if we are leaving this part for
further implementations
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/ConfigModalSidebar/ConfigModalSidebar.tsx:
##########
@@ -100,8 +113,105 @@ const ConfigModalSidebar: FC<ConfigModalSidebarProps> = ({
restoreItem,
onCollapseChange,
onCrossListDrop,
+ formValuesVersion,
itemTitles,
}) => {
+ const [isDragging, setIsDragging] = useState(false);
+
+ const sensor = useSensor(PointerSensor, {
+ activationConstraint: { distance: 10 },
+ });
+
+ const handleDragStart = useCallback(() => {
+ setIsDragging(true);
+ }, []);
+
+ const handleDragEnd = useCallback(
+ (event: DragEndEvent) => {
+ const { active, over } = event;
+
Review Comment:
Is this relevant @LevisNgigi ?
##########
superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx:
##########
@@ -524,7 +524,11 @@ test('deletes a filter including dependencies', async ()
=> {
);
}, 30000);
-test('reorders filters via drag and drop', async () => {
+// dnd-kit's PointerSensor requires a real browser environment with proper
+// pointer event handling that JSDOM doesn't fully support. This test should
+// be covered by Playwright E2E tests instead.
+// eslint-disable-next-line jest/no-disabled-tests
+test.skip('reorders filters via drag and drop', async () => {
Review Comment:
Would this help? https://github.com/clauderic/dnd-kit/issues/261
--
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]