Last active
December 17, 2015 14:55
-
-
Save elpete/86bb1d4c1a9559059b9a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| component extends='cfselenium.BaseSpec' { | |
| function beforeAll() { | |
| super.beforeAll('http://#CGI.HTTP_HOST#/'); | |
| } | |
| function afterAll() { | |
| super.afterAll(); | |
| } | |
| function run() { | |
| story('As a user, I want to log in', function() { | |
| given('I have a user with an email of "[email protected]" and a password of "1234"', function() { | |
| when('I go to the login page, enter my credentials, and click "Log In"', function() { | |
| then('I should be on the home page and I should see "Welcome Back!"', function() { | |
| var email = '[email protected]'; | |
| var password = '1234'; | |
| // create user in database | |
| variables.selenium.open('/login'); | |
| expect(selenium.getTitle).toBe('Log In'); | |
| // etc... | |
| }); | |
| }); | |
| }); | |
| }); | |
| } | |
| } |
This file contains hidden or 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
| component extends='cfselenium.BaseSpec' { | |
| function beforeAll() { | |
| super.beforeAll('http://#CGI.HTTP_HOST#/'); | |
| } | |
| function afterAll() { | |
| super.afterAll(); | |
| } | |
| function run() { | |
| story('As a user, I want to log in', function() { | |
| given('I have a user with an email of "[email protected]" and a password of "1234"', function() { | |
| var email = '[email protected]'; | |
| var password = '1234'; | |
| // create user in database | |
| when('I go to the login page, enter my credentials, and click "Log In"', function() { | |
| variables.selenium.open('/login'); | |
| then('I should be on the home page and I should see "Welcome Back!"', function() { | |
| expect(selenium.getTitle).toBe('Log In'); | |
| // etc... | |
| }); | |
| }); | |
| }); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment