diff options
author | Alex Denisov <1101.debian@gmail.com> | 2012-12-02 22:54:19 +0200 |
---|---|---|
committer | Alex Denisov <1101.debian@gmail.com> | 2013-01-09 19:30:20 +0000 |
commit | b255c3c44b849510e19be88833bb73425b8d0e9d (patch) | |
tree | d0fd4a5bbbc223cdd01dd8c6529af47fa6b75813 /features | |
parent | 2b93201533d0d5c7fdcb9b6e74f0eec944ed0ea9 (diff) | |
download | gitlab-ce-b255c3c44b849510e19be88833bb73425b8d0e9d.tar.gz |
Tests on events filtering added
Diffstat (limited to 'features')
-rw-r--r-- | features/dashboard/event_filters.feature | 19 | ||||
-rw-r--r-- | features/steps/dashboard/dashboard_event_filters.rb | 30 |
2 files changed, 45 insertions, 4 deletions
diff --git a/features/dashboard/event_filters.feature b/features/dashboard/event_filters.feature index e3e6eced8fb..050d98951a8 100644 --- a/features/dashboard/event_filters.feature +++ b/features/dashboard/event_filters.feature @@ -9,6 +9,23 @@ Feature: Event filters Scenario: I should see all events Then I should see push event + And I should see new member event + And I should see merge request event + + Scenario: I should see only pushed events + When I click "push" event filter + Then I should see push event + And I should not see new member event + And I should not see merge request event + + Scenario: I should see only joined events + When I click "team" event filter Then I should see new member event - Then I should see merge request event + And I should not see push event + And I should not see merge request event + Scenario: I should see only merged events + When I click "merge" event filter + Then I should see merge request event + And I should not see push event + And I should not see new member event diff --git a/features/steps/dashboard/dashboard_event_filters.rb b/features/steps/dashboard/dashboard_event_filters.rb index cb821ca327a..03a0bd85e43 100644 --- a/features/steps/dashboard/dashboard_event_filters.rb +++ b/features/steps/dashboard/dashboard_event_filters.rb @@ -4,15 +4,27 @@ class EventFilters < Spinach::FeatureSteps include SharedProject Then 'I should see push event' do - page.find('span.pushed').should have_content('pushed') + page.has_selector?('span.pushed').should be_true + end + + Then 'I should not see push event' do + page.has_selector?('span.pushed').should be_false end Then 'I should see new member event' do - page.find('span.joined').should have_content('joined') + page.has_selector?('span.joined').should be_true + end + + And 'I should not see new member event' do + page.has_selector?('span.joined').should be_false end Then 'I should see merge request event' do - page.find('span.merged').should have_content('merged') + page.has_selector?('span.merged').should be_true + end + + And 'I should not see merge request event' do + page.has_selector?('span.merged').should be_false end And 'this project has push event' do @@ -59,5 +71,17 @@ class EventFilters < Spinach::FeatureSteps ) end + When 'I click "push" event filter' do + click_link("push_event_filter") + end + + When 'I click "team" event filter' do + click_link("team_event_filter") + end + + When 'I click "merge" event filter' do + click_link("merged_event_filter") + end + end |