Skip to content
Snippets Groups Projects
Commit 4116e383 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Merge branch '132-search-multiple-add-reset-position-option' into 'develop'

Resolve "[Search Multiple] Add reset position option"

Closes #132

See merge request !144
parents 6fdf626d 847af0cd
No related branches found
No related tags found
2 merge requests!147Develop,!144Resolve "[Search Multiple] Add reset position option"
Pipeline #3159 passed
......@@ -4,6 +4,9 @@
<p class="border-bottom bg-light text-primary mb-0 py-4 pl-4">Cone Search</p>
<div class="p-4">
<app-cone-search></app-cone-search>
<div class=" pt-3 text-center">
<button class="btn btn-outline-secondary" (click)="resetConeSearch()">Reset cone search</button>
</div>
</div>
</div>
</div>
......
......@@ -10,6 +10,7 @@ import * as searchMultipleActions from '../store/search-multiple.action';
import * as fromConeSearch from '../../shared/cone-search/store/cone-search.reducer';
import * as datasetActions from '../../metamodel/action/dataset.action';
import { Dataset, Project } from '../../metamodel/model';
import * as coneSearchActions from '../../shared/cone-search/store/cone-search.action';
import { ConeSearch } from '../../shared/cone-search/store/model';
import { SearchMultipleQueryParams } from '../store/model';
import { ScrollTopService } from '../../shared/service/sroll-top.service';
......@@ -99,4 +100,12 @@ describe('[SearchMultiple] Container: PositionComponent', () => {
expect(spy).toHaveBeenCalledTimes(1);
expect(spy).toHaveBeenCalledWith(positionCheckedAction);
});
it('#resetConeSearch() should dispatch DeleteConeSearchAction', () => {
const deleteConeSearchAction = new coneSearchActions.DeleteConeSearchAction();
const spy = spyOn(store, 'dispatch');
component.resetConeSearch();
expect(spy).toHaveBeenCalledTimes(1);
expect(spy).toHaveBeenCalledWith(deleteConeSearchAction);
});
});
......@@ -11,6 +11,7 @@ import * as datasetActions from '../../metamodel/action/dataset.action';
import * as fromMetamodel from '../../metamodel/reducers';
import * as metamodelSelector from '../../metamodel/selectors';
import { Dataset, Project } from '../../metamodel/model';
import * as coneSearchActions from '../../shared/cone-search/store/cone-search.action';
import * as coneSearchSelector from '../../shared/cone-search/store/cone-search.selector';
import { ConeSearch } from '../../shared/cone-search/store/model';
import { ScrollTopService } from '../../shared/service/sroll-top.service';
......@@ -63,4 +64,8 @@ export class PositionComponent implements OnInit {
checkStep(): void {
this.store.dispatch(new searchMultipleActions.PositionCheckedAction());
}
resetConeSearch(): void {
this.store.dispatch(new coneSearchActions.DeleteConeSearchAction());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment