Commit 657502e0c99b60c05e93739db40729a90581bda7
1 parent
5cd956a4
Exists in
master
and in
22 other branches
Fixed test: featues/browse.feature
Showing
2 changed files
with
52 additions
and
46 deletions
Show diff stats
features/browse.feature
| @@ -15,35 +15,36 @@ Feature: browse | @@ -15,35 +15,36 @@ Feature: browse | ||
| 15 | | comunity-silva | Community Silva | | 15 | | comunity-silva | Community Silva | |
| 16 | | comunity-neto | Community Neto | | 16 | | comunity-neto | Community Neto | |
| 17 | 17 | ||
| 18 | - @selenium-fixme | 18 | + @selenium |
| 19 | Scenario: Show people browse menu | 19 | Scenario: Show people browse menu |
| 20 | - Given I should not see "More Recent" | ||
| 21 | - And I should not see "More Active" | ||
| 22 | - And I should not see "More Popular" | ||
| 23 | - When I follow "#submenu-people-trigger" | ||
| 24 | - Then I should see "More Recent" | ||
| 25 | - And I should see "More Active" | ||
| 26 | - And I should see "More Popular" | 20 | + Given I should not see "More recent" |
| 21 | + And I should not see "More active" | ||
| 22 | + And I should not see "More popular" | ||
| 23 | + And display "submenu-people-trigger" | ||
| 24 | + When I follow "submenu-people-trigger" | ||
| 25 | + Then I should see "More recent" | ||
| 26 | + And I should see "More active" | ||
| 27 | + And I should see "More popular" | ||
| 27 | 28 | ||
| 28 | - @selenium-fixme | 29 | + @selenium |
| 29 | Scenario: People browse menu should add logged information | 30 | Scenario: People browse menu should add logged information |
| 30 | Given I am logged in as "joaosilva" | 31 | Given I am logged in as "joaosilva" |
| 31 | - And I should not see "More Recent" | ||
| 32 | - And I should not see "More Active" | ||
| 33 | - And I should not see "More Popular" | 32 | + And I should not see "More recent" |
| 33 | + And I should not see "More active" | ||
| 34 | + And I should not see "More popular" | ||
| 34 | And I should not see "Invite friends" | 35 | And I should not see "Invite friends" |
| 35 | And I should not see "My friends" | 36 | And I should not see "My friends" |
| 36 | - When I follow "#submenu-people-trigger" | ||
| 37 | - Then I should see "More Recent" | ||
| 38 | - And I should see "More Active" | ||
| 39 | - And I should see "More Popular" | 37 | + And display "submenu-people-trigger" |
| 38 | + When I follow "submenu-people-trigger" | ||
| 39 | + Then I should see "More recent" | ||
| 40 | + And I should see "More active" | ||
| 41 | + And I should see "More popular" | ||
| 40 | And I should see "Invite friends" | 42 | And I should see "Invite friends" |
| 41 | And I should see "My friends" | 43 | And I should see "My friends" |
| 42 | 44 | ||
| 43 | - @fixme | ||
| 44 | Scenario: Browse people by query | 45 | Scenario: Browse people by query |
| 45 | Given I go to /search/people | 46 | Given I go to /search/people |
| 46 | - When I fill in "Silva" for "query" | 47 | + When I fill in "Silva" for "search-input" |
| 47 | And I press "Search" | 48 | And I press "Search" |
| 48 | Then I should see "Joao Silva" | 49 | Then I should see "Joao Silva" |
| 49 | And I should see "Pedro Silva" | 50 | And I should see "Pedro Silva" |
| @@ -51,36 +52,37 @@ Feature: browse | @@ -51,36 +52,37 @@ Feature: browse | ||
| 51 | And I should not see "Community Silva" | 52 | And I should not see "Community Silva" |
| 52 | And I should not see "Community Neto" | 53 | And I should not see "Community Neto" |
| 53 | 54 | ||
| 54 | - @selenium-fixme | 55 | + @selenium |
| 55 | Scenario: Communities browse menu should add logged information | 56 | Scenario: Communities browse menu should add logged information |
| 56 | Given I am logged in as "joaosilva" | 57 | Given I am logged in as "joaosilva" |
| 57 | When I go to /joaosilva | 58 | When I go to /joaosilva |
| 58 | - Then I should not see "More Recent" | ||
| 59 | - And I should not see "More Active" | ||
| 60 | - And I should not see "More Popular" | 59 | + Then I should not see "More recent" |
| 60 | + And I should not see "More active" | ||
| 61 | + And I should not see "More popular" | ||
| 61 | And I should not see "My communities" | 62 | And I should not see "My communities" |
| 62 | And I should not see "New community" | 63 | And I should not see "New community" |
| 63 | - When I follow "#submenu-communities-trigger" | ||
| 64 | - Then I should see "More Recent" | ||
| 65 | - And I should see "More Active" | ||
| 66 | - And I should see "More Popular" | 64 | + And display "submenu-communities-trigger" |
| 65 | + When I follow "submenu-communities-trigger" | ||
| 66 | + Then I should see "More recent" | ||
| 67 | + And I should see "More active" | ||
| 68 | + And I should see "More popular" | ||
| 67 | And I should see "My communities" | 69 | And I should see "My communities" |
| 68 | And I should see "New community" | 70 | And I should see "New community" |
| 69 | 71 | ||
| 70 | - @selenium-fixme | 72 | + @selenium |
| 71 | Scenario: Show communities browse menu | 73 | Scenario: Show communities browse menu |
| 72 | - Given I should not see "More Recent" | ||
| 73 | - And I should not see "More Active" | ||
| 74 | - And I should not see "More Popular" | ||
| 75 | - When I follow "#submenu-communities-trigger" | ||
| 76 | - Then I should see "More Recent" | ||
| 77 | - And I should see "More Active" | ||
| 78 | - And I should see "More Popular" | 74 | + Given I should not see "More recent" |
| 75 | + And I should not see "More active" | ||
| 76 | + And I should not see "More popular" | ||
| 77 | + And display "submenu-communities-trigger" | ||
| 78 | + When I follow "submenu-communities-trigger" | ||
| 79 | + Then I should see "More recent" | ||
| 80 | + And I should see "More active" | ||
| 81 | + And I should see "More popular" | ||
| 79 | 82 | ||
| 80 | - @fixme | ||
| 81 | Scenario: Browse communities by query | 83 | Scenario: Browse communities by query |
| 82 | When I go to /search/communities | 84 | When I go to /search/communities |
| 83 | - And I fill in "Neto" for "query" | 85 | + And I fill in "Neto" for "search-input" |
| 84 | And I press "Search" | 86 | And I press "Search" |
| 85 | Then I should see "Community Neto" | 87 | Then I should see "Community Neto" |
| 86 | And I should not see "Joao Silva" | 88 | And I should not see "Joao Silva" |
| @@ -88,17 +90,17 @@ Feature: browse | @@ -88,17 +90,17 @@ Feature: browse | ||
| 88 | And I should not see "Paulo Neto" | 90 | And I should not see "Paulo Neto" |
| 89 | And I should not see "Community Silva" | 91 | And I should not see "Community Silva" |
| 90 | 92 | ||
| 91 | - @selenium-fixme | 93 | + @selenium |
| 92 | Scenario: Show contents browse menu | 94 | Scenario: Show contents browse menu |
| 93 | - Given I should not see "More Comments" | ||
| 94 | - And I should not see "More Views" | ||
| 95 | - And I should not see "More Recent" | ||
| 96 | - When I follow "#submenu-contents-trigger" | ||
| 97 | - Then I should see "More Comments" | ||
| 98 | - And I should see "More Views" | ||
| 99 | - And I should see "More Recent" | 95 | + Given I should not see "Most commented" |
| 96 | + And I should not see "More viewed" | ||
| 97 | + And I should not see "More recent" | ||
| 98 | + And display "submenu-contents-trigger" | ||
| 99 | + When I follow "submenu-contents-trigger" | ||
| 100 | + Then I should see "Most commented" | ||
| 101 | + And I should see "More viewed" | ||
| 102 | + And I should see "More recent" | ||
| 100 | 103 | ||
| 101 | - @fixme | ||
| 102 | Scenario: Browse contents by query | 104 | Scenario: Browse contents by query |
| 103 | Given the following articles | 105 | Given the following articles |
| 104 | | owner | name | body | | 106 | | owner | name | body | |
| @@ -106,7 +108,7 @@ Feature: browse | @@ -106,7 +108,7 @@ Feature: browse | ||
| 106 | | joaosilva | Bees and ants are insects | this is another article | | 108 | | joaosilva | Bees and ants are insects | this is another article | |
| 107 | | joaosilva | Ants are small | this is another article | | 109 | | joaosilva | Ants are small | this is another article | |
| 108 | When I go to /search/contents | 110 | When I go to /search/contents |
| 109 | - And I fill in "bees" for "query" | 111 | + And I fill in "bees" for "search-input" |
| 110 | And I press "Search" | 112 | And I press "Search" |
| 111 | Then I should see "Bees can fly" | 113 | Then I should see "Bees can fly" |
| 112 | And I should see "Bees and ants are insects" | 114 | And I should see "Bees and ants are insects" |
features/step_definitions/web_steps.rb
| @@ -217,3 +217,7 @@ end | @@ -217,3 +217,7 @@ end | ||
| 217 | Then /^show me the page$/ do | 217 | Then /^show me the page$/ do |
| 218 | save_and_open_page | 218 | save_and_open_page |
| 219 | end | 219 | end |
| 220 | + | ||
| 221 | +Then /^display "([^\"]*)"$/ do |element| | ||
| 222 | + evaluate_script("document.getElementById('#{element}').style.display = 'inline';") | ||
| 223 | +end |