Compare commits
2 Commits
a34b788ff4
...
94026bdad2
| Author | SHA1 | Date |
|---|---|---|
|
|
94026bdad2 | |
|
|
b827f72f25 |
|
|
@ -0,0 +1 @@
|
||||||
|
*.sw*
|
||||||
|
|
@ -4,6 +4,8 @@ Feature: Homepage
|
||||||
|
|
||||||
Loading the homepage is the initial starting point for this tool
|
Loading the homepage is the initial starting point for this tool
|
||||||
|
|
||||||
Scenario: Homepage Loads
|
Scenario: Homepage Loads with a form
|
||||||
Given I visit the homepage
|
Given I visit the homepage
|
||||||
Then I should see "URL Shortener"
|
Then I should see text "URL Shortener"
|
||||||
|
And I should see a form field "url"
|
||||||
|
And I should see a "Submit" button
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# GIVEN
|
# GIVEN
|
||||||
|
|
||||||
Given('I visit the homepage') do
|
Given('I visit the homepage') do
|
||||||
visit '/'
|
visit '/'
|
||||||
end
|
end
|
||||||
|
|
||||||
# WHEN
|
# WHEN
|
||||||
|
|
@ -10,6 +10,14 @@ end
|
||||||
|
|
||||||
# THEN
|
# THEN
|
||||||
|
|
||||||
Then('I should see {string}') do |string|
|
Then('I should see text {string}') do |string|
|
||||||
page.should have_content "URL Shortener"
|
page.should have_content string
|
||||||
|
end
|
||||||
|
|
||||||
|
Then('I should see a form field {string}') do |string|
|
||||||
|
page.should have_field string
|
||||||
|
end
|
||||||
|
|
||||||
|
Then('I should see a {string} button') do |string|
|
||||||
|
page.should have_button string
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,5 @@
|
||||||
placeholder="http://www.example.com/"
|
placeholder="http://www.example.com/"
|
||||||
style="padding: 0.5rem;"
|
style="padding: 0.5rem;"
|
||||||
required />
|
required />
|
||||||
<input type="submit" value="Submit" style="padding: 0.5rem;" />
|
<button type="submit" style="padding: 0.5rem;">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue