Skip to content

Commit 71134a3

Browse files
committed
Add logs before get
Signed-off-by: Lin Wang <[email protected]>
1 parent e3588a0 commit 71134a3

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

cypress/utils/commands.js

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export const currentBackendEndpoint = (() => {
6060
}
6161
},
6262
get() {
63+
cy.log(
64+
`Before get currentEndpoint: ${currentEndpoint}`
65+
);
6366
return currentEndpoint;
6467
},
6568
});
@@ -108,12 +111,6 @@ Cypress.Commands.overwrite('visit', (orig, url, options) => {
108111
}
109112
});
110113

111-
112-
Cypress.log({
113-
name: 'Override request',
114-
displayName: 'OR',
115-
message: BACKEND_BASE_PATH,
116-
});
117114
/**
118115
* Overwrite request command to support authentication similar to visit.
119116
* The request function parameters can be url, or (method, url), or (method, url, body).
@@ -134,24 +131,6 @@ Cypress.Commands.overwrite('request', (originalFn, ...args) => {
134131
} else if (args.length === 3) {
135132
[options.method, options.url, options.body] = args;
136133
}
137-
// These logs will appear in the left Command Log panel
138-
Cypress.log({
139-
name: 'REQUEST INFO',
140-
displayName: 'INFO',
141-
message: `Backend: ${currentBackendEndpoint.get()}`,
142-
});
143-
144-
Cypress.log({
145-
name: 'URL',
146-
displayName: 'URL',
147-
message: options.url || 'undefined',
148-
});
149-
150-
Cypress.log({
151-
name: 'BASE PATH',
152-
displayName: 'BASE',
153-
message: BACKEND_BASE_PATH,
154-
});
155134
/**
156135
*
157136
* Overwrite opensearch backend endpoint to customized endpoint if data source management enabled and

0 commit comments

Comments
 (0)