Commit d2d84b1c authored by Yadd's avatar Yadd
Browse files

UTF-8 test

parent 49686ebb
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Lemonldap::NG Manager', function() {
describe('Apply mechanism', function() {
it('should be able to send UTF-8 chars', function() {
browser.get('/#/confs/latest');
element(by.id('a-generalParameters')).click();
element(by.id('a-advancedParams')).click();
element(by.id('a-security')).click();
element(by.id('t-key')).click();
element(by.id('pwdinput')).clear().sendKeys('éà©®');
});
it('should save new configuration', function() {
element(by.id('save')).click();
element(by.id('longtextinput')).sendKeys('UTF-8 tests');
element(by.id('saveok')).click();
element(by.id('messageok')).click();
expect(element(by.id('cfgnum')).getText()).toEqual('2');
});
it('should restitute UTF chars', function() {
element(by.id('a-generalParameters')).click();
element(by.id('a-advancedParams')).click();
element(by.id('a-security')).click();
element(by.id('t-key')).click();
element(by.id('showp')).click();
expect(element(by.id('pwdinput')).getAttribute('value')).toEqual('éà©®');
});
});
});
......@@ -26,7 +26,7 @@ describe('Lemonldap::NG Manager', function() {
element(by.id('saveok')).click();
expect(element.all(by.repeater('item in item.items')).count()).toEqual(2);
element(by.id('messageok')).click();
expect(element(by.id('cfgnum')).getText()).toEqual('2');
expect(element(by.id('cfgnum')).getText()).toEqual('3');
});
});
});
\ No newline at end of file
});
......@@ -44,7 +44,7 @@ describe('Lemonldap::NG Manager', function() {
element(by.id('longtextinput')).sendKeys('Activate SAML');
element(by.id('saveok')).click();
element(by.id('messageok')).click();
expect(element(by.id('cfgnum')).getText()).toEqual('3');
expect(element(by.id('cfgnum')).getText()).toEqual('4');
});
});
});
\ No newline at end of file
});
......@@ -6,7 +6,7 @@
<div class="input-group">
<label class="input-group-addon" for="pwdinput" trspan="value"/>
<input type="password" id="pwdinput" class="form-control" ng-model="currentNode.data"/>
<span class="input-group-addon link" trspan="show" onclick="$('#pwdinput').attr('type','text')"/>
<span id="showp" class="input-group-addon link" trspan="show" onclick="$('#pwdinput').attr('type','text')"/>
</div>
</div>
</div>
......
......@@ -10,6 +10,10 @@
<td ng-if="!n.type||n.type=='text'">
<input class="form-control" ng-model="n.data" />
</td>
<!-- PASSWORD -->
<td ng-if="!n.type||n.type=='text'">
<input type="password" class="form-control" ng-model="n.data" />
</td>
<!-- LONG TEXT -->
<td ng-if="n.type=='longtext'">
<div class="input-group" style="width:100%;">
......
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