Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Browser, Page } from 'playwright'; | ||
import qawolf from 'qawolf'; | ||
import { connect } from '../browser'; | ||
import { TEST_URL } from '../utils'; | ||
|
||
let browser: Browser; | ||
let page: Page; | ||
|
||
beforeAll(async () => { | ||
browser = await connect(); | ||
const context = await browser.newContext(); | ||
await qawolf.register(context); | ||
page = await context.newPage(); | ||
const targetId = (page as any)._delegate._targetId; | ||
console.log(`targetId="${targetId}"`); | ||
}); | ||
|
||
afterAll(async () => { | ||
await qawolf.stopVideos(); | ||
await browser.close(); | ||
}); | ||
|
||
test("example", async () => { | ||
await page.goto(`${TEST_URL}infinite-scroll`); | ||
await qawolf.create(); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`CodeReconciler.reconcile inserts new expressions 1`] = ` | ||
"await page.click(\\"text=Log in\\"); | ||
"const page = await qawolf.waitForPage(context, 0, { waitUntil: \\"domcontentloaded\\" }); | ||
await page.click(\\"text=Log in\\"); | ||
// 🐺 create code here" | ||
`; | ||
|
||
exports[`CodeReconciler.reconcile updates the last expression 1`] = ` | ||
"await page.click(\\"#username\\"); | ||
"const page = await qawolf.waitForPage(context, 0, { waitUntil: \\"domcontentloaded\\" }); | ||
await page.click(\\"#username\\"); | ||
" | ||
`; | ||
|
||
exports[`CodeReconciler.reconcile updates the last expression after a step was removed (ex: paste) 1`] = ` | ||
"await page.click(\\"#username\\"); | ||
"const page = await qawolf.waitForPage(context, 0, { waitUntil: \\"domcontentloaded\\" }); | ||
await page.click(\\"#username\\"); | ||
" | ||
`; |