diff --git a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts index bfdf6b624d856e9b1a165f8984e739deccdc4a80..ac3917c2dd21ca7859c009a824267033c8df5349 100644 --- a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts +++ b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component.ts @@ -21,21 +21,52 @@ * Die sprachspezifischen Genehmigungen und Beschränkungen * unter der Lizenz sind dem Lizenztext zu entnehmen. */ +export class OrganisationsEinheitListE2EComponent { + private readonly root: string = 'organisations-einheit-list'; + + public getRoot(): Cypress.Chainable<Element> { + return cy.getTestElement(this.root); + } + + public getListItem(name: string): OrganisationsEinheitListItemE2EComponent { + return new OrganisationsEinheitListItemE2EComponent(name); + } +} + +export class OrganisationsEinheitListItemE2EComponent { + private root: string; -export class OrganisationsEinheitenE2EComponent { - private readonly organisationsEinheitenList: string = 'organisations-einheit-list'; - private readonly organisationsEinheitHinzufuegen: string = 'add-organisationseinheit-button'; private readonly organisationsEinheitItemSuffix: string = '-organisation-item'; + private readonly deleteButton: string = 'delete-button'; + + constructor(name: string) { + this.root = name; + } + + public getRoot(): Cypress.Chainable<Element> { + return cy.getTestElement(this.root + this.organisationsEinheitItemSuffix); + } + + public getDeleteButton(): Cypress.Chainable<Element> { + return this.getRoot().findTestElementWithClass(this.deleteButton); + } +} + +export class OrganisationsEinheitDeleteDialogE2EComponent { + private readonly root: string = 'organisations-einheit-delete-dialog'; + + private readonly deleteButton: string = 'dialog-delete-button'; + private readonly cancelButton: string = 'dialog-cancel-button'; - public getOrganisationsEinheitList(): Cypress.Chainable<Element> { - return cy.getTestElement(this.organisationsEinheitenList); + public getRoot(): Cypress.Chainable<Element> { + return cy.getTestElement(this.root); } - public getOrganisationsEinheitHinzufuegenButton(): Cypress.Chainable<Element> { - return cy.getTestElement(this.organisationsEinheitHinzufuegen); + public getDeleteButton(): Cypress.Chainable<Element> { + return cy.getTestElement(this.deleteButton); } - public getListItem(name: string) { - return cy.getTestElement(name + this.organisationsEinheitItemSuffix); + public getCancelButton(): Cypress.Chainable<Element> { + return cy.getTestElement(this.cancelButton); } } diff --git a/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisations-einheit.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisations-einheit.cy.ts new file mode 100644 index 0000000000000000000000000000000000000000..2f52b488067ab890200384cfe2d0eba448c87078 --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisations-einheit.cy.ts @@ -0,0 +1,53 @@ +import { E2EOrganisationsEinheitHelper } from 'apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.helper'; +import { E2EOrganisationsEinheitVerifier } from 'apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.verifier'; +import { OrganisationsEinheitPage } from 'apps/admin-e2e/src/page-objects/organisations-einheit.po'; +import { ZustaendigeStelleDialogE2EComponent } from '../../../components/zustaendige-stelle/zustaendige-stelle-dialog.e2e.component'; +import { exist } from '../../../support/cypress.util'; +import { loginAsAriane } from '../../../support/user-util'; + +describe('Organisationseinheit', () => { + const organisationsEinheitPage: OrganisationsEinheitPage = new OrganisationsEinheitPage(); + + const organisationsEinheitHelper: E2EOrganisationsEinheitHelper = new E2EOrganisationsEinheitHelper(); + const organisationsEinheitVerifier: E2EOrganisationsEinheitVerifier = new E2EOrganisationsEinheitVerifier(); + + const zustaendigeStelleSearchComponent: ZustaendigeStelleDialogE2EComponent = new ZustaendigeStelleDialogE2EComponent(); + + const organisationsEinheit: string = 'Wasserwerk - Hamburg Wasser - Hamburger Stadtentwässerung'; + + before(() => { + loginAsAriane(); + }); + + describe('hinzufügen', () => { + it('should show search dialog on add button click', () => { + organisationsEinheitHelper.openOrganisationsEinheitPage(); + + organisationsEinheitPage.getAddButton().click(); + + exist(zustaendigeStelleSearchComponent.getZustaendigeStelleForm()); + }); + + it('should find at least one organisationseinheit on search', () => { + zustaendigeStelleSearchComponent.enterSearchTerm(organisationsEinheit); + + zustaendigeStelleSearchComponent.expectNumberOfEntriesToBeGreaterThan(1); + }); + + it('should show organisationseinheit in list', () => { + organisationsEinheitHelper.addOrganisationsEinheit(organisationsEinheit); + + organisationsEinheitVerifier.verifyOrganisationsEinheitInList(organisationsEinheit); + }); + }); + + describe('löschen', () => { + it('should not show entry in list', () => { + organisationsEinheitHelper.openOrganisationsEinheitPage(); + + organisationsEinheitHelper.deleteOrganisationsEinheit(organisationsEinheit); + + organisationsEinheitVerifier.verifyOrganisationsEinheitNotInList(organisationsEinheit); + }); + }); +}); diff --git a/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisations-einheiten-page.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisations-einheiten-page.cy.ts new file mode 100644 index 0000000000000000000000000000000000000000..c17724c86bb9ed02eacc5f5f88bbcf35e865b79a --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisations-einheiten-page.cy.ts @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den + * Ministerpräsidenten des Landes Schleswig-Holstein + * Staatskanzlei + * Abteilung Digitalisierung und zentrales IT-Management der Landesregierung + * + * Lizenziert unter der EUPL, Version 1.2 oder - sobald + * diese von der Europäischen Kommission genehmigt wurden - + * Folgeversionen der EUPL ("Lizenz"); + * Sie dürfen dieses Werk ausschließlich gemäß + * dieser Lizenz nutzen. + * Eine Kopie der Lizenz finden Sie hier: + * + * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 + * + * Sofern nicht durch anwendbare Rechtsvorschriften + * gefordert oder in schriftlicher Form vereinbart, wird + * die unter der Lizenz verbreitete Software "so wie sie + * ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - + * ausdrücklich oder stillschweigend - verbreitet. + * Die sprachspezifischen Genehmigungen und Beschränkungen + * unter der Lizenz sind dem Lizenztext zu entnehmen. + */ +import { OrganisationsEinheitListE2EComponent } from 'apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten.e2e.component'; +import { E2EOrganisationsEinheitHelper } from 'apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.helper'; +import { OrganisationsEinheitE2E } from 'apps/admin-e2e/src/model/organisations-einheit'; +import { OrganisationsEinheitPage } from 'apps/admin-e2e/src/page-objects/organisations-einheit.po'; +import { exist } from '../../../support/cypress.util'; +import { loginAsAriane } from '../../../support/user-util'; + +describe('Organisationsheiten page', () => { + const organisationsEinheitPage: OrganisationsEinheitPage = new OrganisationsEinheitPage(); + + const organisationsEinheitHelper: E2EOrganisationsEinheitHelper = new E2EOrganisationsEinheitHelper(); + + const organisationsEinheitList: OrganisationsEinheitListE2EComponent = new OrganisationsEinheitListE2EComponent(); + + before(() => { + loginAsAriane(); + }); + + it('should show list', () => { + organisationsEinheitHelper.openOrganisationsEinheitPage(); + + exist(organisationsEinheitPage.getList().getRoot()); + }); + + it('should show add button', () => { + organisationsEinheitHelper.openOrganisationsEinheitPage(); + + exist(organisationsEinheitPage.getAddButton()); + }); + + it('should show default (Bauamt, Fundstelle, Denkmalpflege) entries', () => { + organisationsEinheitHelper.openOrganisationsEinheitPage(); + + exist(organisationsEinheitList.getListItem(OrganisationsEinheitE2E.BAUAMT).getRoot()); + exist(organisationsEinheitList.getListItem(OrganisationsEinheitE2E.FUNDSTELLE).getRoot()); + exist(organisationsEinheitList.getListItem(OrganisationsEinheitE2E.DENKMALPFLEGE).getRoot()); + }); +}); diff --git a/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisationseinheiten-hinzufuegen.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisationseinheiten-hinzufuegen.cy.ts deleted file mode 100644 index c88d54bf3dac14f0f0a7b5f124a66e7d1e26d60f..0000000000000000000000000000000000000000 --- a/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisationseinheiten-hinzufuegen.cy.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { convertToDataTestId } from 'apps/admin-e2e/src/support/tech-util'; -import { OrganisationsEinheitenE2EComponent } from '../../../components/organisationseinheiten/organisationseinheiten.e2e.component'; -import { ZustaendigeStelleDialogE2EComponent } from '../../../components/zustaendige-stelle/zustaendige-stelle-dialog.e2e.component'; -import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; -import { exist } from '../../../support/cypress.util'; -import { loginAsAriane } from '../../../support/user-util'; - -describe('Organisationseinheiten', () => { - const mainPage: MainPage = new MainPage(); - const organisationsEinheitenComponent: OrganisationsEinheitenE2EComponent = new OrganisationsEinheitenE2EComponent(); - const zustaendigeStelleSearchComponent: ZustaendigeStelleDialogE2EComponent = new ZustaendigeStelleDialogE2EComponent(); - - const searchTerm: string = 'Hamburg'; - - before(() => { - loginAsAriane(); - }); - - it('should show table with Organisationseinheiten', () => { - waitForSpinnerToDisappear(); - mainPage.clickOrganisationsEinheitenNavigationItem(); - - exist(organisationsEinheitenComponent.getOrganisationsEinheitHinzufuegenButton()); - }); - - it('should show button to add Organisationseinheit', () => { - exist(organisationsEinheitenComponent.getOrganisationsEinheitHinzufuegenButton()); - }); - - it('should show search Organisationseinheit dialog', () => { - organisationsEinheitenComponent.getOrganisationsEinheitHinzufuegenButton().click(); - - exist(zustaendigeStelleSearchComponent.getZustaendigeStelleForm()); - }); - - it('should find at least one Organisationseinheit', () => { - zustaendigeStelleSearchComponent.enterSearchTerm(searchTerm); - - zustaendigeStelleSearchComponent.expectNumberOfEntriesToBeGreaterThan(1); - }); - - it('should add first Organisationseinheit', () => { - zustaendigeStelleSearchComponent.getZustaendigeStelleTitle(0).then((name: string) => { - zustaendigeStelleSearchComponent.clickFoundItem(0); - exist(organisationsEinheitenComponent.getListItem(convertToDataTestId(name))); - }); - }); -}); diff --git a/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisationseinheiten-laden.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisationseinheiten-laden.cy.ts deleted file mode 100644 index 2b8eaeb70ab47d7845d24f973bac43f7645c25b2..0000000000000000000000000000000000000000 --- a/alfa-client/apps/admin-e2e/src/e2e/main-tests/organisationseinheiten/organisationseinheiten-laden.cy.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den - * Ministerpräsidenten des Landes Schleswig-Holstein - * Staatskanzlei - * Abteilung Digitalisierung und zentrales IT-Management der Landesregierung - * - * Lizenziert unter der EUPL, Version 1.2 oder - sobald - * diese von der Europäischen Kommission genehmigt wurden - - * Folgeversionen der EUPL ("Lizenz"); - * Sie dürfen dieses Werk ausschließlich gemäß - * dieser Lizenz nutzen. - * Eine Kopie der Lizenz finden Sie hier: - * - * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 - * - * Sofern nicht durch anwendbare Rechtsvorschriften - * gefordert oder in schriftlicher Form vereinbart, wird - * die unter der Lizenz verbreitete Software "so wie sie - * ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - - * ausdrücklich oder stillschweigend - verbreitet. - * Die sprachspezifischen Genehmigungen und Beschränkungen - * unter der Lizenz sind dem Lizenztext zu entnehmen. - */ -import { OrganisationsEinheitenE2EComponent } from '../../../components/organisationseinheiten/organisationseinheiten.e2e.component'; -import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; -import { exist } from '../../../support/cypress.util'; -import { loginAsAriane } from '../../../support/user-util'; - -describe('Organisationsheiten list', () => { - const mainPage: MainPage = new MainPage(); - const organisationsEinheitenTab: OrganisationsEinheitenE2EComponent = new OrganisationsEinheitenE2EComponent(); - - before(() => { - loginAsAriane(); - }); - - it('should show Organisationseinheiten list', () => { - waitForSpinnerToDisappear(); - mainPage.clickOrganisationsEinheitenNavigationItem(); - waitForSpinnerToDisappear(); - - exist(organisationsEinheitenTab.getOrganisationsEinheitList()); - }); - - it('should show entry for Bauamt', () => { - exist(organisationsEinheitenTab.getListItem('Bauamt')); - }); - - it('should show entry for Fundstelle', () => { - exist(organisationsEinheitenTab.getListItem('Fundstelle')); - }); - - it('should show entry for Denkmalpflege', () => { - exist(organisationsEinheitenTab.getListItem('Denkmalpflege')); - }); -}); diff --git a/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.executor.ts b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.executor.ts new file mode 100644 index 0000000000000000000000000000000000000000..a89ad1f958ca17a73511980431455f6e8ae479bc --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.executor.ts @@ -0,0 +1,34 @@ +import { + OrganisationsEinheitDeleteDialogE2EComponent, + OrganisationsEinheitListE2EComponent, +} from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; +import { ZustaendigeStelleDialogE2EComponent } from '../../components/zustaendige-stelle/zustaendige-stelle-dialog.e2e.component'; +import { OrganisationsEinheitPage } from '../../page-objects/organisations-einheit.po'; +import { exist } from '../../support/cypress.util'; +import { convertToDataTestId } from '../../support/tech-util'; + +export class E2EOrganisationsEinheitExecutor { + private readonly organisationsEinheitPage: OrganisationsEinheitPage = new OrganisationsEinheitPage(); + private readonly organisationsEinheitList: OrganisationsEinheitListE2EComponent = this.organisationsEinheitPage.getList(); + + private readonly deleteDialog: OrganisationsEinheitDeleteDialogE2EComponent = + new OrganisationsEinheitDeleteDialogE2EComponent(); + + private readonly zustaendigeStelleSearchComponent: ZustaendigeStelleDialogE2EComponent = + new ZustaendigeStelleDialogE2EComponent(); + + public addOrganisationsEinheit(name: string): void { + //TODO von index auf Name umstellen + this.zustaendigeStelleSearchComponent + .getZustaendigeStelleTitle(0) + .then((name: string) => this.zustaendigeStelleSearchComponent.clickFoundItem(0)); + exist(this.organisationsEinheitList.getRoot()); + } + + public deleteOrganisationsEinheit(name: string): void { + this.organisationsEinheitList.getListItem(convertToDataTestId(name)).getDeleteButton().click(); + exist(this.deleteDialog.getRoot()); + this.deleteDialog.getDeleteButton().click(); + exist(this.organisationsEinheitList.getRoot()); + } +} diff --git a/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.helper.ts b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.helper.ts new file mode 100644 index 0000000000000000000000000000000000000000..339793cde888c3cedcbd1dc6e4dd3b7a7f28e313 --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.helper.ts @@ -0,0 +1,19 @@ +import { E2EOrganisationsEinheitExecutor } from './organisations-einheit.executor'; +import { E2EOrganisationsEinheitNavigator } from './organisations-einheit.navigator'; + +export class E2EOrganisationsEinheitHelper { + private readonly navigator: E2EOrganisationsEinheitNavigator = new E2EOrganisationsEinheitNavigator(); + private readonly executor: E2EOrganisationsEinheitExecutor = new E2EOrganisationsEinheitExecutor(); + + public openOrganisationsEinheitPage(): void { + this.navigator.openOrganisationsEinheitListPage(); + } + + public addOrganisationsEinheit(name: string): void { + this.executor.addOrganisationsEinheit(name); + } + + public deleteOrganisationsEinheit(name: string): void { + this.executor.deleteOrganisationsEinheit(name); + } +} diff --git a/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.navigator.ts b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.navigator.ts new file mode 100644 index 0000000000000000000000000000000000000000..6274ee80d4bbbf2d2326f685d83d84da6e1ea07e --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.navigator.ts @@ -0,0 +1,21 @@ +import { OrganisationsEinheitListE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; +import { MainPage } from '../../page-objects/main.po'; +import { OrganisationsEinheitPage } from '../../page-objects/organisations-einheit.po'; +import { exist } from '../../support/cypress.util'; + +export class E2EOrganisationsEinheitNavigator { + private readonly mainPage: MainPage = new MainPage(); + + private readonly organisationsEinheitPage: OrganisationsEinheitPage = new OrganisationsEinheitPage(); + private readonly organisationsEinheitList: OrganisationsEinheitListE2EComponent = this.organisationsEinheitPage.getList(); + + public openOrganisationsEinheitListPage(): void { + this.navigateToDomain(); + this.mainPage.getOrganisationEinheitNavigationItem().click(); + exist(this.organisationsEinheitList.getRoot()); + } + + private navigateToDomain(): void { + this.mainPage.getHeader().getLogo().click(); + } +} diff --git a/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.verifier.ts b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.verifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..cb1b43021649ffea97c252237556966d3dea38ac --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/helper/organisations-einheit/organisations-einheit.verifier.ts @@ -0,0 +1,17 @@ +import { OrganisationsEinheitListE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; +import { OrganisationsEinheitPage } from '../../page-objects/organisations-einheit.po'; +import { exist, notExist } from '../../support/cypress.util'; +import { convertToDataTestId } from '../../support/tech-util'; + +export class E2EOrganisationsEinheitVerifier { + private readonly organisationsEinheitPage: OrganisationsEinheitPage = new OrganisationsEinheitPage(); + private readonly organisationsEinheitList: OrganisationsEinheitListE2EComponent = this.organisationsEinheitPage.getList(); + + public verifyOrganisationsEinheitInList(name: string): void { + exist(this.organisationsEinheitList.getListItem(convertToDataTestId(name)).getRoot()); + } + + public verifyOrganisationsEinheitNotInList(name: string): void { + notExist(this.organisationsEinheitList.getListItem(convertToDataTestId(name)).getRoot()); + } +} diff --git a/alfa-client/apps/admin-e2e/src/model/organisations-einheit.ts b/alfa-client/apps/admin-e2e/src/model/organisations-einheit.ts index 9870f7e3f1292df175cd154c88c59fbd60a94f26..311c1bfd5c4f39e55d5ddf17a4f91fdf34f19067 100644 --- a/alfa-client/apps/admin-e2e/src/model/organisations-einheit.ts +++ b/alfa-client/apps/admin-e2e/src/model/organisations-einheit.ts @@ -1,5 +1,7 @@ export enum OrganisationsEinheitE2E { - ORDNUNGSAMT = 'Ordnungsamt', + BAUAMT = 'Bauamt', DENKMALPFLEGE = 'Denkmalpflege', + FUNDSTELLE = 'Fundstelle', + ORDNUNGSAMT = 'Ordnungsamt', WIRTSCHAFTSFOERDERUNG = 'Wirtschaftsförderung', } diff --git a/alfa-client/apps/admin-e2e/src/page-objects/header.po.ts b/alfa-client/apps/admin-e2e/src/page-objects/header.po.ts index fb87e566cab2f09fd01b593fa883841fc6075243..60fc24b0d4bf09419e0f0e0b0e15f3b439d2f500 100644 --- a/alfa-client/apps/admin-e2e/src/page-objects/header.po.ts +++ b/alfa-client/apps/admin-e2e/src/page-objects/header.po.ts @@ -24,13 +24,13 @@ import { CurrentUserProfileE2EComponent } from '../components/user-profile/current-user-profile.component.e2e'; import { UserSettingsE2EComponent } from '../components/user-settings/user-settings.component.e2e'; +//TODO Zu den Componenten packen, nicht zu den page-objects export class HeaderE2EComponent { private readonly locatorLogo: string = 'logo-link'; private readonly locatorRoot: string = 'header'; private readonly userSettings: UserSettingsE2EComponent = new UserSettingsE2EComponent(); - private readonly currentUserProfile: CurrentUserProfileE2EComponent = - new CurrentUserProfileE2EComponent(); + private readonly currentUserProfile: CurrentUserProfileE2EComponent = new CurrentUserProfileE2EComponent(); public getRoot() { return cy.getTestElement(this.locatorRoot); diff --git a/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts b/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts index 73005caaf69cb0be2990541fdabe003326a20153..48a03c246ceeeea3b8b7e58c3f211e091c86e955 100644 --- a/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts +++ b/alfa-client/apps/admin-e2e/src/page-objects/login.po.ts @@ -1,3 +1,4 @@ +//TODO Das sollte eher eine Component als eine Page sein export class LoginPage { private readonly locatorLogin: string = '#kc-login'; private readonly locatorBarrierefreiheitLink: string = '#kc-barrierefreiheit'; diff --git a/alfa-client/apps/admin-e2e/src/page-objects/organisations-einheit.po.ts b/alfa-client/apps/admin-e2e/src/page-objects/organisations-einheit.po.ts new file mode 100644 index 0000000000000000000000000000000000000000..b37d9a9d3f0cd1cafc518f2ae995b0988807c7e9 --- /dev/null +++ b/alfa-client/apps/admin-e2e/src/page-objects/organisations-einheit.po.ts @@ -0,0 +1,14 @@ +import { OrganisationsEinheitListE2EComponent } from '../components/organisationseinheiten/organisationseinheiten.e2e.component'; + +export class OrganisationsEinheitPage { + private readonly addButton: string = 'add-organisationseinheit-button'; + private readonly list: OrganisationsEinheitListE2EComponent = new OrganisationsEinheitListE2EComponent(); + + public getAddButton(): Cypress.Chainable<Element> { + return cy.getTestElement(this.addButton); + } + + public getList(): OrganisationsEinheitListE2EComponent { + return this.list; + } +}