From c5083d5fc372b750ceea35d72cafa26562762b0c Mon Sep 17 00:00:00 2001 From: GeoSot Date: Wed, 17 Mar 2021 07:44:15 +0200 Subject: Use more safe check for 'isDisabled' helper (#33385) --- js/tests/unit/util/index.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/tests') diff --git a/js/tests/unit/util/index.spec.js b/js/tests/unit/util/index.spec.js index 24921d730..41c1ce2b8 100644 --- a/js/tests/unit/util/index.spec.js +++ b/js/tests/unit/util/index.spec.js @@ -347,16 +347,19 @@ describe('Util', () => { expect(Util.isDisabled(div2)).toEqual(true) }) - it('should return false if the element has disabled attribute with "false" value', () => { + it('should return false if the element has disabled attribute with "false" value, or doesn\'t have attribute', () => { fixtureEl.innerHTML = [ '
', '
', + '
', '
' ].join('') const div = fixtureEl.querySelector('#element') + const div1 = fixtureEl.querySelector('#element1') expect(Util.isDisabled(div)).toEqual(false) + expect(Util.isDisabled(div1)).toEqual(false) }) it('should return false if the element is not disabled ', () => { -- cgit v1.2.3