Skip to content
Snippets Groups Projects
Commit cac83437 authored by Cord Westhoff's avatar Cord Westhoff
Browse files

OZG-8086 OZG-8172 add E2E test file

parent 69077182
No related branches found
No related tags found
2 merge requests!144OZG-8086 Refactor tab handling; use existing components; inverse dependencies,!142Ozg 8086 statistik datenanfrage erstellen
import { Auswertung, FieldMapping } from '@admin-client/reporting-shared';
import { AuswertungFormE2EComponent } from '../../../components/auswertung/auswertung-form.e2e.component';
import { AuswertungE2EComponent } from '../../../components/auswertung/auswertung.e2e.component';
import { E2EAuswertungHelper } from '../../../helper/auswertung/auswertung.helper';
import { E2EAuswertungVerifier } from '../../../helper/auswertung/auswertung.verifier';
import { dropCollections } from '../../../support/cypress-helper';
import { exist, notExist } from '../../../support/cypress.util';
import { loginAsDaria } from '../../../support/user-util';
describe('Datenanfrage erstellen', () => {
const page: AuswertungE2EComponent = new AuswertungE2EComponent();
const form: AuswertungFormE2EComponent = new AuswertungFormE2EComponent();
const helper: E2EAuswertungHelper = new E2EAuswertungHelper();
const verifier: E2EAuswertungVerifier = new E2EAuswertungVerifier();
const fieldMapping0: FieldMapping = {
sourcePath: '/path/to/source/a',
targetPath: '/path/to/target/a',
};
const fieldMapping1: FieldMapping = {
sourcePath: '/path/to/source/b',
targetPath: '/path/to/target/b',
};
const auswertung: Auswertung = {
name: 'Auswertung',
formIdentifier: {
formEngineName: 'formEngineName',
formId: 'formId',
},
mappings: [fieldMapping0, fieldMapping1],
};
before(() => {
loginAsDaria();
});
after(() => {
dropCollections();
});
it('should show "Auswertung erstellen" button', () => {});
it('should show first tab after button click', () => {});
it('should fill input fields', () => {});
it('should add data field in form', () => {
page.getWeitereFelderAuswertenButton().click();
form.getAddFieldButton().click();
exist(form.getDataFieldInput(1));
});
it('should fill out form with two data fields', () => {
helper.fillFormular(auswertung);
verifier.verifyForm(auswertung);
});
it('should delete data fields', () => {
form.getDataFieldDeleteButton(0).click();
notExist(form.getDataFieldInput(1));
});
it('should open second tab after save', () => {});
it('should show all entered data in second tab', () => {});
it('should open first tab after back', () => {});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment