MCPcopy
hub / github.com/mailvelope/mailvelope / typeRecipient

Function typeRecipient

test/integration/components/editor/editor.test.js:94–102  ·  view source on GitHub ↗
(text, separator = 'Enter', inputIndex = 0)

Source from the content-addressed store, hash-verified

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

Callers 1

editor.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected