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
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-04-17 18:22:44 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-04-17 18:25:58 +0300
commit836bdc2141f93e8619998b59467842ac2bf45a8c (patch)
tree5fc0aedddca1cb5d274003b493bd7aca6df65a6d /spec
parentaed60daacbecee25975205d0c2896c83642e165d (diff)
Merge branch '45271-collpased-diff-loading' into 'master'
Resolve "Collapsed diff spacing wrong when failed to load" Closes #45271 and #45317 See merge request gitlab-org/gitlab-ce!18351
Diffstat (limited to 'spec')
-rw-r--r--spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb b/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb
index 565e375600b..3b6fffb7abd 100644
--- a/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb
+++ b/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb
@@ -27,6 +27,23 @@ describe 'Merge request > User scrolls to note on load', :js do
expect(fragment_position_top).to be < (page_scroll_y + page_height)
end
+ it 'renders un-collapsed notes with diff' do
+ page.current_window.resize_to(1000, 1000)
+
+ visit "#{project_merge_request_path(project, merge_request)}#{fragment_id}"
+
+ page.execute_script "window.scrollTo(0,0)"
+
+ note_element = find(fragment_id)
+ note_container = note_element.ancestor('.js-toggle-container')
+
+ expect(note_element.visible?).to eq true
+
+ page.within note_container do
+ expect(page).not_to have_selector('.js-error-lazy-load-diff')
+ end
+ end
+
it 'expands collapsed notes' do
visit "#{project_merge_request_path(project, merge_request)}#{collapsed_fragment_id}"
note_element = find(collapsed_fragment_id)