Skip to content

Commit

Permalink
Merge branch 'develop' into cacie/feat/persist-upload-timings
Browse files Browse the repository at this point in the history
  • Loading branch information
cacieprins authored Nov 28, 2023
2 parents 6eeba62 + d5678c7 commit 65217ff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _Released 12/5/2023 (PENDING)_
**Bugfixes:**

- Fixed an issue where pages or downloads opened in a new tab were missing basic auth headers. Fixes [#28350](https://github.com/cypress-io/cypress/issues/28350).
- Fixed an issue where request logging would default the `message` to the `args` of the currently running command even though those `args` would not apply to the request log and are not displayed. If the `args` are sufficiently large (e.g. when running the `cy.task` from the [code-coverage](https://github.com/cypress-io/code-coverage/) plugin) there could be performance/memory implications. Addressed in [#28411](https://github.com/cypress-io/cypress/pull/28411).

## 13.6.0

Expand Down
21 changes: 21 additions & 0 deletions packages/driver/cypress/e2e/cypress/proxy-logging.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,27 @@ describe('Proxy Logging', () => {
img.src = `/fixtures/media/cypress.png?${Date.now()}`
})

it('does not inherit the message of the currently running command', () => {
const logs: any[] = []

cy.on('log:added', (log) => {
if (log.name !== 'request') return

logs.push(log)
})

// delay the fetch call by 100ms to ensure it gets
// triggered during the cy.wait() below
setTimeout(() => {
fetch('/some-url')
}, 100)

cy.wait(200).then(() => {
expect(logs).to.have.length(1)
expect(logs[0].message).to.eq('')
})
})

context('with cy.intercept()', () => {
it('shows non-xhr/fetch log if intercepted', (done) => {
const src = `/fixtures/media/cypress.png?${Date.now()}`
Expand Down
1 change: 1 addition & 0 deletions packages/driver/src/cypress/proxy-logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function getRequestLogConfig (req: Omit<ProxyRequest, 'log'>): Partial<Cypress.I
url: req.preRequest.url,
method: req.preRequest.method,
timeout: 0,
message: '', // set to empty string so that we don't inherit the default message
consoleProps: () => req.consoleProps,
renderProps: () => {
function getIndicator (): 'aborted' | 'pending' | 'successful' | 'bad' {
Expand Down

0 comments on commit 65217ff

Please sign in to comment.