-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2bec9d
commit 7e01018
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,5 +294,23 @@ | |
expect(page.find_field("What is the name of the event?").value).to eql("Design System Day") | ||
end | ||
end | ||
|
||
context "where the input has type=email" do | ||
before do | ||
TestApp.body = '<form action="/success" method="post"><div class="govuk-form-group"> | ||
<label class="govuk-label" for="email"> | ||
Email address | ||
</label> | ||
<input class="govuk-input" id="email" name="email" type="email" spellcheck="false" autocomplete="email"> | ||
</div></form>' | ||
visit('/') | ||
end | ||
|
||
it 'should raise an error' do | ||
expect { | ||
fill_in_govuk_text_field("Email address", with: "[email protected]") | ||
}.to raise_error('Found the field, but it has type="email", expected type="text"') | ||
end | ||
end | ||
end | ||
end |