Skip to content

Commit 86341b7

Browse files
committed
fix: fixed test and removed unused import
1 parent 003805f commit 86341b7

File tree

6 files changed

+34
-15
lines changed

6 files changed

+34
-15
lines changed

packages/studio-web/src/app/shared/shared.module.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,9 @@ import {
88
WcStylingComponent,
99
WCStylingHelper,
1010
} from "./wc-styling/wc-styling.component";
11-
import { MatListModule } from "@angular/material/list";
1211
@NgModule({
13-
declarations: [DownloadComponent, WcStylingComponent, WCStylingHelper],
14-
imports: [
15-
BrowserModule,
16-
MaterialModule,
17-
FormsModule,
18-
CommonModule,
19-
MatListModule,
20-
],
21-
exports: [DownloadComponent, WcStylingComponent, WCStylingHelper],
12+
declarations: [DownloadComponent, WcStylingComponent], //WCStylingHelper],
13+
imports: [BrowserModule, MaterialModule, FormsModule, CommonModule],
14+
exports: [DownloadComponent, WcStylingComponent], // WCStylingHelper],
2215
})
2316
export class SharedModule {}

packages/studio-web/src/app/shared/wc-styling/wc-styling.component.spec.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
import { ComponentFixture, TestBed } from "@angular/core/testing";
22

33
import { WcStylingComponent } from "./wc-styling.component";
4-
4+
import { ToastrModule } from "ngx-toastr";
5+
import { HttpClientTestingModule } from "@angular/common/http/testing";
6+
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
7+
import { MaterialModule } from "../../material.module";
8+
import { FormsModule } from "@angular/forms";
59
describe("WcStylingComponent", () => {
610
let component: WcStylingComponent;
711
let fixture: ComponentFixture<WcStylingComponent>;
812

913
beforeEach(async () => {
1014
await TestBed.configureTestingModule({
11-
imports: [WcStylingComponent],
15+
imports: [
16+
HttpClientTestingModule,
17+
BrowserAnimationsModule,
18+
FormsModule,
19+
MaterialModule,
20+
ToastrModule.forRoot(),
21+
],
22+
declarations: [WcStylingComponent],
1223
}).compileComponents();
1324

1425
fixture = TestBed.createComponent(WcStylingComponent);

packages/studio-web/src/app/shared/wc-styling/wc-styling.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { ToastrService } from "ngx-toastr";
99
import { BehaviorSubject, Subject, takeUntil } from "rxjs";
1010
import { WcStylingService } from "./wc-styling.service";
1111
import { MatDialog, MatDialogRef } from "@angular/material/dialog";
12-
import { MatList } from "@angular/material/list";
1312
import { B64Service } from "../../b64.service";
1413

1514
@Component({

packages/studio-web/src/app/shared/wc-styling/wc-styling.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Injectable } from "@angular/core";
2-
import { Subject, BehaviorSubject } from "rxjs";
2+
import { BehaviorSubject } from "rxjs";
33
@Injectable({
44
providedIn: "root",
55
})

packages/studio-web/src/app/studio/studio.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class StudioComponent implements OnDestroy, OnInit {
129129

130130
async ngOnDestroy() {
131131
// step us back to the previously left step
132-
this.studioService.lastStepperIndex = this.stepper.selectedIndex;
132+
this.studioService.lastStepperIndex = this.stepper?.selectedIndex;
133133
this.unsubscribe$.next();
134134
this.unsubscribe$.complete();
135135
}

packages/web-component/src/components/read-along-component/readme.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@ Type: `Promise<object>`
8787

8888

8989

90+
### `setCss(url: any) => Promise<void>`
91+
92+
Update stylesheet
93+
94+
#### Parameters
95+
96+
| Name | Type | Description |
97+
| ----- | ----- | ----------- |
98+
| `url` | `any` | |
99+
100+
#### Returns
101+
102+
Type: `Promise<void>`
103+
104+
105+
90106
### `updateSpriteAlignments(alignment: Alignment) => Promise<void>`
91107

92108
Update Single Sprite

0 commit comments

Comments
 (0)