Updated SignIn and SignOut calls

This commit is contained in:
2020-11-13 12:30:27 -08:00
parent 9ead4d157f
commit f6eaf6b361
13 changed files with 256 additions and 246 deletions

View File

@@ -20,19 +20,21 @@ describe('Institutions Widget script', function () {
});
function SignIn(UserNameTextBox, PasswordTextBox) {
it('should sign into journeysmap.com', async function () {
it('SignIn, should sign into journeysmap.com', async function () {
var PageGreetingText = element(by.css('td > div > div:nth-child(1)'));
var NextButton = element(by.css('.btn'));
var JourneysGreeting = element(by.css('.dropdown'));
expect(await PageGreetingText.getText()).toEqual('Login and start exploring.');
await UserNameTextBox.sendKeys(browser.params.username);
browser.sleep(1000);
await PasswordTextBox.sendKeys('3Dm!nAuto');
browser.sleep(1000);
browser.sleep(1500);
await UserNameTextBox.sendKeys(browser.params.username).then(function() {
browser.sleep(1500);
});
await PasswordTextBox.sendKeys('3Dm!nAuto').then(function() {
browser.sleep(1500);
});
await NextButton.click().then(function() {
browser.waitForAngular();
browser.getCurrentUrl();
browser.sleep(5000);
});
expect(await JourneysGreeting.getText()).toContain('Hi, ');
expect(await JourneysGreeting.getText()).toContain('_Automated');
@@ -53,7 +55,6 @@ function InstitutionsWidget() {
var InstitutionsViewAllLink = element(by.css('#myInstitutionsCollapsed .text-color-7a'));
var InstitutionsSearchResults = element(by.css('#divCSCSearchResult b'))
var BackLink = element(by.css('.btn-primary-back-mod'));
var CloseXIcon = element(by.css('.close'));
var UniversityOfSanDiego = element(by.xpath("//span[contains(.,'University of San Diego')]"));
var UniversityOfSanDiegoAtAGlanceIcon = element(by.css('#territoryCardContainer > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div > div.territoryCardItemText.territoryCardMediaHide'));
var UniversityOfSanDiegoBackOfCardTitle = element(by.css('#territoryCardTitleHeader > div.territoryCardTitleText.ng-binding'));
@@ -167,12 +168,15 @@ function SignOut() {
var ProfileImage = element(by.css('.roundCenterBackgroundImage'));
var SignOutButton = element(by.css('.dropDownFAEdits:nth-child(5) > .btn'));
browser.waitForAngular();
browser.sleep(1000);
await ProfileImage.click();
browser.sleep(1000);
browser.waitForAngular();
browser.getCurrentUrl();
browser.waitForAngular().then(function() {
browser.sleep(1000);
});
await ProfileImage.click().then(function() {
browser.sleep(1000);
browser.waitForAngular();
browser.getCurrentUrl();
});
await SignOutButton.click().then(function() {
browser.sleep(2500);
});