MCPcopy Create free account
hub / github.com/Rello/analytics / waitForThresholdTextGone

Function waitForThresholdTextGone

tests/playwright/31_options_thresholds.js:46–56  ·  view source on GitHub ↗
(page, expectedText, timeout = 10000)

Source from the content-addressed store, hash-verified

44}
45
46async function waitForThresholdTextGone(page, expectedText, timeout = 10000) {
47 await page.waitForFunction(
48 ({ selector, expected }) => {
49 const texts = Array.from(document.querySelectorAll(selector))
50 .map((node) => (node.textContent || '').replace(/\s+/g, ' ').trim());
51 return !texts.includes(expected);
52 },
53 { selector: '#thresholdList .thresholdText', expected: expectedText },
54 { timeout }
55 );
56}
57
58async function createThreshold(page, { columnLabel, value, severity, coloring = 'value', option = '=' }) {
59 await page.locator('#thresholdDimension').selectOption({ label: columnLabel });

Callers 1

deleteThresholdFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected