-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8474119
commit a18fd7c
Showing
5 changed files
with
44 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
describe('icon', () => { | ||
describe('font icons by ligature', () => { | ||
let testIcon: any; | ||
|
||
beforeEach(() => { | ||
browser.get('/icon'); | ||
testIcon = element(by.id('test-icon')); | ||
}); | ||
|
||
it('should have the correct aria-label when used', () => { | ||
testIcon.getAttribute('aria-label').then((attr: string) => { | ||
expect(attr).toEqual('favorite'); | ||
}); | ||
}); | ||
|
||
it('should have the correct class when used', () => { | ||
testIcon.getAttribute('class').then((attr: string) => { | ||
expect(attr).toEqual('md-24 material-icons'); | ||
}); | ||
}); | ||
|
||
it('should have the correct role when used', () => { | ||
testIcon.getAttribute('role').then((attr: string) => { | ||
expect(attr).toEqual('img'); | ||
}); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<a md-list-item [routerLink]="['button']">Button</a> | ||
<a md-list-item [routerLink]="['tabs']">Tabs</a> | ||
<a md-list-item [routerLink]="['icon']">Icon</a> | ||
|
||
<router-outlet></router-outlet> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<section> | ||
<md-icon class="md-24" id="test-icon">favorite</md-icon> | ||
</section> |
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 @@ | ||
import {Component} from '@angular/core'; | ||
import {MD_ICON_DIRECTIVES} from '@angular2-material/icon/icon'; | ||
|
||
@Component({ | ||
moduleId: module.id, | ||
selector: 'icon-e2e', | ||
templateUrl: 'icon-e2e.html', | ||
directives: [MD_ICON_DIRECTIVES] | ||
}) | ||
export class IconE2E {} |