Skip to content

Commit 46bb8f4

Browse files
committed
linting
1 parent 051b315 commit 46bb8f4

File tree

8 files changed

+40
-118
lines changed

8 files changed

+40
-118
lines changed

atest/04_Interface/DiagnosticsPanel.robot

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ ${DIAGNOSTIC MESSAGE R} Closing curly-braces should always be on their own l
1212
${DIAGNOSTIC MESSAGE} trailing whitespace
1313
${DIAGNOSTIC} W291 trailing whitespace (pycodestyle)
1414
${EXPECTED_COUNT} 4
15-
${LAB MENU} css:.lm-Menu
16-
${MENU COLUMNS} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "columns")]
17-
${R CELL} %%R\n{}
15+
${MENU COLUMNS} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "columns")]
16+
${R CELL} %%R\n{}
1817

1918
*** Test Cases ***
2019
Diagnostics Panel Opens
@@ -129,31 +128,6 @@ Open Context Menu Over W291
129128
Table Cell Should Equal W291 row=-1 column=2
130129
Open Context Menu Over css:.lsp-diagnostics-listing tbody > tr:last-child
131130

132-
<<<<<<< HEAD
133-
Expand Menu Entry
134-
[Arguments] ${label}
135-
${entry} = Set Variable xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "${label}")]
136-
Wait Until Page Contains Element ${entry} timeout=10s
137-
${menus before} = Get Element Count ${LAB MENU}
138-
Mouse Over ${entry}
139-
${expected menus} = Evaluate ${menus before} + 1
140-
Wait Until Keyword Succeeds 10 x 1s Menus Count Equal ${expected menus}
141-
142-
Menus Count Equal
143-
[Arguments] ${count}
144-
${menus count} = Get Element Count ${LAB MENU}
145-
Should Be Equal ${menus count} ${count}
146-
147-
Select Menu Entry
148-
[Arguments] ${label}
149-
${entry} = Set Variable xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), '${label}')]
150-
Wait Until Page Contains Element ${entry} timeout=10s
151-
Mouse Over ${entry}
152-
Click Element ${entry}
153-
Wait Until Page Does Not Contain Element ${entry} timeout=10s
154-
155-
=======
156-
>>>>>>> upsteam/master
157131
Open Notebook And Panel
158132
[Arguments] ${notebook}
159133
Setup Notebook Python ${notebook}

