You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Fabriceli (via GitHub)" <gi...@apache.org> on 2023/03/15 02:48:11 UTC

[GitHub] [apisix-dashboard] Fabriceli commented on a diff in pull request #2731: feat: support consul discovery

Fabriceli commented on code in PR #2731:
URL: https://github.com/apache/apisix-dashboard/pull/2731#discussion_r1136475929


##########
web/cypress/e2e/route/create-route-with-service-discovery-upstream.cy.js:
##########
@@ -154,6 +154,48 @@ context('Create Route with Service Discovery Upstream', () => {
     });
   });
 
+  it('should edit this route with Consul Service Discovery upstream', function () {
+    cy.visit('/');
+    cy.contains('Route').click();
+    cy.get(selector.nameSelector).type(data.routeName);
+
+    cy.contains('Search').click();
+    cy.contains(data.routeName).siblings().contains('Configure').click();
+
+    cy.get(selector.name).should('value', data.routeName);
+    cy.contains('Next').click({
+      force: true,
+    });
+
+    cy.contains('Nacos').should('exist');
+
+    // set another service discovery
+    cy.get(selector.discovery_type).click({ force: true });
+    cy.get(selector.selectItem).within(() => {
+      cy.contains('Consul').click();
+    });
+    cy.get(selector.service_name).clear().type(`another.${data.serviceName}`);
+
+    cy.contains('Next').click();
+    cy.contains('Next').click();
+    cy.contains('Submit').click();
+    cy.contains(data.submitSuccess).should('be.visible');
+    cy.contains('Goto List').click();
+    cy.url().should('contains', 'routes/list');
+
+    // check if the changes have been saved
+    cy.get(selector.nameSelector).type(data.routeName);
+    cy.contains('Search').click();
+
+    cy.contains(data.routeName).siblings().contains('Configure').click();
+    // ensure it has already changed to edit page
+    cy.get(selector.name).should('value', data.routeName);

Review Comment:
   done



##########
web/cypress/e2e/route/create-route-with-service-discovery-upstream.cy.js:
##########
@@ -154,6 +154,48 @@ context('Create Route with Service Discovery Upstream', () => {
     });
   });
 
+  it('should edit this route with Consul Service Discovery upstream', function () {
+    cy.visit('/');
+    cy.contains('Route').click();
+    cy.get(selector.nameSelector).type(data.routeName);
+
+    cy.contains('Search').click();
+    cy.contains(data.routeName).siblings().contains('Configure').click();
+
+    cy.get(selector.name).should('value', data.routeName);
+    cy.contains('Next').click({
+      force: true,
+    });
+
+    cy.contains('Nacos').should('exist');
+
+    // set another service discovery
+    cy.get(selector.discovery_type).click({ force: true });
+    cy.get(selector.selectItem).within(() => {
+      cy.contains('Consul').click();
+    });
+    cy.get(selector.service_name).clear().type(`another.${data.serviceName}`);
+
+    cy.contains('Next').click();
+    cy.contains('Next').click();
+    cy.contains('Submit').click();
+    cy.contains(data.submitSuccess).should('be.visible');
+    cy.contains('Goto List').click();
+    cy.url().should('contains', 'routes/list');
+
+    // check if the changes have been saved
+    cy.get(selector.nameSelector).type(data.routeName);
+    cy.contains('Search').click();
+
+    cy.contains(data.routeName).siblings().contains('Configure').click();
+    // ensure it has already changed to edit page
+    cy.get(selector.name).should('value', data.routeName);
+    cy.contains('Next').click({
+      force: true,
+    });
+    cy.get(selector.service_name).should('value', `another.${data.serviceName}`);

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org