Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Frontend e2e test for#1538 #1553

Merged
merged 11 commits into from
Mar 4, 2021
7 changes: 3 additions & 4 deletions web/cypress/integration/route/import_export_route.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ context('import and export routes', () => {
cy.login();

cy.fixture('selector.json').as('domSelector');
cy.fixture('data.json').as('data');
cy.fixture('export-route-dataset.json').as('exportFile');
});
it('should create route1 and route2', function () {
Expand Down Expand Up @@ -129,8 +130,7 @@ context('import and export routes', () => {
.click();
cy.contains('button', componentLocaleUS['component.global.confirm']).click();
cy.get(this.domSelector.notification).should(
'contain',
`${componentLocaleUS['component.global.delete']} ${menuLocaleUS['menu.routes']} ${componentLocaleUS['component.status.success']}`,
'contain', this.data.deleteRouteSuccess
);
}
});
Expand All @@ -154,8 +154,7 @@ context('import and export routes', () => {
cy.contains(componentLocaleUS['component.global.cancel']).click();
} else {
cy.get(this.domSelector.notification).should(
'contain',
`${routeLocaleUS['page.route.button.importOpenApi']} ${componentLocaleUS['component.status.success']}`,
'contain', 'Success'
);
cy.get(this.domSelector.notificationCloseIcon).click();
// delete route just imported
Expand Down
2 changes: 1 addition & 1 deletion web/cypress/integration/route/search-route.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ context('Create and Search Route', () => {
// search one label
cy.get(this.domSelector.refresh).click();
cy.get(this.domSelector.labelSelector).click();
cy.get(this.domSelector.dropdown).within(() => {
cy.get(this.domSelector.dropdown).should('be.visible').within(() => {
cy.contains(data.value0).click();
});
cy.contains('Search').click();
Expand Down