diff --git a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts index 5e7bf6e85e5720b81092d689070b4db49b237e50..cebd7aa2c967d2cae2897936b00f563d37ae6738 100644 --- a/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts +++ b/alfa-client/apps/admin-e2e/src/components/organisationseinheiten/organisationseinheiten-signatur.e2e.component.ts @@ -1,12 +1,12 @@ import { haveValue, typeText } from '../../support/cypress.util'; export class OrganisationseinheitenSignaturE2EComponent { - private readonly einheitName: string = 'organisations-form-container-headline'; + private readonly OrganisationsEinheitName: string = 'organisations-form-container-headline'; private readonly signaturText: string = 'signature-textarea'; private readonly saveSignatureButton: string = 'save-button'; - public getEinheitName(): Cypress.Chainable<Element> { - return cy.getTestElement(this.einheitName).should('exist'); + public getOrganisationsEinheitName(): Cypress.Chainable<Element> { + return cy.getTestElement(this.OrganisationsEinheitName).should('exist'); } public getSignaturText(): any { 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 4ab237e7010e3bf1d324dd1a40597c072fb10351..a20594d9fa0c7ad650e1726381837ad17e1b48b8 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 @@ -1,55 +1,54 @@ -@@ -1,54 +0,0 @@ import { notContainClass } from '../../support/cypress.util'; -export class OrganisationseinheitenE2EComponent { - private readonly einheitenList: string = 'organisations-einheit-list'; - private readonly einheitenName: string = 'organisations-einheit-name'; - private readonly einheitenID: string = 'organisations-einheit-id'; +export class OrganisationsEinheitenE2EComponent { + private readonly OrganisationsEinheitenList: string = 'organisations-einheit-list'; + private readonly OrganisationsEinheitenName: string = 'organisations-einheit-name'; + private readonly OrganisationsEinheitenID: string = 'organisations-einheit-id'; private readonly errorColor: string = 'text-red-500'; private readonly errorIcon: string = 'organisations-einheit-sync-error'; private readonly errorText: string = 'Organisationseinheit wurde nicht in den PVOG-Daten gefunden.'; - public getOETable(): Cypress.Chainable<Element> { - return cy.getTestElement(this.einheitenList).should('exist'); + public getOrganisationsEinheitTable(): Cypress.Chainable<Element> { + return cy.getTestElement(this.OrganisationsEinheitenList).should('exist'); } - public getListItemByName(einheit: string): Cypress.Chainable<JQuery<HTMLElement>> { - return cy.getTestElement(this.einheitenName).contains(einheit).should('exist'); + public getListItemByName(name: string): Cypress.Chainable<JQuery<HTMLElement>> { + return cy.getTestElement(this.OrganisationsEinheitenName).contains(name).should('exist'); } - public clickEinheit(einheit: string): void { - this.getListItemByName(einheit).click(); + public clickOrganisationsEinheit(name: string): void { + this.getListItemByName(name).click(); } - public organisationseinheitContainsID(einheit: string, einheitID: string): void { - this.getListItemByName(einheit) + public organisationsEinheitContainsID(name: string, id: string): void { + this.getListItemByName(name) .parents('a') .within(() => { - cy.getTestElement(this.einheitenID).should('have.text', einheitID); + cy.getTestElement(this.OrganisationsEinheitenID).should('have.text', id); }); } - public elementIsShownAsError(einheit: string): void { - this.getListItemByName(einheit).closest('ods-list-item').should('have.class', this.errorColor); + public elementIsShownAsError(name: string): void { + this.getListItemByName(name).closest('ods-list-item').should('have.class', this.errorColor); } - public getErrorIconInElement(einheit: string): Cypress.Chainable<JQuery<HTMLAnchorElement>> { - return this.getListItemByName(einheit) + public getErrorIconInElement(name: string): Cypress.Chainable<JQuery<HTMLAnchorElement>> { + return this.getListItemByName(name) .parents('a') .within(() => { cy.getTestElement(this.errorIcon).should('exist'); }); } - public getErrorTooltip(einheit: string): Cypress.Chainable<JQuery<HTMLElement>> { - return this.getErrorIconInElement(einheit) + public getErrorTooltip(name: string): Cypress.Chainable<JQuery<HTMLElement>> { + return this.getErrorIconInElement(name) .find('ods-exclamation-icon[mattooltip]') .should('have.attr', 'mattooltip') .and('include', this.errorText); } - public elementShowsNoError(einheit: string): void { - notContainClass(this.getListItemByName(einheit).closest('ods-list-item'), this.errorColor); + public elementShowsNoError(name: string): void { + notContainClass(this.getListItemByName(name).closest('ods-list-item'), this.errorColor); } } diff --git a/alfa-client/apps/admin-e2e/src/e2e/main-tests/benutzer_rollen/benutzer_rollen.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/main-tests/benutzer_rollen/benutzer_rollen.cy.ts index f40e990fcec28ded8975b821952f3de3006cbae3..8a54a3d07f413167dca9390fd78467b30b471c9e 100644 --- a/alfa-client/apps/admin-e2e/src/e2e/main-tests/benutzer_rollen/benutzer_rollen.cy.ts +++ b/alfa-client/apps/admin-e2e/src/e2e/main-tests/benutzer_rollen/benutzer_rollen.cy.ts @@ -1,18 +1,18 @@ -import { BenutzerE2EComponent } from '../../components/benutzer/benutzer.e2e.component'; -import { MainPage } from '../../page-objects/main.po'; -import { beChecked, beEnabled, exist, notBeChecked, notBeEnabled } from '../../support/cypress.util'; -import { loginAsAriane } from '../../support/user-util'; +import { BenutzerE2EComponent } from '../../../components/benutzer/benutzer.e2e.component'; +import { MainPage } from '../../../page-objects/main.po'; +import { beChecked, beEnabled, exist, notBeChecked, notBeEnabled } from '../../../support/cypress.util'; +import { loginAsAriane } from '../../../support/user-util'; const mainPage: MainPage = new MainPage(); const benutzerPage: BenutzerE2EComponent = new BenutzerE2EComponent(); const role1: string = 'VERWALTUNG_USER'; const role2: string = 'VERWALTUNG_LOESCHEN'; const role3: string = 'VERWALTUNG_POSTSTELLE'; -const orga1: string = 'Ordnungsamt'; -const orga2: string = 'Denkmalpflege'; -const orga3: string = 'Wirtschaftsförderung'; -const orga_none: string = 'keine zuständige Stelle zugewiesen'; -const mail1: string = 'peter.von.der.post@ozg-sh.de'; +const OrganisationsEinheitName1: string = 'Ordnungsamt'; +const OrganisationsEinheitName2: string = 'Denkmalpflege'; +const OrganisationsEinheitName3: string = 'Wirtschaftsförderung'; +const OrganisationsEinheitNone: string = 'keine zuständige Stelle zugewiesen'; +const emailAddress: string = 'peter.von.der.post@ozg-sh.de'; describe('Benutzer und Rollen', () => { before(() => { @@ -28,13 +28,13 @@ describe('Benutzer und Rollen', () => { it('should show users and attributes in table', () => { exist(benutzerPage.getUserEntry('ariane')); benutzerPage.stringExistsInUserEntry(role1, 'dorothea'); - benutzerPage.stringExistsInUserEntry(orga1, 'ludwig'); + benutzerPage.stringExistsInUserEntry(OrganisationsEinheitName1, 'ludwig'); benutzerPage.stringExistsInUserEntry(role1, 'zelda'); benutzerPage.stringExistsInUserEntry(role2, 'ludwig'); - benutzerPage.stringExistsInUserEntry(orga2, 'zelda'); - benutzerPage.stringExistsInUserEntry(orga3, 'zelda'); - benutzerPage.stringExistsInUserEntry(orga_none, 'richard'); - benutzerPage.stringExistsInUserEntry(mail1, 'peter'); + benutzerPage.stringExistsInUserEntry(OrganisationsEinheitName2, 'zelda'); + benutzerPage.stringExistsInUserEntry(OrganisationsEinheitName3, 'zelda'); + benutzerPage.stringExistsInUserEntry(OrganisationsEinheitNone, 'richard'); + benutzerPage.stringExistsInUserEntry(emailAddress, 'peter'); benutzerPage.stringExistsInUserEntry(role3, 'peter'); }); diff --git a/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-laden.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-laden.cy.ts index e258297354ac1f17033849c59b575139aa846115..6c57cb56d4d26b53db3658f2b23e79de4ecf1d0d 100644 --- a/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-laden.cy.ts +++ b/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-laden.cy.ts @@ -1,5 +1,4 @@ -@@ -1,52 +0,0 @@ -import { OrganisationseinheitenE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; +import { OrganisationsEinheitenE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; import { MainPage, waitForSpinnerToDisappear } from '../../page-objects/main.po'; import { exist } from '../../support/cypress.util'; import { AdminOrganisationsEinheitSyncResultE2E } from '../../support/organisationseinheit'; @@ -13,7 +12,7 @@ import { loginAsAriane } from '../../support/user-util'; describe('show Organisationsheiten', () => { const mainPage: MainPage = new MainPage(); - const organisationseinheitenTab: OrganisationseinheitenE2EComponent = new OrganisationseinheitenE2EComponent(); + const organisationsEinheitenTab: OrganisationsEinheitenE2EComponent = new OrganisationsEinheitenE2EComponent(); before(() => { loginAsAriane(); @@ -26,28 +25,28 @@ describe('show Organisationsheiten', () => { it('should show table of Organisationseinheiten', () => { waitForSpinnerToDisappear(); - mainPage.clickOrganisationseinheitenTab(); + mainPage.clickOrganisationsEinheitenTab(); - exist(organisationseinheitenTab.getOETable()); + exist(organisationsEinheitenTab.getOrganisationsEinheitTable()); }); it('should show identical data in Keycloak and PVOG without error', () => { - organisationseinheitenTab.getListItemByName('Bauamt'); - organisationseinheitenTab.organisationseinheitContainsID('Bauamt', '248240886'); - organisationseinheitenTab.elementShowsNoError('Bauamt'); + organisationsEinheitenTab.getListItemByName('Bauamt'); + organisationsEinheitenTab.organisationsEinheitContainsID('Bauamt', '248240886'); + organisationsEinheitenTab.elementShowsNoError('Bauamt'); }); it('should show data not found in PVOG in red color and with error icon and tooltip message', () => { - const einheit: string = 'Fundstelle'; + const organisationsEinheitName: string = 'Fundstelle'; - organisationseinheitenTab.organisationseinheitContainsID(einheit, '10363455'); - organisationseinheitenTab.elementIsShownAsError(einheit); - organisationseinheitenTab.getErrorIconInElement(einheit); - organisationseinheitenTab.getErrorTooltip(einheit); + organisationsEinheitenTab.organisationsEinheitContainsID(organisationsEinheitName, '10363455'); + organisationsEinheitenTab.elementIsShownAsError(organisationsEinheitName); + organisationsEinheitenTab.getErrorIconInElement(organisationsEinheitName); + organisationsEinheitenTab.getErrorTooltip(organisationsEinheitName); }); it('should get name for OE from PVOG, if mismatch with Keycloak, but without error', () => { - organisationseinheitenTab.organisationseinheitContainsID('Landesamt für Denkmalpflege', '9093371'); - organisationseinheitenTab.elementShowsNoError('Landesamt für Denkmalpflege'); + organisationsEinheitenTab.organisationsEinheitContainsID('Landesamt für Denkmalpflege', '9093371'); + organisationsEinheitenTab.elementShowsNoError('Landesamt für Denkmalpflege'); }); }); diff --git a/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-signaturen.cy.ts b/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-signaturen.cy.ts index af7f6e0e48db529c343e0f6ea73b638cba1de9ea..d0fef2b5cb767fd14b82fde17e9abad8d8472071 100644 --- a/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-signaturen.cy.ts +++ b/alfa-client/apps/admin-e2e/src/e2e/organisationseinheiten/organisationseinheiten-signaturen.cy.ts @@ -1,5 +1,5 @@ import { OrganisationseinheitenSignaturE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten-signatur.e2e.component'; -import { OrganisationseinheitenE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; +import { OrganisationsEinheitenE2EComponent } from '../../components/organisationseinheiten/organisationseinheiten.e2e.component'; import { MainPage, waitForSpinnerToDisappear } from '../../page-objects/main.po'; import { haveText } from '../../support/cypress.util'; import { loginAsAriane } from '../../support/user-util'; @@ -7,7 +7,7 @@ import { loginAsAriane } from '../../support/user-util'; describe('Signatur', () => { const mainPage: MainPage = new MainPage(); const signaturePage: OrganisationseinheitenSignaturE2EComponent = new OrganisationseinheitenSignaturE2EComponent(); - const organisationseinheitenTab: OrganisationseinheitenE2EComponent = new OrganisationseinheitenE2EComponent(); + const organisationseinheitenTab: OrganisationsEinheitenE2EComponent = new OrganisationsEinheitenE2EComponent(); const signaturText: string = 'Signatur\nmit\n\n\n\nZeilenumbruch\n\n'; @@ -17,10 +17,10 @@ describe('Signatur', () => { it('should open signature page for Bauamt on click', () => { waitForSpinnerToDisappear(); - mainPage.clickOrganisationseinheitenTab(); - organisationseinheitenTab.clickEinheit('Bauamt'); + mainPage.clickOrganisationsEinheitenTab(); + organisationseinheitenTab.clickOrganisationsEinheit('Bauamt'); - haveText(signaturePage.getEinheitName(), 'Bauamt'); + haveText(signaturePage.getOrganisationsEinheitName(), 'Bauamt'); }); it('should show signature input with scrollbar', () => { @@ -31,7 +31,7 @@ describe('Signatur', () => { signaturePage.scrollbarIsPresent(); }); - it('should enter an save empty signature', () => { + it.skip('should enter and save empty signature', () => { signaturePage.clearSignatur(); signaturePage.saveSignatur(); diff --git a/alfa-client/apps/admin-e2e/src/page-objects/main.po.ts b/alfa-client/apps/admin-e2e/src/page-objects/main.po.ts index 0d49928d6e5f08c470ff6489717098322ef970ef..f204fd70d224b0b92bef485c05b3f0ca04406dca 100644 --- a/alfa-client/apps/admin-e2e/src/page-objects/main.po.ts +++ b/alfa-client/apps/admin-e2e/src/page-objects/main.po.ts @@ -6,7 +6,7 @@ export class MainPage { private readonly header: HeaderE2EComponent = new HeaderE2EComponent(); private readonly benutzerTab: string = 'caption-Benutzer__Rollen'; private readonly postfachTab: string = 'caption-Postfach'; - private readonly organisationseinheitenTab: string = 'caption-Organisationseinheiten'; + private readonly organisationsEinheitenTab: string = 'caption-Organisationseinheiten'; public getBuildInfo(): BuildInfoE2EComponent { return this.buildInfo; @@ -24,12 +24,12 @@ export class MainPage { this.getBenutzerTab().click(); } - public getOrganisationseinheitenTab(): Cypress.Chainable<Element> { - return cy.getTestElement(this.organisationseinheitenTab); + public getOrganisationsEinheitenTab(): Cypress.Chainable<Element> { + return cy.getTestElement(this.organisationsEinheitenTab); } - public clickOrganisationseinheitenTab(): void { - this.getOrganisationseinheitenTab().click(); + public clickOrganisationsEinheitenTab(): void { + this.getOrganisationsEinheitenTab().click(); } }