Files
mediawiki-extensions-Univer…/tests/browser/features/step_definitions/font_selection_steps.rb
Santhosh Thottingal 27771fdeaf Restore enableWebfonts pref and remove uls-enable
This patch restores the enableWebfonts preference, stored inside
the uls-preferences blob. It existed as 'enable-webfonts' in
the past and was removed in
If735a733717596fae03042c5e277bd538bd8501f

Each wiki can be configured to load the fonts by default
using the new global variable $wgULSWebfontsEnabled.
Its default value is true (to load fonts).

This also removes the preference 'uls-enable', recently added in
I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f

The initialization of ext.uls.webfonts.js is changed as well,
so that minimal webfonts JS library code is loaded,
and the rest is loaded only if a user requests it.

Bug: 60304
Change-Id: I49e812eae32266f165591c75fd67b86ca06b13f0
2014-02-10 17:40:30 +05:30

50 lines
1.5 KiB
Ruby

When(/^I click the checkbox to (?:enable|disable) fonts downloading$/) do
on(PanelPage).webfonts_enable_checkbox_element.click
end
Then(/^the checkbox to enable fonts downloading appears$/) do
on(PanelPage).webfonts_enable_checkbox_element.should be_visible
end
Then(/^the checkbox to enable fonts downloading is checked$/) do
on(PanelPage).webfonts_enable_checkbox_element.should be_checked
end
Then(/^the checkbox to enable fonts downloading is not checked$/) do
on(PanelPage).webfonts_enable_checkbox_element.should_not be_checked
end
Given(/^I open ULS$/) do
on(PanelPage).trigger_personal_element.when_visible.click
end
Then(/^the active content font must be the same as font prior to the preview$/) do
pending("bug #56081") do
on(PanelPage).content_font.should == @original_content_font
end
end
Then(/^the active interface font must be the same as font prior to the preview$/) do
on(PanelPage).interface_font.should == @original_interface_font
end
Then(/^the selected content font must be (.*?)$/) do |font|
on(PanelPage).selected_content_font_element.when_visible.value.should == font
end
Then(/^the interface font is (.*?)$/) do |font|
on(PanelPage).interface_font.should match("^#{font}")
end
Then(/^the content font is (.*?)$/) do |font|
on(PanelPage).content_font.should match("^#{font}")
end
Then(/^webfonts are applied to body$/) do
on(PanelPage).webfonts_library_loaded.should be_true
end
Then(/^webfonts are not applied to body$/) do
on(PanelPage).webfonts_library_loaded.should be_false
end