Skip to content

Commit

Permalink
refactor: rename HeaderQuickorderComponent to QuickorderLinkComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
shauke committed Jul 29, 2021
1 parent b06ac13 commit 0bc6755
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { NgModule } from '@angular/core';
import { FeatureToggleModule } from 'ish-core/feature-toggle.module';

import { LazyDirectOrderComponent } from './lazy-direct-order/lazy-direct-order.component';
import { LazyHeaderQuickorderComponent } from './lazy-header-quickorder/lazy-header-quickorder.component';
import { LazyQuickorderLinkComponent } from './lazy-quickorder-link/lazy-quickorder-link.component';

@NgModule({
imports: [FeatureToggleModule],

declarations: [LazyDirectOrderComponent, LazyHeaderQuickorderComponent],
exports: [LazyDirectOrderComponent, LazyHeaderQuickorderComponent],
declarations: [LazyDirectOrderComponent, LazyQuickorderLinkComponent],
exports: [LazyDirectOrderComponent, LazyQuickorderLinkComponent],
})
export class QuickorderExportsModule {}
4 changes: 2 additions & 2 deletions src/app/extensions/quickorder/quickorder.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { NgModule } from '@angular/core';
import { SharedModule } from 'ish-shared/shared.module';

import { DirectOrderComponent } from './shared/direct-order/direct-order.component';
import { HeaderQuickorderComponent } from './shared/header-quickorder/header-quickorder.component';
import { QuickorderLinkComponent } from './shared/quickorder-link/quickorder-link.component';

@NgModule({
imports: [SharedModule],
declarations: [DirectOrderComponent, HeaderQuickorderComponent],
declarations: [DirectOrderComponent, QuickorderLinkComponent],
exports: [SharedModule],
})
export class QuickorderModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { TranslateModule } from '@ngx-translate/core';
import { MockComponent } from 'ng-mocks';

import { HeaderQuickorderComponent } from './header-quickorder.component';
import { QuickorderLinkComponent } from './quickorder-link.component';

