|
| 1 | +*** Settings *** |
| 2 | +Documentation Configuration of language servers |
| 3 | +Suite Setup Setup Suite For Screenshots config |
| 4 | +Force Tags feature:config |
| 5 | +Resource ./Keywords.robot |
| 6 | + |
| 7 | +*** Test Cases *** |
| 8 | +Python |
| 9 | + [Documentation] pyflakes is enabled by default, but flake8 is not |
| 10 | + Settings Should Change Editor Diagnostics Python style.py pyls |
| 11 | + ... {"pyls": {"plugins": {"flake8": {"enabled": true},"pyflakes": {"enabled": false}}}} |
| 12 | + ... undefined name 'foo' (pyflakes) |
| 13 | + ... undefined name 'foo' (flake8) |
| 14 | + |
| 15 | +YAML |
| 16 | + [Documentation] EXPECT FAIL Composer YAML files don't allow a "greetings" key |
| 17 | + Settings Should Change Editor Diagnostics YAML example.yaml yaml-language-server |
| 18 | + ... {"yaml.schemas": {"http://json.schemastore.org/composer": "*"}} |
| 19 | + ... duplicate key |
| 20 | + ... Property greetings is not allowed. |
| 21 | + |
| 22 | +Markdown |
| 23 | + [Documentation] different englishes spell colou?r differently |
| 24 | + Settings Should Change Editor Diagnostics Markdown example.md unified-language-server |
| 25 | + ... {"unified-language-server":{"remark-parse":{"plugins":[["#remark-retext","#parse-latin"],["#retext-spell","#dictionary-en"]]}}} |
| 26 | + ... `Color` is misspelt |
| 27 | + ... `Colour` is misspelt |
| 28 | + |
| 29 | +*** Keywords *** |
| 30 | +Clean Up After Working with File and Settings |
| 31 | + [Arguments] ${file} |
| 32 | + Clean Up After Working With File ${file} |
| 33 | + Reset Plugin Settings |
| 34 | + |
| 35 | +Settings Should Change Editor Diagnostics |
| 36 | + [Arguments] ${language} ${file} ${server} ${settings} ${before} ${after} |
| 37 | + ${before diagnostic} = Set Variable ${CSS DIAGNOSTIC}\[title^="${before}"] |
| 38 | + ${after diagnostic} = Set Variable ${CSS DIAGNOSTIC}\[title^="${after}"] |
| 39 | + ${tab} = Set Variable ${JLAB XP DOCK TAB}\[contains(., '${file}')] |
| 40 | + ${close icon} = Set Variable *[contains(@class, 'm-TabBar-tabCloseIcon')] |
| 41 | + Prepare File for Editing ${language} config ${file} |
| 42 | + Open in Advanced Settings ${LSP PLUGIN ID} |
| 43 | + Drag and Drop By Offset ${tab} 0 100 |
| 44 | + Wait Until Fully Initialized |
| 45 | + Open Diagnostics Panel |
| 46 | + Drag and Drop By Offset ${JLAB XP DOCK TAB}\[contains(., 'Diagnostics Panel')] 600 -200 |
| 47 | + Click Element ${JLAB XP DOCK TAB}\[contains(., 'Launcher')]/${close icon} |
| 48 | + Wait Until Page Contains Element ${before diagnostic} timeout=30s |
| 49 | + Page Should Not Contain ${after diagnostic} |
| 50 | + Capture Page Screenshot 01-default-diagnostics-and-settings.png |
| 51 | + Set Editor Content {"language_servers": {"${server}": {"serverSettings": ${settings}}}} ${CSS USER SETTINGS} |
| 52 | + Wait Until Page Contains No errors found |
| 53 | + Capture Page Screenshot 01-default-diagnostics-and-settings.png |
| 54 | + Click Element css:button[title\='Save User Settings'] |
| 55 | + Click Element ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/${close icon} |
| 56 | + Drag and Drop By Offset ${tab} 0 100 |
| 57 | + Lab Command Save ${language} File |
| 58 | + Ensure Sidebar Is Closed |
| 59 | + Capture Page Screenshot 02-settings-changed.png |
| 60 | + Wait Until Page Contains Element ${after diagnostic} timeout=30s |
| 61 | + Capture Page Screenshot 03-configured-diagnostic-found.png |
| 62 | + [Teardown] Clean Up After Working with File and Settings ${file} |
0 commit comments