Ozg 7501 adjust loading
11 unresolved threads
11 unresolved threads
Merge request reports
Activity
4 4 (clickEmitter)="clickEmitter.emit()" 5 5 text="Weiterleiten" 6 6 variant="outline" 7 dataTestId="forwarding-button" 7 [dataTestId]="dataTestId" changed this line in version 3 of the diff
13 13 export class ForwardingButtonComponent { 14 14 @Input() disabled: boolean; 15 15 @Input() stateResource: StateResource<CommandResource>; 16 @Input({ required: true }) dataTestId: string; changed this line in version 3 of the diff
16 16 [disabled]="!selectedSearchResult" 17 17 (clickEmitter)="onForwarding()" 18 18 data-test-id="foward-dialog-forward-button" 19 dataTestId="forwarding-dialog-forwarding-button" changed this line in version 3 of the diff
1 import { VorgangListE2EComponent } from '../components/vorgang/vorgang-list.e2e.component'; 2 import { MainPage, waitForSpinnerToDisappear } from '../page-objects/main.po'; 3 import { exist } from '../support/cypress.util'; 4 import { loginAsSabine } from '../support/user-util'; 5 6 export class E2EAppHelper { 1 import { registerLocaleData } from '@angular/common'; 2 import localeDe from '@angular/common/locales/de'; 3 import localeDeExtra from '@angular/common/locales/extra/de'; 4 import { E2EAppHelper } from 'apps/alfa-e2e/src/helper/app.helper'; 5 import { E2EForwardingHelper } from 'apps/alfa-e2e/src/helper/forwarding/forwarding.helper'; 6 import { E2EOrganisationsEinheit } from 'apps/alfa-e2e/src/model/organisationseinheit'; 7 import { E2EVorgangVerifier } from '../../../helper/vorgang/vorgang.verifier'; 8 import { VorgangE2E } from '../../../model/vorgang'; 9 import { dropCollections } from '../../../support/cypress-helper'; 10 import { createVorgang, initVorgang } from '../../../support/vorgang-util'; 11 12 registerLocaleData(localeDe, 'de', localeDeExtra); 13 14 describe('Vorgang weiterleiten', () => { 15 const appHelper: E2EAppHelper = new E2EAppHelper(); 16 10 import { createVorgang, initVorgang } from '../../../support/vorgang-util'; 11 12 registerLocaleData(localeDe, 'de', localeDeExtra); 13 14 describe('Vorgang weiterleiten', () => { 15 const appHelper: E2EAppHelper = new E2EAppHelper(); 16 17 const vorgangVerifier: E2EVorgangVerifier = new E2EVorgangVerifier(); 18 19 const forwardingHelper: E2EForwardingHelper = new E2EForwardingHelper(); 20 21 const vorgang: VorgangE2E = { ...createVorgang(), name: 'Weiterleitung' }; 22 23 before(() => { 24 initVorgang(vorgang); 25 1 import { E2EForwardingExecutor } from './forwarding.executor'; 2 import { E2EForwardingNavigator } from './forwarding.navigator'; 3 4 export class E2EForwardingHelper { 5 private readonly executor: E2EForwardingExecutor = new E2EForwardingExecutor(); 6 private readonly navigator: E2EForwardingNavigator = new E2EForwardingNavigator(); 7 8 public openForwarding(vorgangName: string): void { 9 this.navigator.openForwardDialog(vorgangName); 10 } 11 12 public forwardTo(orgnisationsEinheit: string): void { changed this line in version 3 of the diff
16 18 public verifyNoForwardingButtonExists(): void { 17 19 notExist(this.vorgangPage.getFormularButtons().getForwardButton()); 18 20 } 21 22 public verifyVorgangIsLocked(): void { 23 this.verifyFormularButtonsNotVisible(); 24 notExist(this.vorgangPage.getWiedervorlagenContainer().getCreateWiedervorlageButton()); 25 notExist(this.vorgangPage.getKommentarContainer().getHinzufuegenButton()); 26 notExist(this.vorgangPage.getPostfachMailcontainer().getCreateButtonWithText()); 27 notExist(this.vorgangPage.getPostfachMailcontainer().getCreateButtonWithoutText()); 28 } 29 30 private verifyFormularButtonsNotVisible(): void { 103 _refreshVorgangSubscription(): void { 104 this.vorgangSubscription.unsubscribe(); 105 this._listenToVorgangChange(); 106 } 107 108 _listenToVorgangChange(): void { 109 this.vorgangSubscription = this.vorgangService 110 .getVorgangWithEingang() 111 .subscribe((vorgangWithEingangStateResource: StateResource<VorgangWithEingangResource>) => 112 this._handleVorgangChange(vorgangWithEingangStateResource), 113 ); 114 } 115 116 _handleVorgangChange(vorgangWithEingangStateResource: StateResource<VorgangWithEingangResource>): void { 117 if (this.shouldReloadList(vorgangWithEingangStateResource)) { 118 this.shouldReload = true; 81 95 } 82 96 83 97 public getKommentareByVorgang(vorgang: VorgangResource): Observable<StateResource<KommentarListResource>> { 98 this._refreshVorgangSubscription(); 84 99 doIfLoadingRequired(this.kommentarList$.value, () => this.loadKommentare(vorgang)); 85 100 return this.kommentarList$.asObservable(); 86 101 } 87 102 103 _refreshVorgangSubscription(): void { 81 87 82 88 service.setListLoadingTrue = jest.fn(); 83 89 service.setKommentarList = jest.fn(); 90 service._refreshVorgangSubscription = jest.fn(); 91 }); 92 93 it('should call refresh vorgang subscription', () => { 94 service.getKommentareByVorgang(vorgang); 95 expect(service._refreshVorgangSubscription).toHaveBeenCalled(); mentioned in commit 3b6d95ad
Please register or sign in to reply