2020-06-02 20:30:00 +00:00
|
|
|
'use strict';
|
|
|
|
|
2020-04-17 21:55:45 +00:00
|
|
|
const createScreenshotEnvironment = require( './screenshots.js' ).createScreenshotEnvironment,
|
|
|
|
test = require( 'selenium-webdriver/testing' ),
|
2020-06-28 12:04:42 +00:00
|
|
|
userGuide = require( './screenshots-client/userGuide.js' ),
|
2020-04-17 21:55:45 +00:00
|
|
|
runScreenshotTest = createScreenshotEnvironment( test );
|
2017-03-28 17:15:25 +00:00
|
|
|
|
2020-04-17 21:55:45 +00:00
|
|
|
function runTests( lang ) {
|
2017-03-28 17:15:25 +00:00
|
|
|
|
2020-06-28 12:04:42 +00:00
|
|
|
const runLang = runScreenshotTest.bind( this, lang );
|
|
|
|
|
2020-04-17 21:55:45 +00:00
|
|
|
test.describe( 'Screenshots: ' + lang, function () {
|
|
|
|
this.lang = lang;
|
2024-06-04 03:39:48 +00:00
|
|
|
test.it( 'Screenshots', () => {
|
2020-08-25 15:18:04 +00:00
|
|
|
|
|
|
|
// Toolbar & action tools
|
2020-06-28 12:04:42 +00:00
|
|
|
runLang( 'VisualEditor_toolbar', userGuide.toolbar, 0 );
|
|
|
|
runLang( 'VisualEditor_toolbar_actions', userGuide.toolbarActions, 0 );
|
2020-08-25 15:18:04 +00:00
|
|
|
|
|
|
|
// Citoid inspector
|
2020-06-28 12:04:42 +00:00
|
|
|
runLang( 'VisualEditor_Citoid_Inspector', userGuide.citoidInspector );
|
|
|
|
runLang( 'VisualEditor_Citoid_Inspector_Manual', userGuide.citoidInspectorManual );
|
2020-08-25 15:18:04 +00:00
|
|
|
runLang( 'VisualEditor_Citoid_Inspector_Reuse', userGuide.citoidInspectorReuse, undefined, userGuide.citoidInspectorTeardown );
|
|
|
|
|
|
|
|
// Tool groups (headings/text style/indentation/insert/page settings)
|
2020-06-28 12:04:42 +00:00
|
|
|
runLang( 'VisualEditor_Toolbar_Headings', userGuide.toolbarHeadings );
|
|
|
|
runLang( 'VisualEditor_Toolbar_Formatting', userGuide.toolbarFormatting );
|
|
|
|
runLang( 'VisualEditor_Toolbar_Lists_and_indentation', userGuide.toolbarLists );
|
|
|
|
runLang( 'VisualEditor_Insert_Menu', userGuide.toolbarInsert );
|
|
|
|
runLang( 'VisualEditor_Media_Insert_Menu', userGuide.toolbarMedia );
|
|
|
|
runLang( 'VisualEditor_Template_Insert_Menu', userGuide.toolbarTemplate );
|
|
|
|
runLang( 'VisualEditor_insert_table', userGuide.toolbarTable );
|
|
|
|
runLang( 'VisualEditor_Formula_Insert_Menu', userGuide.toolbarFormula );
|
|
|
|
runLang( 'VisualEditor_References_List_Insert_Menu', userGuide.toolbarReferences );
|
|
|
|
runLang( 'VisualEditor_More_Settings', userGuide.toolbarSettings );
|
|
|
|
runLang( 'VisualEditor_page_settings_item', userGuide.toolbarPageSettings );
|
2020-08-25 15:18:04 +00:00
|
|
|
runLang( 'VisualEditor_category_item', userGuide.toolbarCategory, undefined, userGuide.toolbarTeardown );
|
|
|
|
|
|
|
|
// Save dialog
|
|
|
|
runLang( 'VisualEditor_save_dialog', userGuide.save, undefined, userGuide.saveTeardown );
|
|
|
|
|
|
|
|
// Special character inserter
|
|
|
|
runLang( 'VisualEditor_Toolbar_SpecialCharacters', userGuide.specialCharacters, undefined, userGuide.specialCharactersTeardown );
|
|
|
|
|
|
|
|
// Math dialog
|
|
|
|
runLang( 'VisualEditor_formula', userGuide.formula, undefined, userGuide.formulaTeardown );
|
|
|
|
|
|
|
|
// Reference list dialog
|
|
|
|
runLang( 'VisualEditor_references_list', userGuide.referenceList, undefined, userGuide.referenceListTeardown );
|
|
|
|
|
|
|
|
// Cite button
|
|
|
|
runLang( 'VisualEditor_citoid_Cite_button', userGuide.toolbarCite, undefined, userGuide.toolbarCiteTeardown );
|
|
|
|
|
|
|
|
// Link inspector
|
|
|
|
runLang( 'VisualEditor-link_tool-search_results', userGuide.linkSearchResults, undefined, userGuide.linkSearchResultsTeardown );
|
2017-03-28 17:15:25 +00:00
|
|
|
} );
|
2020-04-17 21:55:45 +00:00
|
|
|
} );
|
|
|
|
}
|
2017-03-28 17:15:25 +00:00
|
|
|
|
2024-06-04 03:39:48 +00:00
|
|
|
langs.forEach( ( lang ) => {
|
2020-06-28 12:04:42 +00:00
|
|
|
runTests( lang );
|
|
|
|
} );
|