Updated script to work on prod

This commit is contained in:
2020-12-10 15:05:31 -08:00
parent 2ae7059116
commit 11bf2a6186

View File

@@ -45,7 +45,7 @@ describe('User Profile script', function () {
UserProfile(); UserProfile();
SignOut(); SignOut();
//LogBackInToResetTestCase(); //CAN'T GET SCRIPT TO SUCCESSFULLY SAVE EDIT PROFILE RESET //LogBackInToResetTestCase(); //CAN'T GET SCRIPT TO SUCCESSFULLY SAVE EDIT PROFILE RESET TO REMOVE EMAIL AND MIDDLE INITIAL
}); });
function UserProfile() { function UserProfile() {
@@ -325,7 +325,7 @@ function UserProfile() {
}); });
expect(await SelectASecurityQuestionHeader.getText()).toContain('Select a Security Question'); expect(await SelectASecurityQuestionHeader.getText()).toContain('Select a Security Question');
element(by.cssContainingText('option', 'What was the make of your first car?')).click().then(function() { element(by.cssContainingText('option', 'What was the make of your first car?')).click().then(function() {
browser.sleep(1000); browser.sleep(1500);
}); });
expect(await AnswerSecurityQuestionHeader.getText()).toContain('Answer Security Question'); expect(await AnswerSecurityQuestionHeader.getText()).toContain('Answer Security Question');
await AnswerSecurityAnswerTextBox.sendKeys('Chevy Luv').then(function() { await AnswerSecurityAnswerTextBox.sendKeys('Chevy Luv').then(function() {
@@ -334,10 +334,11 @@ function UserProfile() {
expect(await CancelButton.getText()).toContain('CANCEL'); expect(await CancelButton.getText()).toContain('CANCEL');
expect(await SaveButton.getText()).toContain('SAVE'); expect(await SaveButton.getText()).toContain('SAVE');
await SaveButton.click().then(function() { await SaveButton.click().then(function() {
browser.sleep(2500); browser.sleep(1500);
var alertDialog = browser.switchTo().alert(); var alertDialog = browser.switchTo().alert();
expect(alertDialog.getText()).toEqual('Security questions is updated.'); expect(alertDialog.getText()).toEqual('Security questions is updated.');
browser.switchTo().alert().accept(); browser.switchTo().alert().accept();
browser.sleep(1500);
}); });
//<<<<RESET>>>> //<<<<RESET>>>>
//Password //Password