@@ -4,65 +4,59 @@ Suite Setup Setup Suite For Screenshots config
4
4
Force Tags feature:config
5
5
Resource ./Keywords.robot
6
6
7
- *** Variables ***
8
- ${CONFIG PYLS } {"language_servers": {"pyls": {"serverSettings": {"pyls": {"plugins": {"flake8": {"enabled": true},"pyflakes": {"enabled": false}}}}}}}
9
- # pyflakes is enabled by default, but flake8 is not
10
- ${PYFLAKES DIAGNOSTIC } ${CSS DIAGNOSTIC } -Error[title="undefined name 'foo' (pyflakes)"]
11
- ${FLAKE8 DIAGNOSTIC } ${CSS DIAGNOSTIC } -Warning[title="undefined name 'foo' (flake8)"]
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)
12
14
13
- # Sets expectation that all YAML files (wildcard *) adhere to Composer spec
14
- ${CONFIG YAML SCHEMA } {"language_servers": {"yaml-language-server": {"serverSettings": {"yaml.schemas": {"http://json.schemastore.org/composer": "*"}}}}}
15
- # Composer YAML files don't allow a "greetings" key
16
- ${SCHEMA DIAGNOSTIC } ${CSS DIAGNOSTIC } -Error[title="Property greetings is not allowed."]
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.
17
21
18
- *** Test Cases ***
19
- Pyls Configuration
20
- ${file } = Set Variable style.py
21
- ${tab } = Set Variable ${JLAB XP DOCK TAB } \[contains(., '${file } ')]
22
- Prepare File for Editing PYTHON config ${file }
23
- Open in Advanced Settings ${LSP PLUGIN ID }
24
- Drag and Drop By Offset ${tab } 0 100
25
- Wait Until Fully Initialized
26
- Open Diagnostics Panel
27
- Drag and Drop By Offset ${JLAB XP DOCK TAB } \[contains(., 'Diagnostics Panel')] 600 -200
28
- Ensure Sidebar Is Closed
29
- Capture Page Screenshot 01-diagnostics-and-settings.png
30
- # Diagnostic panel should show pyflakes diagnostics, but no flake8
31
- Wait Until Page Contains Element ${PYFLAKES DIAGNOSTIC } timeout=60s
32
- Page Should Not Contain ${FLAKE8 DIAGNOSTIC }
33
- Set Editor Content ${CONFIG PYLS } ${CSS USER SETTINGS }
34
- Click Element css:button[title\='Save User Settings']
35
- Drag and Drop By Offset ${tab } 0 100
36
- Lab Command Save Python File
37
- Capture Page Screenshot 02-settings-changed.png
38
- # After updating settings, we should see flake8 but no pyflakes
39
- Wait Until Page Contains Element ${FLAKE8 DIAGNOSTIC } timeout=60s
40
- Page Should Not Contain ${PYFLAKES DIAGNOSTIC }
41
- Capture Page Screenshot 03-flake8-diagnostic-found.png
42
- [Teardown] Clean Up After Working with File and Settings ${file }
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
43
28
44
- YAML Schema
45
- ${file } = Set Variable example.yaml
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 } "]
46
39
${tab } = Set Variable ${JLAB XP DOCK TAB } \[contains(., '${file } ')]
47
- Prepare File for Editing YAML config ${file }
40
+ ${close icon } = Set Variable *[contains(@class, 'm-TabBar-tabCloseIcon')]
41
+ Prepare File for Editing ${language } config ${file }
48
42
Open in Advanced Settings ${LSP PLUGIN ID }
49
43
Drag and Drop By Offset ${tab } 0 100
50
44
Wait Until Fully Initialized
51
45
Open Diagnostics Panel
52
46
Drag and Drop By Offset ${JLAB XP DOCK TAB } \[contains(., 'Diagnostics Panel')] 600 -200
53
- Capture Page Screenshot 01-diagnostics-and-settings.png
54
- # Diagnostic panel shouldn't show "Property ... is not allowed"
55
- Page Should Not Contain ${SCHEMA DIAGNOSTIC }
56
- Set Editor Content ${CONFIG YAML SCHEMA } ${CSS USER SETTINGS }
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
57
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
58
59
Capture Page Screenshot 02-settings-changed.png
59
- # Now show the Composer YAML error
60
- Wait Until Page Contains Element ${SCHEMA DIAGNOSTIC } timeout=60s
61
- Capture Page Screenshot 03-schema-diagnostic-found.png
60
+ Wait Until Page Contains Element ${after diagnostic } timeout=30s
61
+ Capture Page Screenshot 03-configured-diagnostic-found.png
62
62
[Teardown] Clean Up After Working with File and Settings ${file }
63
-
64
- *** Keywords ***
65
- Clean Up After Working with File and Settings
66
- [Arguments] ${file }
67
- Clean Up After Working With File ${file }
68
- Reset Plugin Settings
0 commit comments