Skip to content
Snippets Groups Projects
Select Git revision
  • OZG-8168-replace-remaining-mat-icon
  • OZG-7983-OZG-8244-Statistik-Datenanfrage-veröffentlichen
  • OZG-7983-Statistik-Land-kann-Anfrage-an-Mandanten-veröffentlichen
  • OZG-6123-Vorgänge-aus-Suche-E2E
  • main default protected
  • OZG-8086-Admin-Datenanfrage-erstellen
  • OZG-8086-Datenanfrage-Umbenennung
  • mongodb-7-0-16-e2e
  • release-info
  • release-administration
  • release
  • OZG-6220-Bescheid-speichern-ohne-Postfach
  • OZG-7985-Statistik-Datenfreigabe
  • OZG-7922-KeycloakOperatorExceptions
  • OZG-8142-poc-cards
  • OZG-8086-E2E
  • OZG-8086-E2E2
  • OZG-8142-ProjectionStuff
  • OZG-8086-Statistik-Datenanfrage-erstellen
  • OZG-7856_schadcode_scanner
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
  • 1.6.0-administration
  • 2.21.0-alfa
  • 1.5.0-info
  • 1.5.0-administration
  • 2.20.0-alfa
  • 2.19.2-alfa
  • 2.19.1-alfa
40 results

aggregation-mapping.verifier.ts

Blame
  • aggregation-mapping.verifier.ts 1.83 KiB
    import { AggregationMapping, FieldMapping } from '@admin-client/reporting-shared';
    import { AggregationMappingFormE2EComponent } from '../../components/aggregation-mapping/aggregation-mapping-form.e2e.component';
    import {
      AggregationMappingE2EComponent,
      AggregationMappingListItemE2EComponent,
    } from '../../components/aggregation-mapping/aggregation-mapping.e2e.component';
    import { haveText, haveValue } from '../../support/cypress.util';
    
    export class E2EAggregationMappingVerifier {
      private component: AggregationMappingE2EComponent = new AggregationMappingE2EComponent();
      private formComponent: AggregationMappingFormE2EComponent = new AggregationMappingFormE2EComponent();
    
      public verifyFieldMapping(fieldMapping: FieldMapping, index: number): void {
        haveValue(this.formComponent.getSourceMappingFieldInput(index), fieldMapping.sourcePath);
        haveValue(this.formComponent.getTargetMappingFieldInput(index), fieldMapping.targetPath);
      }
    
      public verifyForm(aggregationMapping: AggregationMapping): void {
        haveValue(this.formComponent.getNameInput(), aggregationMapping.name);
        haveValue(this.formComponent.getFormEngineInput(), aggregationMapping.formIdentifier.formEngineName);
        haveValue(this.formComponent.getFormIdInput(), aggregationMapping.formIdentifier.formId);
    
        aggregationMapping.mappings.forEach((fieldMapping, index) => {
          this.verifyFieldMapping(fieldMapping, index);
        });
      }
    
      public verifyAggregationMappingInList(aggregationMapping: AggregationMapping): void {
        const listItem: AggregationMappingListItemE2EComponent = this.component.getListItem(aggregationMapping.name);
        haveText(listItem.getName(), aggregationMapping.name);
        haveText(listItem.getFormEngineName(), aggregationMapping.formIdentifier.formEngineName);
        haveText(listItem.getFormId(), aggregationMapping.formIdentifier.formId);
      }
    }