File: completion.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 (113 lines) | stat: -rw-r--r-- 4,261 bytes parent folder | download
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
Feature: Using completion

    Scenario: No warnings when completing with one entry (#1600)
        Given I open about:blank
        When I run :cmd-set-text -s :open
        And I run :completion-item-focus next
        Then no crash should happen

    Scenario: Hang with many spaces in completion (#1919)
        # Generate some history data
        When I open data/numbers/1.txt
        And I open data/numbers/2.txt
        And I open data/numbers/3.txt
        And I open data/numbers/4.txt
        And I open data/numbers/5.txt
        And I open data/numbers/6.txt
        And I open data/numbers/7.txt
        And I open data/numbers/8.txt
        And I open data/numbers/9.txt
        And I open data/numbers/10.txt
        And I run :cmd-set-text :open a                             b
        # Make sure qutebrowser doesn't hang
        And I run :message-info "Still alive!"
        Then the message "Still alive!" should be shown

    Scenario: Crash when pasting emoji into the command line (#2007)
        Given I open about:blank
        When I run :cmd-set-text -s :🌀
        Then no crash should happen

    Scenario: Using command completion
        When I run :cmd-set-text :
        Then the completion model should be command

    Scenario: Using help completion
        When I run :cmd-set-text -s :help
        Then the completion model should be helptopic

    Scenario: Using quickmark completion
        When I run :cmd-set-text -s :quickmark-load
        Then the completion model should be quickmark

    Scenario: Using bookmark completion
        When I run :cmd-set-text -s :bookmark-load
        Then the completion model should be bookmark

    Scenario: Using bind completion
        When I run :cmd-set-text -s :bind X
        Then the completion model should be bind

    # See #2956
    @flaky
    Scenario: Using session completion
        Given I open data/hello.txt
        And I run :session-save hello
        When I run :cmd-set-text -s :session-load
        And I run :completion-item-focus next
        And I run :completion-item-focus next
        And I run :session-delete hello
        And I run :command-accept
        Then the error "Session hello not found!" should be shown

    Scenario: Using option completion
        When I run :cmd-set-text -s :set
        Then the completion model should be option

    Scenario: Using value completion
        When I run :cmd-set-text -s :set aliases
        Then the completion model should be value

    Scenario: Deleting an open tab via the completion
        Given I have a fresh instance
        When I open data/hello.txt
        And I open data/hello2.txt in a new tab
        And I run :cmd-set-text -s :tab-select
        And I wait for "Setting completion pattern ''" in the log
        And I run :completion-item-focus next
        And I wait for "setting text = ':tab-select 0/1', *" in the log
        And I run :completion-item-focus next
        And I wait for "setting text = ':tab-select 0/2', *" in the log
        And I run :completion-item-del
        Then the following tabs should be open:
            """
            - data/hello.txt (active)
            """

    Scenario: Go to tab after moving a tab
        Given I have a fresh instance
        When I open data/hello.txt
        And I open data/hello2.txt in a new tab
        # Tricking completer into not updating tabs
        And I run :cmd-set-text -s :tab-select
        And I run :tab-move 1
        And I run :tab-select hello2.txt
        Then the following tabs should be open:
            """
            - data/hello2.txt (active)
            - data/hello.txt
            """

    Scenario: Space updates completion model after selecting full command
        When I run :cmd-set-text :set
        And I run :completion-item-focus next
        And I run :cmd-set-text -s :set
        Then the completion model should be option

    Scenario: Page focus after using completion (#8750)
        When I open data/insert_mode_settings/html/input.html
        And I run :cmd-set-text :
        And I run :mode-leave
        And I run :click-element id qute-input
        And I run :fake-key -g someinput
        Then the javascript message "contents: someinput" should be logged