mediawiki-skins-MinervaNeue/tests/browser/features/search.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

51 lines
1.8 KiB
Gherkin

@chrome @en.m.wikipedia.beta.wmflabs.org @firefox @integration @test2.m.wikipedia.org @vagrant
Feature: Search
Background:
Given I am using the mobile site
And I am in beta mode
And the page "Selenium search test" exists
And I am on the "Main Page" page
And I am viewing the site in mobile mode
And I click the search icon
And I see the search overlay
Scenario: Closing search (overlay button)
When I click the search overlay close button
Then I should not see the search overlay
Scenario: Closing search (browser button)
When I click the browser back button
Then I should not see the search overlay
@smoke @integration
Scenario: Search for partial text
When I type into search box "Selenium search tes"
Then search results should contain "Selenium search test"
Scenario: Search with search in pages button
When I type into search box "Test is used by Selenium web driver"
And I see the search in pages button
And I click the search in pages button
Then I should see a list of search results
Scenario: Search with enter key
When I type into search box "Test is used by Selenium web driver"
And I press the enter key
Then I should see a list of search results
Scenario: Going back to the previous page
When I type into search box "Selenium search tes"
When I click a search result
When I click the browser back button
Then I should not see '#/search' in URL
@integration
Scenario: Search doesn't break after one search result
When I type into search box "Selenium search tes"
And I click a search result
And the text of the first heading should be "Selenium search test"
And I click the search icon
And I type into search box "Main Page"
Then search results should contain "Main Page"