Skip to content

Commit 650e472

Browse files
committed
tweak some tests to avoid false webdriver 'rect' errors, wait for editor initialization
1 parent f44c918 commit 650e472

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

atest/01_Editor.robot

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ JSX
2828
${def} = Set Variable xpath:(//span[contains(@class, 'cm-variable')][contains(text(), 'hello')])[last()]
2929
Editor Shows Features for Language JSX example.jsx Diagnostics=Expression expected Jump to Definition=${def} Rename=${def}
3030

31+
LaTeX
32+
[Tags] language:latex
33+
${def} = Set Variable xpath:(//span[contains(@class, 'cm-atom')][contains(text(), 'foo')])[last()]
34+
Editor Shows Features for Language LaTeX example.tex Jump to Definition=${def} Rename=${def}
35+
3136
Less
3237
${def} = Set Variable xpath:(//span[contains(@class, 'cm-variable-2')][contains(text(), '@width')])[last()]
3338
Editor Shows Features for Language Less example.less Diagnostics=Do not use empty rulesets Jump to Definition=${def}
@@ -47,11 +52,6 @@ SCSS
4752
${def} = Set Variable xpath:(//span[contains(@class, 'cm-variable-2')][contains(text(), 'primary-color')])[last()]
4853
Editor Shows Features for Language SCSS example.scss Diagnostics=Do not use empty rulesets Jump to Definition=${def}
4954

50-
LaTeX
51-
[Tags] language:latex
52-
${def} = Set Variable xpath:(//span[contains(@class, 'cm-atom')][contains(text(), 'foo')])[last()]
53-
Editor Shows Features for Language LaTeX example.tex Jump to Definition=${def} Rename=${def}
54-
5555
TSX
5656
${def} = Set Variable xpath:(//span[contains(@class, 'cm-tag')][contains(text(), 'HelloWorld')])[last()]
5757
Editor Shows Features for Language TSX example.tsx Diagnostics=Cannot find module 'react' Jump to Definition=${def} Rename=${def}
@@ -67,6 +67,7 @@ YAML
6767
Editor Shows Features for Language
6868
[Arguments] ${Language} ${file} &{features}
6969
Prepare File for Editing ${Language} editor ${file}
70+
Wait Until Fully Initialized
7071
FOR ${f} IN @{features}
7172
Run Keyword If "${f}" == "Diagnostics" Editor Should Show Diagnostics ${features["${f}"]}
7273
... ELSE IF "${f}" == "Jump to Definition" Editor Should Jump To Definition ${features["${f}"]}

atest/03_Notebook.robot

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,27 @@ Resource Keywords.robot
55

66
*** Test Cases ***
77
Python
8-
Setup Notebook Python Python.ipynb
9-
Capture Page Screenshot 01-python.png
8+
[Setup] Setup Notebook Python Python.ipynb
109
${diagnostic} = Set Variable W291 trailing whitespace (pycodestyle)
1110
Wait Until Page Contains Element css:.cm-lsp-diagnostic[title="${diagnostic}"] timeout=35s
12-
Capture Page Screenshot 02-python.png
13-
Clean Up After Working With File Python.ipynb
11+
Capture Page Screenshot 01-python.png
12+
[Teardown] Clean Up After Working With File Python.ipynb
1413

1514
Foreign Extractors
1615
${file} = Set Variable Foreign extractors.ipynb
17-
Configure JupyterLab Plugin {"language_servers": {"texlab": {"serverSettings": {"latex.lint.onChange": true}}}}
16+
Configure JupyterLab Plugin
17+
... {"language_servers": {"texlab": {"serverSettings": {"latex.lint.onChange": true}}}}
18+
Capture Page Screenshot 10-configured.png
19+
Reset Application State
1820
Setup Notebook Python ${file}
19-
# if mypy and pyflakes will fight over `(N|n)ame 'valid'`, just hope for the best
2021
@{diagnostics} = Create List
2122
... Failed to parse expression # bash
22-
... ame 'valid' # python
23+
... ame 'valid' # python, mypy and pyflakes will fight over `(N|n)ame 'valid'`, just hope for the best
2324
... Trailing whitespace is superfluous. # r
2425
... `frob` is misspelt # markdown
2526
... Command terminated with space # latex
2627
FOR ${diagnostic} IN @{diagnostics}
2728
Wait Until Page Contains Element css:.cm-lsp-diagnostic[title*\="${diagnostic}"] timeout=35s
28-
Capture Page Screenshot 0x-${diagnostic}.png
2929
END
30+
Capture Page Screenshot 11-extracted.png
3031
[Teardown] Clean Up After Working with File and Settings ${file}

atest/07_Configuration.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LaTeX
3333
Settings Should Change Editor Diagnostics LaTeX example.tex texlab
3434
... {"latex.lint.onChange": true}
3535
... ${EMPTY}
36-
... Command terminated with space. (chktex)
36+
... Delete this space to maintain correct pagereferences.
3737
... Save File
3838
... ${needs reload}
3939

atest/examples/example.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
\begin{document}
44
\label{foo}
55
\ref{foo}
6-
\foo This is an error.
76
\end{document}

0 commit comments

Comments
 (0)