Add new scenarios for font changes

There is currently some duplication between the various page objects
and other code. Those should be cleaned up incrementally.

Change-Id: I592829a00ca65bbecd5399b773c885c764c1cc06
This commit is contained in:
Niklas Laxström
2013-08-27 14:04:24 +03:00
committed by Amir E. Aharoni
parent 8aa7b46191
commit d695b21381
6 changed files with 198 additions and 0 deletions

View File

@@ -5,3 +5,31 @@ end
Given(/^I am logged in$/) do
visit(LoginPage).login_with(@mediawiki_username, @mediawiki_password)
end
def language_to_code(language)
case language
when 'German'
'de'
when 'English'
'en'
else
pending
end
end
def get_font(selector)
@browser.execute_script( "return $( '#{selector}' ).css( 'font-family' );" )
end
def get_content_font()
get_font('#mw-content-text')
end
def get_interface_font()
get_font('body')
end
After('@reset-preferences-after') do |scenario|
visit(ResetPreferencesPage)
on(ResetPreferencesPage).submit_element.click
end