-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore: add toggle to hide fetch requests #32658
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
base: develop
Are you sure you want to change the base?
Conversation
cypress
|
Project |
cypress
|
Branch Review |
alejandro/chore/hide-fetch-requests
|
Run status |
|
Run duration | 20m 28s |
Commit |
|
Committer | Alejandro Estrada |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
3
|
|
12
|
|
1102
|
|
4
|
|
26688
|
View all changes introduced in this branch ↗︎ |
Warning
Partial Report: The results for the Application Quality reports may be incomplete.
UI Coverage
45.24%
|
|
---|---|
|
185
|
|
157
|
Accessibility
97.95%
|
|
---|---|
|
4 critical
8 serious
2 moderate
2 minor
|
|
101
|
Tests for review
cypress/e2e/unit/events.cy.ts • 1 failed test • reporter
Test | Artifacts | |
---|---|---|
events > from runner > sets showFetchRequests on the app state on reporter:start |
Test Replay
Screenshots
|
src/components/Blank.cy.tsx • 1 failed test • app-ct
Test | Artifacts | |
---|---|---|
An uncaught error was detected outside of a test |
Test Replay
|
cypress/e2e/studio/studio.cy.ts • 1 failed test • app-e2e
Test | Artifacts | |
---|---|---|
Cypress Studio > creates a new test from an empty spec |
Test Replay
Screenshots
|
e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-electron
Test | Artifacts | |
---|---|---|
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary |
Test Replay
|
issues/28527.cy.ts • 1 flaky test • 5x-driver-electron
Test | Artifacts | |
---|---|---|
issue 28527 > fails and then retries and verifies about:blank is not displayed |
Test Replay
Screenshots
|
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
... > stops waiting when an xhr request is canceled |
|
Test | Artifacts | |||||||
---|---|---|---|---|---|---|---|---|
src/cy/commands/files > #readFile > retries to read when ENOENT |
|
Test | Artifacts | |
---|---|---|
issue 28527 > fails and then retries and verifies about:blank is not displayed |
Screenshots
|
The first 5 flaky specs are shown, see all 12 specs in Cypress Cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: UI Pref Not Applied on Reporter Start
The reporter:start
event handler is missing a call to initialize appState.showFetchRequests
from the startInfo
payload. This prevents the showFetchRequests
preference from being applied when the reporter starts, so the UI won't reflect the saved preference.
packages/reporter/cypress/e2e/unit/events.cy.ts#L204-L208
cypress/packages/reporter/cypress/e2e/unit/events.cy.ts
Lines 204 to 208 in b4e22b5
it('sets showFetchRequests on the app state on reporter:start', () => { | |
runner.on.withArgs('reporter:start').callArgWith(1, { showFetchRequests: false }) | |
expect(appState.setShowFetchRequests).to.have.been.calledWith(false) | |
}) |
packages/reporter/src/lib/events.ts#L107-L115
cypress/packages/reporter/src/lib/events.ts
Lines 107 to 115 in b4e22b5
})) | |
runner.on('test:set:state', action('test:set:state', (props: UpdatableTestProps, cb: UpdateTestCallback) => { | |
runnablesStore.updateTest(props, cb) | |
})) | |
runner.on('paused', action('paused', (nextCommandName: string) => { | |
appState.pause(nextCommandName) | |
statsStore.pause() |
packages/reporter/src/lib/events.ts#L132-L140
cypress/packages/reporter/src/lib/events.ts
Lines 132 to 140 in b4e22b5
})) | |
localBus.on('resume', action('resume', () => { | |
appState.resume() | |
statsStore.resume() | |
runner.emit('runner:resume') | |
})) | |
localBus.on('next', action('next', () => { |
|
||
if (model.name === 'request' && !appState.showFetchRequests) { | ||
return null | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?Note
Adds a user preference and toggle to show/hide HTTP (fetch) request logs, wired through GraphQL/local settings, runner events, reporter, and tests.
save:state
.Reporter
acceptsshowFetchRequests
and initializes app state;Command
hidesrequest
commands when disabled.AppState
with observableshowFetchRequests
plus setters/toggler; include insave:state
and set onreporter:start
.usePreferences
andlocalSettings.preferences
.showFetchRequests
toLocalSettingsPreferences
ingql-LocalSettings.ts
andschema.graphql
.ReporterStartInfo
,RunState
, and preferences (defaultPreferences
,allowedKeys
).showFetchRequests
through Vue runners (SpecRunnerOpenMode.vue
,event-manager.ts
,reporter.ts
), stores, and mocks.Written by Cursor Bugbot for commit b4e22b5. This will update automatically on new commits. Configure here.