QA: Add additional steps to guard against slow test runs
Bug: T182202 Change-Id: If46620941924b86c5403c9e928911b1aa5845d7a
This commit is contained in:
parent
b20e1a3b25
commit
e87d838466
|
@ -60,6 +60,7 @@ Feature: Language selection
|
||||||
Scenario: Checking that the suggested language link has been created
|
Scenario: Checking that the suggested language link has been created
|
||||||
Given I go to a page that has languages
|
Given I go to a page that has languages
|
||||||
And I click the switch-language page action
|
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 on a language from the list of all languages
|
||||||
And I click the browser back button
|
And I click the browser back button
|
||||||
And I see the language overlay
|
And I see the language overlay
|
||||||
|
|
|
@ -7,7 +7,8 @@ When(/^I see the language overlay$/) do
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I click on a language from the list of all languages$/ do
|
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
|
end
|
||||||
|
|
||||||
Then(/^I should not see the languages overlay$/) do
|
Then(/^I should not see the languages overlay$/) do
|
||||||
|
|
|
@ -29,7 +29,7 @@ When(/^I click the search in pages button$/) do
|
||||||
end
|
end
|
||||||
|
|
||||||
When(/^I click a search watch star$/) do
|
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
|
end
|
||||||
|
|
||||||
When(/^I press the enter key$/) do
|
When(/^I press the enter key$/) do
|
||||||
|
|
|
@ -19,12 +19,17 @@ When(/^I add a topic called "(.+)"$/) do |topic|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
When(/^I see the talk overlay$/) do
|
||||||
|
on(ArticlePage).overlay_element.when_visible
|
||||||
|
end
|
||||||
|
|
||||||
When(/^I click the add discussion button$/) do
|
When(/^I click the add discussion button$/) do
|
||||||
on(ArticlePage).talkadd_element.when_present.click
|
on(ArticlePage).talkadd_element.when_present.click
|
||||||
end
|
end
|
||||||
|
|
||||||
Then(/^I should see the topic called "(.+)" in the list of topics$/) do |topic|
|
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
|
end
|
||||||
|
|
||||||
Then(/^I should see the talk overlay$/) do
|
Then(/^I should see the talk overlay$/) do
|
||||||
|
|
|
@ -42,6 +42,7 @@ Feature: Talk
|
||||||
And I am logged into the mobile website
|
And I am logged into the mobile website
|
||||||
And the page "Selenium talk test" exists
|
And the page "Selenium talk test" exists
|
||||||
When I click the talk button
|
When I click the talk button
|
||||||
|
And I see the talk overlay
|
||||||
And no topic is present
|
And no topic is present
|
||||||
And I add a topic called "New topic"
|
And I add a topic called "New topic"
|
||||||
Then I should see the topic called "New topic" in the list of topics
|
Then I should see the topic called "New topic" in the list of topics
|
||||||
|
|
Loading…
Reference in New Issue