Open in a new tab.
This commit is contained in:
parent
4bf6359205
commit
6e786ff9b7
@ -29,7 +29,7 @@ def set_setting(quteproc, sect, opt, value):
|
|||||||
|
|
||||||
@bdd.given(bdd.parsers.parse("I open {path}"))
|
@bdd.given(bdd.parsers.parse("I open {path}"))
|
||||||
def open_path(quteproc, path):
|
def open_path(quteproc, path):
|
||||||
quteproc.open_path(path)
|
quteproc.open_path(path, new_tab=True)
|
||||||
|
|
||||||
|
|
||||||
@bdd.when(bdd.parsers.parse("I open {path}"))
|
@bdd.when(bdd.parsers.parse("I open {path}"))
|
||||||
|
@ -142,10 +142,13 @@ class QuteProc(testprocess.Process):
|
|||||||
with self._wait_signal(self.setting_done):
|
with self._wait_signal(self.setting_done):
|
||||||
self.send_cmd(':set "{}" "{}" "{}"'.format(sect, opt, value))
|
self.send_cmd(':set "{}" "{}" "{}"'.format(sect, opt, value))
|
||||||
|
|
||||||
def open_path(self, path):
|
def open_path(self, path, new_tab=False):
|
||||||
url = 'http://localhost:{}/{}'.format(self._httpbin.port, path)
|
url = 'http://localhost:{}/{}'.format(self._httpbin.port, path)
|
||||||
with self._wait_signal(self.url_loaded):
|
with self._wait_signal(self.url_loaded):
|
||||||
self.send_cmd(':open ' + url)
|
if new_tab:
|
||||||
|
self.send_cmd(':open -t ' + url)
|
||||||
|
else:
|
||||||
|
self.send_cmd(':open ' + url)
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture(scope='session', autouse=True)
|
@pytest.yield_fixture(scope='session', autouse=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user