If a user does changes in module A, does not save or cancel, goes to module B, does some changes, moves to other modules, and finally presses Apply, all changes should get saved. Similarly, if a user cancels, all changes should get cancelled. This required moving the cancel and apply button outside of modules and managed by the language settings framework. Modules get mw.uls.settings.apply or mw.uls.settings.cancel triggers to do whatever they want to do on apply or save. Includes some refactoring related to this. Bug: 53256 Change-Id: I7d773d33a980a78604b36e39bf96a5686870124e
20 lines
855 B
Ruby
20 lines
855 B
Ruby
require "page-object"
|
|
|
|
module InterlanguagePageModule
|
|
include PageObject
|
|
|
|
a(:add_links, id: 'wbc-linkToItem-link')
|
|
a(:back_to_display, text: 'Back to display settings')
|
|
a(:back_to_input, text: 'Back to input settings')
|
|
span(:cog, class: 'uls-settings-trigger')
|
|
button(:ellipsis_button, class: 'uls-more-languages button')
|
|
a(:english_link, text: 'English')
|
|
div(:input_settings, id: 'input-settings-block')
|
|
div(:language_list, class: 'row uls-language-list lcd')
|
|
text_field(:language_search, id: 'languagefilter')
|
|
button(:non_default_language, class: 'button uls-language-button', index: 1)
|
|
a(:talk, text: 'Discussion')
|
|
span(:x, id: 'languagesettings-close')
|
|
a(:how_to_use_ml_transliteration, href: 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:UniversalLanguageSelector/Input_methods/ml-transliteration')
|
|
end
|