diff --git a/web/cypress/integration/route/create_and_delete_route.spec.js b/web/cypress/integration/route/create_and_delete_route.spec.js index 39853c683f..655e2f9320 100644 --- a/web/cypress/integration/route/create_and_delete_route.spec.js +++ b/web/cypress/integration/route/create_and_delete_route.spec.js @@ -65,7 +65,9 @@ context('Create and Delete Route', () => { cy.contains('Next').click(); // config prometheus plugin - cy.contains('.ant-card', 'prometheus').get('button').first().click(); + cy.contains('.ant-card', 'prometheus').within(($form) => { + cy.get('button').first().click(); + }) cy.contains('button', 'Cancel').click(); // go to step4