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
1 merge request!66Testcafe testing base
Pipeline #100704 failed
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) => { test("Connection id appears", async (t) => {
await t.typeText("#developer-name", "John Smith").click("#submit-button") const articleHeader = Selector("#user-id").with({ timeout: 100 })
let inputValue = await articleHeader.value
await t.expect(inputValue.length).gt(0)
}) })
const createTestCafe = require("testcafe") const createTestCafe = require("testcafe")
let runner = null let runner = null
let runner2 = null
createTestCafe("localhost", 1337, 1338) createTestCafe("localhost", 1337, 1338)
.then((testcafe) => { .then((testcafe) => {
runner = testcafe.createRunner() runner = testcafe.createRunner()
runner2 = testcafe.createRunner()
return testcafe.createBrowserConnection() return testcafe.createBrowserConnection()
}) })
.then((remoteConnection) => { .then((remoteConnection) => {
...@@ -14,11 +15,20 @@ createTestCafe("localhost", 1337, 1338) ...@@ -14,11 +15,20 @@ createTestCafe("localhost", 1337, 1338)
.reporter("json") .reporter("json")
.run() .run()
.then((failedCount) => { .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) => { .catch((error) => {
console.log("error" + 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