-
Notifications
You must be signed in to change notification settings - Fork 60
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
fix #1411 load extrascripts in Classic Test Runner #1411
fix #1411 load extrascripts in Classic Test Runner #1411
Conversation
dc956e5
to
66a9333
Compare
This commit adds the possibility to load in the Classic Test Runner the extrascripts exposed in attester's config, when CTR is run in isolated mode. Previously, the extrascripts were injected by attester only to CTR's index page, but CTR had no possibility to propagate those scripts into the iframe when tests were run with `#runIsolated=true` in the URL. This commit needs attester/attester#121 integrated in attester in order for it to properly expose `before` and `after` extrascripts.
…unner This commit makes an iframe used to run the test in Classic Test Runner in isolated mode semi-transparent, in order to easily follow the progress of the test suite, which happens in background.
3522e5a
to
6104aab
Compare
…ated mode This commit adds the possibility to load in the Classic Test Runner the extrascripts exposed in attester's config, when CTR is run in isolated mode. Previously, the extrascripts were injected by attester only to CTR's index page, but CTR had no possibility to propagate those scripts into the iframe when tests were run with `#runIsolated=true` in the URL. This commit needs attester/attester#121 integrated in attester in order for it to properly expose `before` and `after` extrascripts.
This commit makes an iframe used to run the test in Classic Test Runner in isolated mode semi-transparent, in order to easily follow the progress of the test suite, which happens in background.
c33bc68
to
862baad
Compare
@divdavem I added a new commit removing It's a bit artificial to do it IMO but at least it doesn't break compat. I don't think it will be useful to store them per each document, I don't think it's really useful at all to do it, it should be developer's responsibility to not load things twice, but let's leave the original behavior for the main document. |
_injectExtraScriptsIntoFrame : function (subWindow, whereToInsert, callback) { | ||
var document = Aria.$window.document; | ||
var subDocument = subWindow.document; | ||
var scripts = document.querySelectorAll('script') || document.scripts; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
querySelectorAll
is not supported by IE7, whereas document.scripts
is not supported by Firefox < 9.
See https://developer.mozilla.org/en-US/docs/Web/API/Document/scripts and https://developer.mozilla.org/en/docs/Web/API/Document/querySelectorAll
I would reverse the order so that the line works in all browsers (including IE7):
var scripts = document.scripts || document.querySelectorAll('script');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, rather than using querySelectorAll
which is generic for all CSS selectors, you should probably use getElementsByTagName
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
862baad
to
748b672
Compare
…ated mode This commit adds the possibility to load in the Classic Test Runner the extrascripts exposed in attester's config, when CTR is run in isolated mode. Previously, the extrascripts were injected by attester only to CTR's index page, but CTR had no possibility to propagate those scripts into the iframe when tests were run with `#runIsolated=true` in the URL. This commit needs attester/attester#121 integrated in attester in order for it to properly expose `before` and `after` extrascripts.
This commit makes an iframe used to run the test in Classic Test Runner in isolated mode semi-transparent, in order to easily follow the progress of the test suite, which happens in background.
This commit makes an iframe used to run the test in Classic Test Runner in isolated mode semi-transparent, in order to easily follow the progress of the test suite, which happens in background.
…ated mode This commit adds the possibility to load in the Classic Test Runner the extrascripts exposed in attester's config, when CTR is run in isolated mode. Previously, the extrascripts were injected by attester only to CTR's index page, but CTR had no possibility to propagate those scripts into the iframe when tests were run with `#runIsolated=true` in the URL. This commit needs attester/attester#121 integrated in attester in order for it to properly expose `before` and `after` extrascripts.
748b672
to
5a5a780
Compare
@divdavem |
This commit adds the possibility to load in the Classic Test Runner the extrascripts exposed in attester's config, when CTR is run in isolated mode. Previously, the extrascripts were injected by attester only to CTR's index page, but CTR had no possibility to propagate those scripts into the iframe when tests were run with `#runIsolated=true` in the URL. This commit needs attester/attester#121 integrated in attester (to be released in attester 2.2.0) in order for it to properly expose `before` and `after` extrascripts. Close #1411
@divdavem thank you for the review! |
This commit makes an iframe used to run the test in Classic Test Runner in isolated mode semi-transparent, in order to easily follow the progress of the test suite, which happens in background. (cherry picked from commit dffd2ad)
(cherry picked from commit 538ad4e)
This commit adds the possibility to load in the Classic Test Runner the extrascripts exposed in attester's config, when CTR is run in isolated mode. Previously, the extrascripts were injected by attester only to CTR's index page, but CTR had no possibility to propagate those scripts into the iframe when tests were run with `#runIsolated=true` in the URL. This commit needs attester/attester#121 integrated in attester (to be released in attester 2.2.0) in order for it to properly expose `before` and `after` extrascripts. Close #1411 (cherry picked from commit b3ee82d)
This PR adds the possibility to load in the Classic Test Runner
the extrascripts exposed in attester's config, when CTR is run
in isolated mode.
Previously, the extrascripts were injected by attester only to CTR's
index page, but CTR had no possibility to propagate those scripts
into the iframe when tests were run with
#runIsolated=true
in the URL.This commit needs attester/attester#121
integrated in attester in order for it to properly expose
before
and
after
extrascripts.The other 2 commits are just minor visual improvements