File: invoke.feature

package info (click to toggle)
qutebrowser 3.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,432 kB
  • sloc: python: 72,411; javascript: 31,862; sh: 874; xml: 149; makefile: 52
file content (140 lines) | stat: -rw-r--r-- 4,881 bytes parent folder | download | duplicates (2)
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
136
137
138
139
140
Feature: Invoking a new process
    Simulate what happens when running qutebrowser with an existing instance

    Background:
        Given I clean up open tabs

    Scenario: Using new_instance_open_target = tab
        When I set new_instance_open_target to tab
        And I open data/title.html
        And I open data/search.html as a URL
        Then the following tabs should be open:
            """
            - data/title.html
            - data/search.html (active)
            """

    Scenario: Using new_instance_open_target = tab-bg
        When I set new_instance_open_target to tab-bg
        And I open data/title.html
        And I open data/search.html as a URL
        Then the following tabs should be open:
            """
            - data/title.html (active)
            - data/search.html
            """

    Scenario: Using new_instance_open_target = window
        When I set new_instance_open_target to window
        And I open data/title.html
        And I open data/search.html as a URL
        Then the session should look like:
            """
            windows:
            - tabs:
              - history:
                - url: about:blank
                - url: http://localhost:*/data/title.html
            - tabs:
              - history:
                - url: http://localhost:*/data/search.html
            """

    Scenario: Using new_instance_open_target = private-window
        When I set new_instance_open_target to private-window
        And I open data/title.html
        And I open data/search.html as a URL
        Then the session should look like:
            """
            windows:
            - tabs:
              - history:
                - url: about:blank
                - url: http://localhost:*/data/title.html
            - private: True
              tabs:
              - history:
                - url: http://localhost:*/data/search.html
            """

    Scenario: Using new_instance_open_target_window = last-opened
        When I set new_instance_open_target to tab
        And I set new_instance_open_target_window to last-opened
        And I open data/title.html
        And I open data/search.html in a new window
        And I open data/hello.txt as a URL
        Then the session should look like:
            """
            windows:
            - tabs:
              - history:
                - url: about:blank
                - url: http://localhost:*/data/title.html
            - tabs:
              - history:
                - url: http://localhost:*/data/search.html
              - history:
                - url: http://localhost:*/data/hello.txt
            """

    Scenario: Using new_instance_open_target_window = first-opened
        When I set new_instance_open_target to tab
        And I set new_instance_open_target_window to first-opened
        And I open data/title.html
        And I open data/search.html in a new window
        And I open data/hello.txt as a URL
        Then the session should look like:
            """
            windows:
            - tabs:
              - history:
                - url: about:blank
                - url: http://localhost:*/data/title.html
              - history:
                - url: http://localhost:*/data/hello.txt
            - tabs:
              - history:
                - url: http://localhost:*/data/search.html
            """

    # issue #1060

    Scenario: Using target_window = first-opened after tab-give
        When I set new_instance_open_target to tab
        And I set new_instance_open_target_window to first-opened
        And I open data/title.html
        And I open data/search.html in a new tab
        And I run :tab-give
        And I wait until data/search.html is loaded
        And I open data/hello.txt as a URL
        Then the session should look like:
            """
            windows:
            - tabs:
              - history:
                - url: about:blank
                - url: http://localhost:*/data/title.html
              - history:
                - url: http://localhost:*/data/hello.txt
            - tabs:
              - history:
                - url: http://localhost:*/data/search.html
            """

    Scenario: Opening a new qutebrowser instance with no parameters
        When I set new_instance_open_target to tab
        And I set url.start_pages to ["http://localhost:(port)/data/hello.txt"]
        And I open data/title.html
        And I spawn a new window
        And I wait until data/hello.txt is loaded
        Then the session should look like:
            """
            windows:
            - tabs:
              - history:
                - url: about:blank
                - url: http://localhost:*/data/title.html
            - tabs:
              - history:
                - url: http://localhost:*/data/hello.txt
            """