Hide the suggestions when the user corrects the address
This commit is contained in:
parent
1d1260060e
commit
fb3f82074d
2 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,8 @@ delegate('focusout', userNewEmailSelector, () => {
|
|||
if (suggestion && suggestion.full) {
|
||||
suggestedEmailSpan.innerHTML = suggestion.full;
|
||||
show(document.querySelector(suggestionsSelector));
|
||||
} else {
|
||||
hide(document.querySelector(suggestionsSelector));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -41,6 +41,13 @@ feature 'Signing up:' do
|
|||
expect(page).to have_field("Email", :with => 'bidou@yahoo.rf')
|
||||
expect(page).to have_selector('.suspect-email', visible: false)
|
||||
end
|
||||
|
||||
scenario 'they can fix the typo themselves', js: true do
|
||||
expect(page).to have_selector('.suspect-email', visible: true)
|
||||
fill_in 'Email', with: 'bidou@yahoo.fr'
|
||||
blur
|
||||
expect(page).to have_selector('.suspect-email', visible: false)
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'a new user can’t sign-up with too short password when visiting a procedure' do
|
||||
|
|
Loading…
Reference in a new issue