-
-
Save fahdi/196a4f120b4fa1f0dcbe277d8a927eca to your computer and use it in GitHub Desktop.
Conversion of a user story into protractor/jasmine stubbed tests
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
"use strict"; | |
/* | |
* Login page and fields | |
* */ | |
xdescribe('Application login page > ', function () { | |
beforeEach(function() { | |
//start at root app url every time tests are run | |
browser.get('http://localhost:8888/#/login'); | |
}); | |
xit('should be accessible', function () { | |
}); | |
xit('should present two form fields, a checkbox, and a submit button', function () { | |
}); | |
xit('should have a disabled submit button when no fields filled out', function () { | |
}); | |
xit('should have a disabled submit button when only username filled in', function () { | |
}); | |
xit('should have an enabled button when username and password are filled in', function () { | |
}); | |
xit('should have all fields visible when browser scaled down to mobile', function () { | |
}); | |
}); | |
/* | |
* Basic Application Authentication behaviors | |
* */ | |
xdescribe('Application authentication behavior > ', function() { | |
beforeEach(function() { | |
//start at root app url every time tests are run | |
browser.get('http://localhost:8888/'); | |
}); | |
xdescribe('when a user is not logged in > ', function() { | |
xit('should jump to the /login path when / is accessed', function() { | |
}); | |
xit('should jump to the /login path when /home is accessed', function () { | |
}); | |
xit('should jump to the /login path when /business is accessed', function () { | |
}); | |
xdescribe('they should not see > ', function () { | |
xit('a welcome message', function () { | |
}); | |
xit('a logout button', function () { | |
}); | |
xit('an application menu', function () { | |
}); | |
xdescribe('(when scaled down to mobile) > ', function () { | |
xit('a dropdown menu', function () { | |
}); | |
xit('a main nav menu', function () { | |
}); | |
}); | |
}); | |
}); | |
/* | |
* Existence of the page, and the | |
* Form validations and behavior | |
* are tested e2e in separate test | |
* */ | |
xdescribe('when an invalid user logs in > ', function() { | |
xit('they should remain on the /login page', function () { | |
}); | |
xit('they should get redirected to /login if they access /home', function () { | |
}); | |
xit('they should get redirected to /login if they access /business', function () { | |
}); | |
}); | |
xdescribe('when a valid user logs in > ', function() { | |
xit('they should be redirected to /home', function () { | |
}); | |
}); | |
xdescribe('when a user is logged in > ', function() { | |
xit('they should see a welcome message', function () { | |
}); | |
xit('they should see a logout button', function () { | |
}); | |
xit('they should not be able to navigate to /login', function () { | |
}); | |
xit('they should see a menu of items they have access to', function () { | |
}); | |
xdescribe('(and scales the app down to mobile) > ', function () { | |
xit('they should see a dropdown menu of items', function () { | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment