Skip to content
Snippets Groups Projects
Commit f97e4161 authored by Yuriy Maksymets's avatar Yuriy Maksymets
Browse files

Testing id appearance

parent 31267568
No related branches found
No related tags found
No related merge requests found
import { Selector } from "testcafe"
fixture`Peer 2`.page`localhost:12345`
const selectorOptions = { timeout: 100 }
test("Connection id appears", async (t) => {
const articleHeader = Selector("#user-id").with(selectorOptions)
let inputValue = await articleHeader.value
await t.expect(inputValue.length).gt(0)
})
// import { Selector } from "testcafe"
import { Selector } from "testcafe"
fixture`Getting Started`.page`http://devexpress.github.io/testcafe/example`
fixture`Peer 1`.page`localhost:12345`
test("My first test", async (t) => {
await t.typeText("#developer-name", "John Smith").click("#submit-button")
test("Connection id appears", async (t) => {
const articleHeader = Selector("#user-id").with({ timeout: 100 })
let inputValue = await articleHeader.value
await t.expect(inputValue.length).gt(0)
})
const createTestCafe = require("testcafe")
let runner = null
let runner2 = null
createTestCafe("localhost", 1337, 1338)
.then((testcafe) => {
runner = testcafe.createRunner()
runner2 = testcafe.createRunner()
return testcafe.createBrowserConnection()
})
.then((remoteConnection) => {
......@@ -14,11 +15,20 @@ createTestCafe("localhost", 1337, 1338)
.reporter("json")
.run()
.then((failedCount) => {
console.log("failed count " + failedCount)
/* ... */
console.log("failed count 1: " + failedCount)
// runner2
// .src("peer.test.js")
// .browsers(["chrome"])
// .reporter("json")
// .run()
// .then((failedCount) => {
// console.log("failed count 2: " + failedCount)
// })
// .catch((error) => {
// console.log("error" + error)
// })
})
.catch((error) => {
console.log("error" + error)
/* ... */
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment