From d324dd5f700f2c3af85368e114a94cbb286fca83 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 23 Nov 2015 19:42:01 +0100 Subject: [PATCH] bdd: Add "I open ... in a new tab" step. --- tests/integration/features/conftest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index 24fc46d03..90bc1a3ec 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -42,7 +42,14 @@ def open_path_given(quteproc, path): @bdd.when(bdd.parsers.parse("I open {path}")) def open_path_when(quteproc, path): - quteproc.open_path(path) + new_tab_suffix = ' in a new tab' + if path.endswith(new_tab_suffix): + path = path[:-len(new_tab_suffix)] + new_tab = True + else: + new_tab = False + + quteproc.open_path(path, new_tab=new_tab) @bdd.when(bdd.parsers.parse("I set {sect} -> {opt} to {value}"))