Skip to content

Allow to setup 'skip-js-error' option only for specified pages. #2775

Closed

Description

@miherlosev

Use case:
The tested site contains parts (ad blocks, external service pages and etc.) that have js errors and cannot be controlled by test writer.

We need a conditional behavior for this case:

  • for uncontrolled pages need to skip js errors.
  • for other pages need to handle js errors.

So, we need a way to setup 'skip-js-error' option only for specified pages.

Based on https://stackoverflow.com/questions/52031129/skip-js-errors-on-specific-test-cases

Activity

  1. changed the title [-]Allow to skip js error for specified pages[/-] [+]Allow to skip js error only for specified pages[/+] on Aug 27, 2018
  2. changed the title [-]Allow to skip js error only for specified pages[/-] [+]Allow to setup 'skip-js-error' option only for specified pages.[/+] on Aug 27, 2018
  3. ljowen commented on Aug 28, 2018

    @ljowen

    Perhaps instead of at the page level it could be done using the test controller:
    t.ignoreJSErrors(true / false)

  4. bxt commented on Jul 24, 2019

    @bxt

    Yes it seems to me this comes up somewhat regularly (#2033, #3747). In our case there is some ad-script on a 3rd party page that throws an error. And this means we have to set --skip-js-error for all tests. This is really sad, since:

    • we have to hope that errors get caught still by also breaking functionality
    • we have one less incentive for developers to handle errors properly
  5. self-assigned this
    on Jul 24, 2019
  6. self-assigned this
    on Jul 25, 2019
  7. aleks-pro commented on Jul 25, 2019

    @aleks-pro
    Collaborator

    Hello @bxt,

    Thank you for sharing your scenario with us. We will take it into account when we are ready to implement this feature.

  8. bartzielonka commented on Aug 22, 2019

    @bartzielonka

    Exactly the same problem as @bxt

    Other than that having many small wholes in TC (new tab opening, visibility checking...) because of that not able to write stable and efficient tests.

  9. 23 remaining items

  10. rushby commented on May 4, 2021

    @rushby

    This would be great to be able to overwrite the default config value within a particular test - we have issues loading certain external js files related to analytics within some pages owned by other teams which causes problems when doing a smoke test of our micro frontend.

  11. miherlosev commented on May 5, 2021

    @miherlosev
    CollaboratorAuthor

    Hi @rushby

    Thank you for sharing this use case. You can use a workaround until this feature is implemented.

  12. jbradenclickfunnels commented on Jan 17, 2022

    @jbradenclickfunnels

    Hello,

    We are also running into this with third party sites. It would be nice to set skipjserrors = true via the controller in a step in a test. Right now, it's just a global setting.

  13. knodschi commented on Feb 10, 2022

    @knodschi

    Same here, we have a specific test that throws an error which we have no control to (external script), now we need skip all js errors for all our tests. Would be really great if we could enable this option only on one test!

  14. jmosley5 commented on Feb 11, 2022

    @jmosley5

    Would really appreciate this as well. My hesitancy in skipping javascript errors globally is that my tests would miss something I need to see. Being able to set this by page or even by individual test would be incredibly helpful. Thank you!!

  15. miherlosev commented on Feb 28, 2022

    @miherlosev
    CollaboratorAuthor

    Hi @jmosley5,

    Thank you for your opinion. This feature has a high priority for us, and it is in our roadmap. You can use a workaround until this feature is implemented.

  16. github-actions commented on Aug 25, 2022

    @github-actions

    Release v2.0.0-rc.1 addresses this.

  17. github-actions commented on Aug 25, 2022

    @github-actions

    Release v2.0.0-rc.1 addresses this.

  18. added a commit that references this issue on Jul 15, 2025
    530a39a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions