mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore(icon): add e2e tests (#794)
This commit is contained in:
committed by
Jeremy Elbourn
parent
8474119d89
commit
a18fd7ccc4
@@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user