split homepage out into homepage and submit feature sets
parent
d4db64f404
commit
e50667b392
|
|
@ -10,26 +10,3 @@ Feature: Homepage
|
||||||
And I should see the message "Enter a URL"
|
And I should see the message "Enter a URL"
|
||||||
And I should see a form field "url"
|
And I should see a form field "url"
|
||||||
And I should see a "Submit" button
|
And I should see a "Submit" button
|
||||||
|
|
||||||
Scenario: Submitting the form without entering a URL
|
|
||||||
Given I visit the "/" page
|
|
||||||
When I click the "Submit" button
|
|
||||||
Then I should be on "/" page
|
|
||||||
And I should see the message "Please enter a valid URL"
|
|
||||||
|
|
||||||
@db-test
|
|
||||||
Scenario: Submitting the form with a correct URL
|
|
||||||
Given I visit the "/" page
|
|
||||||
When I type "http://google.com" in the "url" field
|
|
||||||
And I click the "Submit" button
|
|
||||||
Then I should be on "/create" page
|
|
||||||
And I should see the message "Link created"
|
|
||||||
|
|
||||||
@db-test
|
|
||||||
Scenario: Submitting the form with an existing URL
|
|
||||||
Given I visit the "/" page
|
|
||||||
And A link already exists with the url "http://google.com"
|
|
||||||
When I type "http://google.com" in the "url" field
|
|
||||||
And I click the "Submit" button
|
|
||||||
Then I should be on "/create" page
|
|
||||||
And I should see the message "Link exists"
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
# features/submit.feature
|
||||||
|
|
||||||
|
Feature: Submit
|
||||||
|
|
||||||
|
Submitting URL's on the homepage
|
||||||
|
|
||||||
|
Scenario: Submitting the form without entering a URL
|
||||||
|
Given I visit the "/" page
|
||||||
|
When I click the "Submit" button
|
||||||
|
Then I should be on "/" page
|
||||||
|
And I should see the message "Please enter a valid URL"
|
||||||
|
|
||||||
|
@db-test
|
||||||
|
Scenario: Submitting the form with a correct URL
|
||||||
|
Given I visit the "/" page
|
||||||
|
When I type "http://google.com" in the "url" field
|
||||||
|
And I click the "Submit" button
|
||||||
|
Then I should be on "/create" page
|
||||||
|
And I should see the message "Link created"
|
||||||
|
|
||||||
|
@db-test
|
||||||
|
Scenario: Submitting the form with an existing URL
|
||||||
|
Given I visit the "/" page
|
||||||
|
And A link already exists with the url "http://google.com"
|
||||||
|
When I type "http://google.com" in the "url" field
|
||||||
|
And I click the "Submit" button
|
||||||
|
Then I should be on "/create" page
|
||||||
|
And I should see the message "Link exists"
|
||||||
Loading…
Reference in New Issue