2018-09-10 16:30:24 -04:00
|
|
|
import { browser, element, by } from 'protractor';
|
|
|
|
|
2020-07-30 13:03:13 +03:00
|
|
|
describe('Attribute binding example', () => {
|
2018-09-10 16:30:24 -04:00
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
beforeEach(() => browser.get(''));
|
2018-09-10 16:30:24 -04:00
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
it('should display Property Binding with Angular', async () => {
|
|
|
|
expect(await element(by.css('h1')).getText()).toEqual('Attribute, class, and style bindings');
|
2018-09-10 16:30:24 -04:00
|
|
|
});
|
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
it('should display a table', async () => {
|
|
|
|
expect(await element.all(by.css('table')).isPresent()).toBe(true);
|
2018-09-10 16:30:24 -04:00
|
|
|
});
|
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
it('should display an Aria button', async () => {
|
|
|
|
expect(await element.all(by.css('button')).get(0).getText()).toBe('Go for it with Aria');
|
2018-09-10 16:30:24 -04:00
|
|
|
});
|
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
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)');
|
2018-09-10 16:30:24 -04:00
|
|
|
});
|
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
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)');
|
2018-09-10 16:30:24 -04:00
|
|
|
});
|
|
|
|
|
2020-11-23 20:17:10 +02:00
|
|
|
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');
|
2018-09-10 16:30:24 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|