Beam

Matrix / Create button disabled while Email is empty

Create button disabled while Email is empty

BalancedNot from a Kane issueMeasured on Kane 0.10.9 and 0.10.8

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

WordingKaneCorrect pageBroken pageResult
Verify the "Create account" button is disabled.Baseline0.10.9passedfailedBalanced
0.10.8passedfailedBalanced
Verify that the "Create account" button has the disabled state and cannot be clicked while the Email field is empty.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 "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

Correct page Kane should passOpen full page
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>
Broken page Kane should failOpen full page
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