Refactoring tests to make them more robust
Fixed typo in feature description. Merged two background steps since the last one did not have any actions that could be done manually. Removed assertions from a "given" (login) step. We already extensively test logging in. If this extension needs login tests, they should go to a separate feature file. Moved methods from steps file to page file, following page object pattern. Change-Id: Ic5250970362718f5ed887c9ac8fd56948724b210
This commit is contained in:
committed by
Niklas Laxström
parent
afc5774ee2
commit
f45d5bfcd5
@@ -38,4 +38,30 @@ class PanelPage
|
||||
|
||||
# Is there way to access the html element?
|
||||
div(:interface, id: 'footer')
|
||||
|
||||
def get_content_font
|
||||
get_font('#mw-content-text')
|
||||
end
|
||||
def get_font(selector)
|
||||
@browser.execute_script( "return $( '#{selector}' ).css( 'font-family' );" )
|
||||
end
|
||||
def get_interface_font
|
||||
get_font('body')
|
||||
end
|
||||
def language_to_code(language)
|
||||
case language
|
||||
when 'German'
|
||||
'de'
|
||||
when 'English'
|
||||
'en'
|
||||
when 'Finnish'
|
||||
'fi'
|
||||
when 'Hebrew'
|
||||
'he'
|
||||
when 'Hindi'
|
||||
'hi'
|
||||
else
|
||||
pending
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user