Check for Merge Request fixed

Fixed couple of spinach test
This commit is contained in:
Tim Zallmann 2017-05-29 11:28:20 +02:00
parent 6709e65cfc
commit 3374896071
4 changed files with 9 additions and 4 deletions

View file

@ -267,7 +267,8 @@
padding: 0 16px;
}
.separator + .dropdown-header, .separator + .dropdown-bold-header {
.separator + .dropdown-header,
.separator + .dropdown-bold-header {
padding-top: 2px;
}

View file

@ -22,7 +22,7 @@
- create_project_issue = can?(current_user, :create_issue, @project)
- merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project))
- create_project_snippet = can?(current_user, :create_project_snippet, @project)
- if (create_project_issue || create_project_mr || create_project_snippet)
- if (create_project_issue || merge_project || create_project_snippet)
%li.dropdown-bold-header This project
- if create_project_issue
%li

View file

@ -14,7 +14,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I click link "New Merge Request"' do
page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request')
page.within '#content-body' do
page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request')
end
end
step 'I click link "Bug NS-04"' do

View file

@ -23,7 +23,9 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end
step 'I click link "New snippet"' do
first(:link, "New snippet").click
page.within '#content-body' do
first(:link, "New snippet").click
end
end
step 'I click link "Snippet one"' do