diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2019-08-08 09:04:29 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-08-08 09:04:29 +0000 |
commit | 8505049e1f2510642715d9bfd56fc022cd42caf0 (patch) | |
tree | a682a7e14c74a90ff723141c1a7c9abf79ca5cc1 /spec/javascripts | |
parent | 400da76d5e6db4c9ea8180d20366e04dc4f36651 (diff) | |
parent | 85e0eb472dc33ae561c4b04b498c61f91fb7aa3e (diff) | |
download | gitlab-ce-8505049e1f2510642715d9bfd56fc022cd42caf0.tar.gz |
Merge branch '63181-collapsible-line' into 'master'
Makes section title clickable and collapsible
Closes #63181
See merge request gitlab-org/gitlab-ce!31571
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/jobs/components/job_log_spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/javascripts/jobs/components/job_log_spec.js b/spec/javascripts/jobs/components/job_log_spec.js index 7e2ec2ec3f7..3485eec7763 100644 --- a/spec/javascripts/jobs/components/job_log_spec.js +++ b/spec/javascripts/jobs/components/job_log_spec.js @@ -98,5 +98,25 @@ describe('Job Log', () => { .then(done) .catch(done.fail); }); + + it('toggles hidden class to the sibilings rows when header section is clicked', done => { + vm.$nextTick() + .then(() => { + const { section } = vm.$el.querySelector('.js-section-header').dataset; + vm.$el.querySelector('.js-section-header').click(); + + vm.$el.querySelectorAll(`.js-s-${section}:not(.js-section-header)`).forEach(el => { + expect(el.classList.contains('hidden')).toEqual(true); + }); + + vm.$el.querySelector('.js-section-header').click(); + + vm.$el.querySelectorAll(`.js-s-${section}:not(.js-section-header)`).forEach(el => { + expect(el.classList.contains('hidden')).toEqual(false); + }); + }) + .then(done) + .catch(done.fail); + }); }); }); |