diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2019-08-06 19:11:13 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-08-07 18:42:17 +0300 |
commit | 85e0eb472dc33ae561c4b04b498c61f91fb7aa3e (patch) | |
tree | 6a0275744ff9c679e7a51cbf18b7edaa6cd1ea5b /spec/features | |
parent | 4aa824e7059889c7b8badb4bd43cc44f9a01201f (diff) |
Makes title section collapsible
In the job log, if the user clicks the section title
the job log section will be collapsed
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/jobs/user_browses_job_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/projects/jobs/user_browses_job_spec.rb b/spec/features/projects/jobs/user_browses_job_spec.rb index 6d0269dd96b..1b277e17b0c 100644 --- a/spec/features/projects/jobs/user_browses_job_spec.rb +++ b/spec/features/projects/jobs/user_browses_job_spec.rb @@ -50,6 +50,20 @@ describe 'User browses a job', :js do expect(page).not_to have_content(text_to_hide) expect(page).to have_content(text_to_show) end + + it 'collapses the section header clicked' do + wait_for_requests + text_to_hide = "Cloning into '/nolith/ci-tests'" + text_to_show = 'Waiting for pod' + + expect(page).to have_content(text_to_hide) + expect(page).to have_content(text_to_show) + + first('.js-section-header.js-s-get-sources').click + + expect(page).not_to have_content(text_to_hide) + expect(page).to have_content(text_to_show) + end end context 'when job trace contains sections' do |