| 92 | * Type a string into a recipient input (default: main = first) and press a separator key. |
| 93 | */ |
| 94 | const typeRecipient = async (text, separator = 'Enter', inputIndex = 0) => { |
| 95 | await page.evaluate(idx => { |
| 96 | document.querySelectorAll('.recipients-input')[idx].querySelector('.tag-input-field').focus(); |
| 97 | }, inputIndex); |
| 98 | await page.keyboard.type(text); |
| 99 | await page.keyboard.press(separator); |
| 100 | // Give React a beat to reconcile the new tag. |
| 101 | await page.evaluate(() => new Promise(r => setTimeout(r, 30))); |
| 102 | }; |
| 103 | |
| 104 | /** |
| 105 | * Toggle the editor's extraKey checkbox. The checkbox is rendered inside |