1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
Feature: Opening pages
Scenario: :open with URL
Given I open about:blank
When I run :open http://localhost:(port)/data/numbers/1.txt
And I wait until data/numbers/1.txt is loaded
And I run :tab-only
Then the session should look like:
"""
windows:
- tabs:
- active: true
history:
- url: about:blank
- active: true
url: http://localhost:*/data/numbers/1.txt
"""
Scenario: :open without URL
When I set url.default_page to http://localhost:(port)/data/numbers/11.txt
And I run :open
Then data/numbers/11.txt should be loaded
Scenario: :open without URL and -t
When I set url.default_page to http://localhost:(port)/data/numbers/2.txt
And I run :open -t
Then data/numbers/2.txt should be loaded
Scenario: :open with invalid URL
When I set url.auto_search to never
And I run :open foo!
Then the error "Invalid URL" should be shown
Scenario: :open with -t and -b
When I run :open -t -b foo.bar
Then the error "Only one of -t/-b/-w/-p can be given!" should be shown
Scenario: Searching with :open
When I set url.auto_search to naive
And I set url.searchengines to {"DEFAULT": "http://localhost:(port)/data/numbers/{}.txt"}
And I run :open 3
Then data/numbers/3.txt should be loaded
@flaky
Scenario: Opening in a new tab
Given I open about:blank
When I run :tab-only
And I run :open -t http://localhost:(port)/data/numbers/4.txt
And I wait until data/numbers/4.txt is loaded
Then the following tabs should be open:
"""
- about:blank
- data/numbers/4.txt (active)
"""
Scenario: Opening in a new background tab
Given I open about:blank
When I run :tab-only
And I run :open -b http://localhost:(port)/data/numbers/5.txt
And I wait until data/numbers/5.txt is loaded
Then the following tabs should be open:
"""
- about:blank (active)
- data/numbers/5.txt
"""
Scenario: :open with count
Given I open about:blank
When I run :tab-only
And I open about:blank in a new tab
And I run :open http://localhost:(port)/data/numbers/6.txt with count 2
And I wait until data/numbers/6.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- history:
- url: about:blank
- active: true
history:
- url: about:blank
- active: true
url: http://localhost:*/data/numbers/6.txt
"""
Scenario: Opening in a new tab (unrelated)
Given I open about:blank
When I set tabs.new_position.unrelated to next
And I set tabs.new_position.related to prev
And I run :tab-only
And I run :open -t http://localhost:(port)/data/numbers/7.txt
And I wait until data/numbers/7.txt is loaded
Then the following tabs should be open:
"""
- about:blank
- data/numbers/7.txt (active)
"""
Scenario: Opening in a new tab (related)
Given I open about:blank
When I set tabs.new_position.unrelated to next
And I set tabs.new_position.related to prev
And I run :tab-only
And I run :open -t --related http://localhost:(port)/data/numbers/8.txt
And I wait until data/numbers/8.txt is loaded
Then the following tabs should be open:
"""
- data/numbers/8.txt (active)
- about:blank
"""
Scenario: Opening in a new window
Given I open about:blank
When I run :tab-only
And I run :open -w http://localhost:(port)/data/numbers/9.txt
And I wait until data/numbers/9.txt is loaded
Then the session should look like:
"""
windows:
- tabs:
- active: true
history:
- active: true
url: about:blank
- tabs:
- active: true
history:
- active: true
url: http://localhost:*/data/numbers/9.txt
"""
Scenario: Opening a quickmark
When I run :quickmark-add http://localhost:(port)/data/numbers/10.txt quickmarktest
And I run :open quickmarktest
Then data/numbers/10.txt should be loaded
|