| 9 | |
| 10 | |
| 11 | def test_checkbox(example_app): |
| 12 | example_app.expect(textwrap.dedent("""\ |
| 13 | ? Select toppings (<up>, <down> to move, <space> to select, <a> to toggle, <i> |
| 14 | = The Meats = |
| 15 | ❯○ Ham |
| 16 | ○ Ground Meat |
| 17 | ○ Bacon |
| 18 | = The Cheeses = |
| 19 | ● Mozzarella |
| 20 | ○ Cheddar |
| 21 | ○ Parmesan |
| 22 | = The usual = |
| 23 | ○ Mushroom |
| 24 | ○ Tomato |
| 25 | ○ Pepperoni |
| 26 | = The extras = |
| 27 | ○ Pineapple |
| 28 | - Olives (out of stock) |
| 29 | ○ Extra cheese""")) |
| 30 | example_app.write(' ') |
| 31 | example_app.expect('\n\n● ') |
| 32 | example_app.write(keys.ENTER) |
| 33 | example_app.expect(textwrap.dedent("""\ |
| 34 | ? Select toppings done (2 selections) |
| 35 | { |
| 36 | "toppings": [ |
| 37 | "Ham", |
| 38 | "Mozzarella" |
| 39 | ] |
| 40 | } |
| 41 | |
| 42 | """)) |