lemonldap-ng/e2e-tests/handler/02-headers.js

19 lines
984 B
JavaScript
Raw Normal View History

2016-02-28 12:51:31 +01:00
'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+$/);
2017-04-11 18:24:02 +02:00
expect(browser.driver.findElement(by.id('v-Macro-Uri')).getText()).toMatch(/\w/);
2016-02-28 12:51:31 +01:00
});
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');
2016-04-27 08:12:35 +02:00
expect(browser.driver.findElement(by.id('v-Base64')).getText()).toEqual('YTpi');
2016-02-28 12:51:31 +01:00
});
});
2017-07-11 18:15:06 +02:00
});