Refactoring Discarding live preview of interface font
Includes fix for content font as well Change-Id: Ie97c5d45c6613889975ca6af59c6bd0856d331dc
This commit is contained in:
@@ -16,8 +16,18 @@ Then(/^the active content font must be the same as font prior to the preview$/)
|
||||
end
|
||||
end
|
||||
|
||||
Then(/^the active interface font must be the same as font prior to the preview$/) do
|
||||
on(PanelPage).get_interface_font.should == @original_interface_font
|
||||
end
|
||||
|
||||
Then(/^the selected content font must be "(.*?)"$/) do |font|
|
||||
step 'I open display settings'
|
||||
step 'I open fonts panel of language settings'
|
||||
on(PanelPage).selected_content_font.should == font
|
||||
end
|
||||
|
||||
Then(/^the selected interface font must be "(.*?)"$/) do |font|
|
||||
step 'I open display settings'
|
||||
step 'I open fonts panel of language settings'
|
||||
on(PanelPage).selected_interface_font.should == font
|
||||
end
|
||||
|
||||
@@ -44,18 +44,6 @@ When(/^I close the panel to discard the changes$/) do
|
||||
on(PanelPage).panel_button_close_element.click
|
||||
end
|
||||
|
||||
Then(/^the active interface font must be the same as font prior to the preview$/) do
|
||||
on(PanelPage).get_interface_font.should == @original_interface_font
|
||||
end
|
||||
|
||||
Then(/^the selected interface font must be "(.*?)"$/) do |font|
|
||||
type = 'ui'
|
||||
step 'I open "Fonts" panel of language settings'
|
||||
Selenium::WebDriver::Support::Select.new(
|
||||
@browser.driver.find_element(:id, "#{type}-font-selector")
|
||||
).first_selected_option().attribute('value').should == font
|
||||
end
|
||||
|
||||
When(/^I apply the changes$/) do
|
||||
on(PanelPage).panel_button_apply_element.click
|
||||
# Leave a little time for the settings to be saved. The settings window closes
|
||||
|
||||
Reference in New Issue
Block a user