Commit 03655e65 authored by Xavier Guimard's avatar Xavier Guimard

Add e2e-tests for handler

parent f35de3ff
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Lemonldap::NG', function() {
describe('Redirection mechanism', function() {
it('should redirect to portal', function() {
browser.ignoreSynchronization = true;
browser.driver.get('http://test1.example.com:' + process.env.TESTWEBSERVERPORT + '/');
expect(browser.getCurrentUrl()).toEqual('http://auth.example.com:' + process.env.TESTWEBSERVERPORT + '/?url=aHR0cDovL3Rlc3QxLmV4YW1wbGUuY29tOjE5ODc2Lw==');
});
it('should accept authentication as dwho/dwho', function() {
browser.driver.findElement(by.xpath("//input[@name='user']")).sendKeys('dwho');
browser.driver.findElement(by.xpath("//input[@name='password']")).sendKeys('dwho');
browser.driver.findElement(by.xpath("//button[@type='submit']")).click();
});
it('should redirect to test1.example.com', function() {
expect(browser.getCurrentUrl()).toContain('http://test1.example.com:' + process.env.TESTWEBSERVERPORT + '/');
});
});
});
\ No newline at end of file
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Lemonldap::NG auth mechanism', function() {
it('should allow logout', function() {
browser.driver.get('http://auth.example.com:' + process.env.TESTWEBSERVERPORT + '/?logout=1');
});
});
\ No newline at end of file
......@@ -163,4 +163,4 @@
"timeout": 72000,
"userDB": "Demo",
"whatToTrace": "_whatToTrace"
}
}
\ No newline at end of file
......@@ -84,4 +84,4 @@ var filterFunctions = {
});
});
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment