Aitema-gmbh commented on code in PR #39231:
URL: https://github.com/apache/superset/pull/39231#discussion_r3232633312


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx:
##########
@@ -56,49 +55,73 @@ class MainPreset extends Preset {
   }
 }
 
-new MainPreset().register();
-
 fetchMock.get('glob:*/api/v1/dataset/7', {
   description_columns: {},
   id: 1,
-  label_columns: { columns: 'Columns', table_name: 'Table Name' },
+  label_columns: {
+    columns: 'Columns',
+    table_name: 'Table Name',
+  },
   result: {
     metrics: [],
-    columns: [{ column_name: 'Column A', id: 1 }],
+    columns: [
+      {
+        column_name: 'Column A',
+        id: 1,
+      },
+    ],
     table_name: 'birth_names',
     id: 1,
   },
   show_columns: ['id', 'table_name'],
 });
 
-// Cleanup between tests
-beforeEach(() => {
-  jest.clearAllMocks();
-});
-
 const getTestId = testWithId<string>(FILTER_BAR_TEST_ID, true);
 const getModalTestId = testWithId<string>(FILTERS_CONFIG_MODAL_TEST_ID, true);
 
-function createClosedBarProps(toggleFiltersBar = jest.fn()) {
-  return { filtersOpen: false, toggleFiltersBar };
-}
+const FILTER_NAME = 'Time filter 1';
 
-function createOpenedBarProps(toggleFiltersBar = jest.fn()) {
-  return { filtersOpen: true, toggleFiltersBar };
-}
+const addFilterFlow = async () => {
+  // open filter config modals
+  userEvent.click(screen.getByTestId(getTestId('collapsable')));
+  userEvent.click(screen.getByLabelText('setting'));
+  userEvent.click(screen.getByText('Add or edit filters and controls'));
+  // select filter
+  userEvent.click(screen.getByText('Value'));
+  userEvent.click(screen.getByText('Time range'));
+  userEvent.type(screen.getByTestId(getModalTestId('name-input')), 
FILTER_NAME);
+  userEvent.click(screen.getByText('Save'));
+  // TODO: fix this flaky test
+  // await screen.findByText('All filters (1)');

Review Comment:
   Addressed in e71b0d57 — addFilterFlow now asserts `await 
screen.findByText('All filters (1)')` after Save to confirm the filter was 
persisted. Resolving — thanks for the catch.



##########
superset-frontend/src/dashboard/components/AutoRefreshIndicator/index.tsx:
##########
@@ -124,6 +124,7 @@ export const AutoRefreshIndicator: 
FC<AutoRefreshIndicatorProps> = ({
           css={iconButtonStyles}
           onClick={onTogglePause}
           aria-label={tooltipTitle}
+          aria-pressed={isPaused}

Review Comment:
   Addressed in e71b0d57 — aria-label is now the static 'Toggle auto-refresh' 
with aria-pressed={isPaused} carrying the state, exactly per WCAG 1.3.3 
toggle-button guidance. Inline comment in the component explains the choice. 
Resolving — thanks for the catch.



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