summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-05-29 14:49:28 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-05-29 14:49:28 +0000
commit8f1dd45aa23a893dfc7bbbafad2872b0c60b3a0b (patch)
tree4ae31dcfac3a7a1cecb1fde378a08f843a7b8daa /spec/features
parent4c74936f4567ba142bcd9ca31c8f5f10c8aa52fa (diff)
downloadgitlab-ce-8f1dd45aa23a893dfc7bbbafad2872b0c60b3a0b.tar.gz
Resolve "Merge request spinner spins forever after loading the diff"
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/merge_requests/user_views_diffs_spec.rb4
-rw-r--r--spec/features/users/user_browses_projects_on_user_page_spec.rb16
2 files changed, 14 insertions, 6 deletions
diff --git a/spec/features/projects/merge_requests/user_views_diffs_spec.rb b/spec/features/projects/merge_requests/user_views_diffs_spec.rb
index 295eb02b625..d36aafdbc54 100644
--- a/spec/features/projects/merge_requests/user_views_diffs_spec.rb
+++ b/spec/features/projects/merge_requests/user_views_diffs_spec.rb
@@ -26,6 +26,10 @@ describe 'User views diffs', :js do
expect(page).to have_css('#inline-diff-btn', count: 1)
end
+ it 'hides loading spinner after load' do
+ expect(page).not_to have_selector('.mr-loading-status .loading', visible: true)
+ end
+
context 'when in the inline view' do
include_examples 'unfold diffs'
end
diff --git a/spec/features/users/user_browses_projects_on_user_page_spec.rb b/spec/features/users/user_browses_projects_on_user_page_spec.rb
index 7bede0b0d48..5478e38ce70 100644
--- a/spec/features/users/user_browses_projects_on_user_page_spec.rb
+++ b/spec/features/users/user_browses_projects_on_user_page_spec.rb
@@ -26,18 +26,23 @@ describe 'Users > User browses projects on user page', :js do
end
end
+ it 'hides loading spinner after load', :js do
+ visit user_path(user)
+ click_nav_link('Personal projects')
+
+ wait_for_requests
+
+ expect(page).not_to have_selector('.loading-status .loading', visible: true)
+ end
+
it 'paginates projects', :js do
project = create(:project, namespace: user.namespace, updated_at: 2.minutes.since)
project2 = create(:project, namespace: user.namespace, updated_at: 1.minute.since)
allow(Project).to receive(:default_per_page).and_return(1)
sign_in(user)
-
visit user_path(user)
-
- page.within('.user-profile-nav') do
- click_link('Personal projects')
- end
+ click_nav_link('Personal projects')
wait_for_requests
@@ -92,7 +97,6 @@ describe 'Users > User browses projects on user page', :js do
click_nav_link('Personal projects')
expect(title).to start_with(user.name)
-
expect(page).to have_content(private_project.name)
expect(page).to have_content(public_project.name)
expect(page).to have_content(internal_project.name)