Select Git revision
user-profile-current-user-icon.e2e-spec.ts
user-profile-current-user-icon.e2e-spec.ts 1.51 KiB
import { CurrentUserProfileE2EComponent } from "apps/goofy-e2e/src/components/user-profile/current-user-profile.component.e2e";
import { UserE2E } from "apps/goofy-e2e/src/model/user";
import { HeaderE2EComponent } from "apps/goofy-e2e/src/page-objects/header.po";
import { MainPage, waitForSpinnerToDisappear } from "apps/goofy-e2e/src/page-objects/main.po";
import { dropCollections } from "apps/goofy-e2e/src/support/cypress-helper";
import { exist, haveText } from "apps/goofy-e2e/src/support/cypress.util";
import { getUserManagerUserSabine, getUserSabine, initUsermanagerUsers, loginAsSabine } from "apps/goofy-e2e/src/support/user-util";
describe('Current User Profile', () => {
const mainPage: MainPage = new MainPage();
const header: HeaderE2EComponent = mainPage.getHeader();
const currentUserProfile: CurrentUserProfileE2EComponent = header.getCurrentUserProfile();
const userSabine: UserE2E = getUserSabine();
describe('for sabine', () => {
before(() => {
initUsermanagerUsers([getUserManagerUserSabine()]);
loginAsSabine();
waitForSpinnerToDisappear();
exist(header.getRoot());
})
after(() => {
dropCollections();
})
it('should show current user profile', () => {
exist(currentUserProfile.getRoot());
})
it('should show assigned icon', () => {
exist(currentUserProfile.getUserProfile().getIconContainer().getAssignedIcon());
})
it('should show initials', () => {
haveText(currentUserProfile.getUserProfile().getIconContainer().getAssignedIcon(), userSabine.initials)
})
})
})