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

Ensure we fail tests when a javascript exception happens #9539

Merged
merged 1 commit into from
Jul 27, 2018

Conversation

stefwalter
Copy link
Contributor

@stefwalter stefwalter commented Jun 29, 2018

When PhantomJS was used we used to fail integration testing on every javascript exception. That is no longer the case with headless-chromium.

@stefwalter
Copy link
Contributor Author

Oo it looks like #8275 regressed the fact that integration tests should treat any javascript exception as a failure

@stefwalter
Copy link
Contributor Author

@martinpitt How do we get tests to fail when an exception happens. I added an exception and it needs to cause the integration testing to fail.


b.switch_to_top()
b.wait_visible("#navbar-oops")
b.wait_visible("#navbar-oops")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It may be that we remove these lines, if it turns out that in order to catch errors via the CDP driver, we have to disable the Ooops error handling in Cockpit.

Copy link
Member

Choose a reason for hiding this comment

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

I just tested this, and this isn't necessary. I posted #9639 that puts back failling on unhandled exceptions, and the check-menu test here now picks this up.

@martinpitt martinpitt self-assigned this Jul 11, 2018
@stefwalter stefwalter changed the title WIP Ensure we fail tests when a javascript exception happens Ensure we fail tests when a javascript exception happens Jul 12, 2018
@stefwalter stefwalter added the blocked Don't land until something else happens first (see task list) label Jul 12, 2018
@martinpitt martinpitt removed the blocked Don't land until something else happens first (see task list) label Jul 27, 2018
@martinpitt
Copy link
Member

@stefwalter #9639 landed. The playground page and explicit test still sounds useful, I suppose you want to salvage that?

@martinpitt
Copy link
Member

I rebased, made the test a bit nicer and more robust, and fixed some tab damage.

@martinpitt martinpitt merged commit 2d72f50 into cockpit-project:master Jul 27, 2018
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.

None yet

2 participants