-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add card example to mdc-migration integration test
- Loading branch information
Showing
14 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
integration/mdc-migration/golden/src/app/components/card/card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h2>Card example</h2> | ||
<mat-card appearance="outlined">Pomeranian</mat-card><mat-card appearance="outlined">Maltese</mat-card> | ||
<mat-card appearance="outlined">Chihuahua</mat-card> | ||
<mat-card appearance="outlined"> | ||
Welsh Corgi | ||
<mat-card | ||
appearance="outlined" | ||
class="example-card"> | ||
Cardigan Welsh Corgi | ||
</mat-card> | ||
<mat-card | ||
appearance="outlined" | ||
class="example-card"> | ||
Pembroke Welsh Corgi | ||
</mat-card> | ||
</mat-card> |
12 changes: 12 additions & 0 deletions
12
integration/mdc-migration/golden/src/app/components/card/card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.example-card { color: gray; } | ||
|
||
|
||
.mat-mdc-card .example-card { | ||
padding-left: 24px; | ||
} | ||
|
||
/* TODO: The following rule targets internal classes of card that may no longer apply for the MDC version. */ | ||
|
||
.mat-card-flat { | ||
margin: 4px; | ||
} |
26 changes: 26 additions & 0 deletions
26
integration/mdc-migration/golden/src/app/components/card/card.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {ComponentFixture, TestBed} from '@angular/core/testing'; | ||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; | ||
import {MatCardModule} from '@angular/material/card'; | ||
import {CardComponent} from './card.component'; | ||
|
||
describe('CardComponent', () => { | ||
let component: CardComponent; | ||
let fixture: ComponentFixture<CardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [BrowserAnimationsModule, MatCardModule], | ||
declarations: [CardComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(CardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
integration/mdc-migration/golden/src/app/components/card/card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'card-example', | ||
templateUrl: './card.component.html', | ||
styleUrls: ['./card.component.scss'], | ||
}) | ||
export class CardComponent implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
integration/mdc-migration/sample-project/src/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
integration/mdc-migration/sample-project/src/app/components/card/card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<h2>Card example</h2> | ||
<mat-card>Pomeranian</mat-card><mat-card>Maltese</mat-card> | ||
<mat-card>Chihuahua</mat-card> | ||
<mat-card> | ||
Welsh Corgi | ||
<mat-card | ||
class="example-card"> | ||
Cardigan Welsh Corgi | ||
</mat-card> | ||
<mat-card | ||
class="example-card"> | ||
Pembroke Welsh Corgi | ||
</mat-card> | ||
</mat-card> |
10 changes: 10 additions & 0 deletions
10
integration/mdc-migration/sample-project/src/app/components/card/card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.example-card { color: gray; } | ||
|
||
|
||
.mat-card .example-card { | ||
padding-left: 24px; | ||
} | ||
|
||
.mat-card-flat { | ||
margin: 4px; | ||
} |
26 changes: 26 additions & 0 deletions
26
integration/mdc-migration/sample-project/src/app/components/card/card.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {ComponentFixture, TestBed} from '@angular/core/testing'; | ||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; | ||
import {MatCardModule} from '@angular/material/card'; | ||
import {CardComponent} from './card.component'; | ||
|
||
describe('CardComponent', () => { | ||
let component: CardComponent; | ||
let fixture: ComponentFixture<CardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [BrowserAnimationsModule, MatCardModule], | ||
declarations: [CardComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(CardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
integration/mdc-migration/sample-project/src/app/components/card/card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'card-example', | ||
templateUrl: './card.component.html', | ||
styleUrls: ['./card.component.scss'], | ||
}) | ||
export class CardComponent implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit(): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters