Skip to content

Commit

Permalink
fixup! remove autocomplete animation, highlight the first option and …
Browse files Browse the repository at this point in the history
…fix other minor issues
  • Loading branch information
IlinaGergova committed Jun 12, 2024
1 parent 6b8fff5 commit 68aea9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Observable, of } from 'rxjs';
import { NgxsModule } from '@ngxs/store';
import { FormsModule } from '@angular/forms';
import { PhenoMeasure } from 'app/pheno-browser/pheno-browser';
import { MatAutocompleteOrigin, MatAutocomplete } from '@angular/material/autocomplete';
import { MatAutocompleteOrigin, MatAutocomplete, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MatAutocompleteTrigger } from '@angular/material/autocomplete';

const SelectionMock = {
isEmpty: (): boolean => true,
Expand Down Expand Up @@ -59,7 +59,8 @@ describe('MultiContinuousFilterComponent', () => {
MultiContinuousFilterComponent,
PhenoMeasureSelectorComponent,
MatAutocompleteOrigin,
MatAutocomplete
MatAutocomplete,
MatAutocompleteTrigger
],
providers: [
MultiContinuousFilterComponent,
Expand All @@ -68,6 +69,7 @@ describe('MultiContinuousFilterComponent', () => {
ConfigService,
{provide: DatasetsService, useValue: mockDatasetsService},
UsersService,
{provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY, useValue: ''}
],
imports: [
RouterTestingModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { MeasuresService } from 'app/measures/measures.service';
import { UsersService } from 'app/users/users.service';

import { PhenoMeasureSelectorComponent } from './pheno-measure-selector.component';
import { MatAutocomplete, MatAutocompleteOrigin } from '@angular/material/autocomplete';
import {
MAT_AUTOCOMPLETE_SCROLL_STRATEGY,
MatAutocomplete,
MatAutocompleteOrigin,
MatAutocompleteTrigger } from '@angular/material/autocomplete';

class MockDatasetsService {
public getSelectedDataset(): object {
Expand All @@ -24,12 +28,13 @@ describe('PhenoMeasureSelectorComponent', () => {

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PhenoMeasureSelectorComponent, MatAutocompleteOrigin, MatAutocomplete],
declarations: [PhenoMeasureSelectorComponent, MatAutocompleteOrigin, MatAutocomplete, MatAutocompleteTrigger],
providers: [
MeasuresService,
ConfigService,
{provide: DatasetsService, useValue: mockDatasetsService},
UsersService,
{provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY, useValue: ''}
],
imports: [HttpClientTestingModule, RouterTestingModule, NgxsModule.forRoot([], {developmentMode: true})],
schemas: [NO_ERRORS_SCHEMA]
Expand Down

0 comments on commit 68aea9c

Please sign in to comment.