Matrix / Create button disabled while Email is empty
Create button disabled while Email is empty
On a sign-up form with an empty Email field, the "Create account" button is disabled. The broken page leaves the "Create account" button enabled while the Email field is empty, and it looks the same.
What your agent will do with Beam installed
Use
Verify the "Create account" button is disabled.Results
| Wording | Kane | Correct page | Broken page | Result |
|---|---|---|---|---|
Verify the "Create account" button is disabled.Baseline | 0.10.9 | passed | failed | Balanced |
| 0.10.8 | passed | failed | Balanced | |
Verify that the "Create account" button has the disabled state and cannot be clicked while the Email field is empty.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 "Create account" button is disabled. Balanced
el(5).matches(':enabled')Verify that the "Create account" button has the disabled state and cannot be clicked while the Email field is empty. Balanced
el(4).value === '' ? 'empty' : 'nonempty'The two pages
Source
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>sign up</title></head><body>
<h1>Sign up</h1>
<form onsubmit="return false">
<label for="email">Email</label>
<input id="email" type="email" placeholder="you@example.com">
<button id="create" type="button" disabled>Create account</button>
</form>
<script>
const email = document.getElementById('email');
const btn = document.getElementById('create');
email.addEventListener('input', () => { btn.disabled = email.value.trim() === ''; });
</script></body></html>
Source
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>sign up</title></head><body>
<h1>Sign up</h1>
<form onsubmit="return false">
<label for="email">Email</label>
<input id="email" type="email" placeholder="you@example.com">
<button id="create" type="button">Create account</button>
</form>
<script>
const email = document.getElementById('email');
const btn = document.getElementById('create');
email.addEventListener('input', () => { btn.disabled = email.value.trim() === ''; });
</script></body></html>
Reproduce it
Clone the repo, then run this behavior on your own Kane:
npm run suite -- disabled-button