Skip to content

Commit ae73ae3

Browse files
committed
File list and busy indicator lab 3.4 compat for tests
1 parent 7066b5a commit ae73ae3

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

atest/05_Features/Completion.robot

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Force Tags feature:completion
1111
*** Variables ***
1212
${COMPLETER_BOX} css:.jp-Completer.jp-HoverBox
1313
${DOCUMENTATION_PANEL} css:.jp-Completer-docpanel
14-
${KERNEL_BUSY_INDICATOR} css:.jp-NotebookPanel-toolbar div[title="Kernel Busy"]
14+
${KERNEL_BUSY_INDCA_OLD} css:.jp-NotebookPanel-toolbar div[title="Kernel Busy"]
15+
${KERNEL_BUSY_INDICATOR} css:.jp-Notebook-ExecutionIndicator div[data-status="busy"]
1516

1617

1718
*** Test Cases ***
@@ -451,12 +452,20 @@ Should Complete While Kernel Is Busy
451452
# Lab Command Run Selected Cells And Don't Advance
452453
Press Keys None CTRL+ENTER
453454
# Confirm that the kernel is busy
454-
Wait Until Page Contains Element ${KERNEL_BUSY_INDICATOR} timeout=5s
455+
IF '${LAB VERSION}'.startswith('3.4')
456+
Wait Until Page Contains Element ${KERNEL_BUSY_INDICATOR} timeout=5s
457+
ELSE
458+
Wait Until Page Contains Element ${KERNEL_BUSY_INDCA_OLD} timeout=5s
459+
END
455460
# Enter a cell with "t"
456461
Enter Cell Editor 18
457462
# Check if completion worked
458463
Enter Cell Editor 1 line=2
459464
Trigger Completer timeout=10s
460465
Completer Should Suggest test
461466
# Confirm that the kernel indicator was busy all along
462-
Page Should Contain Element ${KERNEL_BUSY_INDICATOR}
467+
IF '${LAB VERSION}'.startswith('3.4')
468+
Page Should Contain Element ${KERNEL_BUSY_INDICATOR}
469+
ELSE
470+
Page Should Contain Element ${KERNEL_BUSY_INDCA_OLD}
471+
END

atest/Keywords.resource

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,17 @@ Ensure Sidebar Is Closed
214214
Click Element css:.jp-mod-${side} .lm-TabBar-tab.lm-mod-current
215215
END
216216

217+
Refresh File List
218+
IF '${LAB VERSION}'.startswith('3.4')
219+
Click Element ${JLAB CSS REFRESH FILES}
220+
ELSE
221+
Click Element ${JLAB CSS REFRESH F_OLD}
222+
END
223+
217224
Open Context Menu for File
218225
[Arguments] ${file}
219226
Ensure File Browser is Open
220-
Click Element ${JLAB CSS REFRESH FILES}
227+
Refresh File List
221228
${selector} = Set Variable xpath://span[@class='jp-DirListing-itemText']/span\[text() = '${file}']
222229
Wait Until Page Contains Element ${selector} timeout=10s
223230
Wait Until Keyword Succeeds 10 x 0.1 s Open Context Menu ${selector}
@@ -240,7 +247,7 @@ Input Into Dialog
240247

241248
Open Folder
242249
[Arguments] @{paths}
243-
Click Element ${JLAB CSS REFRESH FILES}
250+
Refresh File List
244251
FOR ${path} IN @{paths}
245252
${sel} = Set Variable css:li.jp-DirListing-item\[title^='Name: ${path}']
246253
Wait Until Page Contains Element ${sel}

atest/Variables.resource

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ ${JLAB XP MENU ITEM LABEL} //div[contains(@class, 'lm-Menu-itemLabel')]
2323
${JLAB XP MENU LABEL} //div[contains(@class, 'lm-MenuBar-itemLabel')]
2424
${JLAB XP DOCK TAB} xpath://div[contains(@class, 'lm-DockPanel-tabBar')]//li[contains(@class, 'lm-TabBar-tab')]
2525
${JLAB CSS VERSION} css:.jp-About-version
26-
${JLAB CSS REFRESH FILES} css:button[title="Refresh File List"]
26+
${JLAB CSS REFRESH F_OLD} css:button[title="Refresh File List"]
27+
${JLAB CSS REFRESH FILES} css:button[data-command="filebrowser:refresh"]
2728
${CSS DIALOG OK} css:.jp-Dialog .jp-mod-accept
2829
${MENU OPEN WITH} xpath://div[contains(@class, 'lm-Menu-itemLabel')][contains(text(), "Open With")]
2930
# R is missing on purpose (may need to use .)

0 commit comments

Comments
 (0)