LiteSun commented on a change in pull request #1515:
URL: https://github.com/apache/apisix-dashboard/pull/1515#discussion_r582736034
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -85,6 +85,21 @@ context('Create and Delete Route', () => {
cy.url().should('contains', 'routes/list');
});
+ it('should view the route', function () {
+ cy.visit('/');
+ cy.contains('Route').click();
+
+ cy.get(this.domSelector.nameSelector).type(name);
+ cy.contains('Search').click();
+ cy.contains(name).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
Review comment:
ditto
##########
File path: web/cypress/integration/consumer/create_and_delete_consumer.spec.js
##########
@@ -56,6 +56,21 @@ context('Create and Delete Consumer', () => {
cy.get(this.domSelector.notification).should('contain',
this.data.createConsumerSuccess);
});
+ it('should view the consumer', function () {
+ cy.visit('/');
+ cy.contains('Consumer').click();
+
+ cy.get(this.domSelector.nameSelector).type(this.data.consumerName);
+ cy.contains('Search').click();
+ cy.contains(this.data.consumerName).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
Review comment:
```suggestion
cy.get(this.domSelector.xxx).should('be.visible');
```
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -103,6 +118,15 @@ context('Create and Delete Route', () => {
cy.contains('Goto List').click();
cy.url().should('contains', 'routes/list');
cy.contains(newName).siblings().should('contain', this.data.description2);
+
+ // test view
+ cy.contains(newName).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
Review comment:
ditto
##########
File path: web/cypress/integration/service/create-edit-delete-service.spec.js
##########
@@ -40,6 +40,21 @@ context('create and delete service ', () => {
cy.get(this.domSelector.notification).should('contain',
this.data.createServiceSuccess);
});
+ it('should view the service', function () {
+ cy.visit('/');
+ cy.contains('Service').click();
+
+ cy.get(this.domSelector.nameSelector).type(this.data.serviceName);
+ cy.contains('Search').click();
+ cy.contains(this.data.serviceName).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
Review comment:
ditto
##########
File path: web/cypress/integration/service/create-edit-delete-service.spec.js
##########
@@ -59,10 +74,20 @@ context('create and delete service ', () => {
cy.contains('Next').click();
cy.contains('Submit').click();
cy.get(this.domSelector.notification).should('contain',
this.data.editServiceSuccess);
+
+ // test view
+ cy.contains(this.data.serviceName2).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
Review comment:
ditto
##########
File path: web/cypress/integration/service/create-edit-delete-service.spec.js
##########
@@ -59,10 +74,20 @@ context('create and delete service ', () => {
cy.contains('Next').click();
cy.contains('Submit').click();
cy.get(this.domSelector.notification).should('contain',
this.data.editServiceSuccess);
+
+ // test view
+ cy.contains(this.data.serviceName2).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
+
+ cy.get('.CodeMirror-scroll').within(() => {
Review comment:
```suggestion
cy.get(this.domSelector.xxx).within(() => {
```
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -41,6 +41,22 @@ context('Create and Delete Upstream', () => {
cy.url().should('contains', 'upstream/list');
});
+ it('should view the (roundrobin) upstream', function () {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+
+ cy.get(this.domSelector.nameSelector).type(this.data.upstreamName);
+ cy.contains('Search').click();
+ cy.contains(this.data.upstreamName).siblings().contains('View').click();
+ cy.get('.ant-drawer-content').should('be.visible');
Review comment:
ditto
----------------------------------------------------------------
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:
[email protected]