Matrix / Save shows a settings toast
Save shows a settings toast
Clicking Save shows a toast reading "Settings saved" that stays for 4 seconds and then fades. The broken page sets the toast text but never makes the toast visible, so clicking Save shows nothing.
What your agent will do with Beam installed
Not measured yet.
Results
Before each check, Kane does: Click "Save".
| Wording | Kane | Correct page | Broken page | Result |
|---|---|---|---|---|
Verify a toast message "Settings saved" appears. | Not run yet | |||
Verify that within 3 seconds of clicking Save, a message with the exact text "Settings saved" is visible. | Not run yet | |||
The two pages
These are live. To see the difference, do what Kane does: Click "Save".
Source
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Settings</title><style>body{font:18px system-ui,sans-serif;margin:24px}button{font-size:18px;padding:8px 14px}.toast{position:fixed;bottom:24px;left:24px;background:#222;color:#fff;padding:12px 18px;border-radius:6px;opacity:0;visibility:hidden;transition:opacity .5s,visibility .5s}.toast.show{opacity:1;visibility:visible}.toast.fade{opacity:0;visibility:hidden}</style></head><body>
<h1>Settings</h1>
<button id="save">Save</button>
<div id="toast" class="toast" role="status"></div>
<script>
let timer;
document.getElementById('save').addEventListener('click', () => {
const toast = document.getElementById('toast');
toast.textContent = 'Settings saved'; toast.className = 'toast show';
clearTimeout(timer);
timer = setTimeout(() => { toast.className = 'toast fade'; }, 4000);
});
</script></body></html>
Source
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Settings</title><style>body{font:18px system-ui,sans-serif;margin:24px}button{font-size:18px;padding:8px 14px}.toast{position:fixed;bottom:24px;left:24px;background:#222;color:#fff;padding:12px 18px;border-radius:6px;opacity:0;visibility:hidden;transition:opacity .5s,visibility .5s}.toast.show{opacity:1;visibility:visible}.toast.fade{opacity:0;visibility:hidden}</style></head><body>
<h1>Settings</h1>
<button id="save">Save</button>
<div id="toast" class="toast" role="status"></div>
<script>
let timer;
document.getElementById('save').addEventListener('click', () => {
const toast = document.getElementById('toast');
toast.textContent = 'Settings saved'; toast.className = 'toast';
clearTimeout(timer);
timer = setTimeout(() => { toast.className = 'toast fade'; }, 4000);
});
</script></body></html>
Reproduce it
Clone the repo, then run this behavior on your own Kane:
npm run suite -- toast-message