chore(example): adds zippy example
This commit is contained in:

committed by
Victor Berchet

parent
dee0e008f5
commit
783654e6a3
31
modules/examples/e2e_test/zippy_component/zippy_spec.ts
Normal file
31
modules/examples/e2e_test/zippy_component/zippy_spec.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import {verifyNoBrowserErrors} from 'angular2/src/test_lib/e2e_util';
|
||||
|
||||
describe('Zippy Component', function() {
|
||||
|
||||
afterEach(verifyNoBrowserErrors);
|
||||
|
||||
describe('dynamic reflection', function() {
|
||||
var URL = 'examples/src/zippy_component/index.html';
|
||||
|
||||
beforeEach(function() { browser.get(URL); });
|
||||
|
||||
it('should change the zippy title depending on it\'s state', function() {
|
||||
var zippyTitle = element(by.css('.zippy__title'));
|
||||
|
||||
expect(zippyTitle.getText()).toEqual('▾ Details');
|
||||
zippyTitle.click();
|
||||
expect(zippyTitle.getText()).toEqual('▸ Details');
|
||||
});
|
||||
|
||||
it('should have zippy content', function() {
|
||||
expect(element(by.css('.zippy__content')).getText()).toEqual('This is some content.');
|
||||
});
|
||||
|
||||
it('should toggle when the zippy title is clicked', function() {
|
||||
element(by.css('.zippy__title')).click();
|
||||
expect(element(by.css('.zippy__content')).isDisplayed()).toEqual(false);
|
||||
element(by.css('.zippy__title')).click();
|
||||
expect(element(by.css('.zippy__content')).isDisplayed()).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user