mirror of
https://github.com/fsolla/teqo.git
synced 2026-12-03 22:13:06 +00:00
style(C101): format
This commit is contained in:
parent
1d326a72ab
commit
de205c61e4
1 changed files with 13 additions and 13 deletions
|
|
@ -166,16 +166,16 @@ test.describe('C101 — agenda mobile com cara de app nativo', () => {
|
||||||
.poll(
|
.poll(
|
||||||
() =>
|
() =>
|
||||||
page.evaluate(() => {
|
page.evaluate(() => {
|
||||||
const scroller = [...document.querySelector('.activity-agenda')!.querySelectorAll('*')].find(
|
const scroller = [
|
||||||
(el) => {
|
...document.querySelector('.activity-agenda')!.querySelectorAll('*'),
|
||||||
const style = getComputedStyle(el)
|
].find((el) => {
|
||||||
return (
|
const style = getComputedStyle(el)
|
||||||
(style.overflowY === 'auto' || style.overflowY === 'scroll') &&
|
return (
|
||||||
el.scrollHeight > el.clientHeight &&
|
(style.overflowY === 'auto' || style.overflowY === 'scroll') &&
|
||||||
el.querySelector('[role="rowheader"]')
|
el.scrollHeight > el.clientHeight &&
|
||||||
)
|
el.querySelector('[role="rowheader"]')
|
||||||
},
|
)
|
||||||
)
|
})
|
||||||
return scroller ? scroller.scrollTop : null
|
return scroller ? scroller.scrollTop : null
|
||||||
}),
|
}),
|
||||||
{ timeout: 15_000 },
|
{ timeout: 15_000 },
|
||||||
|
|
@ -187,9 +187,9 @@ test.describe('C101 — agenda mobile com cara de app nativo', () => {
|
||||||
const colHeaderText = `${weekdayOf(civilDate)} ${Number(civilDate.slice(8, 10))}`
|
const colHeaderText = `${weekdayOf(civilDate)} ${Number(civilDate.slice(8, 10))}`
|
||||||
const headerTop = () =>
|
const headerTop = () =>
|
||||||
page.evaluate((text) => {
|
page.evaluate((text) => {
|
||||||
const cell = [...document.querySelector('.activity-agenda')!.querySelectorAll('[role="columnheader"]')].find(
|
const cell = [
|
||||||
(el) => el.textContent?.includes(text),
|
...document.querySelector('.activity-agenda')!.querySelectorAll('[role="columnheader"]'),
|
||||||
)
|
].find((el) => el.textContent?.includes(text))
|
||||||
return cell ? Math.round(cell.getBoundingClientRect().top) : null
|
return cell ? Math.round(cell.getBoundingClientRect().top) : null
|
||||||
}, colHeaderText)
|
}, colHeaderText)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue