Skip to content

Commit b5f696b

Browse files
committed
Add test for jumping back and fro ctrl+click jump
1 parent faeda52 commit b5f696b

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

atest/05_Features/Jump.robot

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@ Python Jumps between Files
1717
Wait Until Page Contains ANOTHER_CONSTANT
1818
Capture Page Screenshot 10-jumped.png
1919

20+
Ctrl Click And Jumping Back Works
21+
[Setup] Prepare File for Editing Python editor jump.py
22+
${usage} = Set Variable a_variable
23+
${sel} = Set Variable xpath:(//span[contains(@class, 'cm-variable')][contains(text(), '${usage}')])[last()]
24+
Click Element ${sel}
25+
${original} = Measure Cursor Position
26+
Capture Page Screenshot 01-ready-to-jump.png
27+
Click Element ${sel} modifier=CTRL
28+
Capture Page Screenshot 02-jumped.png
29+
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${original}
30+
${new} = Measure Cursor Position
31+
Press Keys None ALT+o
32+
Wait Until Keyword Succeeds 10 x 1 s Cursor Should Jump ${new}
33+
${back} = Measure Cursor Position
34+
Should Be Equal ${original} ${back}
35+
[Teardown] Clean Up After Working With File jump.py
36+
2037
*** Keywords ***
2138
Copy Files to Folder With Spaces
2239
[Arguments] @{files}

atest/examples/jump.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
a_variable = 1
2+
3+
4+
a_variable

0 commit comments

Comments
 (0)