You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
'use strict';
|
|
|
|
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
|
|
|
|
describe('my app', function() {
|
|
|
|
describe('Tree display', function() {
|
|
|
|
|
|
it('should display 9 main nodes', function() {
|
|
browser.get('/');
|
|
var mainNodes = element.all(by.repeater('node in data track by node.id'));
|
|
expect(mainNodes.count()).toEqual(9);
|
|
});
|
|
|
|
it('should find a default rule', function() {
|
|
browser.get('/#/confs/1');
|
|
var vhs = element(by.id('a-virtualHosts'));
|
|
vhs.click();
|
|
var vh = element(by.id('a-virtualHosts/manager.example.com'));
|
|
vh.click();
|
|
var r = element(by.id('a-virtualHosts/manager.example.com/locationRules'));
|
|
r.click();
|
|
var def = element.all(by.id("t-virtualHosts/manager.example.com/locationRules/1"));
|
|
expect(def.count()).toEqual(1);
|
|
expect(def.get(0).getText()).toEqual('default');
|
|
});
|
|
it('should find 19 auth/user modules but only Demo visible', function() {
|
|
browser.get('/#/confs/1');
|
|
element(by.id('a-generalParameters')).click();
|
|
element(by.id('a-authParams')).click();
|
|
/* todo */
|
|
});
|
|
it('should have a hash form if a key is clicked', function() {
|
|
element(by.id('a-demoParams')).click();
|
|
element(by.id('a-demoExportedVars')).click();
|
|
element(by.id('t-demoExportedVars/cn')).click();
|
|
var def = element.all(by.id('hashkeyinput'));
|
|
expect(def.count()).toEqual(1);
|
|
});
|
|
});
|
|
}); |