@@ -5,30 +5,50 @@ Force Tags feature:config
5
5
Resource ../Keywords.robot
6
6
7
7
*** Variables ***
8
+ ${CONFIG PYLS } {"language_servers": {"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 } -Error[title="undefined name 'foo' (flake8)"]
12
+
8
13
${CONFIG YAML SCHEMA } {"language_servers": {"yaml-language-server": {"config": {"yaml.schemas": {"http://json.schemastore.org/composer": "*"}}}}}
9
14
${YAML DIAGNOSTIC } ${CSS DIAGNOSTIC } -Error[title="duplicate key"]
10
15
# TODO: fix this for the actual schema error to expect
11
16
${SCHEMA DIAGNOSTIC } ${CSS DIAGNOSTIC } -Error[title="TODO: schema error here"]
12
17
13
18
*** Test Cases ***
14
- YAML Schema
15
- ${file } = Set Variable composer-schema.yaml
16
- Prepare File for Editing YAML config ${file }
19
+ Pyls Configuration
20
+ ${file } = Set Variable style.py
21
+ Prepare File for Editing PYTHON config ${file }
17
22
Open in Advanced Settings ${LSP PLUGIN ID }
18
23
Drag and Drop By Offset ${JLAB XP DOCK TAB } \[contains(., '${file } ')] 0 100
19
24
Capture Page Screenshot 01-file-and-settings.png
20
- Wait Until Page Contains Element ${YAML DIAGNOSTIC } timeout=20s
21
- Page Should Not Contain ${SCHEMA DIAGNOSTIC }
22
- Set Editor Content ${CONFIG YAML SCHEMA } ${CSS USER SETTINGS }
25
+ Wait Until Page Contains Element ${PYFLAKES DIAGNOSTIC } timeout=20s
26
+ Page Should Not Contain ${FLAKE8 DIAGNOSTIC }
27
+ Set Editor Content ${CONFIG PYLS } ${CSS USER SETTINGS }
23
28
Click Element css:button[title\='Save User Settings']
24
29
Capture Page Screenshot 02-settings-changed.png
25
- # TODO: ideally, the configuration should take effect immediately, but might have
26
- # to close the document and re-open it
27
- # Prepare File for Editing YAML config ${file}
28
- Wait Until Page Contains Element ${SCHEMA DIAGNOSTIC } timeout=20s
30
+ Wait Until Page Contains Element ${FLAKE8 DIAGNOSTIC } timeout=20s
29
31
Capture Page Screenshot 03-schema-diagnostic-found.png
30
32
[Teardown] Clean Up After Working with File and Settings ${file }
31
33
34
+ # YAML Schema
35
+ # ${file} = Set Variable composer-schema.yaml
36
+ # Prepare File for Editing YAML config ${file}
37
+ # Open in Advanced Settings ${LSP PLUGIN ID}
38
+ # Drag and Drop By Offset ${JLAB XP DOCK TAB}\[contains(., '${file}')] 0 100
39
+ # Capture Page Screenshot 01-file-and-settings.png
40
+ # Wait Until Page Contains Element ${YAML DIAGNOSTIC} timeout=20s
41
+ # Page Should Not Contain ${SCHEMA DIAGNOSTIC}
42
+ # Set Editor Content ${CONFIG YAML SCHEMA} ${CSS USER SETTINGS}
43
+ # Click Element css:button[title\='Save User Settings']
44
+ # Capture Page Screenshot 02-settings-changed.png
45
+ # # TODO: ideally, the configuration should take effect immediately, but might have
46
+ # # to close the document and re-open it
47
+ # # Prepare File for Editing YAML config ${file}
48
+ # Wait Until Page Contains Element ${SCHEMA DIAGNOSTIC} timeout=20s
49
+ # Capture Page Screenshot 03-schema-diagnostic-found.png
50
+ # [Teardown] Clean Up After Working with File and Settings ${file}
51
+
32
52
*** Keywords ***
33
53
Clean Up After Working with File and Settings
34
54
[Arguments] ${file }
0 commit comments