Matrix / Result appears after a delay
Result appears after a delay
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".
| Wording | Kane | Correct page | Broken page | Result |
|---|---|---|---|---|
Verify the page says "Report ready: 42 rows".Baseline | 0.10.9 | passed | failed | Balanced |
| 0.10.8 | passed | failed | Balanced | |
Verify that once a line starting with "Report ready" appears, its exact visible text is "Report ready: 42 rows".Baseline | 0.10.9 | passed | failed | Balanced |
| 0.10.8 | passed | failed | Balanced |
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".
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>
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