-
Notifications
You must be signed in to change notification settings - Fork 39
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
Interceptor overrides are disabled #120
Comments
Can you check here https://github.com/archfz/cypress-terminal-report/blob/master/src/collector/LogCollectCypressIntercept.js . I don't see how else this should be done, we are calling the previous overwrite. |
The code looks perfectly fine. Still, it seems to cause a side effect within cypress. |
Can you provide reproduction steps? |
beforeEach(() => {
cy.intercept("GET", "https://example.cypress.io/**", {fixture: "example.html"})
})
it('Should show test', () => {
cy.intercept("GET", "https://example.cypress.io/**", {fixture: "example2.html"})
cy.visit('https://example.cypress.io/todo')
cy.contains("Interceptor 2").should('be.visible')
})
it('Should show test', () => {
cy.intercept("GET", "https://example.cypress.io/**", {body: "<html lang='en'>Interceptor 3</html>"})
cy.visit('https://example.cypress.io/todo')
cy.contains("Interceptor 3").should('be.visible')
}) I have setup a minimal project with this bug: |
Yeah good catch. The issue is that somehow the return value of the original handler function of |
Fixed in 3.3.3. |
If interceptors override each other, then the newest matching interceptor should be called.
Somehow this plugin disables this order.
The workaround is to disable/remove 'cy:intercept' in options.collectTypes
The text was updated successfully, but these errors were encountered: