Refactor "Edit area should use the fonts selected by the user from ULS for a language"
* Removed step which different only in case of one letter * Removed quotes from few steps * Fixed the scenario, but marked it as pending due to a bug Change-Id: Iab160782e73071b543ef550dc7d86171e3636d23
This commit is contained in:
@@ -6,10 +6,6 @@ Given(/^I open display settings$/) do
|
||||
on(PanelPage).panel_display_element.when_visible.click
|
||||
end
|
||||
|
||||
When(/^I open fonts panel of language settings$/) do
|
||||
on(PanelPage).panel_fonts_element.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
|
||||
@@ -22,13 +18,13 @@ end
|
||||
|
||||
Then(/^the selected content font must be "(.*?)"$/) do |font|
|
||||
step 'I open display settings'
|
||||
step 'I open fonts panel of language 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'
|
||||
step 'I open Fonts panel of language settings'
|
||||
on(PanelPage).selected_interface_font.should == font
|
||||
end
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ When(/^I open "(.*?)" panel of language settings$/) do |panel|
|
||||
end
|
||||
|
||||
case panel
|
||||
when "Fonts"
|
||||
page.panel_display_element.when_visible.click
|
||||
page.panel_fonts_element.click
|
||||
when "Input"
|
||||
page.panel_input_element.when_visible.click
|
||||
else
|
||||
@@ -42,11 +39,11 @@ When(/^I open "(.*?)" panel of language settings$/) do |panel|
|
||||
end
|
||||
end
|
||||
|
||||
When(/^I select "(.*?)" font for the interface language for the live preview$/) do |font|
|
||||
When(/^I select (.*?) font for the interface language for the live preview$/) do |font|
|
||||
on(PanelPage).font_for_interface = font
|
||||
end
|
||||
|
||||
When(/^I select "(.*?)" font for the content language for the live preview$/) do |font|
|
||||
When(/^I select (.*?) font for the content language for the live preview$/) do |font|
|
||||
on(PanelPage).font_for_content = font
|
||||
end
|
||||
|
||||
|
||||
@@ -14,6 +14,16 @@ When(/^I start editing a page$/) do
|
||||
visit(NoInterlanguagePage).edit_link_element.click
|
||||
end
|
||||
|
||||
When(/^I select (.*?) font for the content language$/) do |font|
|
||||
step 'I open the Universal Language Selector'
|
||||
step 'I open Display panel of language settings'
|
||||
step 'I open Fonts panel of language settings'
|
||||
pending("Bug 56885") do
|
||||
step "I select #{font} font for the content language for the live preview"
|
||||
end
|
||||
step 'I apply the changes'
|
||||
end
|
||||
|
||||
Then(/^I should see the edit area text being displayed using "(.*?)" font$/) do |font|
|
||||
on(EditPage).editarea_element.style("font-family").should match(/^#{font}/)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user