Fixed failing Selenium test
When user is logged in, visual editor is the default editor. When user is not logged in, source editor is the default editor. When the test does not log in, everything works just fine. Bug: T126463 Change-Id: I1f15000a275657c0a92172781f57c5d1db537dcc
This commit is contained in:
parent
e750104394
commit
a4948c208a
|
@ -1,9 +1,8 @@
|
||||||
@chrome @en.wikipedia.beta.wmflabs.org @firefox @login
|
@chrome @en.wikipedia.beta.wmflabs.org @firefox
|
||||||
Feature: Math
|
Feature: Math
|
||||||
|
|
||||||
Scenario: Display simple math
|
Scenario: Display simple math
|
||||||
Given I am logged in
|
Given I am editing a random page with source editor
|
||||||
And I am creating a page with source editor
|
|
||||||
When I type <math>3 + 2</math>
|
When I type <math>3 + 2</math>
|
||||||
And I click Preview
|
And I click Preview
|
||||||
Then the page should contain an img tag
|
Then the page should contain an img tag
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
Given(/^I am creating a page with source editor$/) do
|
Given(/^I am editing a random page with source editor$/) do
|
||||||
visit(DoesNotExistPage, using_params: { page_name: @random_string })
|
visit EditPage
|
||||||
end
|
|
||||||
|
|
||||||
When(/^I click link Create$/) do
|
|
||||||
on(DoesNotExistPage).action_edit_element.when_present.click
|
|
||||||
end
|
end
|
||||||
|
|
||||||
When(/^I click Preview$/) do
|
When(/^I click Preview$/) do
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
class DoesNotExistPage
|
|
||||||
include PageObject
|
|
||||||
|
|
||||||
page_url '<%=params[:page_name]%>?action=edit'
|
|
||||||
end
|
|
|
@ -1,6 +1,8 @@
|
||||||
class EditPage
|
class EditPage
|
||||||
include PageObject
|
include PageObject
|
||||||
|
|
||||||
|
page_url 'Special:Random?action=edit'
|
||||||
|
|
||||||
text_area(:article_text, id: 'wpTextbox1')
|
text_area(:article_text, id: 'wpTextbox1')
|
||||||
img(:math_image, class: 'tex')
|
img(:math_image, class: 'tex')
|
||||||
button(:preview, id: 'wpPreview')
|
button(:preview, id: 'wpPreview')
|
||||||
|
|
Loading…
Reference in New Issue