LT-97: Password validation
LT-107: Login session timeout after 30 min
This commit is contained in:
1 parent
59a6905eb0
commit
d3671a5bdd
15 files changed
+868
-56
No files matched your search
@@ -43,7 +43,7 @@ describe('clinical:active-entry', function () {
|
||||
it('Email validation confirms it is a properly formatted email.', function () {
|
||||
return client.execute(function (a) {
|
||||
ActiveEntry.verifyEmail('janedoe@somewhere.com');
|
||||
expect(ActiveEntry.errorMessages.get('email')).to.equal("Email present");
|
||||
expect(ActiveEntry.successMessages.get('email')).to.equal("Email present");
|
||||
|
||||
ActiveEntry.verifyEmail('');
|
||||
expect(ActiveEntry.errorMessages.get('email')).to.equal("Email is required");
|
||||
@@ -61,24 +61,18 @@ describe('clinical:active-entry', function () {
|
||||
expect(ActiveEntry.errorMessages.get('password')).to.equal("Password is required");
|
||||
|
||||
ActiveEntry.verifyPassword('kittens');
|
||||
expect(ActiveEntry.errorMessages.get('password')).to.equal("Password is weak");
|
||||
expect(ActiveEntry.errorMessages.get('password')).to.equal("Password is invalid");
|
||||
|
||||
ActiveEntry.verifyPassword('kittens123');
|
||||
expect(ActiveEntry.errorMessages.get('password')).to.equal("Password present");
|
||||
ActiveEntry.verifyPassword('K1tt#ns123');
|
||||
expect(ActiveEntry.successMessages.get('password')).to.equal("Password present");
|
||||
});
|
||||
});
|
||||
|
||||
// ActiveEntry.verifyConfirmPassword
|
||||
it('Password match validation confirms that two passwords are the same.', function () {
|
||||
return client.execute(function (a) {
|
||||
ActiveEntry.verifyConfirmPassword('kittens123', '');
|
||||
expect(ActiveEntry.errorMessages.get('confirm')).to.equal("Password is required");
|
||||
|
||||
ActiveEntry.verifyConfirmPassword('kittens123', 'kittens');
|
||||
expect(ActiveEntry.errorMessages.get('confirm')).to.equal("Password is weak");
|
||||
|
||||
ActiveEntry.verifyConfirmPassword('kittens123', 'kittens123');
|
||||
expect(ActiveEntry.errorMessages.get('confirm')).to.equal("Passwords match");
|
||||
ActiveEntry.verifyConfirmPassword('K1tt#ns123', 'K1tt#ns123');
|
||||
expect(ActiveEntry.successMessages.get('confirm')).to.equal("Passwords match");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -92,7 +86,7 @@ describe('clinical:active-entry', function () {
|
||||
expect(ActiveEntry.errorMessages.get('fullName')).to.equal("Name is probably not complete");
|
||||
|
||||
ActiveEntry.verifyFullName('Jane Doe');
|
||||
expect(ActiveEntry.errorMessages.get('fullName')).to.equal("Name present");
|
||||
expect(ActiveEntry.successMessages.get('fullName')).to.equal("Name present");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ module.exports = {
|
||||
"user should be able to request be able to create new account" : function (client) {
|
||||
client.verify.elementPresent("#signUpPageEmailInput")
|
||||
.verify.elementPresent("#signUpPagePasswordInput")
|
||||
.verify.elementPresent("#signUpPagePasswordInput")
|
||||
.verify.elementPresent("#signUpPagePasswordConfirmInput")
|
||||
.verify.elementPresent("#signUpPageJoinNowButton")
|
||||
},
|
||||
|
||||
@@ -56,14 +56,14 @@ module.exports = {
|
||||
.verify.cssProperty('#signUpPagePasswordInput', 'border', '1px solid gray')
|
||||
.setValue("#signUpPagePasswordInput", "jan")
|
||||
.verify.cssProperty('#signUpPagePasswordInput', 'border', '1px solid rgb(242, 222, 222)')
|
||||
.setValue("#signUpPagePasswordInput", "icedoe123")
|
||||
.setValue("#signUpPagePasswordInput", "iceD*e123")
|
||||
.verify.cssProperty('#signUpPagePasswordInput', 'border', '1px solid green')
|
||||
|
||||
.verify.cssProperty('#signUpPagePasswordConfirmInput', 'border', '1px solid gray')
|
||||
.setValue("#signUpPagePasswordConfirmInput", "ja")
|
||||
.verify.cssProperty('#signUpPagePasswordConfirmInput', 'border', '1px solid rgb(242, 222, 222)')
|
||||
.clearValue("#signUpPagePasswordConfirmInput")
|
||||
.setValue("#signUpPagePasswordConfirmInput", "janicedoe123")
|
||||
.setValue("#signUpPagePasswordConfirmInput", "Janiced*e123")
|
||||
.verify.cssProperty('#signUpPagePasswordConfirmInput', 'border', '1px solid green')
|
||||
},
|
||||
"guest should be notified if passwords do not match" : function (client) {
|
||||
@@ -74,10 +74,10 @@ module.exports = {
|
||||
.pause(500)
|
||||
.verify.cssProperty('#signUpPagePasswordInput', 'border', '1px solid gray')
|
||||
.verify.cssProperty('#signUpPagePasswordConfirmInput', 'border', '1px solid gray')
|
||||
.setValue("#signUpPagePasswordInput", "janicedoe123")
|
||||
.setValue("#signUpPagePasswordInput", "Janiced*e123")
|
||||
.verify.cssProperty('#signUpPagePasswordInput', 'border', '1px solid green')
|
||||
.verify.cssProperty('#signUpPagePasswordConfirmInput', 'border', '1px solid gray')
|
||||
.setValue("#signUpPagePasswordConfirmInput", "janicedoe123")
|
||||
.setValue("#signUpPagePasswordConfirmInput", "Janiced*e123")
|
||||
.verify.cssProperty('#signUpPagePasswordInput', 'border', '1px solid green')
|
||||
.verify.cssProperty('#signUpPagePasswordConfirmInput', 'border', '1px solid green')
|
||||
},
|
||||
@@ -104,8 +104,8 @@ module.exports = {
|
||||
|
||||
.setValue("#signUpPageFullNameInput", "Janice Doe")
|
||||
.setValue("#signUpPageEmailInput", "janicedoe@symptomatic.io")
|
||||
.setValue("#signUpPagePasswordInput", "janicedoe123")
|
||||
.setValue("#signUpPagePasswordConfirmInput", "janicedoe123")
|
||||
.setValue("#signUpPagePasswordInput", "Janiced*e123")
|
||||
.setValue("#signUpPagePasswordConfirmInput", "Janiced*e123")
|
||||
|
||||
.click("#signUpPageJoinNowButton").pause(1000)
|
||||
|
||||
@@ -131,7 +131,7 @@ module.exports = {
|
||||
.url("http://localhost:3000/entrySignIn")
|
||||
.resizeWindow(1600, 1200)
|
||||
.verify.containsText("#usernameLink", "Sign In")
|
||||
.signIn("janicedoe@symptomatic.io", "janicedoe123").pause(500)
|
||||
.signIn("janicedoe@symptomatic.io", "Janiced*e123").pause(500)
|
||||
.verify.containsText("#usernameLink", "janicedoe@symptomatic.io")
|
||||
.click("#logoutButton").pause(200)
|
||||
.verify.containsText("#usernameLink", "Sign In")
|
||||
@@ -141,7 +141,7 @@ module.exports = {
|
||||
.url("http://localhost:3000/entrySignIn")
|
||||
.resizeWindow(1024, 768)
|
||||
.verify.containsText("#usernameLink", "Sign In")
|
||||
.signIn("janicedoe@symptomatic.io", "janicedoe123").pause(500)
|
||||
.signIn("janicedoe@symptomatic.io", "Janiced*e123").pause(500)
|
||||
.verify.containsText("#usernameLink", "janicedoe@symptomatic.io")
|
||||
.click("#logoutButton").pause(200)
|
||||
.verify.containsText("#usernameLink", "Sign In")
|
||||
@@ -151,7 +151,7 @@ module.exports = {
|
||||
.url("http://localhost:3000/entrySignIn")
|
||||
.resizeWindow(320, 960)
|
||||
// .verify.containsText("#usernameLink", "Sign In")
|
||||
.signIn("janicedoe@symptomatic.io", "janicedoe123").pause(500)
|
||||
.signIn("janicedoe@symptomatic.io", "Janiced*e123").pause(500)
|
||||
.click("#sidebarToggle").pause(300)
|
||||
.verify.containsText("#usernameLink", "janicedoe@symptomatic.io")
|
||||
.click("#logoutButton").pause(200)
|
||||
@@ -171,7 +171,7 @@ module.exports = {
|
||||
client
|
||||
.url("http://localhost:3000/entrySignUp")
|
||||
.resizeWindow(1024, 768)
|
||||
.signUp("janicedoe@symptomatic.io", "janicedoe123").pause(500)
|
||||
.signUp("janicedoe@symptomatic.io", "Janiced*e123").pause(500)
|
||||
.click("#signUpPageEmailInput").pause(500)
|
||||
.verify.elementPresent("#signUpPageMessage")
|
||||
.verify.containsText("#signUpPageMessage", "Email already exists. [403]")
|
||||
|
||||
Reference in new issue
Block a user