| 1 |
'use strict'; |
| 2 |
|
| 3 |
const createScreenshotEnvironment = require( './screenshots.js' ).createScreenshotEnvironment, |
| 4 |
test = require( 'selenium-webdriver/testing' ), |
| 5 |
userGuide = require( './screenshots-client/userGuide.js' ), |
| 6 |
runScreenshotTest = createScreenshotEnvironment( test ); |
| 7 |
|
| 8 |
function runTests( lang ) { |
| 9 |
|
| 10 |
const runLang = runScreenshotTest.bind( this, lang ); |
| 11 |
|
| 12 |
test.describe( 'Screenshots: ' + lang, function () { |
| 13 |
this.lang = lang; |
| 14 |
test.it( 'Screenshots', () => { |
| 15 |
|
| 16 |
|
| 17 |
runLang( 'VisualEditor_toolbar', userGuide.toolbar, 0 ); |
| 18 |
runLang( 'VisualEditor_toolbar_actions', userGuide.toolbarActions, 0 ); |
| 19 |
|
| 20 |
|
| 21 |
runLang( 'VisualEditor_Citoid_Inspector', userGuide.citoidInspector ); |
| 22 |
runLang( 'VisualEditor_Citoid_Inspector_Manual', userGuide.citoidInspectorManual ); |
| 23 |
runLang( 'VisualEditor_Citoid_Inspector_Reuse', userGuide.citoidInspectorReuse, undefined, userGuide.citoidInspectorTeardown ); |
| 24 |
|
| 25 |
|
| 26 |
runLang( 'VisualEditor_Toolbar_Headings', userGuide.toolbarHeadings ); |
| 27 |
runLang( 'VisualEditor_Toolbar_Formatting', userGuide.toolbarFormatting ); |
| 28 |
runLang( 'VisualEditor_Toolbar_Lists_and_indentation', userGuide.toolbarLists ); |
| 29 |
runLang( 'VisualEditor_Insert_Menu', userGuide.toolbarInsert ); |
| 30 |
runLang( 'VisualEditor_Media_Insert_Menu', userGuide.toolbarMedia ); |
| 31 |
runLang( 'VisualEditor_Template_Insert_Menu', userGuide.toolbarTemplate ); |
| 32 |
runLang( 'VisualEditor_insert_table', userGuide.toolbarTable ); |
| 33 |
runLang( 'VisualEditor_Formula_Insert_Menu', userGuide.toolbarFormula ); |
| 34 |
runLang( 'VisualEditor_References_List_Insert_Menu', userGuide.toolbarReferences ); |
| 35 |
runLang( 'VisualEditor_More_Settings', userGuide.toolbarSettings ); |
| 36 |
runLang( 'VisualEditor_page_settings_item', userGuide.toolbarPageSettings ); |
| 37 |
runLang( 'VisualEditor_category_item', userGuide.toolbarCategory, undefined, userGuide.toolbarTeardown ); |
| 38 |
|
| 39 |
|
| 40 |
runLang( 'VisualEditor_save_dialog', userGuide.save, undefined, userGuide.saveTeardown ); |
| 41 |
|
| 42 |
|
| 43 |
runLang( 'VisualEditor_Toolbar_SpecialCharacters', userGuide.specialCharacters, undefined, userGuide.specialCharactersTeardown ); |
| 44 |
|
| 45 |
|
| 46 |
runLang( 'VisualEditor_formula', userGuide.formula, undefined, userGuide.formulaTeardown ); |
| 47 |
|
| 48 |
|
| 49 |
runLang( 'VisualEditor_references_list', userGuide.referenceList, undefined, userGuide.referenceListTeardown ); |
| 50 |
|
| 51 |
|
| 52 |
runLang( 'VisualEditor_citoid_Cite_button', userGuide.toolbarCite, undefined, userGuide.toolbarCiteTeardown ); |
| 53 |
|
| 54 |
|
| 55 |
runLang( 'VisualEditor-link_tool-search_results', userGuide.linkSearchResults, undefined, userGuide.linkSearchResultsTeardown ); |
| 56 |
} ); |
| 57 |
} ); |
| 58 |
} |
| 59 |
|
| 60 |
langs.forEach( ( lang ) => { |
| 61 |
runTests( lang ); |
| 62 |
} ); |