Skip to content
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

chore: remove cypress log noise #1086

Merged
merged 3 commits into from
Mar 15, 2024
Merged

chore: remove cypress log noise #1086

merged 3 commits into from
Mar 15, 2024

Conversation

pauldambra
Copy link
Member

lifting these changes out of #1083

it was really hard to debug failing cypress tests because we had lots of log warnings and errors around our request interceptors missing requests or not returning expected responses...

well, not any more

@pauldambra pauldambra requested a review from a team March 15, 2024 12:55
@@ -287,7 +287,7 @@ describe('Event capture', () => {

// the code below is going to trigger an event capture
// we want to assert on the request
cy.intercept('POST', '**/e/*', async (request) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I could tell from testing

**/blah matches something/blah but not /blah so wasn't matching all requests the tests were making

Comment on lines +13 to +14
cy.intercept('POST', '/e/*', { status: 1 }).as('capture')
cy.intercept('POST', '/ses/*', { status: 1 }).as('session-recording')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json response so that rate limiter doesn't log an error

Comment on lines +25 to +27
cy.readFile('dist/array.full.js.map').then((body) => {
cy.intercept('/static/array.full.js.map', { body })
})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map file intercepts so we're serving the correct file when the browser requests it and not complaining in the logs

Copy link

github-actions bot commented Mar 15, 2024

Size Change: 0 B

Total Size: 941 kB

ℹ️ View Unchanged
Filename Size
dist/array.full.js 224 kB
dist/array.js 124 kB
dist/es.js 124 kB
dist/exception-autocapture.js 12.1 kB
dist/module.js 124 kB
dist/recorder-v2.js 106 kB
dist/recorder.js 106 kB
dist/surveys-module-previews.js 62 kB
dist/surveys.js 58.3 kB

compressed-size-action

@pauldambra pauldambra merged commit 59ac3f2 into main Mar 15, 2024
13 checks passed
@pauldambra pauldambra deleted the chore/cypress-noise branch March 15, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants