Commit 9b4c97f490488e505bd52305e24035868041969f
1 parent
00778a30
Exists in
master
and in
22 other branches
Fixed some selenium tests that were failing
Showing
8 changed files
with
21 additions
and
17 deletions
Show diff stats
features/approve_article.feature
| @@ -22,7 +22,7 @@ Feature: approve article | @@ -22,7 +22,7 @@ Feature: approve article | ||
| 22 | @selenium-fixme | 22 | @selenium-fixme |
| 23 | Scenario: edit an article before approval | 23 | Scenario: edit an article before approval |
| 24 | Given I am logged in as "mariasilva" | 24 | Given I am logged in as "mariasilva" |
| 25 | - And I am on Maria Silva's homepage | 25 | + And I am on mariasilva's homepage |
| 26 | When I follow "Spread" | 26 | When I follow "Spread" |
| 27 | And I check "Sample Community" | 27 | And I check "Sample Community" |
| 28 | And I press "Spread this" | 28 | And I press "Spread this" |
| @@ -32,14 +32,14 @@ Feature: approve article | @@ -32,14 +32,14 @@ Feature: approve article | ||
| 32 | And I fill in "Text" with "This is an article edited" | 32 | And I fill in "Text" with "This is an article edited" |
| 33 | And I choose "Accept" | 33 | And I choose "Accept" |
| 34 | And I press "Apply!" | 34 | And I press "Apply!" |
| 35 | - And I go to Sample Community's sitemap | 35 | + And I go to sample-community's sitemap |
| 36 | And I follow "Sample Article" | 36 | And I follow "Sample Article" |
| 37 | Then I should see "This is an article edited" | 37 | Then I should see "This is an article edited" |
| 38 | 38 | ||
| 39 | @selenium | 39 | @selenium |
| 40 | Scenario: reject an article with explanation | 40 | Scenario: reject an article with explanation |
| 41 | Given I am logged in as "mariasilva" | 41 | Given I am logged in as "mariasilva" |
| 42 | - And I go to Maria Silva's cms | 42 | + And I go to mariasilva's cms |
| 43 | And I follow "Sample Article" | 43 | And I follow "Sample Article" |
| 44 | And I follow "Spread" | 44 | And I follow "Spread" |
| 45 | And I check "Sample Community" | 45 | And I check "Sample Community" |
| @@ -50,10 +50,10 @@ Feature: approve article | @@ -50,10 +50,10 @@ Feature: approve article | ||
| 50 | And I choose "Reject" | 50 | And I choose "Reject" |
| 51 | And I fill in "Rejection explanation" with "This is not an appropriate article for this community." | 51 | And I fill in "Rejection explanation" with "This is not an appropriate article for this community." |
| 52 | And I press "Apply!" | 52 | And I press "Apply!" |
| 53 | - When I go to Sample Community's sitemap | 53 | + When I go to sample-community's sitemap |
| 54 | Then I should not see "Sample Article" | 54 | Then I should not see "Sample Article" |
| 55 | 55 | ||
| 56 | - @selenium-fixme | 56 | + @selenium |
| 57 | Scenario: reject an article that was removed | 57 | Scenario: reject an article that was removed |
| 58 | Given I am logged in as "mariasilva" | 58 | Given I am logged in as "mariasilva" |
| 59 | And I follow "Dub Wars" | 59 | And I follow "Dub Wars" |
| @@ -61,7 +61,7 @@ Feature: approve article | @@ -61,7 +61,7 @@ Feature: approve article | ||
| 61 | And I check "Sample Community" | 61 | And I check "Sample Community" |
| 62 | And I press "Spread this" | 62 | And I press "Spread this" |
| 63 | And I follow "Delete" | 63 | And I follow "Delete" |
| 64 | - And I press "Yes, I want." | 64 | + And I confirm the browser dialog |
| 65 | When I am logged in as "joaosilva" | 65 | When I am logged in as "joaosilva" |
| 66 | And I go to sample-community's control panel | 66 | And I go to sample-community's control panel |
| 67 | And I follow "Process requests" | 67 | And I follow "Process requests" |
features/chat.feature
| @@ -92,13 +92,13 @@ Feature: chat | @@ -92,13 +92,13 @@ Feature: chat | ||
| 92 | And I am logged in as "tame" | 92 | And I am logged in as "tame" |
| 93 | And I follow "Open chat" | 93 | And I follow "Open chat" |
| 94 | When I select window "noosfero_chat" | 94 | When I select window "noosfero_chat" |
| 95 | - Then the "#chat-online" should not be visible | ||
| 96 | - And the "#chat-busy" should not be visible | ||
| 97 | - And the "#chat-disconnect" should not be visible | 95 | + Then "Online" should not be visible within "#user-status" |
| 96 | + And "Busy" should not be visible within "#user-status" | ||
| 97 | + And "Sign out of chat" should not be visible within "#user-status" | ||
| 98 | When I follow "Offline" | 98 | When I follow "Offline" |
| 99 | - Then the "#chat-connect" should be visible | ||
| 100 | - And the "#chat-busy" should be visible | ||
| 101 | - And the "#chat-disconnect" should be visible | 99 | + Then "Online" should be visible within "#user-status" |
| 100 | + And "Busy" should be visible within "#user-status" | ||
| 101 | + And "Sign out of chat" should be visible within "#user-status" | ||
| 102 | 102 | ||
| 103 | @selenium | 103 | @selenium |
| 104 | Scenario: link to open chatroom of a community | 104 | Scenario: link to open chatroom of a community |
features/edit_article.feature
| @@ -90,7 +90,7 @@ Feature: edit article | @@ -90,7 +90,7 @@ Feature: edit article | ||
| 90 | Scenario: cancel button back to article when edit | 90 | Scenario: cancel button back to article when edit |
| 91 | Given I am on joaosilva's sitemap | 91 | Given I am on joaosilva's sitemap |
| 92 | When I follow "Save the whales" | 92 | When I follow "Save the whales" |
| 93 | - And I follow "Edit" | 93 | + And I follow "Edit" within "#article-actions" |
| 94 | And I follow "Cancel" | 94 | And I follow "Cancel" |
| 95 | Then I should be on /joaosilva/save-the-whales | 95 | Then I should be on /joaosilva/save-the-whales |
| 96 | 96 |
features/gallery_navigation.feature
| @@ -72,7 +72,8 @@ Feature: gallery_navigation | @@ -72,7 +72,8 @@ Feature: gallery_navigation | ||
| 72 | Scenario: image title in window title | 72 | Scenario: image title in window title |
| 73 | Given I am logged in as "marciopunk" | 73 | Given I am logged in as "marciopunk" |
| 74 | When I go to /marciopunk/other-gallery/rails.png?view=true | 74 | When I go to /marciopunk/other-gallery/rails.png?view=true |
| 75 | + And the page title should be "rails.png" | ||
| 75 | And I follow "Edit" | 76 | And I follow "Edit" |
| 76 | And I fill in "Title" with "Rails is cool" | 77 | And I fill in "Title" with "Rails is cool" |
| 77 | And I press "Save" | 78 | And I press "Save" |
| 78 | - Then I should see "Rails is cool" within "title" | 79 | + Then the page title should be "Rails is cool" |
features/manage_inputs.feature
| @@ -215,7 +215,7 @@ Feature: manage inputs | @@ -215,7 +215,7 @@ Feature: manage inputs | ||
| 215 | Then I should see "Rock" | 215 | Then I should see "Rock" |
| 216 | And I should not see "Add the inputs or raw material used by this product" | 216 | And I should not see "Add the inputs or raw material used by this product" |
| 217 | When I follow "Remove" | 217 | When I follow "Remove" |
| 218 | - And I confirm | 218 | + And I confirm the browser dialog |
| 219 | Then I should see "Add the inputs or raw material used by this product" | 219 | Then I should see "Add the inputs or raw material used by this product" |
| 220 | 220 | ||
| 221 | @selenium | 221 | @selenium |
features/manage_product_price_details.feature
| @@ -105,6 +105,7 @@ Feature: manage product price details | @@ -105,6 +105,7 @@ Feature: manage product price details | ||
| 105 | And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details" | 105 | And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details" |
| 106 | And I fill in "$" with "20.00" | 106 | And I fill in "$" with "20.00" |
| 107 | And I press "Save" | 107 | And I press "Save" |
| 108 | + And I should be on Rede Moinho's page of product Abbey Road | ||
| 108 | Then I should see "Inputs" within ".price-detail-name" | 109 | Then I should see "Inputs" within ".price-detail-name" |
| 109 | And I should see "60.0" within ".price-detail-price" | 110 | And I should see "60.0" within ".price-detail-price" |
| 110 | 111 | ||
| @@ -142,7 +143,7 @@ Feature: manage product price details | @@ -142,7 +143,7 @@ Feature: manage product price details | ||
| 142 | And I follow "Describe here the cost of production" | 143 | And I follow "Describe here the cost of production" |
| 143 | And I should see "Taxes" within "#manage-product-details-form" | 144 | And I should see "Taxes" within "#manage-product-details-form" |
| 144 | When I follow "Remove" within "#manage-product-details-form" | 145 | When I follow "Remove" within "#manage-product-details-form" |
| 145 | - And I confirm | 146 | + And I confirm the browser dialog |
| 146 | And I press "Save" | 147 | And I press "Save" |
| 147 | And I follow "Describe here the cost of production" | 148 | And I follow "Describe here the cost of production" |
| 148 | Then I should not see "Taxes" within "#manage-product-details-form" | 149 | Then I should not see "Taxes" within "#manage-product-details-form" |
features/step_definitions/custom_web_steps.rb
| @@ -41,6 +41,6 @@ When /^I leave the "([^\"]+)" field$/ do |selector| | @@ -41,6 +41,6 @@ When /^I leave the "([^\"]+)" field$/ do |selector| | ||
| 41 | page.execute_script "jQuery('#{selector}').trigger('blur')" | 41 | page.execute_script "jQuery('#{selector}').trigger('blur')" |
| 42 | end | 42 | end |
| 43 | 43 | ||
| 44 | -When /^I confirm$/ do | 44 | +When /^I confirm the browser dialog$/ do |
| 45 | page.driver.browser.switch_to.alert.accept | 45 | page.driver.browser.switch_to.alert.accept |
| 46 | end | 46 | end |
features/support/selenium.rb
| @@ -20,6 +20,8 @@ Before('@ignore-hidden-elements') do | @@ -20,6 +20,8 @@ Before('@ignore-hidden-elements') do | ||
| 20 | Capybara.ignore_hidden_elements = true | 20 | Capybara.ignore_hidden_elements = true |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | +Capybara.default_wait_time = 30 | ||
| 24 | + | ||
| 23 | After do | 25 | After do |
| 24 | DatabaseCleaner.clean | 26 | DatabaseCleaner.clean |
| 25 | end | 27 | end |