Skip to content
Snippets Groups Projects
Commit d9971094 authored by Fatih Acet's avatar Fatih Acet
Browse files

Spec fixes for removed UI elements.

parent 0b3369f8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -11,7 +11,7 @@
%span.caret
%ul.dropdown-menu
%li
%a.is-unselectable.js-diff-comments-button{ href: "#", data: { state: "visible" } }
%a.js-diff-comments-button{ href: "#", data: { state: "visible" } }
Hide all comments
%li
- if show_whitespace_toggle
Loading
Loading
@@ -20,10 +20,10 @@
- elsif current_controller?(:merge_requests)
= diff_merge_request_whitespace_link(@project, @merge_request, {})
- elsif current_controller?(:compare)
= diff_compare_whitespace_link(@project, params[:from], params[:to])
= diff_compare_whitespace_link(@project, params[:from], params[:to], {})
%li
- if !expand_all_diffs? && diff_files.any? { |diff_file| diff_file.collapsed? }
= link_to 'Expand all', url_for(params.merge(expand_all_diffs: 1, format: 'html')), class: 'is-unselectable'
= link_to 'Expand all', url_for(params.merge(expand_all_diffs: 1, format: 'html')), {class: 'expand-all'}
.btn-group
= inline_diff_btn
= parallel_diff_btn
Loading
Loading
Loading
Loading
@@ -194,7 +194,7 @@ Feature: Project Merge Requests
And I visit merge request page "Bug NS-05"
And I click on the Changes tab
And I leave a comment like "Line is wrong" on line 39 of the third file
And I click link "Hide inline discussion" of the third file
And I click link "Hide inline discussion" button
Then I should not see a comment like "Line is wrong here" in the third file
 
@javascript
Loading
Loading
@@ -212,9 +212,8 @@ Feature: Project Merge Requests
And I click on the Changes tab
And I leave a comment like "Line is correct" on line 12 of the second file
And I leave a comment like "Line is wrong" on line 39 of the third file
And I click link "Hide inline discussion" of the third file
And I click link "Hide inline discussion" button
Then I should not see a comment like "Line is wrong here" in the third file
And I should still see a comment like "Line is correct" in the second file
 
@javascript
Scenario: I show comments on a merge request diff with comments in multiple files
Loading
Loading
@@ -223,8 +222,8 @@ Feature: Project Merge Requests
And I click on the Changes tab
And I leave a comment like "Line is correct" on line 12 of the second file
And I leave a comment like "Line is wrong" on line 39 of the third file
And I click link "Hide inline discussion" of the third file
And I click link "Show inline discussion" of the third file
And I click link "Hide inline discussion" button
And I click link "Show inline discussion" button
Then I should see a comment like "Line is wrong" in the third file
And I should still see a comment like "Line is correct" in the second file
 
Loading
Loading
Loading
Loading
@@ -401,15 +401,17 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
end
 
step 'I click link "Hide inline discussion" of the third file' do
page.within '.files [id^=diff]:nth-child(3)' do
find('.js-toggle-diff-comments').trigger('click')
step 'I click link "Hide inline discussion" button' do
page.within '#diffs' do
find('.inline-parallel-buttons [data-toggle=dropdown]').trigger('click')
find('.js-diff-comments-button').trigger('click')
end
end
 
step 'I click link "Show inline discussion" of the third file' do
page.within '.files [id^=diff]:nth-child(3)' do
find('.js-toggle-diff-comments').trigger('click')
step 'I click link "Show inline discussion" button' do
page.within '#diffs' do
find('.inline-parallel-buttons [data-toggle=dropdown]').trigger('click')
find('.js-diff-comments-button').trigger('click')
end
end
 
Loading
Loading
Loading
Loading
@@ -210,7 +210,8 @@ feature 'Expand and collapse diffs', js: true, feature: true do
 
context 'expanding all diffs' do
before do
click_link('Expand all')
find('.inline-parallel-buttons [data-toggle=dropdown]').trigger('click')
find('.inline-parallel-buttons .expand-all').trigger('click')
wait_for_ajax
execute_script('window.ajaxUris = []; $(document).ajaxSend(function(event, xhr, settings) { ajaxUris.push(settings.url) });')
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment