You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/12/19 10:45:21 UTC

[apisix-dashboard] branch master updated: feat(FE): update route e2e (#1074)

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

juzhiyuan 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 cb1377c  feat(FE): update route e2e (#1074)
cb1377c is described below

commit cb1377cf9859392ee81ee60b3d4e623b1522be1e
Author: litesun <su...@apache.org>
AuthorDate: Sat Dec 19 18:45:14 2020 +0800

    feat(FE): update route e2e (#1074)
---
 ...ete_route.spec.js => create-and-delete-route.spec.js} | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/web/cypress/integration/route/create_and_delete_route.spec.js b/web/cypress/integration/route/create-and-delete-route.spec.js
similarity index 89%
rename from web/cypress/integration/route/create_and_delete_route.spec.js
rename to web/cypress/integration/route/create-and-delete-route.spec.js
index 655e2f9..ddd60be 100644
--- a/web/cypress/integration/route/create_and_delete_route.spec.js
+++ b/web/cypress/integration/route/create-and-delete-route.spec.js
@@ -17,7 +17,7 @@
 /* eslint-disable no-undef */
 
 context('Create and Delete Route', () => {
-  const root_name = `root_${new Date().valueOf()}`;
+  const name = `routeName${new Date().valueOf()}`;
 
   beforeEach(() => {
     // init login 
@@ -26,12 +26,12 @@ context('Create and Delete Route', () => {
 
   it('create route', () => {
     //  go to route create page
-    cy.visit('/routes/create');
+    cy.visit('/');
     cy.contains('Route').click();
     cy.contains('Create').click();
 
     // input Name And Description
-    cy.get('#name').type(root_name);
+    cy.get('#name').type(name);
     cy.get('#desc').type('desc');
 
     // input Request Basic Define
@@ -48,7 +48,7 @@ context('Create and Delete Route', () => {
     cy.contains('Cookie').click();
     cy.get('.ant-modal').within(() => {
       cy.get('#name').type('modalName');
-    })
+    });
     cy.get('#operator').click();
     cy.contains('Equal').click();
     cy.get('#value').type('value');
@@ -65,9 +65,9 @@ context('Create and Delete Route', () => {
     cy.contains('Next').click();
 
     // config prometheus plugin
-    cy.contains('.ant-card', 'prometheus').within(($form) => {
+    cy.contains('.ant-card', 'prometheus').within(() => {
       cy.get('button').first().click();
-    })
+    });
     cy.contains('button', 'Cancel').click();
 
     // go to step4
@@ -82,9 +82,9 @@ context('Create and Delete Route', () => {
 
   it('delete the route', () => {
     cy.visit('/routes/list');
-    cy.get('[title=Name]').type(root_name);
+    cy.get('[title=Name]').type(name);
     cy.contains('查 询').click();
-    cy.contains(root_name).siblings().contains('Delete').click();
+    cy.contains(name).siblings().contains('Delete').click();
     cy.contains('button', 'Confirm').click();
     cy.get('.ant-notification-notice-message').should('contain', 'Delete Route Successfully');
   })