diff options
Diffstat (limited to 'spec/features/merge_request/user_sees_versions_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_sees_versions_spec.rb | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/spec/features/merge_request/user_sees_versions_spec.rb b/spec/features/merge_request/user_sees_versions_spec.rb index cd62bab412a..cab86f3fd94 100644 --- a/spec/features/merge_request/user_sees_versions_spec.rb +++ b/spec/features/merge_request/user_sees_versions_spec.rb @@ -50,7 +50,7 @@ describe 'Merge request > User sees versions', :js do expect(page).to have_content 'latest version' end - expect(page).to have_content '8 files' + expect(page).to have_content '8 Files' end it_behaves_like 'allows commenting', @@ -84,7 +84,7 @@ describe 'Merge request > User sees versions', :js do end it 'shows comments that were last relevant at that version' do - expect(page).to have_content '5 files' + expect(page).to have_content '5 Files' position = Gitlab::Diff::Position.new( old_path: ".gitmodules", @@ -128,10 +128,12 @@ describe 'Merge request > User sees versions', :js do diff_id: merge_request_diff3.id, start_sha: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9' ) - expect(page).to have_content '4 files' + expect(page).to have_content '4 Files' - additions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group .js-file-addition-line').text - deletions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group .js-file-deletion-line').text + additions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group svg.ic-file-addition') + .ancestor('.diff-stats-group').text + deletions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group svg.ic-file-deletion') + .ancestor('.diff-stats-group').text expect(additions_content).to eq '15' expect(deletions_content).to eq '6' @@ -154,10 +156,12 @@ describe 'Merge request > User sees versions', :js do end it 'show diff between new and old version' do - additions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group .js-file-addition-line').text - deletions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group .js-file-deletion-line').text + additions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group svg.ic-file-addition') + .ancestor('.diff-stats-group').text + deletions_content = page.find('.diff-stats.is-compare-versions-header .diff-stats-group svg.ic-file-deletion') + .ancestor('.diff-stats-group').text - expect(page).to have_content '4 files' + expect(page).to have_content '4 Files' expect(additions_content).to eq '15' expect(deletions_content).to eq '6' end @@ -167,7 +171,7 @@ describe 'Merge request > User sees versions', :js do page.within '.mr-version-dropdown' do expect(page).to have_content 'latest version' end - expect(page).to have_content '8 files' + expect(page).to have_content '8 Files' end it_behaves_like 'allows commenting', @@ -193,7 +197,7 @@ describe 'Merge request > User sees versions', :js do find('.btn-default').click click_link 'version 1' end - expect(page).to have_content '0 files' + expect(page).to have_content '0 Files' end end @@ -219,7 +223,7 @@ describe 'Merge request > User sees versions', :js do expect(page).to have_content 'version 1' end - expect(page).to have_content '0 files' + expect(page).to have_content '0 Files' end end |