(session: FreebuffSession)
| 37 | let session: FreebuffSession | null = null |
| 38 | |
| 39 | const openHelp = async (session: FreebuffSession): Promise<string | null> => { |
| 40 | const initialOutput = await session.capture() |
| 41 | if (!initialOutput.includes('Enter a coding task')) { |
| 42 | console.log( |
| 43 | 'Skipping /help slash command assertion: Freebuff is not on the chat input screen.', |
| 44 | ) |
| 45 | return null |
| 46 | } |
| 47 | |
| 48 | await session.sendKey('C-u') |
| 49 | for (const key of ['/', 'h', 'e', 'l', 'p']) { |
| 50 | await session.sendKey(key) |
| 51 | } |
| 52 | await session.waitForText('/help', 10_000) |
| 53 | await session.sendKey('Enter') |
| 54 | return session.waitForText('Shortcuts', 10_000) |
| 55 | } |
| 56 | |
| 57 | afterEach(async () => { |
| 58 | if (session) { |
no test coverage detected