Skip to content

Commit

Permalink
ISREST-928: hide compare link in mobile view for disabled compare fea…
Browse files Browse the repository at this point in the history
…ture
  • Loading branch information
suschneider committed Nov 21, 2019
1 parent 0eddb6b commit 7a2ced5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="row col col-12">{{ 'header.welcome.text' | translate }}</div>
<div class="row col col-12"><ish-login-status-container view="full"></ish-login-status-container></div>
<div class="row col col-12">
<ish-product-compare-status-container view="full"></ish-product-compare-status-container>
<ish-product-compare-status-container *ishFeature="'compare'" view="full"></ish-product-compare-status-container>
</div>
<div class="row col col-12"><ish-language-switch-container view="accordion"></ish-language-switch-container></div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { MockComponent } from 'ng-mocks';

import { FeatureToggleModule } from 'ish-core/feature-toggle.module';
import { configurationReducer } from 'ish-core/store/configuration/configuration.reducer';
import { ngrxTesting } from 'ish-core/utils/dev/ngrx-testing';
import { LanguageSwitchContainerComponent } from 'ish-shell/header/containers/language-switch/language-switch.container';
import { LoginStatusContainerComponent } from 'ish-shell/header/containers/login-status/login-status.container';
import { MiniBasketContainerComponent } from 'ish-shell/header/containers/mini-basket/mini-basket.container';
Expand All @@ -16,7 +19,16 @@ describe('User Information Mobile Component', () => {

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
imports: [
FeatureToggleModule,
TranslateModule.forRoot(),
ngrxTesting({
reducers: { configuration: configurationReducer },
config: {
initialState: { configuration: { features: ['compare'] } },
},
}),
],
declarations: [
MockComponent(LanguageSwitchContainerComponent),
MockComponent(LoginStatusContainerComponent),
Expand Down

0 comments on commit 7a2ced5

Please sign in to comment.