Created
February 5, 2020 19:51
-
-
Save zaydek/d0f184cbebed0a17912a4843a361f71b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FAIL src/components/Editor/__tests/playwright.test.js (8.955s) | |
β (7056ms) | |
β | |
Evaluation failed: {} | |
12 | await page.focus("[contenteditable]") | |
13 | // https://github.com/puppeteer/puppeteer/issues/1313 | |
> 14 | await page.evaluate(() => document.execCommand("selectall", false, null)) | |
| ^ | |
15 | await page.keyboard.press("Backspace") | |
16 | await page.keyboard.type("Hello, world! π", { delay: 50 }) | |
17 | await browser.close() | |
at checkException (node_modules/playwright-core/lib/firefox/ffExecutionContext.js:155:19) | |
at FFExecutionContext.evaluate (node_modules/playwright-core/lib/firefox/ffExecutionContext.js:92:9) | |
at Object.<anonymous> (src/components/Editor/__tests/playwright.test.js:14:3) | |
Test Suites: 1 failed, 1 total | |
Tests: 1 failed, 1 total | |
Snapshots: 0 total | |
Time: 9.589s | |
Ran all test suites matching /playwright.test.js/i. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { chromium, firefox, webkit } from "playwright" | |
;(function () { | |
jest.setTimeout(60e3) | |
})() | |
test("", async () => { | |
for (const browserType of [chromium, firefox, webkit]) { | |
const browser = await browserType.launch({ headless: false }) | |
const context = await browser.newContext() | |
const page = await context.newPage("http://localhost:3000") | |
await page.focus("[contenteditable]") | |
// https://github.com/puppeteer/puppeteer/issues/1313 | |
await page.evaluate(() => document.execCommand("selectall", false, null)) | |
await page.keyboard.press("Backspace") | |
await page.keyboard.type("Hello, world! π", { delay: 50 }) | |
await browser.close() | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment