Commit 9b4c97f490488e505bd52305e24035868041969f
1 parent
00778a30
Exists in
master
and in
23 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 | 22 | @selenium-fixme |
| 23 | 23 | Scenario: edit an article before approval |
| 24 | 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 | 26 | When I follow "Spread" |
| 27 | 27 | And I check "Sample Community" |
| 28 | 28 | And I press "Spread this" |
| ... | ... | @@ -32,14 +32,14 @@ Feature: approve article |
| 32 | 32 | And I fill in "Text" with "This is an article edited" |
| 33 | 33 | And I choose "Accept" |
| 34 | 34 | And I press "Apply!" |
| 35 | - And I go to Sample Community's sitemap | |
| 35 | + And I go to sample-community's sitemap | |
| 36 | 36 | And I follow "Sample Article" |
| 37 | 37 | Then I should see "This is an article edited" |
| 38 | 38 | |
| 39 | 39 | @selenium |
| 40 | 40 | Scenario: reject an article with explanation |
| 41 | 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 | 43 | And I follow "Sample Article" |
| 44 | 44 | And I follow "Spread" |
| 45 | 45 | And I check "Sample Community" |
| ... | ... | @@ -50,10 +50,10 @@ Feature: approve article |
| 50 | 50 | And I choose "Reject" |
| 51 | 51 | And I fill in "Rejection explanation" with "This is not an appropriate article for this community." |
| 52 | 52 | And I press "Apply!" |
| 53 | - When I go to Sample Community's sitemap | |
| 53 | + When I go to sample-community's sitemap | |
| 54 | 54 | Then I should not see "Sample Article" |
| 55 | 55 | |
| 56 | - @selenium-fixme | |
| 56 | + @selenium | |
| 57 | 57 | Scenario: reject an article that was removed |
| 58 | 58 | Given I am logged in as "mariasilva" |
| 59 | 59 | And I follow "Dub Wars" |
| ... | ... | @@ -61,7 +61,7 @@ Feature: approve article |
| 61 | 61 | And I check "Sample Community" |
| 62 | 62 | And I press "Spread this" |
| 63 | 63 | And I follow "Delete" |
| 64 | - And I press "Yes, I want." | |
| 64 | + And I confirm the browser dialog | |
| 65 | 65 | When I am logged in as "joaosilva" |
| 66 | 66 | And I go to sample-community's control panel |
| 67 | 67 | And I follow "Process requests" | ... | ... |
features/chat.feature
| ... | ... | @@ -92,13 +92,13 @@ Feature: chat |
| 92 | 92 | And I am logged in as "tame" |
| 93 | 93 | And I follow "Open chat" |
| 94 | 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 | 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 | 103 | @selenium |
| 104 | 104 | Scenario: link to open chatroom of a community | ... | ... |
features/edit_article.feature
| ... | ... | @@ -90,7 +90,7 @@ Feature: edit article |
| 90 | 90 | Scenario: cancel button back to article when edit |
| 91 | 91 | Given I am on joaosilva's sitemap |
| 92 | 92 | When I follow "Save the whales" |
| 93 | - And I follow "Edit" | |
| 93 | + And I follow "Edit" within "#article-actions" | |
| 94 | 94 | And I follow "Cancel" |
| 95 | 95 | Then I should be on /joaosilva/save-the-whales |
| 96 | 96 | ... | ... |
features/gallery_navigation.feature
| ... | ... | @@ -72,7 +72,8 @@ Feature: gallery_navigation |
| 72 | 72 | Scenario: image title in window title |
| 73 | 73 | Given I am logged in as "marciopunk" |
| 74 | 74 | When I go to /marciopunk/other-gallery/rails.png?view=true |
| 75 | + And the page title should be "rails.png" | |
| 75 | 76 | And I follow "Edit" |
| 76 | 77 | And I fill in "Title" with "Rails is cool" |
| 77 | 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 | 215 | Then I should see "Rock" |
| 216 | 216 | And I should not see "Add the inputs or raw material used by this product" |
| 217 | 217 | When I follow "Remove" |
| 218 | - And I confirm | |
| 218 | + And I confirm the browser dialog | |
| 219 | 219 | Then I should see "Add the inputs or raw material used by this product" |
| 220 | 220 | |
| 221 | 221 | @selenium | ... | ... |
features/manage_product_price_details.feature
| ... | ... | @@ -105,6 +105,7 @@ Feature: manage product price details |
| 105 | 105 | And I select "Taxes" from "price_details__production_cost_id" within "#display-product-price-details" |
| 106 | 106 | And I fill in "$" with "20.00" |
| 107 | 107 | And I press "Save" |
| 108 | + And I should be on Rede Moinho's page of product Abbey Road | |
| 108 | 109 | Then I should see "Inputs" within ".price-detail-name" |
| 109 | 110 | And I should see "60.0" within ".price-detail-price" |
| 110 | 111 | |
| ... | ... | @@ -142,7 +143,7 @@ Feature: manage product price details |
| 142 | 143 | And I follow "Describe here the cost of production" |
| 143 | 144 | And I should see "Taxes" within "#manage-product-details-form" |
| 144 | 145 | When I follow "Remove" within "#manage-product-details-form" |
| 145 | - And I confirm | |
| 146 | + And I confirm the browser dialog | |
| 146 | 147 | And I press "Save" |
| 147 | 148 | And I follow "Describe here the cost of production" |
| 148 | 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 | 41 | page.execute_script "jQuery('#{selector}').trigger('blur')" |
| 42 | 42 | end |
| 43 | 43 | |
| 44 | -When /^I confirm$/ do | |
| 44 | +When /^I confirm the browser dialog$/ do | |
| 45 | 45 | page.driver.browser.switch_to.alert.accept |
| 46 | 46 | end | ... | ... |