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 4d73ae6  fix: CI failed in create-route-with-upstream (#1364)
4d73ae6 is described below

commit 4d73ae6c7660b2717f7ce70f7a7dcc2f2f29e032
Author: guoqqqi <72343596+guoq...@users.noreply.github.com>
AuthorDate: Mon Jan 25 08:25:01 2021 +0800

    fix: CI failed in create-route-with-upstream (#1364)
    
    * fix: CI failed in create-route-with-upstream
---
 .../route/create-route-with-upstream.spec.js       | 46 +++++++++++-----------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/web/cypress/integration/route/create-route-with-upstream.spec.js 
b/web/cypress/integration/route/create-route-with-upstream.spec.js
index 22d86ef..aa8c21e 100644
--- a/web/cypress/integration/route/create-route-with-upstream.spec.js
+++ b/web/cypress/integration/route/create-route-with-upstream.spec.js
@@ -23,19 +23,19 @@ context('Create Route with Upstream', () => {
     node_0_host: '#nodes_0_host',
     name: '#name',
     description: '#desc',
-    upstreamSelector: '#upstream_id',
-    searchName: '[title=Name]',
+    search_name: '[title=Name]',
+    custom_upstream: '[title=Custom]',
   };
 
   const data = {
-    upstreamName: 'test_upstream',
-    routeName: 'test_route',
+    upstream_name: 'test_upstream',
+    route_name: 'test_route',
     description: 'desc_by_autotes',
     host: '10.89.90.237',
     ip1: '127.0.0.1',
     ip2: '127.0.0.2',
-    deleteRouteSuccess: 'Delete Route Successfully',
-    deleteUpstreamSuccess: 'Delete successfully',
+    delete_route_success: 'Delete Route Successfully',
+    delete_upstream_success: 'Delete Upstream Successfully',
   };
 
   beforeEach(() => {
@@ -47,7 +47,7 @@ context('Create Route with Upstream', () => {
     cy.contains('Upstream').click();
     cy.contains('Create').click();
 
-    cy.get(domSelector.name).type(data.upstreamName);
+    cy.get(domSelector.name).type(data.upstream_name);
     cy.get(domSelector.description).type(data.description);
     cy.get(domSelector.node_0_host).type(data.host);
     cy.contains('Next').click();
@@ -59,18 +59,18 @@ context('Create Route with Upstream', () => {
     cy.contains('Route').click();
     cy.contains('Create').click();
 
-    cy.get(domSelector.name).type(data.routeName);
+    cy.get(domSelector.name).type(data.route_name);
     cy.contains('Next').click();
   });
 
   it('should disable Upstream input boxes after selecting an existing 
upstream', () => {
     cy.contains('Custom').click();
-    cy.contains(data.upstreamName).click();
+    cy.contains(data.upstream_name).click();
     cy.get(domSelector.input).should('be.disabled');
   });
 
   it('should enable Upstream input boxes after selecting Custom mode', () => {
-    cy.contains(data.upstreamName).click();
+    cy.contains(data.upstream_name).click();
     cy.contains('Custom').click();
     cy.get(domSelector.input).should('not.be.disabled');
   });
@@ -88,21 +88,21 @@ context('Create Route with Upstream', () => {
     cy.visit('/');
     cy.contains('Route').click();
 
-    cy.get(domSelector.searchName).type(data.routeName);
+    cy.get(domSelector.search_name).type(data.route_name);
     cy.contains('Search').click();
-    cy.contains(data.routeName).siblings().contains('Edit').click();
+    cy.contains(data.route_name).siblings().contains('Edit').click();
 
-    cy.get(domSelector.name).click().should('value', data.routeName);
+    cy.get(domSelector.name).click().should('value', data.route_name);
     cy.contains('Next').click();
 
     // check if the changes have been saved
     cy.get(domSelector.node_0_host).should('value', data.ip1);
 
-    cy.get(domSelector.upstreamSelector).click();
-    cy.contains(data.upstreamName).click();
+    cy.get(domSelector.custom_upstream).click();
+    cy.contains(data.upstream_name).click();
     cy.get(domSelector.input).should('be.disabled');
 
-    cy.contains(data.upstreamName).click();
+    cy.contains(data.upstream_name).click();
     cy.contains('Custom').click();
     cy.get(domSelector.input).should('not.be.disabled');
 
@@ -114,28 +114,28 @@ context('Create Route with Upstream', () => {
     cy.url().should('contains', 'routes/list');
 
     // check if the changes have been saved
-    cy.get(domSelector.searchName).type(data.routeName);
+    cy.get(domSelector.search_name).type(data.route_name);
     cy.contains('Search').click();
-    cy.contains(data.routeName).siblings().contains('Edit').click();
+    cy.contains(data.route_name).siblings().contains('Edit').click();
     cy.contains('Next').click();
     cy.get(domSelector.node_0_host).should('value', data.ip2);
   });
 
   it('should delete this test route and upstream', () => {
     cy.visit('/routes/list');
-    cy.get(domSelector.searchName).type(data.routeName);
+    cy.get(domSelector.search_name).type(data.route_name);
     cy.contains('Search').click();
-    cy.contains(data.routeName).siblings().contains('Delete').click();
+    cy.contains(data.route_name).siblings().contains('Delete').click();
     cy.contains('button', 'Confirm').click();
-    cy.get(domSelector.notification).should('contain', 
data.deleteRouteSuccess);
+    cy.get(domSelector.notification).should('contain', 
data.delete_route_success);
 
     cy.visit('/');
     cy.contains('Upstream').click();
-    cy.contains(data.upstreamName).siblings().contains('Delete').click();
+    cy.contains(data.upstream_name).siblings().contains('Delete').click();
     cy.contains('button', 'Confirm').click();
     cy.get(domSelector.notification).should(
       'contain',
-      data.deleteUpstreamSuccess,
+      data.delete_upstream_success,
     );
   });
 });

Reply via email to