lemonldap-ng/e2e-tests/handler/02-headers.js
2016-02-28 11:51:31 +00:00

18 lines
810 B
JavaScript

'use strict';
describe('Lemonldap::NG handler', function() {
describe('Header insertion mechanism', function() {
it('should display headers', function() {
browser.driver.get('http://test1.example.com:' + process.env.TESTWEBSERVERPORT + '/');
expect(browser.driver.findElement(by.id('v-Auth-User')).getText()).toEqual('dwho');
expect(browser.driver.findElement(by.id('v-Ip-Addr')).getText()).toMatch(/^\d+\.\d+\.\d+\.\d+$/);
});
it('should display custom functions results', function() {
expect(browser.driver.findElement(by.id('v-Hello')).getText()).toEqual('Hello');
expect(browser.driver.findElement(by.id('v-Uri')).getText()).toEqual('/');
expect(browser.driver.findElement(by.id('v-Additional-Arg')).getText()).toEqual('header-added');
});
});
});