From 2d8bd908576fa7bd407d685dbe43edbb7634efb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Poupard?= Date: Wed, 12 Feb 2020 17:39:43 +0100 Subject: [PATCH] fix(tests): missing declaractions + fixed a selector --- .../src/lib/o-switch/switch.component.spec.ts | 4 +- .../boostwatch/boostwatch.component.spec.ts | 50 +++++++++++++++++-- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/projects/ng-boosted/src/lib/o-switch/switch.component.spec.ts b/projects/ng-boosted/src/lib/o-switch/switch.component.spec.ts index c814713c..b9522159 100644 --- a/projects/ng-boosted/src/lib/o-switch/switch.component.spec.ts +++ b/projects/ng-boosted/src/lib/o-switch/switch.component.spec.ts @@ -20,7 +20,7 @@ describe('OSwitchComponent', () => { beforeEach(() => { fixture = TestBed.createComponent(OSwitchComponent); component = fixture.componentInstance; - input = fixture.debugElement.query(By.css('.checkbox')); + input = fixture.debugElement.query(By.css('.custom-control-input')); fixture.detectChanges(); }); @@ -41,7 +41,7 @@ describe('OSwitchComponent', () => { it('Simulate a click on the input with subscription to the output', () => { component.toggled = true; - component.inputId = 'Input#1'; + component.inputId = 'Input#2'; input.triggerEventHandler('click', null); fixture.detectChanges(); diff --git a/src/app/boostwatch/boostwatch.component.spec.ts b/src/app/boostwatch/boostwatch.component.spec.ts index d64cb497..82104e77 100644 --- a/src/app/boostwatch/boostwatch.component.spec.ts +++ b/src/app/boostwatch/boostwatch.component.spec.ts @@ -31,6 +31,28 @@ import { } from 'ng-boosted'; import {RouterTestingModule} from "@angular/router/testing"; import {AppRoutingModule} from "../app-routing.module"; +import {StartComponent} from "../start/start.component"; +import {DocCollapse} from "../docs/collapse.component"; +import {DocOCalendar} from "../docs/o-calendar.component"; +import {AppComponent} from "../app.component"; +import {DocsMenuComponent} from "../docs-menu/docs-menu.component"; +import {DocAccordion} from "../docs/accordion.component"; +import {DocModal} from "../docs/modal.component"; +import {DocDropdown} from "../docs/dropdown.component"; +import {DocTabs} from "../docs/tabs.component"; +import {DocPagination} from "../docs/pagination.component"; +import {DocAlert} from "../docs/alert.component"; +import {DocTooltip} from "../docs/tooltip.component"; +import {DocToast} from "../docs/toast.component"; +import {DocPopover} from "../docs/popover.component"; +import {DocCarousel} from "../docs/carousel.component"; +import {DocSwiper} from "../docs/swiper.component"; +import {DocProgressBar} from "../docs/progress-bar.component"; +import {DocONavbar} from "../docs/o-navbar.component"; +import {DocOScrollTop} from "../docs/o-scroll-top.component"; +import {DocOSwitch} from "../docs/o-switch.component"; +import {DocOToggle} from "../docs/o-toggle.component"; +import {CodeBox} from "../docs/code-box.component"; describe('BoostwatchComponent', () => { let component: BoostwatchComponent; @@ -54,25 +76,47 @@ describe('BoostwatchComponent', () => { OToastModule ], declarations: [ + AppComponent, + StartComponent, + DocsMenuComponent, BoostwatchComponent, - HomeComponent, DemoAccordion, DemoModal, DemoTabs, DemoPagination, DemoTooltip, + DemoToast, DemoPopover, DemoAlert, DemoCarousel, DemoOCalendar, + DemoSwiper, DemoCollapse, DemoProgressBar, DemoDropdown, DemoOSwitch, DemoOToggle, - DemoSwiper, DemoONavbar, - DemoToast + DocAccordion, + DocOCalendar, + DocModal, + DocDropdown, + DocTabs, + DocPagination, + DocAlert, + DocTooltip, + DocToast, + DocPopover, + DocCarousel, + DocSwiper, + DocCollapse, + DocProgressBar, + DocONavbar, + DocOScrollTop, + DocOSwitch, + DocOToggle, + CodeBox, + HomeComponent ] }) .compileComponents();