Commit f72a70c5 authored by Xavier Guimard's avatar Xavier Guimard

add Diff test in e2e_test (#575)

parent bf3c43ae
......@@ -454,7 +454,7 @@ reload_web_server:
$(MAKE) start_web_server; \
fi
launch_protractor: all e2e-tests/conf/apache2.pid
launch_protractor:
# Start e2e tests
# NB: you must have protractor installed (using npm install -g protractor)
# and have run update-webdriver at least once and have a node.js > 4.0
......
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Lemonldap::NG Manager', function() {
describe('Diff interface', function() {
it('should find key changed', function() {
browser.get('/diff.html#6/7');
element(by.id('t-generalParameters')).click();
element(by.id('t-advancedParams')).click();
element(by.id('t-security')).click();
element(by.id('t-key')).click();
expect(element(by.id('tdold')).getText()).toEqual('éà©®');
expect(element(by.id('tdnew')).getText()).toEqual('qwertyui');
});
});
});
......@@ -55,13 +55,13 @@
<table class="table table-striped">
<tr ng-show="currentNode.oldvalue">
<th><span class="old" trspan="oldValue"></span></th>
<td ng-show="currentNode.oldvalue.constructor === 'array'">{{currentNode.oldvalue|json}}</td>
<td ng-hide="currentNode.oldvalue.constructor === 'array'">{{currentNode.oldvalue}}</td>
<td id="tdoldarray" ng-show="currentNode.oldvalue.constructor === 'array'">{{currentNode.oldvalue|json}}</td>
<td id="tdold" ng-hide="currentNode.oldvalue.constructor === 'array'">{{currentNode.oldvalue}}</td>
</tr>
<tr ng-show="currentNode.newvalue">
<th><span class="new" trspan="newValue"></span></th>
<td ng-show="currentNode.newvalue.constructor === 'array'">{{currentNode.newvalue|json}}</td>
<td ng-hide="currentNode.newvalue.constructor === 'array'">{{currentNode.newvalue}}</td>
<td id="tdnewarray" ng-show="currentNode.newvalue.constructor === 'array'">{{currentNode.newvalue|json}}</td>
<td id="tdnew" ng-hide="currentNode.newvalue.constructor === 'array'">{{currentNode.newvalue}}</td>
</tr>
</table>
</div>
......@@ -71,7 +71,7 @@
<script type="text/ng-template" id="nodes_renderer.html">
<div ui-tree-handle class="tree-node tree-node-content panel-info tree-node-default">
<span ng-include="'arrow.html'"></span>
<span ng-click="stoggle(this,node)">{{node.title}}</span>
<span id="t-{{node.id}}" ng-click="stoggle(this,node)">{{node.title}}</span>
</div>
<ol ui-tree-nodes="" ng-model="node" ng-class="{hidden: collapsed}" ng-include="'subnodes.html'">
</ol>
......@@ -79,7 +79,7 @@
<script type="text/ng-template" id="newnodes_renderer.html">
<div ui-tree-handle class="tree-node tree-node-content panel-info tree-node-default">
<span ng-include="'arrow.html'"></span>
<span ng-click="stoggle(this,node)" class="new">{{node.title}}</span>
<span id="t-{{node.id}}" ng-click="stoggle(this,node)" class="new">{{node.title}}</span>
</div>
<ol ui-tree-nodes="" ng-model="node" ng-class="{hidden: collapsed}" ng-include="'subnodes.html'">
</ol>
......@@ -87,7 +87,7 @@
<script type="text/ng-template" id="oldnodes_renderer.html">
<div ui-tree-handle class="tree-node tree-node-content panel-info tree-node-default">
<span ng-include="'arrow.html'"></span>
<span ng-click="stoggle(this,node)" class="old">{{node.title}}</span>
<span id="t-{{node.id}}" ng-click="stoggle(this,node)" class="old">{{node.title}}</span>
</div>
<ol ui-tree-nodes="" ng-model="node" ng-class="{hidden: collapsed}" ng-include="'subnodes.html'">
</ol>
......
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