michael-s-molina commented on code in PR #19821:
URL: https://github.com/apache/superset/pull/19821#discussion_r858633788
##########
superset-frontend/cypress-base/cypress/integration/dashboard/dashboard.helper.ts:
##########
@@ -159,97 +175,34 @@ export function cleanUp() {
}
/** ************************************************************************
- * Clicks on new filter button
+ * Copy dashboard for testing purpose
* @returns {None}
- * @summary helper for adding new filter
+ * @summary helper for copy dashboard for testing purpose
************************************************************************* */
-export function clickOnAddFilterInModal() {
- return cy
- .get(nativeFilters.addFilterButton.button)
- .first()
- .click()
- .then(() => {
- cy.get(nativeFilters.addFilterButton.dropdownItem)
- .contains('Filter')
- .click({ force: true });
- });
-}
-
-/** ************************************************************************
- * Fills value native filter form with basic information
- * @param {string} name name for filter
- * @param {string} dataset which dataset should be used
- * @param {string} filterColumn which column should be used
- * @returns {None}
- * @summary helper for filling value native filter form
- ************************************************************************* */
-export function fillValueNativeFilterForm(
- name: string,
- dataset: string,
- filterColumn: string,
-) {
- cy.get(nativeFilters.modal.container)
- .find(nativeFilters.filtersPanel.filterName)
- .last()
- .click({ scrollBehavior: false })
- .type(name, { scrollBehavior: false });
- cy.get(nativeFilters.modal.container)
- .find(nativeFilters.filtersPanel.datasetName)
- .last()
- .click({ scrollBehavior: false })
- .type(`${dataset}{enter}`, { scrollBehavior: false });
- cy.get(nativeFilters.silentLoading).should('not.exist');
- cy.get(nativeFilters.filtersPanel.filterInfoInput)
- .last()
+export function copyTestDashboard(dashboard: string) {
+ cy.intercept('POST', '**/copy_dash/**').as('copy');
+ cy.intercept('**/api/v1/dashboard/**').as('dashboard');
Review Comment:
`cy.intercept('**/api/v1/dashboard/**').as('dashboard');` should come after
`cy.intercept('**/api/v1/dashboard/?q=**').as('dashboardsList');` because it's
more generic.
--
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]