Skip to content

Commit 4ca2dba

Browse files
authored
Merge pull request #770 from jupyter-lsp/fix-tests-settings-editor
Fix tests for JupyterLab 3.3
2 parents b024b1b + 6a54274 commit 4ca2dba

File tree

7 files changed

+53
-40
lines changed

7 files changed

+53
-40
lines changed

atest/03_Notebook.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Moving Cells Around
4848
Foreign Extractors
4949
${file} = Set Variable Foreign extractors.ipynb
5050
Configure JupyterLab Plugin
51-
... {"language_servers": {"texlab": {"serverSettings": {"latex.lint.onChange": true}}, "bash-langauge-server": {"bashIde.highlightParsingErrors": true}}, "pylsp": {"priority": 1000}}
51+
... {"language_servers": {"texlab": {"serverSettings": {"chktex.onOpenAndSave": true}}, "bash-langauge-server": {"bashIde.highlightParsingErrors": true}}, "pylsp": {"priority": 1000}}
5252
Capture Page Screenshot 10-configured.png
5353
Reset Application State
5454
Setup Notebook Python ${file}

atest/05_Features/Completion.robot

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ Invalidates On Focus Loss
8383
Enter Cell Editor 1 line=2
8484

8585
Uses LSP Completions When Kernel Resoponse Times Out
86+
[Tags] requires:busy-indicator
8687
Configure JupyterLab Plugin {"kernelResponseTimeout": 1, "waitForBusyKernel": true}
8788
... plugin id=${COMPLETION PLUGIN ID}
8889
Should Complete While Kernel Is Busy
8990

9091
Uses LSP Completions When Kernel Is Busy
92+
[Tags] requires:busy-indicator
9193
[Documentation] When kernel is not available the best thing is to show some suggestions (LSP) rather than none.
9294
Configure JupyterLab Plugin {"kernelResponseTimeout": -1, "waitForBusyKernel": false}
9395
... plugin id=${COMPLETION PLUGIN ID}
@@ -217,12 +219,12 @@ Kernel And LSP Completions Merge Prefix Conflicts Are Resolved
217219
Configure JupyterLab Plugin {"kernelResponseTimeout": -1, "waitForBusyKernel": false}
218220
... plugin id=${COMPLETION PLUGIN ID}
219221
# For more details see: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/30#issuecomment-576003987
220-
# `import os.pat<tab>` → `import os.pathsep`
222+
# `import os.pat<tab>` → `import os.path`
221223
Enter Cell Editor 15 line=1
222224
Trigger Completer
223-
Completer Should Suggest pathsep
224-
Select Completer Suggestion pathsep
225-
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 15 import os.pathsep
225+
Completer Should Suggest path
226+
Select Completer Suggestion path
227+
Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 15 import os.path
226228

227229
Triggers Completer On Dot
228230
Enter Cell Editor 2 line=1

atest/07_Configuration.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LaTeX
3333
[Tags] language:latex
3434
${needs reload} = Set Variable "${OS}" == "Windows"
3535
Settings Should Change Editor Diagnostics LaTeX example.tex texlab
36-
... {"latex.lint.onChange": true}
36+
... {"chktex.onOpenAndSave": true}
3737
... ${EMPTY}
3838
... Command terminated with space. (chktex)
3939
... Save File

atest/Keywords.resource

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,11 @@ Open File
375375

376376
Open in Advanced Settings
377377
[Arguments] ${plugin id}
378-
Lab Command Advanced Settings Editor
378+
IF '${LAB VERSION}'.startswith('3.3')
379+
Lab Command Advanced JSON Settings Editor
380+
ELSE
381+
Lab Command Advanced Settings Editor
382+
END
379383
${sel} = Set Variable css:[data-id="${plugin id}"]
380384
Wait Until Page Contains Element ${sel}
381385
Click Element ${sel}

