mediawiki-extensions-Math/tests/browser/features/support/pages/edit_page.rb
Željko Filipin d2ff0ef699 Fixed broken Selenium test
The test is broken on beta cluster because the formula is rendered as
meta tag. It is rendered at img tag on my mediawiki-vagrant virtual
machine. The test now works on both environments.

Bug: T128190
Change-Id: I458d618af24533d104fcac25a8d8c6468b14605a
2016-04-26 19:07:49 +02:00

17 lines
370 B
Ruby

class EditPage
include PageObject
page_url 'Special:Random?action=edit'
text_area(:article_text, id: 'wpTextbox1')
button(:preview, id: 'wpPreview')
def math_image_element
if env.lookup(:mediawiki_environment, default: nil) == 'beta'
browser.meta(class: 'mwe-math-fallback-image-inline')
else
browser.img(class: 'tex')
end
end
end