Add support for multi-page main menu

This commit is contained in:
2025-01-14 21:56:51 -05:00
parent 9fe732e0e1
commit d261d5200e
9 changed files with 70 additions and 9 deletions

View File

@@ -68,5 +68,11 @@ async def cmd_reports(proc, mrn, alpha, omega):
case _: assert False
proc.sendline('^')
proc.sendline('^Patient information AND OE/RR')
assert await expect.endswith('\r\nSelect Patient Information and OE/RR Option: ', '\r\nSelect Patient Information and OE/RR <TEST ACCOUNT> Option: ')
async for prompt, response in expect.promptmatches((
(re.compile(r' Press \'RETURN\' to continue, \'\^\' to stop: $'), None),
('Select Patient Information and OE/RR Option: ', None, True),
('Select Patient Information and OE/RR <TEST ACCOUNT> Option: ', None, True),
), throw=True):
if prompt.index == 0:
proc.sendline(response)
expect.clear()