Commit e4e6b34e authored by Tim Zallmann's avatar Tim Zallmann

Check for Merge Request fixed

Fixed couple of spinach test
parent e8a30517
...@@ -267,7 +267,8 @@ ...@@ -267,7 +267,8 @@
padding: 0 16px; padding: 0 16px;
} }
.separator + .dropdown-header, .separator + .dropdown-bold-header { .separator + .dropdown-header,
.separator + .dropdown-bold-header {
padding-top: 2px; padding-top: 2px;
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
- create_project_issue = can?(current_user, :create_issue, @project) - 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)) - 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) - 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 %li.dropdown-bold-header This project
- if create_project_issue - if create_project_issue
%li %li
......
...@@ -14,8 +14,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -14,8 +14,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
step 'I click link "New Merge Request"' do step 'I click link "New Merge Request"' do
page.within '#content-body' do
page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request')
end end
end
step 'I click link "Bug NS-04"' do step 'I click link "Bug NS-04"' do
click_link "Bug NS-04" click_link "Bug NS-04"
......
...@@ -23,8 +23,10 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps ...@@ -23,8 +23,10 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end end
step 'I click link "New snippet"' do step 'I click link "New snippet"' do
page.within '#content-body' do
first(:link, "New snippet").click first(:link, "New snippet").click
end end
end
step 'I click link "Snippet one"' do step 'I click link "Snippet one"' do
click_link "Snippet one" click_link "Snippet one"
......
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