33 lines
920 B
TypeScript
33 lines
920 B
TypeScript
import { browser, element, by } from 'protractor';
|
|
|
|
describe('InsightApp', () => {
|
|
|
|
beforeEach(() => {
|
|
browser.get('');
|
|
});
|
|
|
|
it('should have a title', () => {
|
|
expect(browser.getTitle()).toEqual('Insight');
|
|
});
|
|
|
|
it('should have {nav}', () => {
|
|
expect(element(by.css('ion-navbar')).isPresent()).toEqual(true);
|
|
});
|
|
|
|
it('has a menu button that displays the left menu', () => {
|
|
element(by.css('.bar-button-menutoggle')).click()
|
|
.then(() => {
|
|
browser.driver.sleep(2000); // wait for the animation
|
|
expect(element(by.css('ion-menu')).isPresent()).toEqual(true);
|
|
});
|
|
});
|
|
|
|
it('the left menu has a link with title Home', () => {
|
|
element(by.css('.bar-button-menutoggle')).click()
|
|
.then(() => {
|
|
browser.driver.sleep(2000); // wait for the animation
|
|
expect(element.all(by.css('ion-label')).first().getText()).toEqual('Home');
|
|
});
|
|
});
|
|
});
|