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 07e55f2 fix: fe e2e error for pr 1538 (#1590)
07e55f2 is described below
commit 07e55f20be0e177797333a89e8ffcec47047c821
Author: liuxiran <[email protected]>
AuthorDate: Mon Mar 15 10:54:00 2021 +0800
fix: fe e2e error for pr 1538 (#1590)
---
web/cypress/integration/route/import_export_route.spec.js | 1 -
web/cypress/integration/route/online-debug.spec.js | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/web/cypress/integration/route/import_export_route.spec.js
b/web/cypress/integration/route/import_export_route.spec.js
index 1786b40..188ec2e 100644
--- a/web/cypress/integration/route/import_export_route.spec.js
+++ b/web/cypress/integration/route/import_export_route.spec.js
@@ -159,7 +159,6 @@ context('import and export routes', () => {
cy.get(this.domSelector.notification).should(
'contain', 'Success'
);
- cy.get(this.domSelector.fileSelectorClose).click();
cy.get(this.domSelector.notificationCloseIcon).click().should('not.exist');
// delete route just imported
cy.reload();
diff --git a/web/cypress/integration/route/online-debug.spec.js
b/web/cypress/integration/route/online-debug.spec.js
index f491a1c..487a320 100644
--- a/web/cypress/integration/route/online-debug.spec.js
+++ b/web/cypress/integration/route/online-debug.spec.js
@@ -44,7 +44,6 @@ context('Online debug', () => {
postUrl:
`${defaultSettings.serveUrlMap[SERVE_ENV].split('//')[1]}/apisix/admin/import/routes`,
uploadFile: '../../../api/test/testdata/import/default.json',
headerAuthorizationKey: 'Authorization',
- token: localStorage.getItem('token'),
routeName: 'hello',
};
@@ -112,6 +111,7 @@ context('Online debug', () => {
it('should debug POST request with file successfully', function() {
cy.visit('/');
cy.contains(menuLocaleUS['menu.routes']).click();
+ const currentToken = localStorage.getItem('token');
// show online debug draw
cy.contains(routeLocaleUS['page.route.onlineDebug']).click();
@@ -146,8 +146,8 @@ context('Online debug', () => {
// set header Authorization
cy.contains('Header Params').should('be.visible').click();
- cy.get(domSelector.headerDataKey0).type(data.headerAuthorizationKey),
- cy.get(domSelector.headerDataValue0).type(data.token);
+ cy.get(domSelector.headerDataKey0).type(data.headerAuthorizationKey);
+ cy.get(domSelector.headerDataValue0).type(currentToken);
cy.contains(routeLocaleUS['page.route.button.send']).click();
// assert: send request return