atest/05_Features/Completion.robot

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ ${KERNEL_BUSY_INDICATOR} css:.jp-NotebookPanel-toolbar div[title="Kernel Busy
1515
*** Test Cases ***
1616
Works When Kernel Is Idle
1717
[Documentation] The suggestions from kernel and LSP should get integrated; operates in case insensitive mode
18-
Configure JupyterLab Plugin {"kernelResponseTimeout": -1, "waitForBusyKernel": false, "caseSensitive": false} plugin id=${COMPLETION PLUGIN ID}
18+
Configure JupyterLab Plugin {"kernelResponseTimeout": -1, "waitForBusyKernel": false, "caseSensitive": false}
19+
... plugin id=${COMPLETION PLUGIN ID}
1920
Enter Cell Editor 1 line=2
2021
Capture Page Screenshot 01-entered-cell.png
2122
Trigger Completer
@@ -31,8 +32,8 @@ Works When Kernel Is Idle
3132
Should Contain ${content} TabError
3233

3334
Filters Completions In Case Sensitive Mode
34-
Configure JupyterLab Plugin {"caseSensitive": true} plugin id=${COMPLETION PLUGIN ID}
3535
[Documentation] Completions filtering is case-sensitive when caseSensitive is true
36+
Configure JupyterLab Plugin {"caseSensitive": true} plugin id=${COMPLETION PLUGIN ID}
3637
Enter Cell Editor 1 line=2
3738
Trigger Completer
3839
Completer Should Suggest test
@@ -41,8 +42,8 @@ Filters Completions In Case Sensitive Mode
4142
Can Prioritize Kernel Completions
4243
# note: disabling pre-filtering to get ranking without match scoring
4344
Configure JupyterLab Plugin
44-
... {"kernelCompletionsFirst": true, "kernelResponseTimeout": -1, "preFilterMatches": false}
45-
... plugin id=${COMPLETION PLUGIN ID}
45+
... {"kernelCompletionsFirst": true, "kernelResponseTimeout": -1, "preFilterMatches": false}
46+
... plugin id=${COMPLETION PLUGIN ID}
4647
Enter Cell Editor 1 line=2
4748
Trigger Completer
4849
Completer Should Suggest %%timeit
@@ -53,8 +54,8 @@ Can Prioritize Kernel Completions
5354
Can Prioritize LSP Completions
5455
# note: disabling pre-filtering to get ranking without match scoring
5556
Configure JupyterLab Plugin
56-
... {"kernelCompletionsFirst": false, "kernelResponseTimeout": -1, "preFilterMatches": false}
57-
... plugin id=${COMPLETION PLUGIN ID}
57+
... {"kernelCompletionsFirst": false, "kernelResponseTimeout": -1, "preFilterMatches": false}
58+
... plugin id=${COMPLETION PLUGIN ID}
5859
Enter Cell Editor 1 line=2
5960
Trigger Completer
6061
Completer Should Suggest %%timeit
@@ -277,7 +278,8 @@ Works Without A Theme
277278
Wait Until Page Contains Element ${COMPLETER_BOX} .jp-Completer-monogram
278279

279280
Works With Incorrect Theme
280-
Configure JupyterLab Plugin {"theme": "a-non-existing-theme", "caseSensitive": false} plugin id=${COMPLETION PLUGIN ID}
281+
Configure JupyterLab Plugin {"theme": "a-non-existing-theme", "caseSensitive": false}
282+
... plugin id=${COMPLETION PLUGIN ID}
281283
Capture Page Screenshot 01-configured.png
282284
Enter Cell Editor 1 line=2
283285
Trigger Completer

atest/05_Features/Diagnostics.robot

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
*** Settings ***
2-
Suite Setup Setup Suite For Screenshots diagnostics
3-
Force Tags feature:diagnostics
4-
Test Setup Setup Notebook Python Diagnostic.ipynb
5-
Test Teardown Clean Up After Working With File Diagnostic.ipynb
6-
Resource ../Keywords.robot
2+
Resource ../Keywords.resource
3+
4+
Suite Setup Setup Suite For Screenshots diagnostics
5+
Test Setup Setup Notebook Python Diagnostic.ipynb
6+
Test Teardown Clean Up After Working With File Diagnostic.ipynb
7+
8+
Force Tags feature:diagnostics
79
# note: diagnostics are also tested in 01_Editor and 04_Interface/DiagnosticsPanel.robot
810

911
*** Test Cases ***

atest/05_Features/Jump.robot

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Python Jumps Between Files
1313
Copy Files to Folder With Spaces jump_a.py jump_b.py
1414
Open ${FOLDER WITH SPACE}/jump_b.py in ${MENU EDITOR}
1515
Wait Until Fully Initialized
16-
${sel} = Select Token Occurrence a_function_definition
16+
${sel} = Select Token Occurrence a_function_definition
1717
Jump To Definition ${sel}
1818
Wait Until Page Contains ANOTHER_CONSTANT
1919
Capture Page Screenshot 10-jumped.png
@@ -23,30 +23,30 @@ Jumps To References With Modifier Click
2323
[Setup] Prepare File for Editing Python editor jump_references.py
2424
Configure JupyterLab Plugin {"modifierKey": "Accel"} plugin id=${JUMP PLUGIN ID}
2525
Wait Until Fully Initialized
26-
${token} = Select Token Occurrence func type=def
26+
${token} = Select Token Occurrence func type=def
2727
Click Element ${token}
2828
${original} = Measure Cursor Position
29-
Ctrl Click Element ${token}
30-
Wait Until Page Contains Choose the jump target
31-
${references_count} = Get Element Count css:.jp-Dialog select option
29+
Ctrl Click Element ${token}
30+
Wait Until Page Contains Choose the jump target
31+
${references_count} = Get Element Count css:.jp-Dialog select option
3232
Should Be True ${references_count} == ${3}
33-
Select From List By Index css:.jp-Dialog select 2
33+
Select From List By Index css:.jp-Dialog select 2
3434
Click Element css:.jp-Dialog-button.jp-mod-accept
3535
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${original}
3636
Clean Up After Working With File jump_references.py
3737

3838
Jumps To References From Context Menu
3939
[Setup] Prepare File for Editing Python editor jump_references.py
4040
Wait Until Fully Initialized
41-
${token} = Select Token Occurrence func type=def
41+
${token} = Select Token Occurrence func type=def
4242
Click Element ${token}
4343
${original} = Measure Cursor Position
44-
Open Context Menu Over ${token}
44+
Open Context Menu Over ${token}
4545
Select Menu Entry Jump to references
46-
Wait Until Page Contains Choose the jump target
47-
${references_count} = Get Element Count css:.jp-Dialog select option
46+
Wait Until Page Contains Choose the jump target
47+
${references_count} = Get Element Count css:.jp-Dialog select option
4848
Should Be True ${references_count} == ${3}
49-
Select From List By Index css:.jp-Dialog select 2
49+
Select From List By Index css:.jp-Dialog select 2
5050
Click Element css:.jp-Dialog-button.jp-mod-accept
5151
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${original}
5252
Clean Up After Working With File jump_references.py
@@ -59,7 +59,7 @@ Ctrl Click And Jumping Back Works
5959
Click Element ${sel}
6060
${original} = Measure Cursor Position
6161
Capture Page Screenshot 01-ready-to-jump.png
62-
Ctrl Click Element ${sel}
62+
Ctrl Click Element ${sel}
6363
Capture Page Screenshot 02-jumped.png
6464
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${original}
6565
${new} = Measure Cursor Position
@@ -81,10 +81,12 @@ Copy Files to Folder With Spaces
8181

8282
Select Token Occurrence
8383
[Arguments] ${token} ${type}=variable ${which}=last
84-
[Return] xpath:(//span[contains(@class, 'cm-${type}')][contains(text(), '${token}')])[${which}()]
84+
${sel} = Set Variable
85+
... xpath:(//span[contains(@class, 'cm-${type}')][contains(text(), '${token}')])[${which}()]
86+
[Return] ${sel}
8587

8688
Ctrl Click Element
87-
[Arguments] ${element}
89+
[Arguments] ${element}
8890
${key} = Evaluate 'COMMAND' if platform.system() == 'Darwin' else 'CTRL' platform
8991
Click Element ${element} modifier=${key}
9092

atest/05_Features/Signature.robot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Test Teardown Clean Up After Working With File Signature.ipynb
88
Force Tags feature:signature
99

1010
*** Variables ***
11-
${SIGNATURE PLUGIN ID} @krassowski/jupyterlab-lsp:signature
12-
${SIGNATURE_BOX} css:.lsp-signature-help
11+
${SIGNATURE PLUGIN ID} @krassowski/jupyterlab-lsp:signature
12+
${SIGNATURE_BOX} css:.lsp-signature-help
1313
${SIGNATURE_HIGHLIGHTED_ARG} css:.lsp-signature-help mark
14-
${SIGNATURE_DETAILS_CSS} .lsp-signature-help details
15-
${SIGNATURE_DETAILS} css:${SIGNATURE_DETAILS_CSS}
14+
${SIGNATURE_DETAILS_CSS} .lsp-signature-help details
15+
${SIGNATURE_DETAILS} css:${SIGNATURE_DETAILS_CSS}
1616

1717
*** Test Cases ***
1818
Triggers Signature Help After A Keystroke

atest/Keywords.resource

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ Menus Count Equal
465465

466466
Select Menu Entry
467467
[Arguments] ${label}
468-
${entry} Set Variable xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), '${label}')]
468+
${entry} = Set Variable xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), '${label}')]
469469
Wait Until Page Contains Element ${entry} timeout=10s
470470
Mouse Over ${entry}
471471
Click Element ${entry}

atest/Variables.resource

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ${MENU EDITOR} xpath://div[contains(@class, 'lm-Menu-itemLabel'
4040
${MENU JUMP} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "Jump to definition")]
4141
${MENU SETTINGS} xpath://div[contains(@class, 'lm-MenuBar-itemLabel')][contains(text(), "Settings")]
4242
${MENU EDITOR THEME} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "Text Editor Theme")]
43+
${LAB MENU} css:.lm-Menu
4344
${CM CURSOR} css:.CodeMirror-cursor
4445
${CM CURSORS} css:.jp-MainAreaWidget:not(.lm-mod-hidden) .CodeMirror-cursors:not([style='visibility: hidden'])
4546
# settings

atest/Variables.robot

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)