fix userinfo e2e (#5343)

This commit is contained in:
Eugenio Romano
2019-12-19 12:42:35 +00:00
committed by GitHub
parent 2013e5a6b0
commit af51977db4
2 changed files with 13 additions and 15 deletions

View File

@@ -73,16 +73,9 @@ describe('User Info component', () => {
await loginPage.loginToAllUsingUserModel(contentUserModel);
await userInfoPage.clickUserProfile();
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
await expect(await userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
await expect(await userInfoPage.getContentEmail()).toEqual(contentUserModel.email);
await expect(await userInfoPage.getContentJobTitle()).toEqual('N/A');
await userInfoPage.checkInitialImage();
await userInfoPage.APSProfileImageNotDisplayed();
await userInfoPage.ACSProfileImageNotDisplayed();
await userInfoPage.dialogIsDisplayed();
await userInfoPage.clickOnContentServicesTab();
await userInfoPage.checkContentServicesTabIsSelected();
await expect(await userInfoPage.getContentHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
await expect(await userInfoPage.getContentTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
@@ -92,16 +85,16 @@ describe('User Info component', () => {
await userInfoPage.checkInitialImage();
await userInfoPage.APSProfileImageNotDisplayed();
await userInfoPage.ACSProfileImageNotDisplayed();
await userInfoPage.clickOnProcessServicesTab();
await userInfoPage.checkProcessServicesTabIsSelected();
await expect(await userInfoPage.getProcessHeaderTitle()).toEqual(contentUserModel.firstName + ' ' + contentUserModel.lastName);
await expect(await userInfoPage.getProcessTitle()).toEqual(contentUserModel.firstName + ' ' + processUserModel.lastName);
await expect(await userInfoPage.getProcessEmail()).toEqual(contentUserModel.email);
await browser.sleep(1000);
await expect(await userInfoPage.getProcessHeaderTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
await expect(await userInfoPage.getProcessTitle()).toEqual(processUserModel.firstName + ' ' + processUserModel.lastName);
await expect(await userInfoPage.getProcessEmail()).toEqual(processUserModel.email);
await userInfoPage.checkInitialImage();
await userInfoPage.APSProfileImageNotDisplayed();
await userInfoPage.ACSProfileImageNotDisplayed();
await userInfoPage.closeUserProfile();
});

View File

@@ -62,6 +62,11 @@ export class UserInfoPage {
await tabsPage.checkTabIsSelectedByTitle('Process Services');
}
async checkContentServicesTabIsSelected(): Promise<void> {
const tabsPage = new TabsPage;
await tabsPage.checkTabIsSelectedByTitle('Content Services');
}
async clickOnProcessServicesTab(): Promise<void> {
const tabsPage = new TabsPage;
await tabsPage.clickTabByTitle('Process Services');