diff options
author | Rajat Jain <rjain@gitlab.com> | 2019-07-02 18:03:45 +0530 |
---|---|---|
committer | Rajat Jain <rjain@gitlab.com> | 2019-07-02 23:17:49 +0530 |
commit | 2302385cce79b7407d73acccd190f77e55370f04 (patch) | |
tree | 759bc06794f26f411d441cbe1961589bc09a0c37 /spec/features/groups/issues_spec.rb | |
parent | c6861b189b7faaf385bd397fd41ba93ed5649f25 (diff) | |
download | gitlab-ce-2302385cce79b7407d73acccd190f77e55370f04.tar.gz |
Don't let logged out user do manual orderrj-fix-manual-order
Add a check for logged out user in the manual order
so that they don't see an flash message when they try to
reorder issues.
Diffstat (limited to 'spec/features/groups/issues_spec.rb')
-rw-r--r-- | spec/features/groups/issues_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index c000165ccd9..0ada530781c 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -150,6 +150,25 @@ describe 'Group issues page' do check_issue_order end + it 'issues should not be draggable when user is not logged in', :js do + sign_out(user_in_group) + + visit issues_group_path(group, sort: 'relative_position') + + drag_to(selector: '.manual-ordering', + from_index: 0, + to_index: 2) + + wait_for_requests + + # Issue order should remain the same + page.within('.manual-ordering') do + expect(find('.issue:nth-child(1) .title')).to have_content('Issue #1') + expect(find('.issue:nth-child(2) .title')).to have_content('Issue #2') + expect(find('.issue:nth-child(3) .title')).to have_content('Issue #3') + end + end + def check_issue_order page.within('.manual-ordering') do expect(find('.issue:nth-child(1) .title')).to have_content('Issue #2') |