mirror of https://github.com/01-edu/public.git
get-them-all: remove deprecated waitFor methods & changed the file name for the data file
This commit is contained in:
parent
429a501460
commit
9fb8a8b1ec
|
@ -1,4 +1,4 @@
|
||||||
import { people } from './subjects/get-them-all/data.js'
|
import { people } from './subjects/get-them-all/get-them-all.data.js'
|
||||||
|
|
||||||
const getIds = predicate =>
|
const getIds = predicate =>
|
||||||
people
|
people
|
||||||
|
@ -32,7 +32,7 @@ tests.push(async ({ eq, page }) => {
|
||||||
// get architects
|
// get architects
|
||||||
const btnArchitect = await page.$(`#btnArchitect`)
|
const btnArchitect = await page.$(`#btnArchitect`)
|
||||||
btnArchitect.click()
|
btnArchitect.click()
|
||||||
await page.waitFor(150)
|
await page.waitForTimeout(150)
|
||||||
|
|
||||||
const selected = await page.$$eval('a', nodes =>
|
const selected = await page.$$eval('a', nodes =>
|
||||||
nodes
|
nodes
|
||||||
|
@ -51,15 +51,13 @@ tests.push(async ({ eq, page }) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
eq(eliminated, notArchitects)
|
eq(eliminated, notArchitects)
|
||||||
|
|
||||||
await page.waitFor(150)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
tests.push(async ({ page, eq }) => {
|
tests.push(async ({ page, eq }) => {
|
||||||
// get classical
|
// get classical
|
||||||
const btnClassical = await page.$(`#btnClassical`)
|
const btnClassical = await page.$(`#btnClassical`)
|
||||||
btnClassical.click()
|
btnClassical.click()
|
||||||
await page.waitFor(150)
|
await page.waitForTimeout(150)
|
||||||
|
|
||||||
const selected = await page.$$eval('.classical', nodes =>
|
const selected = await page.$$eval('.classical', nodes =>
|
||||||
nodes
|
nodes
|
||||||
|
@ -78,15 +76,13 @@ tests.push(async ({ page, eq }) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
eq(eliminated, notClassical)
|
eq(eliminated, notClassical)
|
||||||
|
|
||||||
await page.waitFor(150)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
tests.push(async ({ page, eq }) => {
|
tests.push(async ({ page, eq }) => {
|
||||||
// check active
|
// check active
|
||||||
const btnActive = await page.$(`#btnActive`)
|
const btnActive = await page.$(`#btnActive`)
|
||||||
btnActive.click()
|
btnActive.click()
|
||||||
await page.waitFor(150)
|
await page.waitForTimeout(150)
|
||||||
|
|
||||||
const selected = await page.$$eval('.classical.active', nodes =>
|
const selected = await page.$$eval('.classical.active', nodes =>
|
||||||
nodes
|
nodes
|
||||||
|
@ -104,14 +100,13 @@ tests.push(async ({ page, eq }) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
eq(eliminated, notActive)
|
eq(eliminated, notActive)
|
||||||
await page.waitFor(150)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
tests.push(async ({ page, eq }) => {
|
tests.push(async ({ page, eq }) => {
|
||||||
// get bonanno
|
// get bonanno
|
||||||
const btnBonanno = await page.$(`#btnBonanno`)
|
const btnBonanno = await page.$(`#btnBonanno`)
|
||||||
btnBonanno.click()
|
btnBonanno.click()
|
||||||
await page.waitFor(150)
|
await page.waitForTimeout(150)
|
||||||
|
|
||||||
const selected = await page.$eval('#BonannoPisano', node => {
|
const selected = await page.$eval('#BonannoPisano', node => {
|
||||||
if (node.textContent === 'Bonanno Pisano') return node.id
|
if (node.textContent === 'Bonanno Pisano') return node.id
|
||||||
|
|
Loading…
Reference in New Issue