mediawiki-skins-MinervaNeue/tests/browser/features/language.feature
jdlrobson c0c90234d0 Port browser tests from MobileFrontend to Minerva
This moves all browser tests from MobileFrontend to the Minerva repo
in preparation for separating the two.

Note, this means browser tests will exist in both repositories for a
period of time. This is important and necessary to ensure we do not
break anything.

See:
https://lists.wikimedia.org/pipermail/mobile-l/2017-July/010536.html

Bug: T168758
Change-Id: I84ae3ea14191f672cabcd52020e80b0a40a72ce1
2017-07-11 14:11:03 -07:00

61 lines
2.3 KiB
Gherkin

@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org
Feature: Language selection
Background:
Given I am using the mobile site
@smoke @integration
Scenario: Language button
Given I go to a page that has languages
Then I should see the switch-language page action
@smoke @integration
Scenario: Language button (on a page that doesn't have languages)
Given I go to a page that does not have languages
Then I should see the disabled switch-language page action
Scenario: Tapping icon opens language overlay
Given I go to a page that has languages
When I click the switch-language page action
Then I should see the language overlay
Scenario: Tapping icon does not open language overlay (on a page that doesn't have languages)
Given I go to a page that does not have languages
When I click the switch-language page action
Then I should not see the languages overlay
Scenario: Tapping the disabled icon shows a toast
Given I go to a page that does not have languages
When I click the switch-language page action
Then I should see a toast with message about page not being available in other languages
Scenario: Closing language overlay (overlay button)
Given I go to a page that has languages
When I click the switch-language page action
And I see the language overlay
And I click the language overlay close button
Then I should not see the languages overlay
Scenario: Closing language overlay (browser button)
Given I go to a page that has languages
When I click the switch-language page action
And I see the language overlay
And I click the browser back button
Then I should not see the languages overlay
Scenario: Checking that there are no suggested language links
Given I go to a page that has languages
When I click the switch-language page action
And I see the language overlay
Then I should not see a suggested language link
Then I should see a non-suggested language link
@smoke
Scenario: Checking that the suggested language link has been created
Given I go to a page that has languages
And I click the switch-language page action
And I click on a language from the list of all languages
And I click the browser back button
And I see the language overlay
Then I should see a suggested language link