Refactoring Applying the live preview of interface font

We renamed get*font to just *font

Change-Id: Ib6992849a2bf927d2e2d465231df58857e506a62
This commit is contained in:
Niklas Laxström
2013-10-28 12:19:36 +02:00
committed by Amire80
parent b47a8ac5d3
commit 891b6977ce
5 changed files with 18 additions and 19 deletions

View File

@@ -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