type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const option = overlayContainerElement.querySelector('mc-option') as HTMLElement;
option.click();
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
document.body.click();
fixture.detectChanges();
flush();
expect(overlayContainerElement.textContent).toEqual('');
expect(fixture.c... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.style.width = '200px';
trigger.click();
fixture.detectChanges();
flush();
const pane = overlayContainerElement.querySelector('.cdk-overlay-pane') as HTMLElement;
expect(pane.style.minWidth).toBe('200px');
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.foods = [];
fixture.detectChanges();
trigger.click();
fixture.detectChanges();
expect(fixture.componentInstance.select.panelOpen).toBe(false);
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.select.panelOpen).toBe(true);
dispatchKeyboardEvent(trigger, 'keydown', TAB);
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const select = fixture.nativeElement.querySelector('.mc-select');
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.select.panelOpen).toBe(true);
// Use a spy since focus can be ... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.select.panelOpen).toBe(true);
const panel = overlayContainerElement.querySelector('.mc-select__panel')!;
dispatchKeyboardEvent(pa... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
trigger.click();
fixture.detectChanges();
flush();
const event = dispatchKeyboardEvent(trigger, 'keydown', HOME);
fix... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
trigger.click();
fixture.detectChanges();
flush();
const event = dispatchKeyboardEvent(trigger, 'keydown', END);
fixt... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const panel = overlayContainerElement.querySelector('.mc-select__panel') as HTMLElement;
expect(panel.classList).toContain('custom-one');
expect(panel.classList).... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const option = overlayContainerElement.querySelector('mc-option') as Node;
const event = dispatchKeyboardEvent(option, 'keydown', SPACE);
expect(event.defaultPrev... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const option = overlayContainerElement.querySelector('mc-option') as Node;
const event = dispatchKeyboardEvent(option, 'keydown', ENTER);
expect(event.defaultPrev... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.destroy();
const groupFixture = TestBed.createComponent(SelectWithGroupsAndNgContainer);
groupFixture.detectChanges();
trigger = groupFixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
trigger.click()... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const selectElement = fixture.nativeElement.querySelector('.mc-select');
const selectInstance = fixture.componentInstance.select;
dispatchFakeEvent(selectElement, 'focus');
fixture.detectChanges();
/* tslint:disable-next-line:dep... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.select.keyManager.activeItemIndex).toEqual(0);
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
let option = overlayContainerElement.querySelector('mc-option') as HTMLElement;
option.click();
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const optionInstances = fixture.componentInstance.options.toArray();
const optionNodes: NodeListOf<HTMLElement> = overlayContainerElement.querySelectorAll('mc-option');
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
let options: NodeListOf<HTMLElement> = overlayContainerElement.querySelectorAll('mc-option');
options[0].click();
fixture.detectChanges();
flush()... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const control = fixture.componentInstance.control;
const foods = fixture.componentInstance.foods;
trigger.click();
fixture.detectChanges();
flush();
let options: NodeListOf<HTMLElement> = overlayContainerElement.q... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const option = overlayContainerElement.querySelector('mc-option') as HTMLElement;
option.click();
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
// must wait for initial writeValue promise to finish
flush();
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
trigger.click();
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.foods.push({ viewValue: 'Potatoes', value: 'potatoes-8' });
trigger.click();
fixture.detectChanges();
flush();
const options: NodeListOf<HTMLElement> = overlayContainerElement.querySelectorAll('mc-option'... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
expect(trigger.querySelector('.mc-select__matcher-text')!.textContent!.trim())
.toBe('Pizza');
fixture.componentInstance.foods[1].viewValue = 'Ca... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
expect(fixture.componentInstance.select.selected).toBeUndefined();
const options: NodeListOf<HTMLElement> = overlayContainerElement.querySelectorAll('mc-option');
options[2].click();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.destroy();
const groupFixture = TestBed.createComponent(SelectWithGroups);
groupFixture.detectChanges();
groupFixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement.click();
groupFixture.detectChanges();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(() => fixture.componentInstance.select.triggerValue).not.toThrow();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => fixture.componentInstance.select.triggerValue | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const spy = jasmine.createSpy('option selection spy');
const subscription = fixture.componentInstance.select.optionSelectionChanges.subscribe(spy);
const option = ... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.destroy();
fixture = TestBed.createComponent(BasicSelect);
const spy = jasmine.createSpy('option selection spy');
let subscription: Subscription;
expect(fixture.componentInstance.select.options).toBeFa... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
subscription = fixture.componentInstance.select.optionSelectionChanges.subscribe(spy);
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.control = new FormControl('pizza-1');
fixture.detectChanges();
const value = fixture.debugElement.query(By.css('.mc-select__matcher'));
expect(value.nativeElement.textContent)
.toContain('Pizza', `Exp... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let value = fixture.debugElement.query(By.css('.mc-select__matcher'));
expect(value.nativeElement.textContent.trim()).toBe('Food');
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
value = fixture.d... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.control.value)
.toEqual(null, `Expected the control's value to be empty initially.`);
trigger.click();
fixture.detectChanges();
flush();
const option = overlayContainerElement.... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
fixture.componentInstance.control.setValue('gibberish');
fixture.detectChanges();
const value = fixture.debugElement.query(By.css('.mc-select__matche... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.componentInstance.control.setValue('pizza-1');
fixture.detectChanges();
fixture.componentInstance.control.reset();
fixture.detectChanges();
const value = fixture.debugElement.query(By.css('.mc-select__matcher'));
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.control.touched)
.toEqual(false, `Expected the control to start off as untouched.`);
trigger.click();
dispatchFakeEvent(trigger, 'blur');
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.control.touched)
.toBe(false, 'Expected the control to start off as untouched.');
trigger.click();
dispatchFakeEvent(trigger, 'blur');
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.control.touched)
.toBe(false, 'Expected the control to start off as untouched.');
fixture.componentInstance.control.disable();
dispatchFakeEvent(trigger, 'blur');
expect(fixture.componentInsta... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.control.dirty)
.toEqual(false, `Expected control to start out pristine.`);
trigger.click();
fixture.detectChanges();
flush();
const option = overlayContainerElement.querySelect... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.control.dirty)
.toEqual(false, `Expected control to start out pristine.`);
fixture.componentInstance.control.setValue('pizza-1');
expect(fixture.componentInstance.control.dirty)
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let requiredMarker = fixture.debugElement.query(By.css('.mc-form-field-required-marker'));
expect(requiredMarker)
.toBeNull(`Expected label not to have an asterisk, as control was not required.`);
fixture.componentInstance.isRequired = true;
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
it('should disable itself when control is disabled programmatically', fakeAsync(() => {
const fixture = TestBed.createComponent(BasicSelect);
fixture.detectChanges();
fixture.componentInstance.control.disable();
fixture.detectChanges(... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(BasicSelect);
fixture.detectChanges();
fixture.componentInstance.control.disable();
fixture.detectChanges();
const trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeE... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let fixture: ComponentFixture<BasicSelect>;
let host: HTMLElement;
let panel: HTMLElement;
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(BasicSelect);
fixture.componentInstance.foods = [];
for (l... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(BasicSelect);
fixture.componentInstance.foods = [];
for (let i = 0; i < 30; i++) {
fixture.componentInstance.foods.push({ value: `value-${i}`, viewValue: `Option ${i}` });
}
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const initialScrollPosition = panel.scrollTop;
[1, 2, 3].forEach(() => {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
});
expect(panel.scrollTop)
.toBe(initialScrollPosition, 'Expected scroll positi... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
for (let i = 0; i < 15; i++) {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
}
expect(panel.scrollTop).toBe(316, 'Expected scroll to be at the 16th option.');
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
// Scroll to the bottom.
for (let i = 0; i < fixture.componentInstance.foods.length; i++) {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
}
for (let i = 0; i < 20; i++) {
dispatchKeyboardEvent(host, '... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture.destroy();
const groupFixture = TestBed.createComponent(SelectWithGroups);
groupFixture.detectChanges();
groupFixture.componentInstance.select.open();
groupFixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
for (let i = 0; i < 20; i++) {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
fixture.detectChanges();
}
expect(panel.scrollTop).toBeGreaterThan(0, 'Expected panel to be scrolled down.');
dispatchKeyb... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
dispatchKeyboardEvent(host, 'keydown', END);
fixture.detectChanges();
expect(panel.scrollTop).toBe(728, 'Expected panel to be scrolled to the bottom');
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
for (let i = 0; i < 15; i++) {
// Press the letter 'o' 15 times since all the options are named 'Option <index>'
dispatchEvent(host, createKeyboardEvent('keydown', 79, undefined, 'o'));
fixture.detectChanges();
tick... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
let fixture: ComponentFixture<BasicEvents>;
let trigger: HTMLElement;
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(BasicEvents);
fixture.detectChanges();
flush();
trigger = fixture.debugElem... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(BasicEvents);
fixture.detectChanges();
flush();
trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.openedChangeListener).not.toHaveBeenCalled();
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.openedChangeListener).toHaveBeenCalled();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.openedChangeListener).not.toHaveBeenCalled();
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.openedChangeListener).toHaveBeenCalled();
documen... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.openedListener).not.toHaveBeenCalled();
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.openedListener).toHaveBeenCalled();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(fixture.componentInstance.closedListener).not.toHaveBeenCalled();
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.closedListener).not.toHaveBeenCalled();
document.body.c... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([SelectWithSearch])));
let fixture: ComponentFixture<SelectWithSearch>;
let trigger: HTMLElement;
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(SelectWithSearch);
fixture.dete... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([SelectWithSearch]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(SelectWithSearch);
fixture.detectChanges();
trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
expect(fixture.debugElement.query(By.css('input'))).toBeDefined();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const input = fixture.debugElement.query(By.css('input')).nativeElement;
expect(input).toBe(document.activeElement);
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
flush();
const inputElementDebug = fixture.debugElement.query(By.css('input'));
inputElementDebug.nativeElement.value = 'lu';
inputElementDebug.triggerEventHandler('input', { target: inputElemen... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
(el) => el.nativeElement.innerText | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
const inputElementDebug = fixture.debugElement.query(By.css('input'));
inputElementDebug.nativeElement.value = 'lu';
inputElementDebug.triggerEventHandler('input', { target: inputElementDebug.nativeElement ... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
const inputElementDebug = fixture.debugElement.query(By.css('input'));
dispatchKeyboardEvent(inputElementDebug.nativeElement, 'keydown', ESCAPE);
fixture.detectChanges();
const selectInstance =... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([SelectWithChangeEvent])));
let fixture: ComponentFixture<SelectWithChangeEvent>;
let trigger: HTMLElement;
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(SelectWithChangeEvent);
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([SelectWithChangeEvent]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(SelectWithChangeEvent);
fixture.detectChanges();
trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
(overlayContainerElement.querySelector('mc-option') as HTMLElement).click();
fixture.detectChanges();
flush();
expect(fixture.componentInstance.changeListener).toHaveBeenCalled();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
trigger.click();
fixture.detectChanges();
const option = overlayContainerElement.querySelector('mc-option') as HTMLElement;
option.click();
option.click();
expect(fixture.componentInstance.changeListener).toHaveBeenCalledTimes(1);
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const select = fixture.debugElement.query(By.css('mc-select')).nativeElement;
dispatchKeyboardEvent(select, 'keydown', DOWN_ARROW);
expect(fixture.componentInstance.changeListener).toHaveBeenCalledTimes(1);
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([NgModelSelect])));
it('should disable itself when control is disabled using the property', fakeAsync(() => {
const fixture = TestBed.createComponent(NgModelSelect);
fixture.detectChanges();
fixtu... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([NgModelSelect]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(NgModelSelect);
fixture.detectChanges();
fixture.componentInstance.isDisabled = true;
fixture.detectChanges();
flush();
fixture.detectChanges();
const trigger =
fixture.... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([NgIfSelect])));
it('should handle nesting in an ngIf', fakeAsync(() => {
const fixture = TestBed.createComponent(NgIfSelect);
fixture.detectChanges();
fixture.componentInstance.isShowing = true;
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([NgIfSelect]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(NgIfSelect);
fixture.detectChanges();
fixture.componentInstance.isShowing = true;
fixture.detectChanges();
const trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
t... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([ManySelects])));
let fixture: ComponentFixture<ManySelects>;
let triggers: DebugElement[];
let options: NodeListOf<HTMLElement>;
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(Man... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([ManySelects]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(ManySelects);
fixture.detectChanges();
triggers = fixture.debugElement.queryAll(By.css('.mc-select__trigger'));
triggers[0].nativeElement.click();
fixture.detectChanges();
flush();
options = ... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const firstOptionID = options[0].id;
expect(options[0].id)
.toContain('mc-option', `Expected option ID to have the correct prefix.`);
expect(options[0].id).not.toEqual(options[1].id, `Expected option IDs to be unique.`);
document.body.click();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([
SelectWithErrorSibling,
ThrowsErrorOnInit
])));
it('should not crash the browser when a sibling throws an error on init', fakeAsync(() => {
// Note that this test can be considered succes... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([
SelectWithErrorSibling,
ThrowsErrorOnInit
]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
// Note that this test can be considered successful if the error being thrown didn't
// end up crashing the testing setup altogether.
expect(() => {
TestBed.createComponent(SelectWithErrorSibling).detectChanges();
}).toThrowError(new RegExp('Oh no... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
TestBed.createComponent(SelectWithErrorSibling).detectChanges();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([SelectWithPlainTabindex])));
it('should complete the stateChanges stream on destroy', () => {
const fixture = TestBed.createComponent(SelectWithPlainTabindex);
fixture.detectChanges();
const debu... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([SelectWithPlainTabindex]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(SelectWithPlainTabindex);
fixture.detectChanges();
const debugElement = fixture.debugElement.query(By.directive(McSelect));
const select = debugElement.componentInstance;
const spy = jasmine.createSpy('stateCh... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([BasicSelectInitiallyHidden])));
it('should set the width of the overlay if the element was hidden initially', fakeAsync(() => {
const fixture = TestBed.createComponent(BasicSelectInitiallyHidden);
fixture.det... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([BasicSelectInitiallyHidden]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(BasicSelectInitiallyHidden);
fixture.detectChanges();
const trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
trigger.style.width = '200px';
fixture.componentInstance.isVisible ... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([BasicSelectNoPlaceholder])));
it('should set the width of the overlay if there is no placeholder', fakeAsync(() => {
const fixture = TestBed.createComponent(BasicSelectNoPlaceholder);
fixture.detectChanges()... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([BasicSelectNoPlaceholder]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
const fixture = TestBed.createComponent(BasicSelectNoPlaceholder);
fixture.detectChanges();
const trigger = fixture.debugElement.query(By.css('.mc-select__trigger')).nativeElement;
trigger.click();
fixture.detectChanges();
flush();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
beforeEach(waitForAsync(() => configureMcSelectTestingModule([BasicSelectWithTheming])));
let fixture: ComponentFixture<BasicSelectWithTheming>;
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(BasicSelectWithTheming);
fixture.detectChanges();
... | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => configureMcSelectTestingModule([BasicSelectWithTheming]) | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
ArrowFunction |
() => {
fixture = TestBed.createComponent(BasicSelectWithTheming);
fixture.detectChanges();
} | anywie/mosaic | packages/mosaic/select/select.component.spec.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.