QA: Add additional steps to guard against slow test runs

Bug: T182202
Change-Id: If46620941924b86c5403c9e928911b1aa5845d7a
This commit is contained in:
jdlrobson 2017-12-07 15:04:36 -08:00 committed by Jdlrobson
parent b20e1a3b25
commit e87d838466
5 changed files with 11 additions and 3 deletions

View File

@ -60,6 +60,7 @@ Feature: Language selection
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 see the language overlay
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

View File

@ -7,7 +7,8 @@ When(/^I see the language overlay$/) do
end
When /^I click on a language from the list of all languages$/ do
on(ArticlePage).non_suggested_language_link_element.when_present.click
# API requests can sometimes take a long time so give additional time to verify this
on(ArticlePage).non_suggested_language_link_element.when_present(15).click
end
Then(/^I should not see the languages overlay$/) do

View File

@ -29,7 +29,7 @@ When(/^I click the search in pages button$/) do
end
When(/^I click a search watch star$/) do
on(ArticlePage).search_watchstars_element.when_present.click
on(ArticlePage).search_watchstars_element.when_present(15).click
end
When(/^I press the enter key$/) do

View File

@ -19,12 +19,17 @@ When(/^I add a topic called "(.+)"$/) do |topic|
end
end
When(/^I see the talk overlay$/) do
on(ArticlePage).overlay_element.when_visible
end
When(/^I click the add discussion button$/) do
on(ArticlePage).talkadd_element.when_present.click
end
Then(/^I should see the topic called "(.+)" in the list of topics$/) do |topic|
expect(on(ArticlePage).talk_overlay_first_topic_title_element.when_present.text).to match topic
# Timeout is high as the previous action hits the API which may take some time
expect(on(ArticlePage).talk_overlay_first_topic_title_element.when_present(20).text).to match topic
end
Then(/^I should see the talk overlay$/) do

View File

@ -42,6 +42,7 @@ Feature: Talk
And I am logged into the mobile website
And the page "Selenium talk test" exists
When I click the talk button
And I see the talk overlay
And no topic is present
And I add a topic called "New topic"
Then I should see the topic called "New topic" in the list of topics