summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorOlivier Dony <odo@odoo.com>2020-07-16 14:32:03 +0000
committerOlivier Dony <odo@odoo.com>2020-07-17 14:36:08 +0000
commit2e17c0458c63661672b25b1a2fe7b46226d09381 (patch)
tree0b0c5926182f3807f68af60b765fff0cc28a0692 /addons/web/static/tests/fields/basic_fields_tests.js
parentc580197a20021931910a0531b5e7eb577a2d428f (diff)
[FIX] web: tests: fix typos in :{last,first}-child
Follow-up of odoo/enterprise#11881, in order to eliminate all similar typos. The CSS pseudo-class selectors are spelled `:first-child` and `:last-child`, and never take any argument, as opposed to `:nth-child(<nth>)` for example. Ref: https://developer.mozilla.org/docs/Web/CSS/Pseudo-classes jQuery doesn't care and matches with or without the `()`, but CSS engines don't, and now libsass SCSS compilation crashes due to the empty argument list (cfr. opw-2299465) Better avoid confusion and fix the typo everywhere. closes odoo/odoo#54685 X-original-commit: 82244e17339615615535073e6f9e1ddbcf0b57d9 Signed-off-by: Richard Mathot (rim) <rim@openerp.com> Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
-rw-r--r--addons/web/static/tests/fields/basic_fields_tests.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js
index 5f537db41eb..504d69dff69 100644
--- a/addons/web/static/tests/fields/basic_fields_tests.js
+++ b/addons/web/static/tests/fields/basic_fields_tests.js
@@ -4323,13 +4323,13 @@ QUnit.module('basic_fields', {
await testUtils.form.clickCreate(form);
testUtils.dom.openDatepicker(form.$('.o_datepicker'));
- $.each($('.day:last-child(),.day:nth-child(2)'), function (index, value) {
+ $.each($('.day:last-child,.day:nth-child(2)'), function (index, value) {
assert.hasClass(value, 'disabled', 'first and last days must be disabled');
});
// the assertions below could be replaced by a single hasClass classic on the jQuery set using the idea
// All not <=> not Exists. But we want to be sure that the set is non empty. We don't have an helper
// function for that.
- $.each($('.day:not(:last-child()):not(:nth-child(2))'), function (index, value) {
+ $.each($('.day:not(:last-child):not(:nth-child(2))'), function (index, value) {
assert.doesNotHaveClass(value, 'disabled', 'other days must stay clickable');
});
form.destroy();