-
Notifications
You must be signed in to change notification settings - Fork 232
Expand file tree
/
Copy pathtest_example_list.py
More file actions
42 lines (37 loc) · 1.26 KB
/
test_example_list.py
File metadata and controls
42 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- coding: utf-8 -*-
import textwrap
from .helpers import keys
from .helpers import create_example_fixture
example_app = create_example_fixture('examples/list.py')
def test_list(example_app):
example_app.expect(textwrap.dedent("""\
? What do you want to do? (Use arrow keys)
❯ Order a pizza
Make a reservation
---------------
Ask for opening hours
- Contact support (Unavailable at this time)
Talk to the receptionist"""))
example_app.write(keys.ENTER)
example_app.expect(textwrap.dedent("""\
? What do you want to do? Order a pizza
? What size do you need? (Use arrow keys)
❯ Jumbo
Large
Standard
Medium
Small
Micro"""))
example_app.write(keys.ENTER)
example_app.expect(textwrap.dedent("""\
? What size do you need? Jumbo
? Which vehicle you want to use for delivery? (Use arrow keys)
❯ bike
car
truck
helicopter"""))
example_app.write(keys.ENTER)
example_app.expect(textwrap.dedent("""\
? Which vehicle you want to use for delivery? bike
{'delivery': 'bike', 'size': 'jumbo', 'theme': 'Order a pizza'}
"""))