Beam

Matrix / Result appears after a delay

Result appears after a delay

BalancedNot from a Kane issueMeasured on Kane 0.10.9 and 0.10.8

After clicking "Load report" and waiting 2.5 seconds, the page shows "Report ready: 42 rows". The broken page shows "Report ready: 0 rows" once the delay passes.

What your agent will do with Beam installed

Use

Verify the page says "Report ready: 42 rows".

Results

Before each check, Kane does: Click "Load report".

WordingKaneCorrect pageBroken pageResult
Verify the page says "Report ready: 42 rows".Baseline0.10.9passedfailedBalanced
0.10.8passedfailedBalanced
Verify that once a line starting with "Report ready" appears, its exact visible text is "Report ready: 42 rows".Baseline0.10.9passedfailedBalanced
0.10.8passedfailedBalanced

How Kane read the page

Kane turns each wording into code that reads the page. This is the code it recorded:

Verify the page says "Report ready: 42 rows". Balanced

el(3).innerText.trim() === 'Report ready: 42 rows'

Verify that once a line starting with "Report ready" appears, its exact visible text is "Report ready: 42 rows". Balanced

el(3).innerText.trim()

The two pages

These are live. To see the difference, do what Kane does: Click "Load report".

Correct page Kane should passOpen full page
Source
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>reports</title></head><body>
<h1>reports</h1>
<button id="load" type="button">Load report</button>
<p id="status" data-testid="status"></p>
<script>
  document.getElementById('load').addEventListener('click', () => {
    setTimeout(() => {
      document.getElementById('status').textContent = 'Report ready: 42 rows';
    }, 2500);
  });
</script></body></html>
Broken page Kane should failOpen full page
Source
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>reports</title></head><body>
<h1>reports</h1>
<button id="load" type="button">Load report</button>
<p id="status" data-testid="status"></p>
<script>
  document.getElementById('load').addEventListener('click', () => {
    setTimeout(() => {
      document.getElementById('status').textContent = 'Report ready: 0 rows';
    }, 2500);
  });
</script></body></html>

Reproduce it

Clone the repo, then run this behavior on your own Kane:

npm run suite -- delayed-element