Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
fix(tests): missing declaractions + fixed a selector
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed Feb 12, 2020
1 parent 1c91bf5 commit 2d8bd90
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 5 deletions.
4 changes: 2 additions & 2 deletions projects/ng-boosted/src/lib/o-switch/switch.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand All @@ -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();
Expand Down
50 changes: 47 additions & 3 deletions src/app/boostwatch/boostwatch.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit 2d8bd90

Please sign in to comment.