jdlrobson / weekipedia

11 stars 2 forks source link

Browser tests for language feature should pass #101

Closed jdlrobson closed 8 years ago

jdlrobson commented 8 years ago

Failing Scenarios:

cucumber features/language.feature:27 # Scenario: Tapping the disabled icon shows a toast
cucumber features/language.feature:32 # Scenario: Closing language overlay (overlay button)
cucumber features/language.feature:46 # Scenario: Checking that there are no suggested language links
cucumber features/language.feature:54 # Scenario: Checking that the suggested language link has been created

All of MobileFrontend's browser tests for anonymous users should pass on Weekipedia. The one's that don't suggest inconsistent markup or a lack of feature parity.

Scenario: Tapping the disabled icon shows a toast                                          # features/language.feature:27
  Given I go to a page that does not have languages                                        # features/step_definitions/create_page_api_steps.rb:75
  When I click the switch-language page action                                             # features/step_definitions/language_icon_steps.rb:1
  Then I should see a toast with message about page not being available in other languages # features/step_definitions/language_steps.rb:17
    timed out after 5 seconds, waiting for {:class=>"mw-notification", :tag_name=>"div"} to become present (Watir::Wait::TimeoutError)
    ./features/step_definitions/language_steps.rb:18:in `/^I should see a toast with message about page not being available in other languages$/'
    features/language.feature:30:in `Then I should see a toast with message about page not being available in other languages'

Scenario: Closing language overlay (overlay button) # features/language.feature:32
  Given I go to a page that has languages           # features/step_definitions/create_page_api_steps.rb:66
  When I click the switch-language page action      # features/step_definitions/language_icon_steps.rb:1
  And I see the language overlay                    # features/step_definitions/language_steps.rb:9
  And I click the language overlay close button     # features/step_definitions/language_steps.rb:5
    unable to locate element, using {:class=>"cancel", :tag_name=>"button"} (Watir::Exception::UnknownObjectException)
    ./features/step_definitions/language_steps.rb:6:in `/^I click the language overlay close button$/'
    features/language.feature:36:in `And I click the language overlay close button'
  Then I should not see the languages overlay       # features/step_definitions/language_steps.rb:21

Scenario: Closing language overlay (browser button) # features/language.feature:39
  Given I go to a page that has languages           # features/step_definitions/create_page_api_steps.rb:66
  When I click the switch-language page action      # features/step_definitions/language_icon_steps.rb:1
  And I see the language overlay                    # features/step_definitions/language_steps.rb:9
  And I click the browser back button               # features/step_definitions/common_steps.rb:87
  Then I should not see the languages overlay       # features/step_definitions/language_steps.rb:21

Scenario: Checking that there are no suggested language links # features/language.feature:46
  Given I go to a page that has languages                     # features/step_definitions/create_page_api_steps.rb:66
  When I click the switch-language page action                # features/step_definitions/language_icon_steps.rb:1
  And I see the language overlay                              # features/step_definitions/language_steps.rb:9
  Then I should not see a suggested language link             # features/step_definitions/language_steps.rb:33
  Then I should see a non-suggested language link             # features/step_definitions/language_steps.rb:29
    expected visible? to return true, got false (RSpec::Expectations::ExpectationNotMetError)
    ./features/step_definitions/language_steps.rb:30:in `/^I should see a non-suggested language link$/'
    features/language.feature:51:in `Then I should see a non-suggested language link'

@smoke
Scenario: Checking that the suggested language link has been created # features/language.feature:54
  Given I go to a page that has languages                            # features/step_definitions/create_page_api_steps.rb:66
  And I click the switch-language page action                        # features/step_definitions/language_icon_steps.rb:1
  And I click on a language from the list of all languages           # features/step_definitions/language_steps.rb:13
    timed out after 5 seconds, waiting for {:css=>".all-languages a", :index=>0} to become present (Watir::Wait::TimeoutError)
    ./features/step_definitions/language_steps.rb:14:in `/^I click on a language from the list of all languages$/'
    features/language.feature:57:in `And I click on a language from the list of all languages'
  And I click the browser back button                                # features/step_definitions/common_steps.rb:87
  And I see the language overlay                                     # features/step_definitions/language_steps.rb:9
  Then I should see a suggested language link
jdlrobson commented 8 years ago

Mostly done but see #111