Skip to content

Commit

Permalink
chore: added more data
Browse files Browse the repository at this point in the history
  • Loading branch information
iamayushdas committed May 11, 2021
1 parent d6d1d8b commit d7749d6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ context('Can select service_id skip upstream in route', () => {
nameSelector: '[title=Name]',
serviceSelector: '[title=test_service]',
deleteAlert: '.ant-modal-body',
notificationCloseIcon: '.ant-notification-close-icon',
};

const data = {
Expand All @@ -41,6 +42,8 @@ context('Can select service_id skip upstream in route', () => {
deleteServiceSuccess: 'Delete Service Successfully',
deleteRouteSuccess: 'Delete Route Successfully',
ip1: '127.0.0.1',
port0: '7000',
weight0: '1',
};

beforeEach(() => {
Expand All @@ -54,8 +57,8 @@ context('Can select service_id skip upstream in route', () => {

cy.get(selector.name).type(data.upstreamName);
cy.get(selector.nodes_0_host).type(data.ip1);
cy.get(selector.nodes_0_port).clear().type('7000');
cy.get(selector.nodes_0_weight).clear().type(1);
cy.get(selector.nodes_0_port).clear().type(data.port0);
cy.get(selector.nodes_0_weight).clear().type(data.weight0);
cy.contains('Next').click();
cy.contains('Submit').click();
cy.get(selector.notification).should('contain', data.createUpstreamSuccess);
Expand Down Expand Up @@ -147,5 +150,6 @@ context('Can select service_id skip upstream in route', () => {
cy.contains(data.upstreamName).siblings().contains('Delete').click();
cy.contains('button', 'Confirm').click();
cy.get(selector.notification).should('contain', data.deleteUpstreamSuccess);
cy.get(selector.notificationCloseIcon).click();
});
});

0 comments on commit d7749d6

Please sign in to comment.