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

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

Closed
miherlosev opened this issue Aug 27, 2018 · 21 comments
Closed

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

miherlosev opened this issue Aug 27, 2018 · 21 comments
Assignees
Labels
FREQUENCY: level 2 SYSTEM: API TYPE: enhancement The accepted proposal for future implementation.

Comments

@miherlosev
Copy link
Collaborator

miherlosev commented Aug 27, 2018

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

@miherlosev miherlosev added TYPE: enhancement The accepted proposal for future implementation. SYSTEM: API labels Aug 27, 2018
@miherlosev miherlosev changed the title Allow to skip js error for specified pages Allow to skip js error only for specified pages Aug 27, 2018
@miherlosev miherlosev changed the title Allow to skip js error only for specified pages Allow to setup 'skip-js-error' option only for specified pages. Aug 27, 2018
@ljowen
Copy link

ljowen commented Aug 28, 2018

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

@bxt
Copy link

bxt commented Jul 24, 2019

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

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 24, 2019
@miherlosev miherlosev self-assigned this Jul 24, 2019
@aleks-pro aleks-pro self-assigned this Jul 25, 2019
@aleks-pro
Copy link
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.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jul 25, 2019
@bartzielonka
Copy link

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.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 22, 2019
@miherlosev miherlosev removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 23, 2019
@GrafDa
Copy link

GrafDa commented Sep 2, 2019

We would also appreciate to get this new feature.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 2, 2019
@arubtsov arubtsov removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 2, 2019
@alienintheheights
Copy link

Need this too. Hammerhead is super flakey already with our application's ajax calls. Now we have a thirdparty JS window that does a window.setTimeout which causes to hammerhead to blow up. We have no way to trap the error without disabling it for all of our tests.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 9, 2020
@Dmitry-Ostashev
Copy link
Contributor

@alienintheheights Could you describe your case in greater detail? Does your test lead to any exceptions in Hammerhead scripts?

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 10, 2020
@pterofractal
Copy link

This would also help us. A few of my test cases involve validating I can visit another site which often has a ton of JS errors. Being able to skip JS errors for a single test would be convenient.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 10, 2020
@AlexSkorkin AlexSkorkin removed the STATE: Need response An issue that requires a response or attention from the team. label Apr 13, 2020
@gothraven
Copy link

gothraven commented Apr 30, 2020

Took like two years to decide that this is a very interesting feature ? we can tell from @bxt that much people would need it.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 30, 2020
@miherlosev
Copy link
Collaborator Author

Hi @gothraven

We confirm that this a good extension of the skip-j-error feature. But it's not what we plan to implement in the near future. At present, we are working on two large features: Capability to perform testing in multiple browser windows and Selector Debug Panel. After these features are implemented, we will concentrate our resources on other features.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Apr 30, 2020
@gothraven
Copy link

@miherlosev is there any way I can help with this small feature ?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 30, 2020
@AlexSkorkin
Copy link
Collaborator

AlexSkorkin commented May 1, 2020

@gothraven, You can submit your PR with this feature implementation.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 1, 2020
@miherlosev
Copy link
Collaborator Author

miherlosev commented Oct 9, 2020

Guys,

There is an example that demonstrates how to extend the built-in error tracking functionality and skip JavaScript errors by a predicate function.

@AndreyBelym AndreyBelym added STATE: Stale An outdated issue that will be automatically closed by the Stale bot. FREQUENCY: level 2 and removed STATE: Stale An outdated issue that will be automatically closed by the Stale bot. labels Oct 19, 2020
@rushby
Copy link

rushby commented May 4, 2021

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.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 4, 2021
@miherlosev
Copy link
Collaborator Author

Hi @rushby

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

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 5, 2021
@jbradenclickfunnels
Copy link

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.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 17, 2022
@knodschi
Copy link

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!

@jmosley5
Copy link

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!!

@miherlosev
Copy link
Collaborator Author

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.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Feb 28, 2022
Enhancements processing automation moved this from New Features & APIs to Closed Aug 25, 2022
@github-actions
Copy link

Release v2.0.0-rc.1 addresses this.

1 similar comment
@github-actions
Copy link

Release v2.0.0-rc.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 SYSTEM: API TYPE: enhancement The accepted proposal for future implementation.
Projects
No open projects
Development

No branches or pull requests