https://github.com/joomla/joomla-cms/blob/staging/tests/javascript/package.json
Joomla ships with jQuery 1.12 right now yet the tests appear to be using jQuery 2. Is there any particular reason for this? Seems like we'd be better off testing against the dependencies we use.
//cc @yvesh @Ruchiranga
Category | ⇒ | JavaScript Unit Tests |
Status | New | ⇒ | Discussion |
Labels |
Added:
?
|
You should probably look at an alternative. You cannot load jQuery 1.x and 3.1 as you'll run into conflicts. Joomla uses jQuery 1.x so surely this was taken into consideration beforehand?
No I was not suggesting loading both 1.x and 3.1 in running tests. We can use 3.1 for the JavaScript tests only.
But if keeping the versions similar in both Joomla and the tests is more important, we simply can drop the few test cases that require jQuery 3.1 too.
@C-Lodder @mbabker What are your thoughts?
To me it'd be better if the tests were running against the same versions we're using in production. If it were a difference in minor branches it'd be one thing, but we're talking about major version differences and jQuery has dropped browser support for browser's we're still supporting. It's great the tests are there, but if they're using versions of dependencies we aren't, it makes the test cases less accurate.
In PHP relations, it'd be like us writing a mail test suite against PHPMailer 6.0 even though we use 5.2 (which has several B/C breaking changes).
Agreed
Okay. I'll open a PR changing the jQuery version to 1.12.
And as for the test cases that need jQuery 3.1, I'll just drop them then. Thanks :)
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-26 18:24:55 |
Closed_By | ⇒ | brianteeman |
I agree. We can go with jQuery 1.12 here.
But the tests written for combobox.js needs the latest jQuery version (3.1.0) to run some of its tests successfully. Those test cases required triggering the Down arrow key
keyup
event and that only worked when the jQuery version was updated to the latest version.The combobox.js test suite has not yet been merged to the core. But when we do, we are going to need to have jQuery version 3.1.0. How do you suggest we handle that? :)