UNPKG

@wordpress/e2e-test-utils

Version:
19 lines (18 loc) 701 B
import { openDocumentSettingsSidebar } from "./open-document-settings-sidebar"; import { clickButton } from "./click-button"; async function createNewTemplate(name) { await openDocumentSettingsSidebar(); await clickButton("Page"); await page.click('button[aria-label^="Select template"]'); await page.waitForSelector('button[aria-label="Add template"]'); await page.click('button[aria-label="Add template"]'); await page.keyboard.press("Tab"); await page.keyboard.press("Tab"); await page.keyboard.type(name); await clickButton("Create"); await page.waitForSelector('iframe[name="editor-canvas"]'); } export { createNewTemplate }; //# sourceMappingURL=create-new-template.js.map