guoqqqi commented on a change in pull request #1608:
URL: https://github.com/apache/apisix-dashboard/pull/1608#discussion_r596501181
##########
File path: web/cypress/integration/route/import_export_route.spec.js
##########
@@ -124,14 +124,13 @@ context('import and export routes', () => {
it('should delete the route', function () {
cy.visit('/routes/list');
+ cy.get(this.domSelector.refresh).click();
+
for (let i = 0; i < 2; i += 1) {
- cy.contains(data[`route_name_${i}`])
- .siblings()
- .contains(componentLocaleUS['component.global.delete'])
- .click();
- cy.contains('button',
componentLocaleUS['component.global.confirm']).click();
+ cy.contains('Delete').should('be.visible').click();
Review comment:
I don't think there is a need to find a specific delete button. Contains
will only find the first element that meets the conditions.
reference: https://docs.cypress.io/api/commands/contains.html#Single-Element
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]