Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-06-27 00:51:53 +0300
committerStan Hu <stanhu@gmail.com>2019-06-27 00:51:53 +0300
commit25b3d905a02c9e9133a32786f167b70bf94d587c (patch)
tree50620909c2dbd4c1b5c499b322b8473d80bb86f5
parent62a5a6b62108456a92d41df5cfe4b1ad311de538 (diff)
Properly check that issue list has persisted
A valid user needs to be signed in, and we need to reload the page to verify that the issue list was saved on the backend.
-rw-r--r--spec/features/groups/issues_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb
index c21accac698..c000165ccd9 100644
--- a/spec/features/groups/issues_spec.rb
+++ b/spec/features/groups/issues_spec.rb
@@ -102,10 +102,16 @@ describe 'Group issues page' do
end
context 'manual ordering' do
+ let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user }
+
let!(:issue1) { create(:issue, project: project, title: 'Issue #1', relative_position: 1) }
let!(:issue2) { create(:issue, project: project, title: 'Issue #2', relative_position: 2) }
let!(:issue3) { create(:issue, project: project, title: 'Issue #3', relative_position: 3) }
+ before do
+ sign_in(user_in_group)
+ end
+
it 'displays all issues' do
visit issues_group_path(group, sort: 'relative_position')
@@ -135,6 +141,16 @@ describe 'Group issues page' do
from_index: 0,
to_index: 2)
+ wait_for_requests
+
+ check_issue_order
+
+ visit issues_group_path(group, sort: 'relative_position')
+
+ check_issue_order
+ end
+
+ def check_issue_order
page.within('.manual-ordering') do
expect(find('.issue:nth-child(1) .title')).to have_content('Issue #2')
expect(find('.issue:nth-child(2) .title')).to have_content('Issue #3')