Commit f1dc6b57 authored by Clement Ho's avatar Clement Ho

Fix spinach test

parent b6bded14
......@@ -12,11 +12,13 @@ Feature: Project Issues
Given I should see "Release 0.4" in issues
And I should not see "Release 0.3" in issues
@javascript
Scenario: I should see closed issues
Given I click link "Closed"
Then I should see "Release 0.3" in issues
And I should not see "Release 0.4" in issues
@javascript
Scenario: I should see all issues
Given I click link "All"
Then I should see "Release 0.3" in issues
......
......@@ -38,11 +38,13 @@ Feature: Project Merge Requests
When I visit merge request page "Bug NS-08"
Then I should see the diverged commits count
@javascript
Scenario: I should see rejected merge requests
Given I click link "Closed"
Then I should see "Feature NS-03" in merge requests
And I should not see "Bug NS-04" in merge requests
@javascript
Scenario: I should see all merge requests
Given I click link "All"
Then I should see "Feature NS-03" in merge requests
......
......@@ -28,7 +28,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I click link "Closed"' do
find('.issues-state-filters a', text: "Closed").click
find('.issues-state-filters .state-closed span', text: 'Closed').click
end
step 'I click button "Unsubscribe"' do
......@@ -44,7 +44,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I click link "All"' do
click_link "All"
find('.issues-state-filters .state-all span', text: 'All').click
# Waits for load
expect(find('.issues-state-filters > .active')).to have_content 'All'
end
......
......@@ -26,7 +26,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I click link "All"' do
click_link "All"
find('.issues-state-filters .state-all span', text: 'All').click
# Waits for load
expect(find('.issues-state-filters > .active')).to have_content 'All'
end
......@@ -36,9 +36,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I click link "Closed"' do
page.within('.issues-state-filters') do
click_link "Closed"
end
find('.issues-state-filters .state-closed span', text: 'Closed').click
end
step 'I should see merge request "Wiki Feature"' do
......
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