sadpandajoe commented on code in PR #36723:
URL: https://github.com/apache/superset/pull/36723#discussion_r2629968463
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditorCurrency.test.tsx:
##########
@@ -54,6 +54,22 @@ const createPropsWithCurrency = () => {
};
};
+// Shared setup to navigate to expanded currency section
+const setupCurrencySection = async () => {
+ await dismissDatasourceWarning();
+
+ // Navigate to metrics tab - use findBy which has built-in waiting
+ const metricButton = await screen.findByTestId('collection-tab-Metrics');
+ await userEvent.click(metricButton);
+
+ // Expand the metric row
+ const expandToggles = await screen.findAllByLabelText(/expand row/i);
+ await userEvent.click(expandToggles[0]);
+
+ // Wait for currency section to be visible
+ await screen.findByText('Metric currency');
+};
Review Comment:
I do like this, it makes it a lot cleaner 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]