diff --git a/goofy-client/apps/goofy-e2e/src/components/buildinfo/buildinfo.e2e.component.ts b/goofy-client/apps/goofy-e2e/src/components/buildinfo/buildinfo.e2e.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..0eb2a1cc617a167e9407bc8daeae724c40f526fd --- /dev/null +++ b/goofy-client/apps/goofy-e2e/src/components/buildinfo/buildinfo.e2e.component.ts @@ -0,0 +1,12 @@ +export class BuildInfoE2EComponent { + private readonly locatorVersion: string = 'version'; + private readonly locatorBuildTime: string = 'build-time'; + + getVersion() { + return cy.getTestElement(this.locatorVersion); + } + + getBuildTime() { + return cy.getTestElement(this.locatorBuildTime); + } +} \ No newline at end of file diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/buildinfo.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/buildinfo.e2e-spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..5eb8d73a7a55affde88fd652bfabbdc5ea62aa0f --- /dev/null +++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/buildinfo.e2e-spec.ts @@ -0,0 +1,34 @@ +import { BuildInfoE2EComponent } from "apps/goofy-e2e/src/components/buildinfo/buildinfo.e2e.component"; +import { VorgangListE2EComponent } from "apps/goofy-e2e/src/components/vorgang/vorgang-list.e2e.component"; +import { MainPage, waitForSpinnerToDisappear } from "apps/goofy-e2e/src/page-objects/main.po"; +import { dropCollections } from "apps/goofy-e2e/src/support/cypress-helper"; +import { exist } from "apps/goofy-e2e/src/support/cypress.util"; +import { loginAsSabine } from "apps/goofy-e2e/src/support/user-util"; + +describe('Buildinfo', () => { + const mainPage: MainPage = new MainPage(); + const vorgangList: VorgangListE2EComponent = mainPage.getVorgangList(); + const buildInfo: BuildInfoE2EComponent = mainPage.getBuildInfo(); + + before(() => { + loginAsSabine(); + + exist(vorgangList.getRoot()); + waitForSpinnerToDisappear(); + }) + + after(() => { + dropCollections(); + }) + + describe('buildinfo', () => { + + it('should show version', () => { + exist(buildInfo.getVersion()); + }) + + it('should show buildTime', () => { + exist(buildInfo.getBuildTime()); + }) + }) +}) \ No newline at end of file diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/login-logout.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts similarity index 68% rename from goofy-client/apps/goofy-e2e/src/integration/main-tests/login-logout.e2e-spec.ts rename to goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts index 42801496860fe7fdbf298e68c5f6834c362f67cd..af8d208a95283c2e343db3a66a45baa92bafec94 100644 --- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/login-logout.e2e-spec.ts +++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/app/login-logout.e2e-spec.ts @@ -1,8 +1,8 @@ -import { UserE2E } from '../../model/user'; -import { HeaderE2EComponent } from '../../page-objects/header.po'; -import { MainPage } from '../../page-objects/main.po'; -import { exist, haveText } from '../../support/cypress.util'; -import { getUserSabine } from '../../support/user-util'; +import { UserE2E } from '../../../model/user'; +import { HeaderE2EComponent } from '../../../page-objects/header.po'; +import { MainPage } from '../../../page-objects/main.po'; +import { exist, haveText } from '../../../support/cypress.util'; +import { getUserSabine } from '../../../support/user-util'; const mainFixture = require('../../fixtures/main.json'); const user: UserE2E = getUserSabine(); diff --git a/goofy-client/apps/goofy-e2e/src/page-objects/main.po.ts b/goofy-client/apps/goofy-e2e/src/page-objects/main.po.ts index 962687e0da9e382e668f9da51a4d561415ad3581..7193ae8b7e4f61d8af770b1dd304fcaaf0633c73 100644 --- a/goofy-client/apps/goofy-e2e/src/page-objects/main.po.ts +++ b/goofy-client/apps/goofy-e2e/src/page-objects/main.po.ts @@ -1,3 +1,4 @@ +import { BuildInfoE2EComponent } from '../components/buildinfo/buildinfo.e2e.component'; import { NavigationE2EComponent } from '../components/navigation/navigation.e2e.component'; import { ConnectionTimeoutRetryDialogE2EComponent, ConnectionTimeoutRetryFailDialogE2EComponent } from '../components/ui/connection-timeout-retry-dialog.e2e.component'; import { InternalServerErrorDialogE2EComponent } from '../components/ui/internal-server-error-diaog.e2e.component'; @@ -7,6 +8,7 @@ import { VorgangSearchE2EComponent } from '../components/vorgang/vorgang-search. import { HeaderE2EComponent } from './header.po'; export class MainPage { + private readonly buildInfo: BuildInfoE2EComponent = new BuildInfoE2EComponent(); private readonly header: HeaderE2EComponent = new HeaderE2EComponent(); private readonly navigation: NavigationE2EComponent = new NavigationE2EComponent(); private readonly snackBar: SnackBarE2EComponent = new SnackBarE2EComponent(); @@ -16,6 +18,10 @@ export class MainPage { private readonly connectionTimeoutRetryDialog: ConnectionTimeoutRetryDialogE2EComponent = new ConnectionTimeoutRetryDialogE2EComponent(); private readonly connectionTimeoutRetryFailDialog: ConnectionTimeoutRetryFailDialogE2EComponent = new ConnectionTimeoutRetryFailDialogE2EComponent(); + public getBuildInfo(): BuildInfoE2EComponent { + return this.buildInfo; + } + public getHeader(): HeaderE2EComponent { return this.header; } diff --git a/goofy-client/libs/navigation/src/lib/build-info/build-info.component.html b/goofy-client/libs/navigation/src/lib/build-info/build-info.component.html index f4d9c6b1327f086add9d9d03a7b9abf49c72476b..3e99a30cf81084b51075b1cfe474c73abe45019b 100644 --- a/goofy-client/libs/navigation/src/lib/build-info/build-info.component.html +++ b/goofy-client/libs/navigation/src/lib/build-info/build-info.component.html @@ -1 +1 @@ -<p>Version: {{ apiRoot.version }} | BuildTime: {{ apiRoot.buildTime | formatDateWithTimePipe }}</p> \ No newline at end of file +<p data-test-id="version"><span>Version: {{ apiRoot.version }}</span> | <span data-test-id="build-time">BuildTime: {{ apiRoot.buildTime | formatDateWithTimePipe }}</span></p> \ No newline at end of file diff --git a/goofy-client/libs/navigation/src/lib/build-info/build-info.component.scss b/goofy-client/libs/navigation/src/lib/build-info/build-info.component.scss index 0c892bfb7980959ea08bd4fff40f54b6e71a27ec..f41aff49a9ad6b3d61af86ef6aa1662ca0fa8779 100644 --- a/goofy-client/libs/navigation/src/lib/build-info/build-info.component.scss +++ b/goofy-client/libs/navigation/src/lib/build-info/build-info.component.scss @@ -1,4 +1,4 @@ -@import "variables"; +@import 'variables'; :host { position: absolute; @@ -11,8 +11,12 @@ transform-origin: right bottom; } +:host-context(.dark) { + color: #ccc; +} + p { margin: 0; line-height: 1; white-space: nowrap; -} +} \ No newline at end of file diff --git a/goofy-client/libs/navigation/src/lib/navigation.module.ts b/goofy-client/libs/navigation/src/lib/navigation.module.ts index 7ed07f6933db985b79f40cf2ced5c5f5df0f3932..78ac06b69038c5a945f9eeb24bea8af80aef88d0 100644 --- a/goofy-client/libs/navigation/src/lib/navigation.module.ts +++ b/goofy-client/libs/navigation/src/lib/navigation.module.ts @@ -32,6 +32,7 @@ import { NavigationComponent } from './navigation/navigation.component'; UserProfileModule ], exports: [ + BuildInfoComponent, NavigationContainerComponent, HeaderContainerComponent ] diff --git a/goofy-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-list-container/_wiedervorlage-list-in-vorgang-list-container.theme.scss b/goofy-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-list-container/_wiedervorlage-list-in-vorgang-list-container.theme.scss index 0d7896254b11bb82c21afacb7e80efdee43613d6..4df16c936eed2cb1ac0ebd45691020de7d36172f 100644 --- a/goofy-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-list-container/_wiedervorlage-list-in-vorgang-list-container.theme.scss +++ b/goofy-client/libs/wiedervorlage/src/lib/wiedervorlage-list-in-vorgang-list-container/_wiedervorlage-list-in-vorgang-list-container.theme.scss @@ -1,4 +1,4 @@ -@import "variables"; +@import 'variables'; goofy-client-wiedervorlage-list-in-vorgang-list-container .foreground { background-color: $background; @@ -6,4 +6,4 @@ goofy-client-wiedervorlage-list-in-vorgang-list-container .foreground { body.dark goofy-client-wiedervorlage-list-in-vorgang-list-container .foreground { background-color: $dark-background; -} +} \ No newline at end of file