This is an automated email from the ASF dual-hosted git repository.

sunyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 77b42e8  fix: Frontend e2e test for#1538 (#1553)
77b42e8 is described below

commit 77b42e839f8a79bbae8e0dd097195bf922076bbb
Author: guoqqqi <[email protected]>
AuthorDate: Thu Mar 4 20:41:45 2021 +0800

    fix: Frontend e2e test for#1538 (#1553)
    
    * fix: update code
    
    * fix: CI error
---
 web/cypress/integration/route/import_export_route.spec.js | 7 +++----
 web/cypress/integration/route/search-route.spec.js        | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/web/cypress/integration/route/import_export_route.spec.js 
b/web/cypress/integration/route/import_export_route.spec.js
index d8730cf..dcf9c1a 100644
--- a/web/cypress/integration/route/import_export_route.spec.js
+++ b/web/cypress/integration/route/import_export_route.spec.js
@@ -42,6 +42,7 @@ context('import and export routes', () => {
     cy.login();
 
     cy.fixture('selector.json').as('domSelector');
+    cy.fixture('data.json').as('data');
     cy.fixture('export-route-dataset.json').as('exportFile');
   });
   it('should create route1 and route2', function () {
@@ -129,8 +130,7 @@ context('import and export routes', () => {
         .click();
       cy.contains('button', 
componentLocaleUS['component.global.confirm']).click();
       cy.get(this.domSelector.notification).should(
-        'contain',
-        `${componentLocaleUS['component.global.delete']} 
${menuLocaleUS['menu.routes']} 
${componentLocaleUS['component.status.success']}`,
+        'contain', this.data.deleteRouteSuccess
       );
     }
   });
@@ -154,8 +154,7 @@ context('import and export routes', () => {
         cy.contains(componentLocaleUS['component.global.cancel']).click();
       } else {
         cy.get(this.domSelector.notification).should(
-          'contain',
-          `${routeLocaleUS['page.route.button.importOpenApi']} 
${componentLocaleUS['component.status.success']}`,
+          'contain', 'Success'
         );
         cy.get(this.domSelector.notificationCloseIcon).click();
         // delete route just imported
diff --git a/web/cypress/integration/route/search-route.spec.js 
b/web/cypress/integration/route/search-route.spec.js
index d6ffa17..be3e0c2 100644
--- a/web/cypress/integration/route/search-route.spec.js
+++ b/web/cypress/integration/route/search-route.spec.js
@@ -103,7 +103,7 @@ context('Create and Search Route', () => {
     // search one label
     cy.get(this.domSelector.refresh).click();
     cy.get(this.domSelector.labelSelector).click();
-    cy.get(this.domSelector.dropdown).within(() => {
+    cy.get(this.domSelector.dropdown).should('be.visible').within(() => {
       cy.contains(data.value0).click();
     });
     cy.contains('Search').click();

Reply via email to