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
|
||||
|
||||
Scenario: Display simple math
|
||||
Given I am logged in
|
||||
And I am creating a page with source editor
|
||||
Given I am editing a random page with source editor
|
||||
When I type <math>3 + 2</math>
|
||||
And I click Preview
|
||||
Then the page should contain an img tag
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
Given(/^I am creating a page with source editor$/) do
|
||||
visit(DoesNotExistPage, using_params: { page_name: @random_string })
|
||||
end
|
||||
|
||||
When(/^I click link Create$/) do
|
||||
on(DoesNotExistPage).action_edit_element.when_present.click
|
||||
Given(/^I am editing a random page with source editor$/) do
|
||||
visit EditPage
|
||||
end
|
||||
|
||||
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
|
||||
include PageObject
|
||||
|
||||
page_url 'Special:Random?action=edit'
|
||||
|
||||
text_area(:article_text, id: 'wpTextbox1')
|
||||
img(:math_image, class: 'tex')
|
||||
button(:preview, id: 'wpPreview')
|
||||
|
|
Loading…
Reference in New Issue