Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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)
})
})
})