User tests: Successful: Unsuccessful:
The set of custom JavaScript libraries in Joomla does not have any tests. This PR contains a test suite that will be run, like the PHP unit tests, automatically for every pull request and commit with Travis.
Shown below are some screenshots of the Travis log with the JavaScript test results.
The Travis log will also show an overview of the test coverage achieved.
As testing framework we use Jasmine, which is run by Karma-Test Runner in a real Firefox browser.
Core JavaScript Libraries covered by this Pull Request:
The documentation is currently available here. This will be moved into the Joomla! documentation soon.
None, since this is only run on Travis. If you want to run it locally, please take a look at the documentation.
Demonstration video can be watched via this link.
Category | ⇒ | Repository Unit Tests JavaScript |
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Good work @Ruchiranga Looks really nice. Thanks to the GSOC Team!
Good work @Ruchiranga
@Ruchiranga That looks very cool. The video and your screenshots show when everything goes right. Can you post some shots of what happens when I break something with a code change?
@roland-d
Thanks!
Here is a screenshot of the Joomla.submitform
function in core.js.
And all the tests covering that function are passing.
Now here, I comment line form.setAttribute('novalidate', !validate)
mimicking a situation where we have mistakenly deleted that line of code.
As a result, the test case covering that line would fail. It will be shown in the log as follows.
The overall summary of the tests would also show that one test case is failing.
Thank you @gunjanpatel :)
@Ruchiranga Thank you for that explanation looks good. Good job.
I have tested this item
Milestone |
Added: |
||
Status | Pending | ⇒ | Ready to Commit |
Labels |
Tested with travis and in a local environment. I will merge on Review
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-12 15:43:53 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
Good job @Ruchiranga! One thing we might can add is that it is not needed that phpunit runs for the javascript tests so if we can exclude this we can have the result faster. No big deal at all.
Labels |
Removed:
?
|
The Travis log for the JavaScript tests in this PR is available here .
The JavaScript tests are run only on the build job shown below.