binder/overrides.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
},
99
"texlab": {
1010
"serverSettings": {
11-
"latex.lint.onChange": true
11+
"chktex.onOpenAndSave": true,
12+
"chktex.onEdit": true
1213
}
1314
},
1415
"pyright": {
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
11
{
22
"title": "LaTeX configuration",
33
"properties": {
4-
"latex.rootDirectory": {
4+
"rootDirectory": {
55
"type": ["string", "null"],
66
"default": null,
77
"description": "Path to the root directory."
88
},
9-
"latex.build.executable": {
9+
"build.executable": {
1010
"type": "string",
1111
"default": "latexmk",
1212
"description": "Path to a LaTeX build tool."
1313
},
14-
"latex.build.args": {
14+
"build.args": {
1515
"type": "array",
1616
"default": ["-pdf", "-interaction=nonstopmode", "-synctex=1", "%f"],
1717
"description": "Additional arguments that are passed to the build tool."
1818
},
19-
"latex.build.onSave": {
19+
"build.onSave": {
2020
"type": "boolean",
2121
"default": false,
2222
"description": "Build after saving a file"
2323
},
24-
"latex.build.outputDirectory": {
24+
"build.outputDirectory": {
2525
"type": "string",
2626
"default": ".",
2727
"description": "Directory containing the build artifacts."
2828
},
29-
"latex.build.forwardSearchAfter": {
29+
"build.forwardSearchAfter": {
3030
"type": "boolean",
3131
"default": false,
3232
"description": "Execute forward search after building"
3333
},
34-
"latex.forwardSearch.executable": {
34+
"forwardSearch.executable": {
3535
"type": ["string", "null"],
3636
"default": null,
3737
"description": "Path to a PDF previewer that supports SyncTeX."
3838
},
39-
"latex.forwardSearch.args": {
39+
"forwardSearch.args": {
4040
"type": "array",
4141
"default": [],
4242
"description": "Additional arguments that are passed to the previewer."
4343
},
44-
"latex.lint.onSave": {
45-
"type": "boolean",
46-
"default": true,
47-
"description": "Lint after saving a file"
48-
},
49-
"latex.lint.onChange": {
44+
"chktex.onOpenAndSave": {
5045
"type": "boolean",
5146
"default": false,
52-
"description": "Lint after changing a file"
47+
"description": "Lint with chktex after opening and saving a file"
5348
},
54-
"latex.server.autoDownload": {
49+
"chktex.onEdit": {
5550
"type": "boolean",
5651
"default": false,
57-
"description": "Automatically download the language server if it is not installed."
52+
"description": "Lint with chktex afte editing a file"
5853
},
59-
"latex.server.trace": {
60-
"type": "boolean",
61-
"default": false,
62-
"description": "Enable the trace verbosity of the server."
54+
"diagnosticsDelay": {
55+
"type": "integer",
56+
"default": 300,
57+
"description": "Delay in milliseconds before reporting diagnostics."
6358
},
64-
"latex.server.logFile": {
65-
"type": ["string", "null"],
66-
"default": null,
67-
"description": "Path to the server log file."
59+
"formatterLineLength": {
60+
"type": "integer",
61+
"default": 80,
62+
"description": "Defines the maximum amount of characters per line (0 = disable) when formatting BibTeX files."
6863
},
69-
"bibtex.formatting.formatter": {
64+
"latexFormatter": {
7065
"type": "string",
71-
"default": "texlab",
72-
"description": "BibTeX formatter to use."
66+
"default": "latexindent",
67+
"description": "Defines the formatter to use for LaTeX formatting. Possible values are either texlab or latexindent. Note that texlab is not implemented yet."
7368
},
74-
"bibtex.formatting.lineLength": {
75-
"type": "integer",
76-
"default": 120,
77-
"description": "Maximum amount of characters per line (0 = disable)."
69+
"latexindent.local": {
70+
"type": ["string", "null"],
71+
"default": null,
72+
"description": "Defines the path of a file containing the latexindent configuration. This corresponds to the --local=file.yaml flag of latexindent. By default the configuration inside the project root directory is used."
73+
},
74+
"latexindent.modifyLineBreaks": {
75+
"type": "boolean",
76+
"default": false,
77+
"description": "Modifies linebreaks before, during, and at the end of code blocks when formatting with latexindent. This corresponds to the --modifylinebreaks flag of latexindent."
7878
}
7979
}
8080
}

scripts/atest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
# TODO: restore when yaml-language-server supports both config and...
3030
# everything else: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/245
3131
["language:yaml", "feature:config"],
32+
# TODO: restore once busy indicator is CSS-readable on 3.3.x
33+
# https://github.com/jupyterlab/jupyterlab/issues/12174
34+
["requires:busy-indicator", "lab:3.3.0"],
35+
["requires:busy-indicator", "lab:3.3.1"],
36+
["requires:busy-indicator", "lab:3.3.2"],
37+
["requires:busy-indicator", "lab:3.3.3"],
3238
# TODO: restore when we figure out win36 vs jedi on windows
3339
# ["language:python", "py:36", "os:windows"],
3440
]

0 commit comments

Comments
 (0)