diff --git a/features/browse.feature b/features/browse.feature index 877d9e2..d39be5d 100644 --- a/features/browse.feature +++ b/features/browse.feature @@ -15,35 +15,36 @@ Feature: browse | comunity-silva | Community Silva | | comunity-neto | Community Neto | - @selenium-fixme + @selenium Scenario: Show people browse menu - Given I should not see "More Recent" - And I should not see "More Active" - And I should not see "More Popular" - When I follow "#submenu-people-trigger" - Then I should see "More Recent" - And I should see "More Active" - And I should see "More Popular" + Given I should not see "More recent" + And I should not see "More active" + And I should not see "More popular" + And display "submenu-people-trigger" + When I follow "submenu-people-trigger" + Then I should see "More recent" + And I should see "More active" + And I should see "More popular" - @selenium-fixme + @selenium Scenario: People browse menu should add logged information Given I am logged in as "joaosilva" - And I should not see "More Recent" - And I should not see "More Active" - And I should not see "More Popular" + And I should not see "More recent" + And I should not see "More active" + And I should not see "More popular" And I should not see "Invite friends" And I should not see "My friends" - When I follow "#submenu-people-trigger" - Then I should see "More Recent" - And I should see "More Active" - And I should see "More Popular" + And display "submenu-people-trigger" + When I follow "submenu-people-trigger" + Then I should see "More recent" + And I should see "More active" + And I should see "More popular" And I should see "Invite friends" And I should see "My friends" - @fixme Scenario: Browse people by query Given I go to /search/people - When I fill in "Silva" for "query" + When I fill in "Silva" for "search-input" And I press "Search" Then I should see "Joao Silva" And I should see "Pedro Silva" @@ -51,36 +52,37 @@ Feature: browse And I should not see "Community Silva" And I should not see "Community Neto" - @selenium-fixme + @selenium Scenario: Communities browse menu should add logged information Given I am logged in as "joaosilva" When I go to /joaosilva - Then I should not see "More Recent" - And I should not see "More Active" - And I should not see "More Popular" + Then I should not see "More recent" + And I should not see "More active" + And I should not see "More popular" And I should not see "My communities" And I should not see "New community" - When I follow "#submenu-communities-trigger" - Then I should see "More Recent" - And I should see "More Active" - And I should see "More Popular" + And display "submenu-communities-trigger" + When I follow "submenu-communities-trigger" + Then I should see "More recent" + And I should see "More active" + And I should see "More popular" And I should see "My communities" And I should see "New community" - @selenium-fixme + @selenium Scenario: Show communities browse menu - Given I should not see "More Recent" - And I should not see "More Active" - And I should not see "More Popular" - When I follow "#submenu-communities-trigger" - Then I should see "More Recent" - And I should see "More Active" - And I should see "More Popular" + Given I should not see "More recent" + And I should not see "More active" + And I should not see "More popular" + And display "submenu-communities-trigger" + When I follow "submenu-communities-trigger" + Then I should see "More recent" + And I should see "More active" + And I should see "More popular" - @fixme Scenario: Browse communities by query When I go to /search/communities - And I fill in "Neto" for "query" + And I fill in "Neto" for "search-input" And I press "Search" Then I should see "Community Neto" And I should not see "Joao Silva" @@ -88,17 +90,17 @@ Feature: browse And I should not see "Paulo Neto" And I should not see "Community Silva" - @selenium-fixme + @selenium Scenario: Show contents browse menu - Given I should not see "More Comments" - And I should not see "More Views" - And I should not see "More Recent" - When I follow "#submenu-contents-trigger" - Then I should see "More Comments" - And I should see "More Views" - And I should see "More Recent" + Given I should not see "Most commented" + And I should not see "More viewed" + And I should not see "More recent" + And display "submenu-contents-trigger" + When I follow "submenu-contents-trigger" + Then I should see "Most commented" + And I should see "More viewed" + And I should see "More recent" - @fixme Scenario: Browse contents by query Given the following articles | owner | name | body | @@ -106,7 +108,7 @@ Feature: browse | joaosilva | Bees and ants are insects | this is another article | | joaosilva | Ants are small | this is another article | When I go to /search/contents - And I fill in "bees" for "query" + And I fill in "bees" for "search-input" And I press "Search" Then I should see "Bees can fly" And I should see "Bees and ants are insects" diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 5a55297..e6cb23d 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -217,3 +217,7 @@ end Then /^show me the page$/ do save_and_open_page end + +Then /^display "([^\"]*)"$/ do |element| + evaluate_script("document.getElementById('#{element}').style.display = 'inline';") +end -- libgit2 0.21.2