summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-17 11:30:46 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-17 11:30:46 +0100
commit62cf48fc779a22617957bd18272a55a04a8ffc2d (patch)
tree19604c17515bc6c8df71f397b7a07c89c0697126
parenta17a2ad1738c2483bed6c24a4a15fcb8dfaf49f8 (diff)
downloadqutebrowser-62cf48fc779a22617957bd18272a55a04a8ffc2d.tar.gz
qutebrowser-62cf48fc779a22617957bd18272a55a04a8ffc2d.zip
Avoid fresh instance in editor.feature
See #3200 30s -> 8s for editor tests on my machine
-rw-r--r--tests/end2end/features/editor.feature10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/end2end/features/editor.feature b/tests/end2end/features/editor.feature
index db80c89ba..4d56440f4 100644
--- a/tests/end2end/features/editor.feature
+++ b/tests/end2end/features/editor.feature
@@ -2,9 +2,6 @@
Feature: Opening external editors
- Background:
- Given I have a fresh instance
-
## :edit-url
Scenario: Editing a URL
@@ -26,6 +23,7 @@ Feature: Opening external editors
Scenario: Editing a URL with -rt
When I set tabs.new_position.related to prev
And I open data/numbers/1.txt
+ And I run :tab-only
And I set up a fake editor replacing "1.txt" by "2.txt"
And I run :edit-url -rt
Then data/numbers/2.txt should be loaded
@@ -44,7 +42,8 @@ Feature: Opening external editors
- data/numbers/2.txt
Scenario: Editing a URL with -w
- When I open data/numbers/1.txt in a new tab
+ When I run :window-only
+ And I open data/numbers/1.txt in a new tab
And I run :tab-only
And I set up a fake editor replacing "1.txt" by "2.txt"
And I run :edit-url -w
@@ -65,6 +64,7 @@ Feature: Opening external editors
Scenario: Editing a URL with -p
When I open data/numbers/1.txt in a new tab
And I run :tab-only
+ And I run :window-only
And I set up a fake editor replacing "1.txt" by "2.txt"
And I run :edit-url -p
Then data/numbers/2.txt should be loaded
@@ -95,6 +95,7 @@ Feature: Opening external editors
Then the error "Invalid URL" should be shown
Scenario: Spawning an editor successfully
+ Given I have a fresh instance
When I set up a fake editor returning "foobar"
And I open data/editor.html
And I run :click-element id qute-textarea
@@ -154,6 +155,7 @@ Feature: Opening external editors
And I wait for "Entering mode KeyMode.caret (reason: command)" in the log
And I run :open-editor
And I wait for "Read back: foobar" in the log
+ And I run :leave-mode
Then the javascript message "text: foobar" should be logged
Scenario: Spawning an editor with existing text