Skip to content

Commit d8b5e39

Browse files
amysortommalerba
authored andcommitted
build: add progress-spinner example to mdc-migration integration test
1 parent ba77c4b commit d8b5e39

14 files changed

+114
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<chips-example></chips-example>
22
<menu-example></menu-example>
33
<paginator-example></paginator-example>
4+
<progress-spinner-example></progress-spinner-example>

integration/mdc-migration/golden/src/app/app.module.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ import {MatFormFieldModule} from '@angular/material-experimental/mdc-form-field'
88
import {MatIconModule} from '@angular/material/icon';
99
import {MatMenuModule} from '@angular/material-experimental/mdc-menu';
1010
import {MatPaginatorModule} from '@angular/material-experimental/mdc-paginator';
11+
import {MatProgressSpinnerModule} from '@angular/material-experimental/mdc-progress-spinner';
1112
import {ChipsComponent} from './components/chips/chips.component';
1213
import {MenuComponent} from './components/menu/menu.component';
1314
import {PaginatorComponent} from './components/paginator/paginator.component';
15+
import {ProgressSpinnerComponent} from './components/progress-spinner/progress-spinner.component';
1416

1517
@NgModule({
16-
declarations: [AppComponent, ChipsComponent, MenuComponent, PaginatorComponent],
18+
declarations: [
19+
AppComponent,
20+
ChipsComponent,
21+
MenuComponent,
22+
PaginatorComponent,
23+
ProgressSpinnerComponent,
24+
],
1725
imports: [
1826
BrowserModule,
1927
BrowserAnimationsModule,
@@ -22,6 +30,7 @@ import {PaginatorComponent} from './components/paginator/paginator.component';
2230
MatIconModule,
2331
MatMenuModule,
2432
MatPaginatorModule,
33+
MatProgressSpinnerModule,
2534
],
2635
providers: [],
2736
bootstrap: [AppComponent],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h2>Progress spinner example</h2>
2+
<mat-spinner></mat-spinner>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.mat-mdc-progress-spinner {
2+
margin: 4px;
3+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import {ComponentFixture, TestBed} from '@angular/core/testing';
2+
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
3+
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
4+
import {ProgressSpinnerComponent} from './progress-spinner.component';
5+
6+
describe('ProgressSpinnerComponent', () => {
7+
let component: ProgressSpinnerComponent;
8+
let fixture: ComponentFixture<ProgressSpinnerComponent>;
9+
10+
beforeEach(async () => {
11+
await TestBed.configureTestingModule({
12+
imports: [BrowserAnimationsModule, MatProgressSpinnerModule],
13+
declarations: [ProgressSpinnerComponent],
14+
}).compileComponents();
15+
});
16+
17+
beforeEach(() => {
18+
fixture = TestBed.createComponent(ProgressSpinnerComponent);
19+
component = fixture.componentInstance;
20+
fixture.detectChanges();
21+
});
22+
23+
it('should create', () => {
24+
expect(component).toBeTruthy();
25+
});
26+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {Component, OnInit} from '@angular/core';
2+
3+
@Component({
4+
selector: 'progress-spinner-example',
5+
templateUrl: './progress-spinner.component.html',
6+
styleUrls: ['./progress-spinner.component.scss'],
7+
})
8+
export class ProgressSpinnerComponent implements OnInit {
9+
constructor() {}
10+
11+
ngOnInit(): void {}
12+
}

integration/mdc-migration/golden/src/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ $sample-project-theme: mat.define-light-theme((
3232
@include mat.mdc-chips-typography($sample-project-theme);
3333
@include mat.mdc-menu-theme($sample-project-theme);
3434
@include mat.mdc-menu-typography($sample-project-theme);
35+
@include mat.mdc-paginator-theme($sample-project-theme);
36+
@include mat.mdc-paginator-typography($sample-project-theme);
37+
@include mat.mdc-progress-spinner-theme($sample-project-theme);
38+
@include mat.mdc-progress-spinner-typography($sample-project-theme);
3539

3640
/* You can add global styles to this file, and also import other style files */
3741

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<chips-example></chips-example>
22
<menu-example></menu-example>
33
<paginator-example></paginator-example>
4+
<progress-spinner-example></progress-spinner-example>

integration/mdc-migration/sample-project/src/app/app.module.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ import {MatFormFieldModule} from '@angular/material/form-field';
88
import {MatIconModule} from '@angular/material/icon';
99
import {MatMenuModule} from '@angular/material/menu';
1010
import {MatPaginatorModule} from '@angular/material/paginator';
11+
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
1112
import {ChipsComponent} from './components/chips/chips.component';
1213
import {MenuComponent} from './components/menu/menu.component';
1314
import {PaginatorComponent} from './components/paginator/paginator.component';
15+
import {ProgressSpinnerComponent} from './components/progress-spinner/progress-spinner.component';
1416

1517
@NgModule({
16-
declarations: [AppComponent, ChipsComponent, MenuComponent, PaginatorComponent],
18+
declarations: [
19+
AppComponent,
20+
ChipsComponent,
21+
MenuComponent,
22+
PaginatorComponent,
23+
ProgressSpinnerComponent,
24+
],
1725
imports: [
1826
BrowserModule,
1927
BrowserAnimationsModule,
@@ -22,6 +30,7 @@ import {PaginatorComponent} from './components/paginator/paginator.component';
2230
MatIconModule,
2331
MatMenuModule,
2432
MatPaginatorModule,
33+
MatProgressSpinnerModule,
2534
],
2635
providers: [],
2736
bootstrap: [AppComponent],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h2>Progress spinner example</h2>
2+
<mat-spinner></mat-spinner>

0 commit comments

Comments
 (0)