From 62cf48fc779a22617957bd18272a55a04a8ffc2d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 17 Jan 2021 11:30:46 +0100 Subject: Avoid fresh instance in editor.feature See #3200 30s -> 8s for editor tests on my machine --- tests/end2end/features/editor.feature | 10 ++++++---- 1 file 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 -- cgit v1.2.3-54-g00ecf