T13: the execution spec picks the mode through the Material select
This commit is contained in:
@@ -29,9 +29,13 @@ describe('execution', () => {
|
|||||||
expect(fixture.componentInstance.execution()).toEqual({ mode: 'local', scheduler: null });
|
expect(fixture.componentInstance.execution()).toEqual({ mode: 'local', scheduler: null });
|
||||||
expect(invoke).toHaveBeenCalledWith(executionHealth, { mode: 'local', scheduler: null });
|
expect(invoke).toHaveBeenCalledWith(executionHealth, { mode: 'local', scheduler: null });
|
||||||
|
|
||||||
const mode: HTMLSelectElement = fixture.nativeElement.querySelector('select');
|
const trigger: HTMLElement = fixture.nativeElement.querySelector('.mat-mdc-select-trigger');
|
||||||
mode.value = 'remote';
|
trigger.click();
|
||||||
mode.dispatchEvent(new Event('change'));
|
fixture.detectChanges();
|
||||||
|
const remote = Array.from(document.querySelectorAll<HTMLElement>('mat-option')).find(
|
||||||
|
(option) => option.textContent?.trim() === 'Remoto',
|
||||||
|
);
|
||||||
|
remote!.click();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|||||||
Reference in New Issue
Block a user