Skip to content
Snippets Groups Projects
Commit cc0607a6 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5243 add method to get historie entry by index

parent 9d58cf83
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
*/ */
import { getElement, getTestElement } from '../../support/cypress-helper'; import { getElement, getTestElement } from '../../support/cypress-helper';
import { ExpansionPanelE2Eomponent } from '../ui/expansion-panel.e2e.component'; import { ExpansionPanelE2Eomponent } from '../ui/expansion-panel.e2e.component';
import { VorgangFormularDatenHistorieE2EComponent } from './vorgang.formular-daten.historie.e2e.component'; import {
VorgangFormularDatenHistorieE2EComponent,
VorgangFormularDatenHistorieItemE2EComponent,
} from './vorgang.formular-daten.historie.e2e.component';
export class VorgangFormularDatenE2EComponent { export class VorgangFormularDatenE2EComponent {
private readonly locatorRoot: string = 'formulardaten-panel'; private readonly locatorRoot: string = 'formulardaten-panel';
...@@ -85,4 +88,8 @@ export class VorgangFormularDatenE2EComponent { ...@@ -85,4 +88,8 @@ export class VorgangFormularDatenE2EComponent {
public getHistorieContainer(): VorgangFormularDatenHistorieE2EComponent { public getHistorieContainer(): VorgangFormularDatenHistorieE2EComponent {
return this.historieContainer; return this.historieContainer;
} }
public getHistorieItemByIndex(index: number): VorgangFormularDatenHistorieItemE2EComponent {
return this.getHistorieContainer().getListItemByIndex(index);
}
} }
...@@ -102,18 +102,16 @@ describe('Bescheid History', () => { ...@@ -102,18 +102,16 @@ describe('Bescheid History', () => {
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
vorgangDatenFormular.getHistorieTab().click(); vorgangDatenFormular.getHistorieTab().click();
const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular const historieItem: VorgangFormularDatenHistorieItemE2EComponent =
.getHistorieContainer() vorgangDatenFormular.getHistorieItemByIndex(0);
.getListItemByIndex(0);
contains(historieItem.getHeadline(), HistorieHeadlineE2E.BESCHEID_ERSTELLT); contains(historieItem.getHeadline(), HistorieHeadlineE2E.BESCHEID_ERSTELLT);
contains(historieItem.getUser(), userName); contains(historieItem.getUser(), userName);
}); });
it('should show detailed info after click on arrow', () => { it('should show detailed info after click on arrow', () => {
const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular const historieItem: VorgangFormularDatenHistorieItemE2EComponent =
.getHistorieContainer() vorgangDatenFormular.getHistorieItemByIndex(0);
.getListItemByIndex(0);
const bescheidItem: BescheidHistorieItemE2EComponent = historieItem.getBescheid(); const bescheidItem: BescheidHistorieItemE2EComponent = historieItem.getBescheid();
historieItem.getExpandButton().click(); historieItem.getExpandButton().click();
...@@ -139,9 +137,8 @@ describe('Bescheid History', () => { ...@@ -139,9 +137,8 @@ describe('Bescheid History', () => {
waitForSpinnerToDisappear(); waitForSpinnerToDisappear();
vorgangDatenFormular.getHistorieTab().click(); vorgangDatenFormular.getHistorieTab().click();
const historieItem: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular const historieItem: VorgangFormularDatenHistorieItemE2EComponent =
.getHistorieContainer() vorgangDatenFormular.getHistorieItemByIndex(0);
.getListItemByIndex(0);
const bescheidItem: BescheidHistorieItemE2EComponent = historieItem.getBescheid(); const bescheidItem: BescheidHistorieItemE2EComponent = historieItem.getBescheid();
historieItem.getExpandButton().click(); historieItem.getExpandButton().click();
...@@ -186,9 +183,8 @@ describe('Bescheid History', () => { ...@@ -186,9 +183,8 @@ describe('Bescheid History', () => {
}); });
it('should show history entries for sent Bescheid and message', () => { it('should show history entries for sent Bescheid and message', () => {
const historieItemSent: VorgangFormularDatenHistorieItemE2EComponent = vorgangDatenFormular const historieItemSent: VorgangFormularDatenHistorieItemE2EComponent =
.getHistorieContainer() vorgangDatenFormular.getHistorieItemByIndex(1);
.getListItemByIndex(1);
contains(historieItemSent.getHeadline(), HistorieHeadlineE2E.BESCHEID_VERSCHICKT); contains(historieItemSent.getHeadline(), HistorieHeadlineE2E.BESCHEID_VERSCHICKT);
contains(historieItemSent.getUser(), userName); contains(historieItemSent.getUser(), userName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment