Skip to content

Commit b07400b

Browse files
committed
Try looking for a Warning instead of an Error in the acceptance test
1 parent e2bb527 commit b07400b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

atest/05_Features/Configuration.robot

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Resource ../Keywords.robot
88
${CONFIG PYLS} {"language_servers": {"pyls": {"serverSettings": {"pyls": {"plugins": {"flake8": {"enabled": true},"pyflakes": {"enabled": false}}}}}}}
99
# pyflakes is enabled by default, but flake8 is not
1010
${PYFLAKES DIAGNOSTIC} ${CSS DIAGNOSTIC}-Error[title="undefined name 'foo' (pyflakes)"]
11-
${FLAKE8 DIAGNOSTIC} ${CSS DIAGNOSTIC}-Error[title="undefined name 'foo' (flake8)"]
11+
${FLAKE8 DIAGNOSTIC} ${CSS DIAGNOSTIC}-Warning[title="undefined name 'foo' (flake8)"]
1212

13-
${CONFIG YAML SCHEMA} {"language_servers": {"yaml-language-server": {"serverSettings": {"yaml.schemas": {"http://json.schemastore.org/composer": "*"}}}}}
14-
${YAML DIAGNOSTIC} ${CSS DIAGNOSTIC}-Error[title="duplicate key"]
15-
# TODO: fix this for the actual schema error to expect
16-
${SCHEMA DIAGNOSTIC} ${CSS DIAGNOSTIC}-Error[title="TODO: schema error here"]
13+
# ${CONFIG YAML SCHEMA} {"language_servers": {"yaml-language-server": {"serverSettings": {"yaml.schemas": {"http://json.schemastore.org/composer": "*"}}}}}
14+
# ${YAML DIAGNOSTIC} ${CSS DIAGNOSTIC}-Error[title="duplicate key"]
15+
# # TODO: fix this for the actual schema error to expect
16+
# ${SCHEMA DIAGNOSTIC} ${CSS DIAGNOSTIC}-Error[title="TODO: schema error here"]
1717

1818
*** Test Cases ***
1919
Pyls Configuration
@@ -24,12 +24,15 @@ Pyls Configuration
2424
Open Diagnostics Panel
2525
Drag and Drop By Offset ${JLAB XP DOCK TAB}\[contains(., 'Diagnostics Panel')] 600 -200
2626
Capture Page Screenshot 01-diagnostics-and-settings.png
27+
# Diagnostic panel should show pyflakes diagnostics, but no flake8
2728
Wait Until Page Contains Element ${PYFLAKES DIAGNOSTIC} timeout=20s
2829
Page Should Not Contain ${FLAKE8 DIAGNOSTIC}
2930
Set Editor Content ${CONFIG PYLS} ${CSS USER SETTINGS}
3031
Click Element css:button[title\='Save User Settings']
3132
Capture Page Screenshot 02-settings-changed.png
33+
# After updating settings, we should see flake8 but no pyflakes
3234
Wait Until Page Contains Element ${FLAKE8 DIAGNOSTIC} timeout=20s
35+
Page Should Not Contain ${PYFLAKES DIAGNOSTIC}
3336
Capture Page Screenshot 03-schema-diagnostic-found.png
3437
[Teardown] Clean Up After Working with File and Settings ${file}
3538

packages/jupyterlab-lsp/schema/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"properties": {
66
"language_servers": {
77
"title": "Language Server",
8-
"description": "Language-server specific configuration, keyed by implementation, e.g: \n\npyls: {\n serverSettings: {\n pyls: {\n plugins: {\n pydocstyle: {\n enabled: true\n },\n pyflakes: {\n enabled: false\n },\n flake8: {\n enabled: true\n }\n }\n }\n }\n}\n\nAlternatively, using VSCode's naming convention:\n\npyls: {\n serverSettings: {\n pyls.plugins.pydocstyle.enabled: true,\n pyls.plugins.pyflakes.enabled: false,\n pyls.plugins.flake8.enabled: true\n }\n}",
8+
"description": "Language-server specific configuration, keyed by implementation, e.g: \n\npyls: {\n serverSettings: {\n pyls: {\n plugins: {\n pydocstyle: {\n enabled: true\n },\n pyflakes: {\n enabled: false\n },\n flake8: {\n enabled: true\n }\n }\n }\n }\n}\n\nAlternatively, using VSCode's naming convention:\n\npyls: {\n serverSettings: {\n \"pyls.plugins.pydocstyle.enabled\": true,\n \"pyls.plugins.pyflakes.enabled\": false,\n \"pyls.plugins.flake8.enabled\": true\n }\n}",
99
"type": "object",
1010
"default": {},
1111
"patternProperties": {

0 commit comments

Comments
 (0)