File tree Expand file tree Collapse file tree 7 files changed +64
-13
lines changed Expand file tree Collapse file tree 7 files changed +64
-13
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,19 @@ Python
12
12
Capture Page Screenshot 02-python.png
13
13
Clean Up After Working With File Python.ipynb
14
14
15
- Foregin Extractors
16
- Setup Notebook Python Foreign extractors.ipynb
15
+ Foreign Extractors
16
+ ${file } = Set Variable Foreign extractors.ipynb
17
+ Configure JupyterLab Plugin {"language_servers": {"texlab": {"serverSettings": {"latex.lint.onChange": true}}}}
18
+ Setup Notebook Python ${file }
17
19
# if mypy and pyflakes will fight over `(N|n)ame 'valid'`, just hope for the best
18
- @{diagnostics } = Create List Failed to parse expression ame 'valid' Trailing whitespace is superfluous.
20
+ @{diagnostics } = Create List
21
+ ... Failed to parse expression # bash
22
+ ... ame 'valid' # python
23
+ ... Trailing whitespace is superfluous. # r
24
+ ... `frob` is misspelt # markdown
25
+ ... Command terminated with space # latex
19
26
FOR ${diagnostic } IN @{diagnostics }
20
27
Wait Until Page Contains Element css:.cm-lsp-diagnostic[title*\="${diagnostic } "] timeout=35s
21
28
Capture Page Screenshot 0x-${diagnostic } .png
22
29
END
23
- Clean Up After Working With File Foreign Extractors.ipynb
30
+ [Teardown] Clean Up After Working with File and Settings ${ file }
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ Markdown
27
27
... `Colour` is misspelt
28
28
29
29
LaTeX
30
- [Tags] FOO
31
30
[Documentation] diagnostics only appear if configured
32
31
Settings Should Change Editor Diagnostics LaTeX example.tex texlab
33
32
... {"latex.lint.onChange": true}
36
35
... Save File
37
36
38
37
*** Keywords ***
39
- Clean Up After Working with File and Settings
40
- [Arguments] ${file }
41
- Clean Up After Working With File ${file }
42
- Reset Plugin Settings
43
-
44
38
Settings Should Change Editor Diagnostics
45
39
[Arguments] ${language } ${file } ${server } ${settings } ${before } ${after } ${save command } =${EMPTY }
46
40
${before diagnostic } = Set Variable ${CSS DIAGNOSTIC } \[title^="${before } "]
@@ -62,7 +56,7 @@ Settings Should Change Editor Diagnostics
62
56
Wait Until Page Contains No errors found
63
57
Capture Page Screenshot 02-default-diagnostics-and-unsaved-settings.png
64
58
Click Element css:button[title\='Save User Settings']
65
- Click Element ${JLAB XP DOCK TAB } \[contains(., 'Settings')]/ ${ close icon }
59
+ Click Element ${JLAB XP CLOSE SETTINGS }
66
60
Drag and Drop By Offset ${tab } 0 100
67
61
Lab Command ${save command }
68
62
Ensure Sidebar Is Closed
Original file line number Diff line number Diff line change @@ -286,3 +286,16 @@ Get Editor Content
286
286
[Arguments] ${css } =${EMPTY }
287
287
${content } = Execute JavaScript return document.querySelector('${css } .CodeMirror').CodeMirror.getValue()
288
288
[Return] ${content }
289
+
290
+ Configure JupyterLab Plugin
291
+ [Arguments] ${settings json } ${plugin id } =${LSP PLUGIN ID }
292
+ Open in Advanced Settings ${plugin id }
293
+ Set Editor Content ${settings json } ${CSS USER SETTINGS }
294
+ Wait Until Page Contains No errors found
295
+ Click Element css:button[title\='Save User Settings']
296
+ Click Element ${JLAB XP CLOSE SETTINGS }
297
+
298
+ Clean Up After Working with File and Settings
299
+ [Arguments] ${file }
300
+ Clean Up After Working With File ${file }
301
+ Reset Plugin Settings
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ ${CM CURSORS} css:.CodeMirror-cursors:not([style='visibility: hidden'])
35
35
${LSP PLUGIN ID } @krassowski/jupyterlab-lsp:plugin
36
36
${LSP PLUGIN SETTINGS FILE } @krassowski${/ } jupyterlab-lsp${/ } plugin.jupyterlab-settings
37
37
${CSS USER SETTINGS } .jp-SettingsRawEditor-user
38
+ ${JLAB XP CLOSE SETTINGS } ${JLAB XP DOCK TAB } \[contains(., 'Settings')]/*[contains(@class, 'm-TabBar-tabCloseIcon')]
38
39
# diagnostics
39
40
${CSS DIAGNOSTIC } css:.cm-lsp-diagnostic
40
41
# log messages
Original file line number Diff line number Diff line change 66
66
" %%bash\n " ,
67
67
" echo $"
68
68
]
69
+ },
70
+ {
71
+ "cell_type" : " markdown" ,
72
+ "metadata" : {},
73
+ "source" : [
74
+ " ### $\\ LaTeX$"
75
+ ]
76
+ },
77
+ {
78
+ "cell_type" : " code" ,
79
+ "execution_count" : null ,
80
+ "metadata" : {},
81
+ "outputs" : [],
82
+ "source" : [
83
+ " %%latex\n " ,
84
+ " \n " ,
85
+ " \\ foo bar"
86
+ ]
87
+ },
88
+ {
89
+ "cell_type" : " markdown" ,
90
+ "metadata" : {},
91
+ "source" : [
92
+ " ### Markdown"
93
+ ]
94
+ },
95
+ {
96
+ "cell_type" : " code" ,
97
+ "execution_count" : null ,
98
+ "metadata" : {},
99
+ "outputs" : [],
100
+ "source" : [
101
+ " %%markdown\n " ,
102
+ " frob"
103
+ ]
69
104
}
70
105
],
71
106
"metadata" : {
84
119
"name" : " python" ,
85
120
"nbconvert_exporter" : " python" ,
86
121
"pygments_lexer" : " ipython3" ,
87
- "version" : " 3.8.0 "
122
+ "version" : " 3.7.6 "
88
123
}
89
124
},
90
125
"nbformat" : 4 ,
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ export let foreign_code_extractors: IForeignCodeExtractorsRegistry = {
112
112
pattern : '^%%(latex)( .*?)?\n([^]*)' ,
113
113
extract_to_foreign : '$3' ,
114
114
is_standalone : false ,
115
- file_extension : 'latex '
115
+ file_extension : 'tex '
116
116
} ) ,
117
117
new RegExpForeignCodeExtractor ( {
118
118
language : 'markdown' ,
Original file line number Diff line number Diff line change 29
29
"TooFewTestSteps:1" ,
30
30
"TooManyTestSteps:30" ,
31
31
"TooManyTestCases:30" ,
32
+ "FileTooLong:400" ,
32
33
]
33
34
34
35
RFLINT_IGNORES = [
You can’t perform that action at this time.
0 commit comments