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(invoke).toHaveBeenCalledWith(executionHealth, { mode: 'local', scheduler: null });
|
||||
|
||||
const mode: HTMLSelectElement = fixture.nativeElement.querySelector('select');
|
||||
mode.value = 'remote';
|
||||
mode.dispatchEvent(new Event('change'));
|
||||
const trigger: HTMLElement = fixture.nativeElement.querySelector('.mat-mdc-select-trigger');
|
||||
trigger.click();
|
||||
fixture.detectChanges();
|
||||
const remote = Array.from(document.querySelectorAll<HTMLElement>('mat-option')).find(
|
||||
(option) => option.textContent?.trim() === 'Remoto',
|
||||
);
|
||||
remote!.click();
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
Reference in New Issue
Block a user