Skip to content
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ _Released 10/21/2025 (PENDING)_

- An error is no longer thrown during command execution when the application under test overwrites the `window.$` property with a non-function. Fixes [#1502](https://github.com/cypress-io/cypress/issues/1502). Fixed in [#32682](https://github.com/cypress-io/cypress/pull/32682).
- When running `cypress` in Cypress development environments, or when `ELECTRON_ENABLE_LOGGING` is otherwise set to 1, certain messages written to `stderr` will no longer be bracketed with verbose tags. Addresses [#32569](https://github.com/cypress-io/cypress/issues/32569). Addressed in [#32674](https://github.com/cypress-io/cypress/pull/32674).
- Improve performance of time between specs by not resetting the `file_systems` `StorageType` state when executing the CDP command `Storage.clearDataForOrigin`. Fixed in [#32703](https://github.com/cypress-io/cypress/pull/32703).

**Misc:**

Expand Down
4 changes: 3 additions & 1 deletion packages/server/lib/browsers/cdp_automation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,9 @@ export class CdpAutomation implements CDPClient, AutomationMiddleware {
})
case 'reset:browser:state':
return Promise.all([
this.sendDebuggerCommandFn('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'all' }),
// Note that we are omitting `file_systems` as it is very non-performant to clear:
// https://github.com/cypress-io/cypress/pull/32703
this.sendDebuggerCommandFn('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'cookies,indexeddb,local_storage,shader_cache,service_workers,cache_storage,interest_groups,shared_storage' }),
this.sendDebuggerCommandFn('Network.clearBrowserCache'),
])
case 'reset:browser:tabs:for:next:spec':
Expand Down
4 changes: 3 additions & 1 deletion packages/server/lib/browsers/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ export = {
this._handleDownloads(win, options.downloadsFolder, automation),
utils.initializeCDP(pageCriClient, automation),
// Ensure to clear browser state in between runs. This is handled differently in browsers when we launch new tabs, but we don't have that concept in electron
pageCriClient.send('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'all' }),
// Note that we are omitting `file_systems` as it is very non-performant to clear:
// https://github.com/cypress-io/cypress/pull/32703
pageCriClient.send('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'cookies,indexeddb,local_storage,shader_cache,service_workers,cache_storage,interest_groups,shared_storage' }),
pageCriClient.send('Network.clearBrowserCache'),
])
}
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/unit/browsers/cdp_automation_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,12 @@ context('lib/browsers/cdp_automation', () => {

describe('reset:browser:state', function () {
it('sends Storage.clearDataForOrigin and Network.clearBrowserCache', async function () {
this.sendDebuggerCommand.withArgs('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'all' }).resolves()
this.sendDebuggerCommand.withArgs('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'cookies,indexeddb,local_storage,shader_cache,service_workers,cache_storage,interest_groups,shared_storage' }).resolves()
this.sendDebuggerCommand.withArgs('Network.clearBrowserCache').resolves()

await this.onRequest('reset:browser:state')

expect(this.sendDebuggerCommand).to.be.calledWith('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'all' })
expect(this.sendDebuggerCommand).to.be.calledWith('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'cookies,indexeddb,local_storage,shader_cache,service_workers,cache_storage,interest_groups,shared_storage' })
expect(this.sendDebuggerCommand).to.be.calledWith('Network.clearBrowserCache')
})
})
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/unit/browsers/electron_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ describe('lib/browsers/electron', () => {
it('expects the browser to be reset', function () {
return electron._launch(this.win, this.url, this.automation, this.options, undefined, undefined, { attachCDPClient: sinon.stub() })
.then(() => {
expect(this.pageCriClient.send).to.be.calledWith('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'all' })
expect(this.pageCriClient.send).to.be.calledWith('Storage.clearDataForOrigin', { origin: '*', storageTypes: 'cookies,indexeddb,local_storage,shader_cache,service_workers,cache_storage,interest_groups,shared_storage' })
expect(this.pageCriClient.send).to.be.calledWith('Network.clearBrowserCache')
})
})
Expand Down
Loading