Skip to content

Commit

Permalink
Mashup code cleanup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mashm committed Dec 16, 2024
1 parent fd126d5 commit 6fe0c00
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 85 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { MCNavComponent } from './mc-nav.component';
import { HeaderComponent } from './header.component';

describe('MCNavComponent', () => {
let component: MCNavComponent;
let fixture: ComponentFixture<MCNavComponent>;
describe('HeaderComponent', () => {
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MCNavComponent]
declarations: [HeaderComponent]
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(MCNavComponent);
fixture = TestBed.createComponent(HeaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ declare global {
}

@Component({
selector: 'app-mc-nav',
templateUrl: './mc-nav.component.html',
styleUrls: ['./mc-nav.component.scss'],
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
providers: [Utils],
standalone: true,
imports: [CommonModule, MatProgressSpinnerModule, MatToolbarModule, MatIconModule, MatButtonModule, MainScreenComponent]
})
export class MCNavComponent implements OnInit, OnDestroy {
export class HeaderComponent implements OnInit, OnDestroy {
starterPackVersion$: string = endpoints.SP_VERSION;
pConn$: typeof PConnect;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<div class="mc-banner">Combine TV, Internet, and Voice for the best deal</div>

<div style="display: flex; justify-content: space-evenly">
<app-bundle-swatch [swatchConfig$]="firstConfig$" (ShopNowButtonClick)="onShopNow($event)"></app-bundle-swatch>
<app-bundle-swatch [swatchConfig$]="secondConfig$" (ShopNowButtonClick)="onShopNow($event)"></app-bundle-swatch>
<app-bundle-swatch [swatchConfig$]="thirdConfig$" (ShopNowButtonClick)="onShopNow($event)"></app-bundle-swatch>
<app-shopping-card [swatchConfig$]="firstConfig$" (ShopNowButtonClick)="onShopNow($event)"></app-shopping-card>
<app-shopping-card [swatchConfig$]="secondConfig$" (ShopNowButtonClick)="onShopNow($event)"></app-shopping-card>
<app-shopping-card [swatchConfig$]="thirdConfig$" (ShopNowButtonClick)="onShopNow($event)"></app-shopping-card>
</div>
</div>
<div [hidden]="!showPega$">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit, Input, OnDestroy } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ResolutionScreenComponent } from '../resolution-screen/resolution-screen.component';
import { BundleSwatchComponent } from '../bundle-swatch/bundle-swatch.component';
import { ShoppingCardComponent } from '../shopping-card/shopping-card.component';
import { ProgressSpinnerService } from '../../../../../../../packages/angular-sdk-components/src/lib/_messages/progress-spinner.service';
import { ServerConfigService } from '../../../../../../../packages/angular-sdk-components/src/lib/_services/server-config.service';
import { ComponentMapperComponent } from '../../../../../../../packages/angular-sdk-components/src/lib/_bridge/component-mapper/component-mapper.component';
Expand All @@ -11,7 +11,7 @@ import { ComponentMapperComponent } from '../../../../../../../packages/angular-
templateUrl: './main-screen.component.html',
styleUrls: ['./main-screen.component.scss'],
standalone: true,
imports: [CommonModule, BundleSwatchComponent, ComponentMapperComponent, ResolutionScreenComponent]
imports: [CommonModule, ShoppingCardComponent, ComponentMapperComponent, ResolutionScreenComponent]
})
export class MainScreenComponent implements OnInit, OnDestroy {
@Input() pConn$: typeof PConnect;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { BundleSwatchComponent } from './bundle-swatch.component';
import { ShoppingCardComponent } from './shopping-card.component';

describe('BundleSwatchComponent', () => {
let component: BundleSwatchComponent;
let fixture: ComponentFixture<BundleSwatchComponent>;
describe('ShoppingCardComponent', () => {
let component: ShoppingCardComponent;
let fixture: ComponentFixture<ShoppingCardComponent>;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [BundleSwatchComponent]
declarations: [ShoppingCardComponent]
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(BundleSwatchComponent);
fixture = TestBed.createComponent(ShoppingCardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
selector: 'app-bundle-swatch',
templateUrl: './bundle-swatch.component.html',
styleUrls: ['./bundle-swatch.component.scss'],
selector: 'app-shopping-card',
templateUrl: './shopping-card.component.html',
styleUrls: ['./shopping-card.component.scss'],
standalone: true
})
export class BundleSwatchComponent implements OnInit {
export class ShoppingCardComponent implements OnInit {
@Input() swatchConfig$: any;
@Output() ShopNowButtonClick: EventEmitter<any> = new EventEmitter();

Expand Down
12 changes: 6 additions & 6 deletions projects/angular-test-app/src/app/routes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Routes } from '@angular/router';
import { TopAppMashupComponent } from './_samples/full-portal/top-app-mashup/top-app-mashup.component';
import { NavigationComponent } from './_samples/simple-portal/navigation/navigation.component';
import { MCNavComponent } from './_samples/embedded/mc-nav/mc-nav.component';
import { HeaderComponent } from './_samples/embedded/header/header.component';
import { endpoints } from '../../../../packages/angular-sdk-components/src/lib/_services/endpoints';

// Adding path to remove "Cannot match routes" error at launch
Expand All @@ -17,15 +17,15 @@ import { endpoints } from '../../../../packages/angular-sdk-components/src/lib/_
// similiar to Nebula/Constellaion)

export const routes: Routes = [
{ path: '', component: MCNavComponent },
{ path: '', component: HeaderComponent },
{ path: endpoints.PORTAL, component: TopAppMashupComponent },
{ path: endpoints.PORTALHTML, component: TopAppMashupComponent },
{ path: endpoints.FULLPORTAL, component: TopAppMashupComponent },
{ path: endpoints.FULLPORTALHTML, component: TopAppMashupComponent },
{ path: endpoints.SIMPLEPORTAL, component: NavigationComponent },
{ path: endpoints.SIMPLEPORTALHTML, component: NavigationComponent },
{ path: endpoints.EMBEDDED, component: MCNavComponent },
{ path: endpoints.EMBEDDEDHTML, component: MCNavComponent },
{ path: endpoints.MASHUP, component: MCNavComponent },
{ path: endpoints.MASHUPHTML, component: MCNavComponent }
{ path: endpoints.EMBEDDED, component: HeaderComponent },
{ path: endpoints.EMBEDDEDHTML, component: HeaderComponent },
{ path: endpoints.MASHUP, component: HeaderComponent },
{ path: endpoints.MASHUPHTML, component: HeaderComponent }
];

0 comments on commit 6fe0c00

Please sign in to comment.