forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.e2e-spec.ts
35 lines (26 loc) · 1.23 KB
/
app.e2e-spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { browser, element, by } from 'protractor';
describe('Attribute binding example', () => {
beforeEach(() => browser.get(''));
it('should display Property Binding with Angular', async () => {
expect(await element(by.css('h1')).getText()).toEqual('Attribute, class, and style bindings');
});
it('should display a table', async () => {
expect(await element.all(by.css('table')).isPresent()).toBe(true);
});
it('should display an Aria button', async () => {
expect(await element.all(by.css('button')).get(0).getText()).toBe('Go for it with Aria');
});
it('should display a blue background on div', async () => {
const div = element.all(by.css('div')).get(1);
expect(await div.getCssValue('background-color')).toEqual('rgba(25, 118, 210, 1)');
});
it('should display a blue div with a red border', async () => {
const div = element.all(by.css('div')).get(1);
expect(await div.getCssValue('border')).toEqual('2px solid rgb(212, 30, 46)');
});
it('should display a div with many classes', async () => {
const div = element.all(by.css('div')).get(1);
expect(await div.getAttribute('class')).toContain('special');
expect(await div.getAttribute('class')).toContain('clearance');
});
});