You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by ma...@apache.org on 2016/11/17 13:31:49 UTC
syncope git commit: [SYNCOPE-967] enduser tests updated
Repository: syncope
Updated Branches:
refs/heads/2_0_X d2c195c89 -> eea3e493f
[SYNCOPE-967] enduser tests updated
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/eea3e493
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/eea3e493
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/eea3e493
Branch: refs/heads/2_0_X
Commit: eea3e493f056047f342d54c557a7a8e433abcc23
Parents: d2c195c
Author: Matteo Di Carlo <ma...@tirasa.net>
Authored: Thu Nov 17 14:30:30 2016 +0100
Committer: Matteo Di Carlo <ma...@tirasa.net>
Committed: Thu Nov 17 14:30:30 2016 +0100
----------------------------------------------------------------------
.../META-INF/resources/app/css/editUser.css | 15 +++++++++
.../resources/app/views/user-credentials.html | 2 +-
.../app/views/user-derived-schemas.html | 2 +-
.../resources/app/views/user-groups.html | 2 +-
.../resources/app/views/user-plain-schemas.html | 2 +-
.../app/views/user-virtual-schemas.html | 2 +-
.../client/enduser/protractor/tests/create.js | 29 +++++++++---------
.../client/enduser/protractor/tests/edit.js | 32 ++++++++------------
8 files changed, 48 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css b/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
index 10d1105..a65be7e 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
+++ b/client/enduser/src/main/resources/META-INF/resources/app/css/editUser.css
@@ -134,6 +134,21 @@ under the License.
#save:hover {
background: #658D5D;
}
+
+#finish{
+ background: -moz-linear-gradient(top, #a9db80 0%, #96c56f 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a9db80), color-stop(100%,#96c56f)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #a9db80 0%,#96c56f 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #a9db80 0%,#96c56f 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #a9db80 0%,#96c56f 100%); /* IE10+ */
+ color: black;
+ margin-left: 5px;
+ /*width: 15%;*/
+}
+#finish:hover {
+ background: #658D5D;
+}
+
#cancel {
/*margin-top: 5%;*/
/*width: 15%;*/
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
index fca6237..2d1a2a8 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-credentials.html
@@ -63,7 +63,7 @@ under the License.
<div id="attribute" class="form-group row">
<button id="save" ng-show="!createMode" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
- <button id="save" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
+ <button id="finish" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
<navigation-buttons ng-show="createMode" base="create" current="credentials" wizard="{{wizard}}"></navigation-buttons>
<navigation-buttons ng-show="!createMode" base= "update" current="credentials" wizard="{{wizard}}"></navigation-buttons>
<div class="pull-left">
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
index f98e1c1..3bbc1c6 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-derived-schemas.html
@@ -22,7 +22,7 @@ under the License.
<div id="attribute" class="form-group row">
<button id="save" ng-show="!createMode" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
- <button id="save" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
+ <button id="finish" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
<navigation-buttons ng-show="createMode" base="create" current="derivedSchemas" wizard="{{wizard}}"></navigation-buttons>
<navigation-buttons ng-show="!createMode" base="update" current="derivedSchemas" wizard="{{wizard}}"></navigation-buttons>
<div class="pull-left">
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
index 9e31904..e6d362e 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-groups.html
@@ -34,7 +34,7 @@ under the License.
</div>
<div id="attribute" class="form-group row">
<button id="save" ng-show="!createMode" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
- <button id="save" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
+ <button id="finish" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
<navigation-buttons ng-show="createMode" base="create" current="groups" wizard="{{wizard}}"></navigation-buttons>
<navigation-buttons ng-show="!createMode" base="update" current="groups" wizard="{{wizard}}"></navigation-buttons>
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
index 4885a85..79161a4 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-plain-schemas.html
@@ -22,7 +22,7 @@ under the License.
<div id="attribute" class="form-group row">
<button id="save" ng-show="!createMode" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
- <button id="save" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
+ <button id="finish" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
<navigation-buttons ng-show="createMode" base="create" current="plainSchemas" wizard="{{wizard}}"></navigation-buttons>
<navigation-buttons ng-show="!createMode" base="update" current="plainSchemas" wizard="{{wizard}}"></navigation-buttons>
<div class="pull-left">
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
----------------------------------------------------------------------
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html b/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
index 89653d6..abc0886 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
+++ b/client/enduser/src/main/resources/META-INF/resources/app/views/user-virtual-schemas.html
@@ -23,7 +23,7 @@ under the License.
<div id="attribute" class="form-group row">
<button id="save" ng-show="!createMode" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
- <button id="save" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
+ <button id="finish" ng-show="createMode && endReached" type="button" class="btn btn-default pull-right" ng-click="finish()">{{'FINISH'| translate}}</button>
<navigation-buttons ng-show="createMode" base="create" current="virtualSchemas" wizard="{{wizard}}"></navigation-buttons>
<navigation-buttons ng-show="!createMode" base="update" current="virtualSchemas" wizard="{{wizard}}"></navigation-buttons>
<div class="pull-left">
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
index f1428c7..0da74b4 100644
--- a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
+++ b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/create.js
@@ -18,30 +18,28 @@
*/
var abstract = require('./abstract.js');
-
describe('syncope enduser user create', function () {
it('should create user donizetti', function () {
console.log("");
console.log("user create");
abstract.goHome();
- abstract.waitSpinner();
browser.wait(element(by.id('register')).isPresent());
element(by.id('register')).click();
+ //creadentials
browser.wait(element(by.id('user.username')).isPresent());
element(by.model('user.username')).sendKeys('donizetti');
element(by.model('user.password')).sendKeys('password123');
element(by.model('confirmPassword.value')).sendKeys('password123');
-
element(by.cssContainingText('option', 'What\'s your mother\'s maiden name?')).click();
-
browser.wait(element(by.id('user.securityAnswer')).isPresent());
element(by.model('user.securityAnswer')).sendKeys('Domenica Oliva Nava');
element.all(by.id('next')).first().click();
//groups
- abstract.waitSpinner();
- browser.wait(element(by.model('dynamicForm.selectedGroups')).isPresent());
+ browser.wait(element(by.model('user.realm')).isPresent());
+ element(by.model('user.realm')).click();
+ element.all(by.repeater('realm in availableRealms')).get(1).click();
var group = element(by.model('dynamicForm.selectedGroups'));
var selectedGroup = group.element(by.css('.ui-select-search'));
group.click();
@@ -60,13 +58,16 @@ describe('syncope enduser user create', function () {
element.all(by.name('surname')).first().sendKeys('Donizetti');
element.all(by.id('next')).first().click();
- //derivedSchemas
- element.all(by.id('next')).first().click();
-
- //virtualSchemas
- element.all(by.id('next')).first().click();
- element.all(by.id('next')).first().click();
-
+ //derivedSchemas,virtualSchemas,resources
+ for (var i = 0; i < 3; i++) {
+ element.all(by.id('next')).first().click();
+ }
+ //finish: breadcrumb should be clickable, testing navigation
+ for (var i = 0; i < 5; i++) {
+ element.all(by.repeater('(key, value) in wizard')).get(i).click();
+ browser.wait(element(by.id('finish')).isPresent());
+ element.all(by.id('finish')).last().click();
+ }
element.all(by.id('save')).last().click();
});
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/syncope/blob/eea3e493/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
----------------------------------------------------------------------
diff --git a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
index 00f2770..9c49f44 100644
--- a/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
+++ b/fit/enduser-reference/src/test/resources/org/apache/syncope/client/enduser/protractor/tests/edit.js
@@ -20,7 +20,6 @@
var abstract = require('./abstract.js');
describe('syncope enduser user edit', function () {
it('should edit user', function () {
-
console.log("");
console.log("user edit");
abstract.goHome();
@@ -34,7 +33,6 @@ describe('syncope enduser user edit', function () {
});
element.all(by.options('language.name for language in languages.availableLanguages track by language.id')).
get(1).click();
-
element(by.id('login-btn')).click();
//credential
@@ -53,12 +51,13 @@ describe('syncope enduser user edit', function () {
abstract.doNext();
//groups
- abstract.waitSpinner();
+ browser.wait(element(by.model('user.realm')).isPresent());
+ element(by.model('user.realm')).click();
+ element.all(by.repeater('realm in availableRealms')).get(0).click();
browser.wait(element(by.model('dynamicForm.selectedGroups')).isPresent());
var group = element(by.model('dynamicForm.selectedGroups'));
var selectedGroup = group.element(by.css('.ui-select-search'));
group.click();
-
//adds group root
selectedGroup.sendKeys('root');
element.all(by.css('.ui-select-choices-row-inner span')).first().click();
@@ -69,22 +68,17 @@ describe('syncope enduser user edit', function () {
element.all(by.repeater('groupSchema in dynamicForm.groupSchemas')).then(function (groupSchema) {
expect(groupSchema.length).toBe(1);
});
-
- element(by.css('[name="fullname"]')).clear();
- element(by.css('[name="fullname"]')).sendKeys('Vincenzo Bellini');
- element(by.css('[name="userId"]')).clear();
- element(by.css('[name="userId"]')).sendKeys('bellini@apache.org');
-
- var selectedDate = element(by.model('selectedDate'));
- selectedDate.clear();
- selectedDate.sendKeys('2009-06-21');
- element(by.css('[name="firstname"]')).clear();
- element(by.css('[name="firstname"]')).sendKeys('Vincenzo');
- element(by.css('[name="ctype"]')).clear();
- element(by.css('[name="ctype"]')).sendKeys('bellinictype');
-
+ element.all(by.css('[name="fullname"]')).first().clear();
+ element.all(by.css('[name="fullname"]')).first().sendKeys('Vincenzo Bellini');
+ element.all(by.css('[name="userId"]')).first().clear();
+ element.all(by.css('[name="userId"]')).first().sendKeys('bellini@apache.org');
+ element.all(by.model('selectedDate')).first().clear();
+ element.all(by.model('selectedDate')).first().sendKeys('2009-06-21');
+ element.all(by.css('[name="firstname"]')).first().clear();
+ element.all(by.css('[name="firstname"]')).first().sendKeys('Vincenzo');
+ element.all(by.css('[name="ctype"]')).first().clear();
+ element.all(by.css('[name="ctype"]')).first().sendKeys('bellinictype');
abstract.doNext();
-
//derSchemas
abstract.doNext();
//virSchemas