add a prompt for manual test

This commit is contained in:
Dima Gerasimov 2020-02-08 15:40:06 +00:00 committed by Dmitrii Gerasimov
parent ff6699d585
commit f24378ebae

View file

@ -88,6 +88,12 @@ def trigger_grasp():
pyautogui.hotkey('ctrl', 'alt', 'c') pyautogui.hotkey('ctrl', 'alt', 'c')
def confirm(what: str):
# pylint: disable=import-error
import click # type: ignore
click.confirm(what, abort=True)
@skip_if_ci('no GUI to run the browser..') @skip_if_ci('no GUI to run the browser..')
def test(tmp_path: Path): def test(tmp_path: Path):
capture_file = tmp_path / 'output.org' capture_file = tmp_path / 'output.org'
@ -102,8 +108,10 @@ def test(tmp_path: Path):
sleep(2) # just in case.. sleep(2) # just in case..
# TODO select something? # TODO select something?
trigger_grasp() trigger_grasp()
confirm('ready to continue?')
sleep(1) # just in case sleep(1) # just in case
# TODO come up with a better test and involve other template parameters # TODO come up with a better test and involve other template parameters
assert capture_file.read_text() == '* [[https://en.wikipedia.org/wiki/Automation][Automation - Wikipedia]]' assert capture_file.read_text() == '* [[https://en.wikipedia.org/wiki/Automation][Automation - Wikipedia]]'