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:
@@ -14,27 +14,27 @@ Feature: Font selection
|
|||||||
And I set "German" as the interface language
|
And I set "German" as the interface language
|
||||||
And I open ULS
|
And I open ULS
|
||||||
And I open display settings
|
And I open display settings
|
||||||
When I open fonts panel of language settings
|
When I open Fonts panel of language settings
|
||||||
|
|
||||||
Scenario: Font selector appears
|
Scenario: Font selector appears
|
||||||
Then a font selector for interface language appears
|
Then a font selector for interface language appears
|
||||||
And a font selector for content language appears
|
And a font selector for content language appears
|
||||||
|
|
||||||
Scenario: Discarding live preview of content font
|
Scenario: Discarding live preview of content font
|
||||||
When I select "OpenDyslexic" font for the content language for the live preview
|
When I select OpenDyslexic font for the content language for the live preview
|
||||||
And I close the panel to discard the changes
|
And I close the panel to discard the changes
|
||||||
Then the active content font must be the same as font prior to the preview
|
Then the active content font must be the same as font prior to the preview
|
||||||
# System is the default value for English and German
|
# System is the default value for English and German
|
||||||
And the selected content font must be "Systemschriftart"
|
And the selected content font must be "Systemschriftart"
|
||||||
|
|
||||||
Scenario: Discarding live preview of interface font
|
Scenario: Discarding live preview of interface font
|
||||||
When I select "OpenDyslexic" font for the interface language for the live preview
|
When I select OpenDyslexic font for the interface language for the live preview
|
||||||
And I close the panel to discard the changes
|
And I close the panel to discard the changes
|
||||||
Then the active interface font must be the same as font prior to the preview
|
Then the active interface font must be the same as font prior to the preview
|
||||||
# System is the default value for English and German
|
# System is the default value for English and German
|
||||||
And the selected interface font must be "Systemschriftart"
|
And the selected interface font must be "Systemschriftart"
|
||||||
|
|
||||||
Scenario: Applying the live preview of interface font
|
Scenario: Applying the live preview of interface font
|
||||||
When I select "OpenDyslexic" font for the interface language for the live preview
|
When I select OpenDyslexic font for the interface language for the live preview
|
||||||
And I apply the changes
|
And I apply the changes
|
||||||
Then the interface font must be changed to the "OpenDyslexic" font
|
Then the interface font must be changed to the "OpenDyslexic" font
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ Given(/^I open display settings$/) do
|
|||||||
on(PanelPage).panel_display_element.when_visible.click
|
on(PanelPage).panel_display_element.when_visible.click
|
||||||
end
|
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
|
Then(/^the active content font must be the same as font prior to the preview$/) do
|
||||||
pending('bug #56081') do
|
pending('bug #56081') do
|
||||||
on(PanelPage).content_font.should == @original_content_font
|
on(PanelPage).content_font.should == @original_content_font
|
||||||
@@ -22,13 +18,13 @@ end
|
|||||||
|
|
||||||
Then(/^the selected content font must be "(.*?)"$/) do |font|
|
Then(/^the selected content font must be "(.*?)"$/) do |font|
|
||||||
step 'I open display settings'
|
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
|
on(PanelPage).selected_content_font.should == font
|
||||||
end
|
end
|
||||||
|
|
||||||
Then(/^the selected interface font must be "(.*?)"$/) do |font|
|
Then(/^the selected interface font must be "(.*?)"$/) do |font|
|
||||||
step 'I open display settings'
|
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
|
on(PanelPage).selected_interface_font.should == font
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ When(/^I open "(.*?)" panel of language settings$/) do |panel|
|
|||||||
end
|
end
|
||||||
|
|
||||||
case panel
|
case panel
|
||||||
when "Fonts"
|
|
||||||
page.panel_display_element.when_visible.click
|
|
||||||
page.panel_fonts_element.click
|
|
||||||
when "Input"
|
when "Input"
|
||||||
page.panel_input_element.when_visible.click
|
page.panel_input_element.when_visible.click
|
||||||
else
|
else
|
||||||
@@ -42,11 +39,11 @@ When(/^I open "(.*?)" panel of language settings$/) do |panel|
|
|||||||
end
|
end
|
||||||
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
|
on(PanelPage).font_for_interface = font
|
||||||
end
|
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
|
on(PanelPage).font_for_content = font
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,16 @@ When(/^I start editing a page$/) do
|
|||||||
visit(NoInterlanguagePage).edit_link_element.click
|
visit(NoInterlanguagePage).edit_link_element.click
|
||||||
end
|
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|
|
Then(/^I should see the edit area text being displayed using "(.*?)" font$/) do |font|
|
||||||
on(EditPage).editarea_element.style("font-family").should match(/^#{font}/)
|
on(EditPage).editarea_element.style("font-family").should match(/^#{font}/)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,10 +18,9 @@ Feature: Font preferences respected in different languages
|
|||||||
And I start editing a page
|
And I start editing a page
|
||||||
Then I should see the edit area text being displayed using "monospace" font
|
Then I should see the edit area text being displayed using "monospace" font
|
||||||
|
|
||||||
|
@commons.wikimedia.beta.wmflabs.org
|
||||||
Scenario: Edit area should use the fonts selected by the user from ULS for a language
|
Scenario: Edit area should use the fonts selected by the user from ULS for a language
|
||||||
When I open "Fonts" panel of language settings
|
When I select OpenDyslexic font for the content language
|
||||||
And I select "OpenDyslexic" font for the content language for the live preview
|
|
||||||
And I apply the changes
|
|
||||||
And I start editing a page
|
And I start editing a page
|
||||||
Then I should see the edit area text being displayed using "OpenDyslexic" font
|
Then I should see the edit area text being displayed using "OpenDyslexic" font
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user