describe('Header Quickorder Component', () => {
let component: HeaderQuickorderComponent;
let fixture: ComponentFixture<HeaderQuickorderComponent>;
describe('Quickorder Link Component', () => {
let component: QuickorderLinkComponent;
let fixture: ComponentFixture<QuickorderLinkComponent>;
let element: HTMLElement;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [HeaderQuickorderComponent, MockComponent(FaIconComponent)],
declarations: [MockComponent(FaIconComponent), QuickorderLinkComponent],
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(HeaderQuickorderComponent);
fixture = TestBed.createComponent(QuickorderLinkComponent);
component = fixture.componentInstance;
element = fixture.nativeElement;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
import { GenerateLazyComponent } from 'ish-core/utils/module-loader/generate-lazy-component.decorator';

@Component({
selector: 'ish-header-quickorder',
templateUrl: './header-quickorder.component.html',
selector: 'ish-quickorder-link',
templateUrl: './quickorder-link.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
@GenerateLazyComponent()
export class HeaderQuickorderComponent {}
export class QuickorderLinkComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports[`Header Default Component should render normal header adequately for des
></a>
</div>
</div>
<div class="col-md-5 text-right"><ish-lazy-header-quickorder></ish-lazy-header-quickorder></div>
<div class="col-md-5 text-right"><ish-lazy-quickorder-link></ish-lazy-quickorder-link></div>
<div class="col-md-4">
<div class="search-container header-search-container">
<ish-lazy-search-box data-testing-id="search-box-desktop"></ish-lazy-search-box>
Expand Down Expand Up @@ -107,7 +107,7 @@ exports[`Header Default Component should render normal header adequately for mob
></a>
</div>
</div>
<div class="col-md-5 text-right"><ish-lazy-header-quickorder></ish-lazy-header-quickorder></div>
<div class="col-md-5 text-right"><ish-lazy-quickorder-link></ish-lazy-quickorder-link></div>
<div class="col-md-4"></div>
</div>
<button class="navbar-toggler" type="button">
Expand Down Expand Up @@ -166,7 +166,7 @@ exports[`Header Default Component should render normal header adequately for tab
></a>
</div>
</div>
<div class="col-md-5 text-right"><ish-lazy-header-quickorder></ish-lazy-header-quickorder></div>
<div class="col-md-5 text-right"><ish-lazy-quickorder-link></ish-lazy-quickorder-link></div>
<div class="col-md-4">
<div class="search-container header-search-container">
<ish-lazy-search-box data-testing-id="search-box-desktop"></ish-lazy-search-box>
Expand Down Expand Up @@ -224,7 +224,7 @@ exports[`Header Default Component should render sticky header adequately for des
></a>
</div>
</div>
<div class="col-md-5 text-right"><ish-lazy-header-quickorder></ish-lazy-header-quickorder></div>
<div class="col-md-5 text-right"><ish-lazy-quickorder-link></ish-lazy-quickorder-link></div>
<div class="col-md-4"></div>
</div>
<button class="navbar-toggler" type="button">
Expand Down Expand Up @@ -278,7 +278,7 @@ exports[`Header Default Component should render sticky header adequately for mob
></a>
</div>
</div>
<div class="col-md-5 text-right"><ish-lazy-header-quickorder></ish-lazy-header-quickorder></div>
<div class="col-md-5 text-right"><ish-lazy-quickorder-link></ish-lazy-quickorder-link></div>
<div class="col-md-4"></div>
</div>
<button class="navbar-toggler" type="button">
Expand Down Expand Up @@ -332,7 +332,7 @@ exports[`Header Default Component should render sticky header adequately for tab
></a>
</div>
</div>
<div class="col-md-5 text-right"><ish-lazy-header-quickorder></ish-lazy-header-quickorder></div>
<div class="col-md-5 text-right"><ish-lazy-quickorder-link></ish-lazy-quickorder-link></div>
<div class="col-md-4"></div>
</div>
<button class="navbar-toggler" type="button">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</div>
</div>
<div class="col-md-5 text-right">
<ish-lazy-header-quickorder></ish-lazy-header-quickorder>
<ish-lazy-quickorder-link></ish-lazy-quickorder-link>
</div>
<div class="col-md-4">
<div *ngIf="!isSticky && deviceType !== 'mobile'" class="search-container header-search-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ProductCompareStatusComponent } from 'ish-shell/header/product-compare-
import { UserInformationMobileComponent } from 'ish-shell/header/user-information-mobile/user-information-mobile.component';
import { LazySearchBoxComponent } from 'ish-shell/shared/lazy-search-box/lazy-search-box.component';

import { LazyHeaderQuickorderComponent } from '../../../extensions/quickorder/exports/lazy-header-quickorder/lazy-header-quickorder.component';
import { LazyQuickorderLinkComponent } from '../../../extensions/quickorder/exports/lazy-quickorder-link/lazy-quickorder-link.component';
import { LazyWishlistsLinkComponent } from '../../../extensions/wishlists/exports/lazy-wishlists-link/lazy-wishlists-link.component';

import { HeaderDefaultComponent } from './header-default.component';
Expand All @@ -32,7 +32,7 @@ describe('Header Default Component', () => {
MockComponent(FaIconComponent),
MockComponent(HeaderNavigationComponent),
MockComponent(LanguageSwitchComponent),
MockComponent(LazyHeaderQuickorderComponent),
MockComponent(LazyQuickorderLinkComponent),
MockComponent(LazySearchBoxComponent),
MockComponent(LazyWishlistsLinkComponent),
MockComponent(LoginStatusComponent),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ish-product-compare-status view="full"></ish-product-compare-status>
</div>
<div *ishFeature="'quickorder'" class="user-info-box-item">
<ish-lazy-header-quickorder></ish-lazy-header-quickorder>
<ish-lazy-quickorder-link></ish-lazy-quickorder-link>
</div>
<div *ishFeature="'wishlists'" class="user-info-box-item">
<ish-lazy-wishlists-link view="full"></ish-lazy-wishlists-link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LanguageSwitchComponent } from 'ish-shell/header/language-switch/langua
import { LoginStatusComponent } from 'ish-shell/header/login-status/login-status.component';
import { ProductCompareStatusComponent } from 'ish-shell/header/product-compare-status/product-compare-status.component';

import { LazyHeaderQuickorderComponent } from '../../../extensions/quickorder/exports/lazy-header-quickorder/lazy-header-quickorder.component';
import { LazyQuickorderLinkComponent } from '../../../extensions/quickorder/exports/lazy-quickorder-link/lazy-quickorder-link.component';
import { LazyWishlistsLinkComponent } from '../../../extensions/wishlists/exports/lazy-wishlists-link/lazy-wishlists-link.component';

import { UserInformationMobileComponent } from './user-information-mobile.component';
Expand All @@ -22,7 +22,7 @@ describe('User Information Mobile Component', () => {
imports: [TranslateModule.forRoot()],
declarations: [
MockComponent(LanguageSwitchComponent),
MockComponent(LazyHeaderQuickorderComponent),
MockComponent(LazyQuickorderLinkComponent),
MockComponent(LazyWishlistsLinkComponent),
MockComponent(LoginStatusComponent),
MockComponent(ProductCompareStatusComponent),
Expand Down

0 comments on commit 0bc6755

Please sign in to comment.