-
Notifications
You must be signed in to change notification settings - Fork 356
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
Jasmine - upgrade to 3.4.0, use chrome headless backend #5437
Conversation
@miq-bot add_label wip |
fails with: ``` catalogItemFormController #resetClicked resets value of name field to initial value Uncaught TypeError: Cannot read property 'catalog_id' of undefined thrown ``` no more details, and I have no idea where it gets thrown from. Fortunately the test just sets a var and tests it's there, so, removing.
jasmine now needs all the assets to be precompiled, had to add jasmine-jquery and angular-mocks to precompile. And our tests fail in random mode, disabling.
This reverts commit 0cd4688.
instead of phantomjs this means `rake environment jasmine:ci` will now use google-chrome-beta to run tests
jasmine ignores the `random: false` option in `jasmine.yml` when running via `rake environment jasmine`. So, adding a message that will appear before the default blob: ```diff +Please open http://localhost:8888/?random=false Disabling webmock! your server is running here: http://localhost:8888/ your tests are here: /home/himdel/manageiq-ui-classic/spec/javascripts your source files are here: /home/himdel/manageiq-ui-classic/app/assets ```
Some comments on commits https://github.com/himdel/manageiq-ui-classic/compare/7338e9b0ea7f748b15f075d4110bb83647e21bfb~...3896880a51f35097c56b579358bd30fccca27f55 Rakefile
|
Checked commits https://github.com/himdel/manageiq-ui-classic/compare/7338e9b0ea7f748b15f075d4110bb83647e21bfb~...3896880a51f35097c56b579358bd30fccca27f55 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 Rakefile
spec/javascripts/support/jasmine_helper.rb
|
@miq-bot remove_label wip |
Right now, it looks like 9 out of the last 17 travis runs on master failed on spec:javascript:
Attempting to fix that.
The actual failure comes from phantomjs sometimes not managing to load the page, failing with:
(details in #5432)
Which is rather non-specific.
But, changing the backend from phantomjs to chrome headless fixes that (details in #5433).
The first jasmine gem version with support for chrome headless is 3.4.0 (also, the current latest),
so upgrading to that.
We had to fix the version to 2.5 when 2.6 came out, in #1148, but I don't see any info on why it failed, and .. it doesn't seem to fail now.
Jasmine 3.4.0 is a bit different in that it tries to run tests in random order by default. Leading to many failures (between 8 and 30ish) in our tests.
So, hacking the
rake environment jasmine
task to also outputPlease open http://localhost:8888/?random=false
so that people get it right locally.I also had to remove one random test, but it was one that was testing that the value it set was set, so, meh :).
Also had to add 2 test-only assets to the precompile list, as jasmine 3* fails trying to load non-precompiled assets.
This also means we're no longer testing our code in an old-browser-like environment.