A test for saving both ime and font preferences
Change-Id: I091f8db781bf7ea0fd8967c568604402a999356d
This commit is contained in:
@@ -20,3 +20,14 @@ Feature: Persistent settings
|
|||||||
When I close the panel to discard the changes
|
When I close the panel to discard the changes
|
||||||
And I visit a random page
|
And I visit a random page
|
||||||
Then the selected interface font must be Systemschriftart
|
Then the selected interface font must be Systemschriftart
|
||||||
|
|
||||||
|
Scenario: Changing both a font and an input method is saved
|
||||||
|
When I open Input side panel of language settings
|
||||||
|
And I click the button with the ellipsis
|
||||||
|
And in the language filter I type ml
|
||||||
|
And I click on the link to select Malayalam
|
||||||
|
And I select the ml-inscript2 input method in the panel
|
||||||
|
And I apply the changes
|
||||||
|
And I visit a random page
|
||||||
|
Then the selected interface font must be OpenDyslexic
|
||||||
|
And the selected input method for Malayalam is ml-inscript2
|
||||||
|
|||||||
@@ -4,3 +4,13 @@ Then(/^the selected interface font must be (.*?)$/) do |font|
|
|||||||
step 'I open Fonts panel of language settings'
|
step 'I open Fonts panel of language settings'
|
||||||
on(PanelPage).font_for_interface.should == font
|
on(PanelPage).font_for_interface.should == font
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then(/^the selected input method for Malayalam is ml-inscript2$/) do
|
||||||
|
@browser.execute_script(
|
||||||
|
"return $.parseJSON( mw.user.options.values['uls-preferences'] ).ime.imes.ml"
|
||||||
|
).should == 'ml-inscript2'
|
||||||
|
end
|
||||||
|
|
||||||
|
When(/^I select the ml-inscript2 input method in the panel$/) do
|
||||||
|
on(PanelPage).ml_inscript2_radio_element.click
|
||||||
|
end
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ class PanelPage
|
|||||||
|
|
||||||
div(:uls_display_settings, class: 'uls-display-settings')
|
div(:uls_display_settings, class: 'uls-display-settings')
|
||||||
|
|
||||||
|
radio_button(:ml_inscript2_radio, id: 'ml-inscript2')
|
||||||
|
|
||||||
# Is there way to access the html element?
|
# Is there way to access the html element?
|
||||||
div(:interface, id: 'footer')
|
div(:interface, id: 'footer')
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
class RandomPage
|
class RandomPage
|
||||||
include PageObject
|
include PageObject
|
||||||
|
|
||||||
@@ -9,7 +11,7 @@ class RandomPage
|
|||||||
a(:download_as_pdf, text: 'Download as PDF')
|
a(:download_as_pdf, text: 'Download as PDF')
|
||||||
a(:download_the_file, text: 'Download the file')
|
a(:download_the_file, text: 'Download the file')
|
||||||
li(:main_page, id: 'n-mainpage-description')
|
li(:main_page, id: 'n-mainpage-description')
|
||||||
a(:malayalam_link, title: 'Malayalam')
|
a(:malayalam_link, text: 'മലയാളം')
|
||||||
a(:print_export, text: 'Print/export')
|
a(:print_export, text: 'Print/export')
|
||||||
a(:printable_version, text: 'Printable version')
|
a(:printable_version, text: 'Printable version')
|
||||||
button(:search_button, id: 'searchButton')
|
button(:search_button, id: 'searchButton')
|
||||||
|
|||||||
Reference in New Issue
Block a user