-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(config): a 3rd option to run the tests by dynamically loading test scripts without using iframe or new window #2542
feat(config): a 3rd option to run the tests by dynamically loading test scripts without using iframe or new window #2542
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
@dignifiedquire what do you think? |
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.
Thank you, this looks mostly good but some things are missing
- tests: there should be at e2e test using this functionality in phantomjs and firefox
- documentation: please add documentation and a description of this feature and when to use it. Also what its limitations are
- there should be an option to override
client_with_context.html
in the same way the other templates can be overridden.
console.log
Outdated
PhantomJS 2.1.1 (Linux 0.0.0) | ||
PhantomJS 2.1.1 (Linux 0.0.0) | ||
PhantomJS 2.1.1 (Linux 0.0.0) | ||
PhantomJS 2.1.1 (Linux 0.0.0) |
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.
this seems like an unrelated change
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.
Not even sure why this file exists in the first place tbh
static/client_with_context.html.html
Outdated
@@ -0,0 +1,125 @@ | |||
|
|||
<!DOCTYPE html> |
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.
.html.html
?
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.
my bad
Thanks! I have added a e2e test case to cover the scenario (first time writing test case on cucumberjs, let me know if I do sth wrong) and updated the documentation on configuration. I am not sure the part on overriding client_with_context.html in the same way the other templates can be overridden, can you elaborate more? |
I have added a e2e test case to cover the scenario (first time writing test case on cucumberjs, let me know if I do sth wrong) and updated the documentation on configuration. I am not sure the part on overriding client_with_context.html in the same way the other templates can be overridden, can you elaborate more? |
there is an config option |
Thanks! I have added the option. Please review. |
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.
Add an option to override client_with_context.html
…g in parent mode without iframe Back in karma-runner#2542, a third option to run tests without iframe is implemented, mostly for lightweight browser. This fix is to include file type so files like .css would able to load properly.
…nt mode without iframe Back in karma-runner#2542, a third option to run tests without iframe is implemented, mostly for lightweight browser. It only allows script element to be loaded dynamically. This fix includes file type like .css to be loaded properly.
…nt mode without iframe (#3289) * fix(client): Includes attributes like type in script tags when running in parent mode without iframe Back in #2542, a third option to run tests without iframe is implemented, mostly for lightweight browser. It only allows script element to be loaded dynamically. This fix includes file type like .css to be loaded properly. Fixes #3289
Implement a new option for user to run their test. The new option doesn't use iframe or a new window to run the tests. It combines both client.html and context.html files and then load the scripts dynamically when execute is received. The call flow remains the same as the other two options. This solution is used on our project that we need to support a lightweight browser which does not support both iframe and opening a new window. Since the scripts are loaded dynamically, the loading time is longer than the other two options.