Skip to content

Commit bca8474

Browse files
committed
Use hecate to perform interface integration tests
1 parent 97d3739 commit bca8474

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

requirements-test.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ configobj==5.0.6
66
# Note you need at least pip --version of 6.0 or
77
# higher to be able to pick on these version specifiers.
88
unittest2==1.1.0; python_version == '2.6'
9+
# requires tmux < v2.0
10+
hecate==0.1.0

tests/integration/test_ui.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from tests.compat import unittest
2+
from time import sleep
3+
from hecate.hecate import Runner, Timeout
4+
5+
class UITest(unittest.TestCase):
6+
7+
def setUp(self):
8+
self.shell = Runner(u'aws-shell')
9+
10+
def tearDown(self):
11+
self.shell.shutdown()
12+
13+
def test_docs_are_searchable(self):
14+
shell = self.shell
15+
shell.await_text(u'aws>', timeout=2)
16+
shell.write(u'ec2 ')
17+
shell.await_text(u'Amazon EC2')
18+
shell.press(u'F9')
19+
shell.write(u'/')
20+
# wait for the input timeout to trigger
21+
sleep(1)
22+
# ensure documentation panel is still there
23+
shell.await_text(u'Amazon EC2')

0 commit comments

Comments
 (0)