diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2022-09-15 16:31:40 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2022-09-15 17:08:04 +0200 |
commit | 700875d90d391543e5ebd8ed96459f45351ad763 (patch) | |
tree | 8353c87dd13e01f206996baf8048ee758a656c7c /core/js | |
parent | 1bfac6d0941894677117144519d14f8f3ed455ec (diff) | |
download | nextcloud-server-700875d90d391543e5ebd8ed96459f45351ad763.tar.gz nextcloud-server-700875d90d391543e5ebd8ed96459f45351ad763.zip |
Rewrite OC.SystemTags.getDescriptiveTag to vanilla js
For every tag a deprecation warning is emitted.
With 10k tags the ui becomes unresponsive and inspector crashed occasionally.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/tests/specs/systemtags/systemtagsSpec.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/js/tests/specs/systemtags/systemtagsSpec.js b/core/js/tests/specs/systemtags/systemtagsSpec.js index f6d99e62a3c..7d7987e9cb3 100644 --- a/core/js/tests/specs/systemtags/systemtagsSpec.js +++ b/core/js/tests/specs/systemtags/systemtagsSpec.js @@ -22,8 +22,8 @@ describe('OC.SystemTags tests', function() { it('describes non existing tag', function() { var $return = OC.SystemTags.getDescriptiveTag('23'); - expect($return.text()).toEqual('Non-existing tag #23'); - expect($return.hasClass('non-existing-tag')).toEqual(true); + expect($return.textContent).toEqual('Non-existing tag #23'); + expect($return.classList.contains('non-existing-tag')).toEqual(true); }); it('describes SystemTagModel', function() { @@ -34,8 +34,8 @@ describe('OC.SystemTags tests', function() { userVisible: true }); var $return = OC.SystemTags.getDescriptiveTag(tag); - expect($return.text()).toEqual('Twenty Three'); - expect($return.hasClass('non-existing-tag')).toEqual(false); + expect($return.textContent).toEqual('Twenty Three'); + expect($return.classList.contains('non-existing-tag')).toEqual(false); }); it('describes JSON tag object', function() { @@ -45,8 +45,8 @@ describe('OC.SystemTags tests', function() { userAssignable: true, userVisible: true }); - expect($return.text()).toEqual('Fourty Two'); - expect($return.hasClass('non-existing-tag')).toEqual(false); + expect($return.textContent).toEqual('Fourty Two'); + expect($return.classList.contains('non-existing-tag')).toEqual(false); }); it('scope', function() { @@ -57,8 +57,8 @@ describe('OC.SystemTags tests', function() { userAssignable: userAssignable, userVisible: userVisible }); - expect($return.text()).toEqual(expectedText); - expect($return.hasClass('non-existing-tag')).toEqual(false); + expect($return.textContent).toEqual(expectedText); + expect($return.classList.contains('non-existing-tag')).toEqual(false); } testScope(true, true, 'Fourty Two'); |