Refactoring Applying the live preview of interface font
We renamed get*font to just *font Change-Id: Ib6992849a2bf927d2e2d465231df58857e506a62
This commit is contained in:
@@ -42,14 +42,11 @@ class PanelPage
|
||||
# Is there way to access the html element?
|
||||
div(:interface, id: 'footer')
|
||||
|
||||
def get_content_font
|
||||
get_font('#mw-content-text')
|
||||
def content_font
|
||||
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')
|
||||
def interface_font
|
||||
font('body')
|
||||
end
|
||||
def language_to_code(language)
|
||||
case language
|
||||
@@ -67,4 +64,9 @@ class PanelPage
|
||||
pending
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def font(selector)
|
||||
@browser.execute_script( "return $( '#{selector}' ).css( 'font-family' );" )
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user