(name)
| 3213 | }; |
| 3214 | |
| 3215 | const readability = async (name) => { |
| 3216 | await closeTooltips(page); |
| 3217 | const top = await measureReadability(page, READABILITY_EXCLUSIONS); |
| 3218 | const scrolled = await scrollRegionsToEnd(page, READABILITY_EXCLUSIONS); |
| 3219 | await page.waitForTimeout(200); |
| 3220 | const bottom = await measureReadability(page, READABILITY_EXCLUSIONS); |
| 3221 | await resetScroll(page, READABILITY_EXCLUSIONS); |
| 3222 | const overlaps = [...top.overlaps, ...bottom.overlaps]; |
| 3223 | const clipped = [...top.clipped, ...bottom.clipped]; |
| 3224 | return { |
| 3225 | name, |
| 3226 | scrolledRegions: scrolled.length, |
| 3227 | candidates: { top: top.candidates, bottom: bottom.candidates }, |
| 3228 | overlaps: overlaps.length, |
| 3229 | clipped: clipped.length, |
| 3230 | cutWithoutHint: clipped.filter((entry) => entry.kind === 'cut-without-hint').length, |
| 3231 | detail: { |
| 3232 | overlaps: overlaps.slice(0, 12).map((entry) => ({ |
| 3233 | a: entry.a.path, b: entry.b.path, |
| 3234 | text: `${entry.a.text} / ${entry.b.text}`.slice(0, 200), |
| 3235 | })), |
| 3236 | clipped: clipped.slice(0, 12).map((entry) => ({ |
| 3237 | kind: entry.kind, path: entry.element.path, |
| 3238 | text: String(entry.element.text).slice(0, 200), |
| 3239 | })), |
| 3240 | }, |
| 3241 | }; |
| 3242 | }; |
| 3243 | |
| 3244 | // ------------------------------------------------ 5a. Die Zustaende |
| 3245 | for (const state of wantedStates) { |
no test coverage detected