LiteSun commented on a change in pull request #1558:
URL: https://github.com/apache/apisix-dashboard/pull/1558#discussion_r598414476



##########
File path: 
web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js
##########
@@ -163,12 +163,15 @@ context('Create and Delete Route', () => {
 
   it('should delete the route', function () {
     cy.visit('/routes/list');
-    [newName, duplicateNewName].forEach(function (routeName) {
-      cy.get(this.domSelector.nameSelector).type(routeName);
+    const { domSelector, data } = this;
+    const routeNames = [newName, duplicateNewName];
+    routeNames.forEach(function (routeName) {
+      cy.get(domSelector.nameSelector).type(routeName);
       cy.contains('Search').click();
       cy.contains(routeName).siblings().contains('Delete').click();
       cy.contains('button', 'Confirm').click();
-      cy.get(this.domSelector.notification).should('contain', 
this.data.deleteRouteSuccess);
-    }).bind(this);
+      cy.get(domSelector.notification).should('contain', 
data.deleteRouteSuccess);

Review comment:
       To make the test case stable, it would be better to close the 
notification here.




-- 
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:
us...@infra.apache.org


Reply via email to