Commit 965fe3b8 authored by Rémy Coutable's avatar Rémy Coutable

Fix buttons copy in specs

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 5ffe05df
...@@ -34,7 +34,7 @@ class Spinach::Features::GroupHooks < Spinach::FeatureSteps ...@@ -34,7 +34,7 @@ class Spinach::Features::GroupHooks < Spinach::FeatureSteps
step 'I submit new hook' do step 'I submit new hook' do
@url = 'http://example.org' @url = 'http://example.org'
fill_in "hook_url", with: @url fill_in "hook_url", with: @url
expect { click_button "Add Webhook" }.to change(GroupHook, :count).by(1) expect { click_button "Add webhook" }.to change(GroupHook, :count).by(1)
end end
step 'I should see newly created hook' do step 'I should see newly created hook' do
......
...@@ -18,12 +18,12 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps ...@@ -18,12 +18,12 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps
end end
step 'merge request is mergeable' do step 'merge request is mergeable' do
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
step 'I should see ff-only merge button' do step 'I should see ff-only merge button' do
expect(page).to have_content "Fast-forward merge without a merge commit" expect(page).to have_content "Fast-forward merge without a merge commit"
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
step 'merge request "Bug NS-05" is mergeable' do step 'merge request "Bug NS-05" is mergeable' do
...@@ -32,7 +32,7 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps ...@@ -32,7 +32,7 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps
step 'I accept this merge request' do step 'I accept this merge request' do
page.within '.mr-state-widget' do page.within '.mr-state-widget' do
click_button "Accept Merge Request" click_button "Accept merge request"
end end
end end
......
...@@ -614,13 +614,13 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -614,13 +614,13 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see the merge button disabled' do step 'I should see the merge button disabled' do
page.within '.mr-state-widget' do page.within '.mr-state-widget' do
expect(page).to have_button('Accept Merge Request', disabled: true) expect(page).to have_button('Accept merge request', disabled: true)
end end
end end
step 'I should not see merge button' do step 'I should not see merge button' do
page.within '.mr-state-widget' do page.within '.mr-state-widget' do
expect(page).not_to have_button('Accept Merge Request') expect(page).not_to have_button('Accept merge request')
end end
end end
...@@ -632,7 +632,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -632,7 +632,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see approved merge request "Bug NS-04"' do step 'I should see approved merge request "Bug NS-04"' do
page.within '.mr-state-widget' do page.within '.mr-state-widget' do
expect(page).to have_button('Accept Merge Request', disabled: false) expect(page).to have_button('Accept merge request', disabled: false)
end end
end end
......
...@@ -18,7 +18,7 @@ feature 'Merge With Push Rules Validation', feature: true, js: true do ...@@ -18,7 +18,7 @@ feature 'Merge With Push Rules Validation', feature: true, js: true do
end end
it 'displays error message after merge request is clicked' do it 'displays error message after merge request is clicked' do
click_button 'Accept Merge Request' click_button 'Accept merge request'
expect(page).to have_content('Merge in progress') expect(page).to have_content('Merge in progress')
expect(page).to have_content('This merge request failed to be merged automatically') expect(page).to have_content('This merge request failed to be merged automatically')
...@@ -35,7 +35,7 @@ feature 'Merge With Push Rules Validation', feature: true, js: true do ...@@ -35,7 +35,7 @@ feature 'Merge With Push Rules Validation', feature: true, js: true do
end end
it 'displays error message after merge request is clicked' do it 'displays error message after merge request is clicked' do
click_button 'Accept Merge Request' click_button 'Accept merge request'
expect(page).to have_content('Merge in progress') expect(page).to have_content('Merge in progress')
expect(page).to have_content('This merge request failed to be merged automatically') expect(page).to have_content('This merge request failed to be merged automatically')
......
...@@ -57,8 +57,8 @@ describe ChatMessage::MergeMessage, models: true do ...@@ -57,8 +57,8 @@ describe ChatMessage::MergeMessage, models: true do
it 'returns a message regarding approval of merge requests' do it 'returns a message regarding approval of merge requests' do
expect(subject.pretext).to eq( expect(subject.pretext).to eq(
'test.user approved <http://somewhere.com/merge_requests/100|merge request !100> '\ 'test.user approved <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> '\
'in <http://somewhere.com|project_name>: *Issue title*') 'in <http://somewhere.com|project_name>: *Merge Request title*')
expect(subject.attachments).to be_empty expect(subject.attachments).to be_empty
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment