2017-03-31 17:16:31 +02:00
|
|
|
# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
|
|
|
|
|
2016-04-14 02:55:33 +02:00
|
|
|
Feature: Setting positional marks
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given I open data/marks.html
|
|
|
|
And I run :tab-only
|
|
|
|
|
|
|
|
## :set-mark, :jump-mark
|
|
|
|
|
|
|
|
Scenario: Setting and jumping to a local mark
|
2016-04-14 23:30:43 +02:00
|
|
|
When I run :scroll-px 5 10
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/10
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark a
|
2016-04-14 02:55:33 +02:00
|
|
|
And I run :scroll-px 0 20
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/30
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :jump-mark a
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/10
|
2016-04-14 23:30:43 +02:00
|
|
|
Then the page should be scrolled to 5 10
|
2016-04-14 02:55:33 +02:00
|
|
|
|
2016-04-21 03:53:12 +02:00
|
|
|
Scenario: Jumping back after jumping to a particular percentage
|
2016-04-14 23:30:43 +02:00
|
|
|
When I run :scroll-px 10 20
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 10/20
|
2017-10-03 22:44:21 +02:00
|
|
|
And I run :scroll-to-perc 100
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed
|
2016-04-14 02:55:33 +02:00
|
|
|
And I run :jump-mark "'"
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 10/20
|
2016-04-14 23:30:43 +02:00
|
|
|
Then the page should be scrolled to 10 20
|
2016-04-14 02:55:33 +02:00
|
|
|
|
2017-04-08 19:29:46 +02:00
|
|
|
@qtwebengine_flaky
|
2016-04-14 02:55:33 +02:00
|
|
|
Scenario: Setting the same local mark on another page
|
2016-04-14 23:30:43 +02:00
|
|
|
When I run :scroll-px 5 10
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/10
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark a
|
2016-04-14 02:55:33 +02:00
|
|
|
And I open data/marks.html
|
|
|
|
And I run :scroll-px 0 20
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 0/20
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark a
|
|
|
|
And I run :jump-mark a
|
2016-04-14 23:30:43 +02:00
|
|
|
Then the page should be scrolled to 0 20
|
2016-04-14 02:55:33 +02:00
|
|
|
|
|
|
|
Scenario: Jumping to a local mark after returning to a page
|
2016-04-14 23:30:43 +02:00
|
|
|
When I run :scroll-px 5 10
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/10
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark a
|
2016-09-06 14:58:33 +02:00
|
|
|
And I run :scroll-px 0 20
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/30
|
2016-04-14 02:55:33 +02:00
|
|
|
And I open data/numbers/1.txt
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark a
|
2016-04-14 02:55:33 +02:00
|
|
|
And I open data/marks.html
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :jump-mark a
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/10
|
2016-04-14 23:30:43 +02:00
|
|
|
Then the page should be scrolled to 5 10
|
2016-04-14 02:55:33 +02:00
|
|
|
|
|
|
|
Scenario: Setting and jumping to a global mark
|
2016-04-14 23:30:43 +02:00
|
|
|
When I run :scroll-px 5 20
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/20
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark A
|
2016-04-14 02:55:33 +02:00
|
|
|
And I open data/numbers/1.txt
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 0/0
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :jump-mark A
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 5/20
|
2016-04-14 02:55:33 +02:00
|
|
|
Then data/marks.html should be loaded
|
2016-04-14 23:30:43 +02:00
|
|
|
And the page should be scrolled to 5 20
|
2016-04-14 02:55:33 +02:00
|
|
|
|
|
|
|
Scenario: Jumping to an unset mark
|
2016-04-21 03:53:12 +02:00
|
|
|
When I run :jump-mark b
|
2016-04-14 02:55:33 +02:00
|
|
|
Then the error "Mark b is not set" should be shown
|
|
|
|
|
|
|
|
Scenario: Jumping to a local mark that was set on another page
|
2016-04-21 03:53:12 +02:00
|
|
|
When I run :set-mark b
|
2016-04-14 02:55:33 +02:00
|
|
|
And I open data/numbers/1.txt
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :jump-mark b
|
2016-04-14 02:55:33 +02:00
|
|
|
Then the error "Mark b is not set" should be shown
|
|
|
|
|
2018-02-08 20:23:34 +01:00
|
|
|
@qtwebengine_skip: Does not emit loaded signal for fragments?
|
2016-04-14 02:55:33 +02:00
|
|
|
Scenario: Jumping to a local mark after changing fragments
|
|
|
|
When I open data/marks.html#top
|
|
|
|
And I run :scroll 'top'
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 0/0
|
2016-04-14 23:30:43 +02:00
|
|
|
And I run :scroll-px 10 10
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 10/10
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :set-mark a
|
2016-04-14 02:55:33 +02:00
|
|
|
When I open data/marks.html#bottom
|
2016-04-21 03:53:12 +02:00
|
|
|
And I run :jump-mark a
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 10/10
|
2016-04-14 23:30:43 +02:00
|
|
|
Then the page should be scrolled to 10 10
|
2016-04-14 05:14:53 +02:00
|
|
|
|
2017-12-22 19:36:45 +01:00
|
|
|
@qtwebengine_skip: Does not emit loaded signal for fragments?
|
2016-04-14 05:14:53 +02:00
|
|
|
Scenario: Jumping back after following a link
|
2016-08-18 17:21:50 +02:00
|
|
|
When I hint with args "links normal" and follow s
|
2016-05-30 14:54:06 +02:00
|
|
|
And I wait until data/marks.html#bottom is loaded
|
2016-04-14 05:14:53 +02:00
|
|
|
And I run :jump-mark "'"
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 0/0
|
2016-04-14 23:30:43 +02:00
|
|
|
Then the page should be scrolled to 0 0
|
2016-04-16 06:12:14 +02:00
|
|
|
|
|
|
|
Scenario: Jumping back after searching
|
2016-04-18 18:26:01 +02:00
|
|
|
When I run :scroll-px 20 15
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 20/15
|
2016-04-18 18:26:01 +02:00
|
|
|
And I run :search Waldo
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed
|
2016-04-16 06:12:14 +02:00
|
|
|
And I run :jump-mark "'"
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 20/15
|
2016-04-18 18:26:01 +02:00
|
|
|
Then the page should be scrolled to 20 15
|
2016-04-16 06:12:14 +02:00
|
|
|
|
2016-09-06 17:38:13 +02:00
|
|
|
# FIXME:qtwebengine
|
|
|
|
@qtwebengine_skip: Does not find Grail on Travis for some reason?
|
2016-04-16 06:12:14 +02:00
|
|
|
Scenario: Jumping back after search-next
|
2016-04-18 18:26:01 +02:00
|
|
|
When I run :search Grail
|
2016-04-16 06:12:14 +02:00
|
|
|
And I run :search-next
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed
|
2016-04-16 06:12:14 +02:00
|
|
|
And I run :jump-mark "'"
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 0/0
|
2016-04-16 06:12:14 +02:00
|
|
|
Then the page should be scrolled to 0 0
|
2016-04-20 02:46:45 +02:00
|
|
|
|
|
|
|
Scenario: Hovering a hint does not set the ' mark
|
|
|
|
When I run :scroll-px 30 20
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 30/20
|
2017-10-03 22:44:21 +02:00
|
|
|
And I run :scroll-to-perc 0
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed
|
2016-08-18 17:21:50 +02:00
|
|
|
And I hint with args "links hover" and follow s
|
2016-04-20 02:46:45 +02:00
|
|
|
And I run :jump-mark "'"
|
2016-09-06 20:24:41 +02:00
|
|
|
And I wait until the scroll position changed to 30/20
|
2016-04-20 02:46:45 +02:00
|
|
|
Then the page should be scrolled to 30 20
|