[prev in list] [next in list] [prev in thread] [next in thread]
List: forgerock-openidm-commit
Subject: [CommitOpenIDM] [5358] trunk/openidm-ui: CR-7026 - fix unit test framework for openidm-ui
From: anonymous () forgerock ! org
Date: 2015-05-22 20:48:56
Message-ID: 20150522204856.224043F8A3 () sources ! internal ! forgerock ! com
[Download RAW message or body]
[Attachment #2 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[5358] trunk/openidm-ui: CR-7026 - fix unit test framework for \
openidm-ui</title> </head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: \
bold} #msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
.info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://sources.forgerock.org/changelog/openidm/?cs=5358">5358</a></dd> \
<dt>Author</dt> <dd>jake.feasel</dd> <dt>Date</dt> <dd>2015-05-22 21:48:56 +0100 \
(Fri, 22 May 2015)</dd> </dl>
<h3>Log Message</h3>
<pre>CR-7026 - fix unit test framework for openidm-ui</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkopenidmuiGruntfilejs">trunk/openidm-ui/Gruntfile.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrctestqunitmappingaddMappingTestjs">trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/addMappingTest.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrctestqunitmappingreconTestsjs">trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/reconTests.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrctestqunitresourcesresourceTestjs">trunk/openidm-ui/openidm-ui-admin/src/test/qunit/resources/resourceTest.js</a></li>
<li><a href="#trunkopenidmuiopenidmuiadminsrctestqunitspecificjs">trunk/openidm-ui/openidm-ui-admin/src/test/qunit/specific.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrctestjsrunjs">trunk/openidm-ui/openidm-ui-common/src/test/js/run.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrctestqunitmockscleartextPWjs">trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/cleartextPW.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrctestqunitmockssystemInitjs">trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/systemInit.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrctestresourcesqunithtml">trunk/openidm-ui/openidm-ui-common/src/test/resources/qunit.html</a></li>
<li><a href="#trunkopenidmuiopenidmuiendusersrcmainjsorgforgerockopenidmuiadminmainjs \
">trunk/openidm-ui/openidm-ui-enduser/src/main/js/org/forgerock/openidm/ui/admin/main.js</a></li>
<li><a href="#trunkopenidmuipackagejson">trunk/openidm-ui/package.json</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkopenidmuiopenidmuicommonsrctestjsconfigjs">trunk/openidm-ui/openidm-ui-common/src/test/js/config.js</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkopenidmuiopenidmuiadminsrctestqunitmocksadminInitjs">trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mocks/adminInit.js</a></li>
<li><a href="#trunkopenidmuiopenidmuicommonsrctestjstextjs">trunk/openidm-ui/openidm-ui-common/src/test/js/text.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkopenidmuiGruntfilejs"></a>
<div class="modfile"><h4>Modified: trunk/openidm-ui/Gruntfile.js (5357 => 5358)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/openidm-ui/Gruntfile.js 2015-05-22 08:18:02 UTC (rev \
5357)
+++ trunk/openidm-ui/Gruntfile.js 2015-05-22 20:48:56 UTC (rev 5358)
</span><span class="lines">@@ -109,17 +109,17 @@
</span><span class="cx"> dest : \
'openidm-ui-admin/target/www' </span><span class="cx"> },
</span><span class="cx"> {
</span><del>- cwd : 'openidm-ui-common/main/js',
</del><ins>+ cwd : 'openidm-ui-common/src/main/js',
</ins><span class="cx"> src : ['**'],
</span><span class="cx"> dest : \
'openidm-ui-admin/target/www' </span><span class="cx"> },
</span><span class="cx"> {
</span><del>- cwd : 'openidm-ui-common/main/resources',
</del><ins>+ cwd : 'openidm-ui-common/src/main/resources',
</ins><span class="cx"> src : ['**'],
</span><span class="cx"> dest : \
'openidm-ui-enduser/target/www' </span><span class="cx"> },
</span><span class="cx"> {
</span><del>- cwd : 'openidm-ui-common/main/js',
</del><ins>+ cwd : 'openidm-ui-common/src/main/js',
</ins><span class="cx"> src : ['**'],
</span><span class="cx"> dest : \
'openidm-ui-enduser/target/www' </span><span class="cx"> },
</span><span class="lines">@@ -227,14 +227,13 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> grunt.loadNpmTasks('grunt-contrib-qunit');
</span><del>-
</del><span class="cx"> grunt.loadNpmTasks('grunt-contrib-watch');
</span><del>-
</del><ins>+
</ins><span class="cx"> grunt.loadNpmTasks('grunt-notify');
</span><span class="cx">
</span><span class="cx"> grunt.loadNpmTasks('grunt-sync');
</span><span class="cx">
</span><span class="cx"> grunt.task.run('notify_hooks');
</span><del>- grunt.registerTask('default', ['sync:target', 'sync:zip', \
'qunit:admin', 'qunit:enduser', 'watch']); </del><ins>+ \
grunt.registerTask('default', ['sync:target', 'sync:zip', 'watch']); </ins><span \
class="cx"> </span><span class="cx"> };
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrctestqunitmappingaddMappingTestjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/addMappingTest.js (5357 => \
5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/addMappingTest.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/addMappingTest.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -30,15 +30,12 @@
</span><span class="cx"> \
"org/forgerock/commons/ui/common/main/EventManager", </span><span \
class="cx"> "org/forgerock/openidm/ui/admin/mapping/AddMappingView", \
</span><span class="cx"> \
"org/forgerock/openidm/ui/admin/ResourcesView", </span><del>- \
"../mocks/adminInit", </del><span class="cx"> \
"../mocks/addMapping" </span><del>-], function (constants, router, \
eventManager, addMappingView, resourcesView, adminInit, addMapping) { </del><ins>+], \
function (constants, router, eventManager, addMappingView, resourcesView, addMapping) \
{ </ins><span class="cx">
</span><span class="cx"> return {
</span><span class="cx"> executeAll: function (server) {
</span><span class="cx">
</span><del>- adminInit(server);
-
</del><span class="cx"> module('Add Mapping UI Functions');
</span><span class="cx">
</span><span class="cx"> QUnit.asyncTest("Add Mapping View", \
function () { </span><span class="lines">@@ -98,4 +95,4 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-});
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrctestqunitmappingreconTestsjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/reconTests.js (5357 => \
5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/reconTests.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mapping/reconTests.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> \
_.size(SituationPolicyView.model.allPatterns["Default Actions"].policies), \
</span><span class="cx"> "All situations are \
present"); </span><span class="cx">
</span><del>- \
QUnit.ok(SituationPolicyView.$el.find(".situationRow .action")[0].length \
>= 1, </del><ins>+ \
QUnit.ok(SituationPolicyView.$el.find("table tbody tr").length >= 1, \
</ins><span class="cx"> "All actions are present"); \
</span><span class="cx"> </span><span class="cx"> \
QUnit.equal(_.size(SituationPolicyView.model.allPatterns), </span><span \
class="lines">@@ -143,4 +143,4 @@ </span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-});
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrctestqunitmocksadminInitjs"></a>
<div class="delfile"><h4>Deleted: \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mocks/adminInit.js (5357 => \
5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mocks/adminInit.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-admin/src/test/qunit/mocks/adminInit.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -1,84 +0,0 @@
</span><del>-/**
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2014-2015 ForgeRock AS. All Rights Reserved
- *
- * The contents of this file are subject to the terms
- * of the Common Development and Distribution License
- * (the License). You may not use this file except in
- * compliance with the License.
- *
- * You can obtain a copy of the License at
- * http://forgerock.org/license/CDDLv1.0.html
- * See the License for the specific language governing
- * permission and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL
- * Header Notice in each file and include the License file
- * at http://forgerock.org/license/CDDLv1.0.html
- * If applicable, add the following below the CDDL Header,
- * with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- */
-
-/*global require, define*/
-define([
-
- "text!css/config/adminConfig.less",
- "text!css/config/adminStyle.less",
- "text!css/config/resourcesView.less",
-
- "text!css/fontawesome/less/forgerock-variables.less",
- "text!css/fontawesome/less/mixins.less",
- "text!css/fontawesome/less/path.less",
- "text!css/fontawesome/less/core.less",
- "text!css/fontawesome/less/larger.less",
- "text!css/fontawesome/less/fixed-width.less",
- "text!css/fontawesome/less/list.less",
- "text!css/fontawesome/less/bordered-pulled.less",
- "text!css/fontawesome/less/spinning.less",
- "text!css/fontawesome/less/rotated-flipped.less",
- "text!css/fontawesome/less/stacked.less",
- "text!css/fontawesome/less/icons.less"
-], function () {
-
- /* an unfortunate need to duplicate the file names here, but I haven't
- yet found a way to fool requirejs into doing dynamic dependencies */
- var staticFiles = [
-
- "css/config/adminConfig.less",
- "css/config/adminStyle.less",
- "css/config/resourcesView.less",
-
- "css/fontawesome/less/forgerock-variables.less",
- "css/fontawesome/less/mixins.less",
- "css/fontawesome/less/path.less",
- "css/fontawesome/less/core.less",
- "css/fontawesome/less/larger.less",
- "css/fontawesome/less/fixed-width.less",
- "css/fontawesome/less/list.less",
- "css/fontawesome/less/bordered-pulled.less",
- "css/fontawesome/less/spinning.less",
- "css/fontawesome/less/rotated-flipped.less",
- "css/fontawesome/less/stacked.less",
- "css/fontawesome/less/icons.less"
- ],
- deps = arguments;
-
- return function (server) {
-
- _.each(staticFiles, function (file, i) {
- server.respondWith(
- "GET",
- new RegExp(file.replace(/([\/\.\-])/g, "\\$1") + \
"$"),
- [
- 200,
- { },
- deps[i]
- ]
- );
- });
-
- };
-});
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrctestqunitresourcesresourceTestjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/resources/resourceTest.js (5357 => \
5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/resources/resourceTest.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-admin/src/test/qunit/resources/resourceTest.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -30,9 +30,8 @@
</span><span class="cx"> \
"org/forgerock/commons/ui/common/main/EventManager", </span><span \
class="cx"> "org/forgerock/openidm/ui/admin/managed/AddEditManagedView",
</span><span class="cx"> \
"org/forgerock/openidm/ui/admin/ResourcesView", </span><del>- \
"../mocks/adminInit", </del><span class="cx"> \
"../mocks/resourceDetails" </span><del>-], function (constants, router, \
eventManager, addEditManagedView, resourcesView, adminInit, resourceDetails) { \
</del><ins>+], function (constants, router, eventManager, addEditManagedView, \
resourcesView, resourceDetails) { </ins><span class="cx">
</span><span class="cx"> return {
</span><span class="cx"> executeAll: function (server, callback) {
</span><span class="lines">@@ -62,4 +61,4 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-});
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuiadminsrctestqunitspecificjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/specific.js (5357 => 5358)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/openidm-ui/openidm-ui-admin/src/test/qunit/specific.js 2015-05-22 08:18:02 UTC \
(rev 5357)
+++ trunk/openidm-ui/openidm-ui-admin/src/test/qunit/specific.js 2015-05-22 20:48:56 \
UTC (rev 5358) </span><span class="lines">@@ -25,14 +25,13 @@
</span><span class="cx"> /*global require, define, QUnit, $ */
</span><span class="cx">
</span><span class="cx"> define([
</span><del>- "./mocks/adminInit",
</del><span class="cx"> "./managedobjects/managedObjectsTest",
</span><span class="cx"> "./resources/resourceTest",
</span><span class="cx"> "./mapping/addMappingTest",
</span><span class="cx"> "./mapping/reconTests",
</span><span class="cx"> "./mapping/propertyMappingTest",
</span><span class="cx"> "./mapping/correlationTest"
</span><del>-], function (adminInit, moTest, resourceTest, addMappingTest, \
reconTests, propertyMappingTest, correlationTest) { </del><ins>+], function (moTest, \
resourceTest, addMappingTest, reconTests, propertyMappingTest, correlationTest) { \
</ins><span class="cx"> </span><span class="cx"> return {
</span><span class="cx"> executeAll: function (server) {
</span><span class="lines">@@ -40,7 +39,6 @@
</span><span class="cx"> $(".bootstrap-dialog").remove();
</span><span class="cx"> });
</span><span class="cx">
</span><del>- adminInit(server);
</del><span class="cx"> addMappingTest.executeAll(server);
</span><span class="cx"> resourceTest.executeAll(server);
</span><span class="cx"> reconTests.executeAll(server);
</span><span class="lines">@@ -49,4 +47,4 @@
</span><span class="cx"> propertyMappingTest.executeAll(server);
</span><span class="cx"> }
</span><span class="cx"> };
</span><del>-});
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrctestjsconfigjs"></a>
<div class="addfile"><h4>Added: \
trunk/openidm-ui/openidm-ui-common/src/test/js/config.js (0 => 5358)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/test/js/config.js (rev \
0)
+++ trunk/openidm-ui/openidm-ui-common/src/test/js/config.js 2015-05-22 20:48:56 UTC \
(rev 5358) </span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright (c) 2015 ForgeRock AS.
+ *
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ *
+ * You can obtain a copy of the License at
+ * http://forgerock.org/license/CDDLv1.0.html
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at http://forgerock.org/license/CDDLv1.0.html
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ */
+
+/*global $, require, QUnit */
+
+require.config({
+ baseUrl: '../www',
+ paths: {
+ text: "../test/text",
+ jquery: "libs/jquery-2.1.1-min",
+ underscore: "libs/lodash-2.4.1-min",
+ sinon: "libs/sinon-1.12.2"
+ },
+ shim: {
+ underscore: {
+ exports: "_"
+ },
+ sinon: {
+ exports: "sinon"
+ }
+ }
+});
+
+require([
+ "../test/tests/mocks/systemInit",
+ "underscore",
+ "sinon"
+], function (systemInit, _, sinon) {
+
+ sinon.FakeXMLHttpRequest.useFilters = true;
+ sinon.FakeXMLHttpRequest.addFilter(function (method, url, async, username, \
password) { + if (/((translation\.json)|(less-1\.5\.1-min\.js))$/.test(url)) {
+ return false;
+ }
+
+ return /((\.html)|(\.css)|(\.less)|(\.json))$/.test(url);
+ });
+
+ var server = sinon.fakeServer.create();
+ server.autoRespond = true;
+ systemInit(server);
+
+ require(['../www/main','../test/run'], function (appMain, run) {
+ run(server);
+ });
+
+ return server;
+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrctestjsrunjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/test/js/run.js (5357 => 5358)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/test/js/run.js 2015-05-22 08:18:02 UTC (rev \
5357)
+++ trunk/openidm-ui/openidm-ui-common/src/test/js/run.js 2015-05-22 20:48:56 UTC \
(rev 5358) </span><span class="lines">@@ -24,55 +24,44 @@
</span><span class="cx">
</span><span class="cx"> /*global $, require, QUnit */
</span><span class="cx">
</span><del>-require.config({
- paths: {
- sinon: "../test/libs/sinon-1.12.2",
- text: "../test/text"
- },
- shim: {
- sinon: {
- exports: "sinon"
- }
- }
-});
</del><span class="cx">
</span><del>-require([
</del><ins>+define([
+ "jquery",
</ins><span class="cx"> \
"org/forgerock/commons/ui/common/util/Constants", </span><span class="cx"> \
"org/forgerock/commons/ui/common/main/EventManager", </span><span \
class="cx"> "sinon", </span><del>- \
"../test/tests/mocks/systemInit", </del><span class="cx"> \
"../test/tests/common", </span><span class="cx"> \
"../test/tests/specific" </span><del>-], function (constants, eventManager, \
sinon, systemInit, commonTests, specificTests) { </del><ins>+], function ($, \
constants, eventManager, sinon, commonTests, specificTests) { </ins><span class="cx"> \
</span><del>- var server = sinon.fakeServer.create();
- server.autoRespond = true;
- systemInit(server);
</del><ins>+ $.doTimeout = function (name, time, func) {
+ func(); // run the function immediately rather than delayed.
+ };
</ins><span class="cx">
</span><del>- sinon.stub(eventManager, "sendEvent", function (eventId, \
event) { </del><ins>+ return function (server) {
+ eventManager.registerListener(constants.EVENT_APP_INTIALIZED, function () {
+ QUnit.testStart(function () {
+ var vm = \
require("org/forgerock/commons/ui/common/main/ViewManager"); </ins><span \
class="cx"> </span><del>- // the normal behavior for sendEvent:
- $(document).trigger(eventId, event);
</del><ins>+ vm.currentView = null;
+ vm.currentDialog = null;
+ vm.currentViewArgs = null;
+ vm.currentDialogArgs = null;
</ins><span class="cx">
</span><del>- // special extended behavior for our stub:
- if (eventId === constants.EVENT_APP_INTIALIZED) {
- eventManager.sendEvent.restore();
- // delayed testing start gives the app time to stablize during startup
- _.delay(function () {
</del><ins>+ \
require("org/forgerock/commons/ui/common/main/Configuration").baseTemplate \
= null; + });
+ QUnit.start();
</ins><span class="cx">
</span><del>- QUnit.start();
</del><ins>+ commonTests.executeAll(server);
+ specificTests.executeAll(server);
</ins><span class="cx">
</span><del>- commonTests.executeAll(server);
- specificTests.executeAll(server);
</del><ins>+ QUnit.done(function () {
+ localStorage.clear();
+ Backbone.history.stop();
+ window.location.hash = "";
+ });
</ins><span class="cx">
</span><del>- QUnit.done(function () {
- Backbone.history.stop();
- window.location.hash = "";
- });
</del><ins>+ });
+ };
</ins><span class="cx">
</span><del>- }, 100);
- }
-
- });
-
-});
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrctestjstextjs"></a>
<div class="delfile"><h4>Deleted: \
trunk/openidm-ui/openidm-ui-common/src/test/js/text.js (5357 => 5358)</h4> <pre \
class="diff"><span> <span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/test/js/text.js 2015-05-22 08:18:02 UTC (rev \
5357)
+++ trunk/openidm-ui/openidm-ui-common/src/test/js/text.js 2015-05-22 20:48:56 UTC \
(rev 5358) </span><span class="lines">@@ -1,386 +0,0 @@
</span><del>-/**
- * @license RequireJS text 2.0.10 Copyright (c) 2010-2012, The Dojo Foundation All \
Rights Reserved.
- * Available via the MIT or new BSD license.
- * see: http://github.com/requirejs/text for details
- */
-/*jslint regexp: true */
-/*global require, XMLHttpRequest, ActiveXObject,
- define, window, process, Packages,
- java, location, Components, FileUtils */
-
-define(['module'], function (module) {
- 'use strict';
-
- var text, fs, Cc, Ci, xpcIsWindows,
- progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
- xmlRegExp = \
/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
- bodyRegExp = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,
- hasLocation = typeof location !== 'undefined' && location.href,
- defaultProtocol = hasLocation && location.protocol && \
location.protocol.replace(/\:/, ''),
- defaultHostName = hasLocation && location.hostname,
- defaultPort = hasLocation && (location.port || undefined),
- buildMap = {},
- masterConfig = (module.config && module.config()) || {};
-
- text = {
- version: '2.0.10',
-
- strip: function (content) {
- //Strips <?xml ...?> declarations so that external SVG and XML
- //documents can be added to a document without worry. Also, if the \
string
- //is an HTML document, only the part inside the body tag is returned.
- if (content) {
- content = content.replace(xmlRegExp, "");
- var matches = content.match(bodyRegExp);
- if (matches) {
- content = matches[1];
- }
- } else {
- content = "";
- }
- return content;
- },
-
- jsEscape: function (content) {
- return content.replace(/(['\\])/g, '\\$1')
- .replace(/[\f]/g, "\\f")
- .replace(/[\b]/g, "\\b")
- .replace(/[\n]/g, "\\n")
- .replace(/[\t]/g, "\\t")
- .replace(/[\r]/g, "\\r")
- .replace(/[\u2028]/g, "\\u2028")
- .replace(/[\u2029]/g, "\\u2029");
- },
-
- createXhr: masterConfig.createXhr || function () {
- //Would love to dump the ActiveX crap in here. Need IE 6 to die first.
- var xhr, i, progId;
- if (typeof XMLHttpRequest !== "undefined") {
- return new XMLHttpRequest();
- } else if (typeof ActiveXObject !== "undefined") {
- for (i = 0; i < 3; i += 1) {
- progId = progIds[i];
- try {
- xhr = new ActiveXObject(progId);
- } catch (e) {}
-
- if (xhr) {
- progIds = [progId]; // so faster next time
- break;
- }
- }
- }
-
- return xhr;
- },
-
- /**
- * Parses a resource name into its component parts. Resource names
- * look like: module/name.ext!strip, where the !strip part is
- * optional.
- * @param {String} name the resource name
- * @returns {Object} with properties "moduleName", "ext" \
and "strip"
- * where strip is a boolean.
- */
- parseName: function (name) {
- var modName, ext, temp,
- strip = false,
- index = name.indexOf("."),
- isRelative = name.indexOf('./') === 0 ||
- name.indexOf('../') === 0;
-
- if (index !== -1 && (!isRelative || index > 1)) {
- modName = name.substring(0, index);
- ext = name.substring(index + 1, name.length);
- } else {
- modName = name;
- }
-
- temp = ext || modName;
- index = temp.indexOf("!");
- if (index !== -1) {
- //Pull off the strip arg.
- strip = temp.substring(index + 1) === "strip";
- temp = temp.substring(0, index);
- if (ext) {
- ext = temp;
- } else {
- modName = temp;
- }
- }
-
- return {
- moduleName: modName,
- ext: ext,
- strip: strip
- };
- },
-
- xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
-
- /**
- * Is an URL on another domain. Only works for browser use, returns
- * false in non-browser environments. Only used to know if an
- * optimized .js version of a text resource should be loaded
- * instead.
- * @param {String} url
- * @returns Boolean
- */
- useXhr: function (url, protocol, hostname, port) {
- var uProtocol, uHostName, uPort,
- match = text.xdRegExp.exec(url);
- if (!match) {
- return true;
- }
- uProtocol = match[2];
- uHostName = match[3];
-
- uHostName = uHostName.split(':');
- uPort = uHostName[1];
- uHostName = uHostName[0];
-
- return (!uProtocol || uProtocol === protocol) &&
- (!uHostName || uHostName.toLowerCase() === \
hostname.toLowerCase()) &&
- ((!uPort && !uHostName) || uPort === port);
- },
-
- finishLoad: function (name, strip, content, onLoad) {
- content = strip ? text.strip(content) : content;
- if (masterConfig.isBuild) {
- buildMap[name] = content;
- }
- onLoad(content);
- },
-
- load: function (name, req, onLoad, config) {
- //Name has format: some.module.filext!strip
- //The strip part is optional.
- //if strip is present, then that means only get the string contents
- //inside a body tag in an HTML string. For XML/SVG content it means
- //removing the <?xml ...?> declarations so the content can be \
inserted
- //into the current doc without problems.
-
- // Do not bother with the work if a build and text will
- // not be inlined.
- if (config.isBuild && !config.inlineText) {
- onLoad();
- return;
- }
-
- masterConfig.isBuild = config.isBuild;
-
- var parsed = text.parseName(name),
- nonStripName = parsed.moduleName +
- (parsed.ext ? '.' + parsed.ext : ''),
- url = req.toUrl(nonStripName),
- useXhr = (masterConfig.useXhr) ||
- text.useXhr;
-
- // Do not load if it is an empty: url
- if (url.indexOf('empty:') === 0) {
- onLoad();
- return;
- }
-
- //Load the text. Use XHR if possible and in a browser.
- if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, \
defaultPort)) {
- text.get(url, function (content) {
- text.finishLoad(name, parsed.strip, content, onLoad);
- }, function (err) {
- if (onLoad.error) {
- onLoad.error(err);
- }
- });
- } else {
- //Need to fetch the resource across domains. Assume
- //the resource has been optimized into a JS module. Fetch
- //by the module name + extension, but do not include the
- //!strip part to avoid file system issues.
- req([nonStripName], function (content) {
- text.finishLoad(parsed.moduleName + '.' + parsed.ext,
- parsed.strip, content, onLoad);
- });
- }
- },
-
- write: function (pluginName, moduleName, write, config) {
- if (buildMap.hasOwnProperty(moduleName)) {
- var content = text.jsEscape(buildMap[moduleName]);
- write.asModule(pluginName + "!" + moduleName,
- "define(function () { return '" +
- content +
- "';});\n");
- }
- },
-
- writeFile: function (pluginName, moduleName, req, write, config) {
- var parsed = text.parseName(moduleName),
- extPart = parsed.ext ? '.' + parsed.ext : '',
- nonStripName = parsed.moduleName + extPart,
- //Use a '.js' file name so that it indicates it is a
- //script that can be loaded across domains.
- fileName = req.toUrl(parsed.moduleName + extPart) + '.js';
-
- //Leverage own load() method to load plugin value, but only
- //write out values that do not have the strip argument,
- //to avoid any potential issues with ! in file names.
- text.load(nonStripName, req, function (value) {
- //Use own write() method to construct full module value.
- //But need to create shell that translates writeFile's
- //write() to the right interface.
- var textWrite = function (contents) {
- return write(fileName, contents);
- };
- textWrite.asModule = function (moduleName, contents) {
- return write.asModule(moduleName, fileName, contents);
- };
-
- text.write(pluginName, nonStripName, textWrite, config);
- }, config);
- }
- };
-
- if (masterConfig.env === 'node' || (!masterConfig.env &&
- typeof process !== "undefined" &&
- process.versions &&
- !!process.versions.node &&
- !process.versions['node-webkit'])) {
- //Using special require.nodeRequire, something added by r.js.
- fs = require.nodeRequire('fs');
-
- text.get = function (url, callback, errback) {
- try {
- var file = fs.readFileSync(url, 'utf8');
- //Remove BOM (Byte Mark Order) from utf8 files if it is there.
- if (file.indexOf('\uFEFF') === 0) {
- file = file.substring(1);
- }
- callback(file);
- } catch (e) {
- errback(e);
- }
- };
- } else if (masterConfig.env === 'xhr' || (!masterConfig.env &&
- text.createXhr())) {
- text.get = function (url, callback, errback, headers) {
- var xhr = text.createXhr(), header;
- xhr.open('GET', url, true);
-
- //Allow plugins direct access to xhr headers
- if (headers) {
- for (header in headers) {
- if (headers.hasOwnProperty(header)) {
- xhr.setRequestHeader(header.toLowerCase(), headers[header]);
- }
- }
- }
-
- //Allow overrides specified in config
- if (masterConfig.onXhr) {
- masterConfig.onXhr(xhr, url);
- }
-
- xhr.onreadystatechange = function (evt) {
- var status, err;
- //Do not explicitly handle errors, those should be
- //visible via console output in the browser.
- if (xhr.readyState === 4) {
- status = xhr.status;
- if (status > 399 && status < 600) {
- //An http 4xx or 5xx error. Signal an error.
- err = new Error(url + ' HTTP status: ' + status);
- err.xhr = xhr;
- errback(err);
- } else {
- callback(xhr.responseText);
- }
-
- if (masterConfig.onXhrComplete) {
- masterConfig.onXhrComplete(xhr, url);
- }
- }
- };
- xhr.send(null);
- };
- } else if (masterConfig.env === 'rhino' || (!masterConfig.env &&
- typeof Packages !== 'undefined' && typeof java !== 'undefined')) \
{
- //Why Java, why is this so awkward?
- text.get = function (url, callback) {
- var stringBuffer, line,
- encoding = "utf-8",
- file = new java.io.File(url),
- lineSeparator = \
java.lang.System.getProperty("line.separator"),
- input = new java.io.BufferedReader(new java.io.InputStreamReader(new \
java.io.FileInputStream(file), encoding)),
- content = '';
- try {
- stringBuffer = new java.lang.StringBuffer();
- line = input.readLine();
-
- // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page \
324
- // http://www.unicode.org/faq/utf_bom.html
-
- // Note that when we use utf-8, the BOM should appear as "EF BB \
BF", but it doesn't due to this bug in the JDK:
- // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
- if (line && line.length() && line.charAt(0) === \
0xfeff) {
- // Eat the BOM, since we've already found the encoding on this \
file,
- // and we plan to concatenating this buffer with others; the BOM \
should
- // only appear at the top of a file.
- line = line.substring(1);
- }
-
- if (line !== null) {
- stringBuffer.append(line);
- }
-
- while ((line = input.readLine()) !== null) {
- stringBuffer.append(lineSeparator);
- stringBuffer.append(line);
- }
- //Make sure we return a JavaScript string and not a Java string.
- content = String(stringBuffer.toString()); //String
- } finally {
- input.close();
- }
- callback(content);
- };
- } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&
- typeof Components !== 'undefined' && Components.classes \
&&
- Components.interfaces)) {
- //Avert your gaze!
- Cc = Components.classes,
- Ci = Components.interfaces;
- Components.utils['import']('resource://gre/modules/FileUtils.jsm');
- xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);
-
- text.get = function (url, callback) {
- var inStream, convertStream, fileObj,
- readData = {};
-
- if (xpcIsWindows) {
- url = url.replace(/\//g, '\\');
- }
-
- fileObj = new FileUtils.File(url);
-
- //XPCOM, you so crazy
- try {
- inStream = Cc['@mozilla.org/network/file-input-stream;1']
- .createInstance(Ci.nsIFileInputStream);
- inStream.init(fileObj, 1, 0, false);
-
- convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
- .createInstance(Ci.nsIConverterInputStream);
- convertStream.init(inStream, "utf-8", \
inStream.available(),
- Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
-
- convertStream.readString(inStream.available(), readData);
- convertStream.close();
- inStream.close();
- callback(readData.value);
- } catch (e) {
- throw new Error((fileObj && fileObj.path || '') + ': ' + e);
- }
- };
- }
- return text;
-});
</del></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrctestqunitmockscleartextPWjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/cleartextPW.js (5357 => \
5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/cleartextPW.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/cleartextPW.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -23,68 +23,45 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /*global require, define*/
</span><del>-define([
- "text!templates/common/DialogTemplate.html",
- "text!templates/admin/MandatoryPasswordChangeDialogTemplate.html"
-], function () {
</del><ins>+define([ ], function () {
</ins><span class="cx">
</span><del>- /* an unfortunate need to duplicate the file names here, but I \
haven't
- yet found a way to fool requirejs into doing dynamic dependencies */
- var staticFiles = [
- "templates/common/DialogTemplate.html",
- "templates/admin/MandatoryPasswordChangeDialogTemplate.html"
- ],
- deps = arguments;
-
</del><span class="cx"> return function (server) {
</span><del>-
- _.each(staticFiles, function (file, i) {
- server.respondWith(
- "GET",
- new RegExp(file.replace(/([\/\.\-])/g, "\\$1") + \
"$"),
- [
- 200,
- { },
- deps[i]
- ]
- );
- });
</del><span class="cx">
</span><span class="cx"> server.respondWith(
</span><del>- "GET",
</del><ins>+ "GET",
</ins><span class="cx"> "/openidm/info/login",
</span><span class="cx"> [
</span><del>- 200,
</del><ins>+ 200,
</ins><span class="cx"> { },
</span><span class="cx"> \
"{\"authorizationId\":{\"id\":\"openidm-admin\",\&q \
uot;component\":\"repo/internal/user\",\"roles\":[\"open \
idm-admin\",\"openidm-authorized\"]},\"parent\":{\"id\&q \
uot;:\"c0ab0f10-94dc-4c9c-9367-1e29f420b1b6\",\"parent\":null,\&qu \
ot;class\":\"org.forgerock.json.resource.RootContext\"},\"class\&q \
uot;:\"org.forgerock.json.resource.SecurityContext\",\"authenticationId\":\"openidm-admin\"}"
</span><span class="cx"> ]
</span><span class="cx"> );
</span><del>-
</del><ins>+
</ins><span class="cx"> server.respondWith(
</span><del>- "GET",
</del><ins>+ "GET",
</ins><span class="cx"> \
"/openidm/repo/internal/user/openidm-admin", </span><span class="cx"> \
[ </span><del>- 200,
</del><ins>+ 200,
</ins><span class="cx"> { },
</span><span class="cx"> \
"{\"_id\":\"openidm-admin\",\"_rev\":\"1\" \
;,\"roles\":\"openidm-admin,openidm-authorized\",\"userName\& \
quot;:\"openidm-admin\",\"password\":\"openidm-admin\"}"
</span><span class="cx"> ]
</span><span class="cx"> );
</span><del>-
</del><ins>+
</ins><span class="cx"> server.respondWith(
</span><del>- "GET",
</del><ins>+ "GET",
</ins><span class="cx"> \
"/openidm/policy/repo/internal/user/openidm-admin", </span><span \
class="cx"> [ </span><del>- 200,
</del><ins>+ 200,
</ins><span class="cx"> { },
</span><span class="cx"> \
"{\"resource\":\"repo/internal/user/*\",\"properties\&qu \
ot;:[{\"policyRequirements\":[\"CANNOT_CONTAIN_CHARACTERS\"],\&quo \
t;policies\":[{\"policyRequirements\":[\"CANNOT_CONTAIN_CHARACTERS \
\"],\"params\":{\"forbiddenChars\":[\"/\"]},\" \
policyId\":\"cannot-contain-characters\",\"policyFunction\":\"\\nfunction \
(fullObject, value, params, property) {\\n var i, join = function (arr, d) {\\n \
var j, list = \\\"\\\";\\n for (j in arr) {\\n list += \
arr[j] + d;\\n }\\n return list.replace(new RegExp(d + \
\\\"$\\\"), \\\"\\\");\\n };\\n if (typeof (value) === \
\\\"string\\\" && value.length) {\\n for (i in \
params.forbiddenChars) {\\n if (value.indexOf(params.forbiddenChars[i]) \
!== -1) {\\n return \
[{\\\"policyRequirement\\\":\\\"CANNOT_CONTAIN_CHARACTERS\\\", \
\\\"params\\\":{\\\"forbiddenChars\\\":join(params.forbiddenChars, \
\\\", \\\")}}];\\n }\\n }\\n }\\n return \
[];\\n}\\n\"}],\"name\":\"_id\"},{\"policyRequirements\& \
quot;:[\"REQUIRED\",\"AT_LEAST_X_CAPITAL_LETTERS\",\"AT_LEAST \
_X_NUMBERS\",\"MIN_LENGTH\"],\"policies\":[{\"policyRequ \
irements\":[\"REQUIRED\"],\"policyId\":\"required\",\"policyFunction\":\"\\nfunction \
(fullObject, value, params, propName) {\\n if (value === undefined) {\\n \
return [{\\\"policyRequirement\\\":\\\"REQUIRED\\\"}];\\n }\\n \
return [];\\n}\\n\"},{\"policyRequirements\":[\"REQUIRED\"],\ \
"policyId\":\"not-empty\",\"policyFunction\":\" \
;\\nfunction (fullObject, value, params, property) {\\n if (value !== undefined \
&& (value === null || !value.length)) {\\n return \
[{\\\"policyRequirement\\\":\\\"REQUIRED\\\"}];\\n } else {\\n \
return [];\\n }\\n}\\n\"},{\"policyRequirements\":[\"AT_LEAST_X \
_CAPITAL_LETTERS\"],\"params\":{\"numCaps\":1},\"policyI \
d\":\"at-least-X-capitals\",\"policyFunction\":\"\\nfunction \
(fullObject, value, params, property) {\\n var isRequired = \
_.find(this.failedPolicyRequirements, function (fpr) {\\n return \
fpr.policyRequirement === \\\"REQUIRED\\\";\\n }), isNonEmptyString = \
(typeof (value) === \\\"string\\\" && value.length), \
valuePassesRegexp = (function (v) {\\n var test = isNonEmptyString ? \
v.match(/[(A-Z)]/g) : null;\\n return test !== null && test.length \
>= params.numCaps;\\n }(value)); \\n if ((isRequired || isNonEmptyString) \
&& !valuePassesRegexp) {\\n return \
[{\\\"policyRequirement\\\":\\\"AT_LEAST_X_CAPITAL_LETTERS\\\", \
\\\"params\\\":{\\\"numCaps\\\":params.numCaps}}];\\n }\\n \
return [];\\n}\\n\"},{\"policyRequirements\":[\"AT_LEAST_X_NUMBERS \
\"],\"params\":{\"numNums\":1},\"policyId\":\"at-least-X-numbers\",\"policyFunction\":\"\\nfunction \
(fullObject, value, params, property) {\\n var isRequired = \
_.find(this.failedPolicyRequirements, function (fpr) {\\n return \
fpr.policyRequirement === \\\"REQUIRED\\\";\\n }), isNonEmptyString = \
(typeof (value) === \\\"string\\\" && value.length), \
valuePassesRegexp = (function (v) {\\n var test = isNonEmptyString ? \
v.match(/\\\\d/g) : null;\\n return test !== null && test.length >= \
params.numNums;\\n }(value ));\\n if ((isRequired || isNonEmptyString) \
&& !valuePassesRegexp) {\\n return \
[{\\\"policyRequirement\\\":\\\"AT_LEAST_X_NUMBERS\\\", \
\\\"params\\\":{\\\"numNums\\\":params.numNums}}];\\n }\\n \
return [];\\n}\\n\"},{\"policyRequirements\":[\"MIN_LENGTH\"] \
,\"params\":{\"minLength\":8},\"policyId\":\"minimum-length\",\"policyFunction\":\"\\nfunction \
(fullObject, value, params, property) {\\n var isRequired = \
_.find(this.failedPolicyRequirements, function (fpr) {\\n return \
fpr.policyRequirement === \\\"REQUIRED\\\";\\n }), isNonEmptyString = \
(typeof (value) === \\\"string\\\" && value.length), hasMinLength = \
isNonEmptyString ? (value.length >= params.minLength) : false;\\n if \
((isRequired || isNonEmptyString) && !hasMinLength) {\\n return \
[{\\\"policyRequirement\\\" :\\\"MIN_LENGTH\\\", \
\\\"params\\\":{\\\"minLength\\\":params.minLength}}];\\n }\\n \
return [];\\n}\\n\"}],\"name\":\"password\"}]}" \
</span><span class="cx"> ] </span><span class="cx"> );
</span><del>-
</del><ins>+
</ins><span class="cx"> server.respondWith(
</span><del>- "POST",
</del><ins>+ "POST",
</ins><span class="cx"> \
"/openidm/policy/repo/internal/user/openidm-admin?_action=validateObject", \
</span><span class="cx"> [ </span><del>- 200,
</del><ins>+ 200,
</ins><span class="cx"> { },
</span><span class="cx"> \
"{\"result\":false,\"failedPolicyRequirements\":[{\"poli \
cyRequirements\":[{\"policyRequirement\":\"REQUIRED\"}],\&quo \
t;property\":\"password\"},{\"policyRequirements\":[{\"p \
olicyRequirement\":\"AT_LEAST_X_CAPITAL_LETTERS\",\"params\": \
{\"numCaps\":1}}],\"property\":\"password\"},{\"pol \
icyRequirements\":[{\"policyRequirement\":\"AT_LEAST_X_NUMBERS\&qu \
ot;,\"params\":{\"numNums\":1}}],\"property\":\"pas \
sword\"},{\"policyRequirements\":[{\"policyRequirement\":\&qu \
ot;MIN_LENGTH\",\"params\":{\"minLength\":8}}],\"property\":\"password\"}]}"
</span><span class="cx"> ]
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrctestqunitmockssystemInitjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/systemInit.js (5357 => \
5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/systemInit.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-common/src/test/qunit/mocks/systemInit.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -25,39 +25,18 @@
</span><span class="cx"> /*global require, define*/
</span><span class="cx"> define([
</span><span class="cx"> "text!locales/en/translation.json",
</span><del>- "text!libs/less-1.5.1-min.js",
- "text!libs/bootstrap.min.js",
- "text!libs/bootstrap-dialog.min.js",
- "text!css/styles.less",
- "text!css/common/bootstrap.min.css",
- "text!css/common/bootstrap-dialog.css",
- "text!templates/common/LoginBaseTemplate.html",
- "text!templates/common/LoginTemplate.html",
- "text!templates/common/NavigationTemplate.html",
- "text!templates/common/FooterTemplate.html",
- "text!templates/common/DialogTemplate.html"
</del><ins>+ "text!libs/less-1.5.1-min.js"
</ins><span class="cx"> ], function () {
</span><span class="cx">
</span><span class="cx"> /* an unfortunate need to duplicate the file names here, \
but I haven't </span><span class="cx"> yet found a way to fool requirejs into \
doing dynamic dependencies */ </span><span class="cx"> var staticFiles = [
</span><span class="cx"> "locales/en/translation.json",
</span><del>- "libs/less-1.5.1-min.js",
- "libs/bootstrap.min.js",
- "libs/bootstrap-dialog.min.js",
- "css/styles.less",
- "css/common/bootstrap.min.css",
- "css/common/bootstrap-dialog.css",
-
- "templates/common/LoginBaseTemplate.html",
- "templates/common/LoginTemplate.html",
- "templates/common/NavigationTemplate.html",
- "templates/common/FooterTemplate.html",
- "templates/common/DialogTemplate.html"
</del><ins>+ "libs/less-1.5.1-min.js"
</ins><span class="cx"> ],
</span><span class="cx"> deps = arguments;
</span><span class="cx">
</span><del>- return function (server) {
</del><ins>+ return function (server) {
</ins><span class="cx">
</span><span class="cx"> _.each(staticFiles, function (file, i) {
</span><span class="cx"> server.respondWith(
</span><span class="lines">@@ -72,10 +51,10 @@
</span><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> server.respondWith(
</span><del>- "GET",
</del><ins>+ "GET",
</ins><span class="cx"> "/openidm/config/ui/configuration",
</span><span class="cx"> [
</span><del>- 200,
</del><ins>+ 200,
</ins><span class="cx"> { },
</span><span class="cx"> \
"{\"configuration\":{\"defaultNotificationType\":\"info\ \
",\"passwordResetLink\":\"\",\"selfRegistration\":false,\"roles\":{\"openidm-tasks-manager\":\"Tasks \
Manager\",\"openidm-authorized\":\"User\",\"openidm-admi \
n\":\"Administrator\"},\"notificationTypes\":{\"error\&q \
uot;:{\"iconPath\":\"images/notifications/error.png\",\"name\ \
":\"common.notification.types.error\"},\"warning\":{\"ic \
onPath\":\"images/notifications/warning.png\",\"name\":\" \
;common.notification.types.warning\"},\"info\":{\"iconPath\": \
\"images/notifications/info.png\",\"name\":\"common.notificat \
ion.types.info\"}},\"siteImages\":[\"images/passphrase/mail.png\",\"im
ages/passphrase/user.png\",\"images/passphrase/report.png\",\"im \
ages/passphrase/twitter.png\"],\"siteIdentification\":false,\"lang\":\"en\",\"securityQuestions\":false}}"
</span><span class="cx"> ]
</span><span class="lines">@@ -83,24 +62,24 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> server.respondWith(
</span><del>- "GET",
</del><ins>+ "GET",
</ins><span class="cx"> "/openidm/info/login",
</span><span class="cx"> [
</span><del>- 401,
</del><ins>+ 401,
</ins><span class="cx"> { },
</span><span class="cx"> "{ \"code\": 401, \
\"reason\": \"Unauthorized\", \"message\": \
\"Access Denied\" }" </span><span class="cx"> ]
</span><span class="cx"> );
</span><del>-
</del><ins>+
</ins><span class="cx"> server.respondWith(
</span><del>- "GET",
</del><ins>+ "GET",
</ins><span class="cx"> "/openidm/config/ui/themeconfig",
</span><span class="cx"> [
</span><del>- 200,
</del><ins>+ 200,
</ins><span class="cx"> { },
</span><span class="cx"> \
"{\"icon\":\"favicon.ico\",\"settings\":{\"foo \
ter\":{\"mailto\":\"info@forgerock.com\",\"phone\": \
\"+47-2108-1746\"},\"logo\":{\"title\":\"ForgeRock\ \
",\"src\":\"images/logo.png\",\"height\":\"80\ \
",\"alt\":\"ForgeRock\",\"width\":\"120\" \
},\"lessVars\":{\"active-menu-font-color\":\"#f9f9f9\",\ \
"color-active\":\"#80b7ab\",\"color-info\":\"blue\& \
quot;,\"color-error\":\"#d97986\",\"header-border-color\" \
;:\"#5D5D5D\",\"login-container-width\":\"430px\",\" \
;button-hover-lightness\":\"4%\",\"input-border-invalid-color\&quo \
t;:\"#f8b9b3\",\"footer-height\":\"126px\",\"color-war
ning\":\"yellow\",\"line-height\":\"18px\",\" \
;message-background-color\":\"#fff\",\"column-padding\":\&quo \
t;0px\",\"href-color-hover\":\"#5e887f\",\"input-border- \
basic\":\"#DBDBDB\",\"font-size\":\"14px\",\"b \
ackground-font-color\":\"#5a646d\",\"login-container-label-align\& \
quot;:\"left\",\"background-image\":\"url('../images/box-bg.png')\",\"background-position\":\"950px \
-100px\",\"input-background-invalid-color\":\"#fff\",\"c \
ontent-background\":\"#f9f9f9\",\"highlight-color\":\"#e \
eea07\",\"background-color\":\"#eee\",\"inactive-menu-co \
lor\":\"#5d6871\",\"href-color\":\"#80b7ab\",\"active-menu-color\":\"#80b7ab\",\"site-width\"
:\"960px\",\"input-background-color\":\"#fff\",\" \
color-inactive\":\"gray\",\"inactive-menu-font-color\":\"#f9f9f9\",\"font-family\":\"Arial, \
Helvetica, sans-serif\",\"font-color\":\"#5a646d\",\"footer-background-color\":\"rgba(238, \
238, 238, 0.7)\",\"medium-container-width\":\"850px\",\" \
color-success\":\"#71bd71\",\"background-repeat\":\"no-repeat\"}}}"
</span><span class="cx"> ]
</span><span class="cx"> );
</span><span class="cx">
</span><span class="cx"> };
</span><del>-});
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkopenidmuiopenidmuicommonsrctestresourcesqunithtml"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-common/src/test/resources/qunit.html (5357 => 5358)</h4> \
<pre class="diff"><span> <span class="info">--- \
trunk/openidm-ui/openidm-ui-common/src/test/resources/qunit.html 2015-05-22 08:18:02 \
UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-common/src/test/resources/qunit.html 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>- <base href="../www/">
</del><ins>+ <base href="../www/" />
</ins><span class="cx"> <meta charset="utf-8">
</span><del>- <title>QUnit Tests</title>
</del><ins>+ <title>ForgeRock UI - QUnit Tests</title>
</ins><span class="cx"> <link rel="stylesheet" \
href="../test/css/qunit-1.14.0.css"> </span><span class="cx"> \
</head> </span><span class="cx"> <body>
</span><span class="lines">@@ -16,17 +16,16 @@
</span><span class="cx"> <div id="popup">
</span><span class="cx"> <div id="popup-content" \
class="radious"></div> </span><span class="cx"> \
</div> </span><del>- <div id="footer"></div>
</del><ins>+
</ins><span class="cx"> <div \
id="dialog-background"></div> </span><span class="cx"> \
<div id="dialogs"></div> </span><del>- <div \
id="content"></div> </del><ins>+ <footer \
id="footer" class="footer"></footer> </ins><span \
class="cx"> </span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <script \
src="../test/libs/qunit-1.15.0.js"></script> </span><span \
class="cx"> <script>QUnit.config.autostart = false;</script> \
</span><span class="cx"> </span><del>- <script data-main="main" \
src="libs/requirejs-2.1.14-min.js"></script>
- <script src="../test/run.js"></script>
</del><ins>+ <script data-main="../test/config" \
src="libs/requirejs-2.1.14-min.js"></script> </ins><span \
class="cx"> </body> </span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkopenidmuiopenidmuiendusersrcmainjsorgforgerockopenidmuiadminmainjs"></a>
<div class="modfile"><h4>Modified: \
trunk/openidm-ui/openidm-ui-enduser/src/main/js/org/forgerock/openidm/ui/admin/main.js \
(5357 => 5358)</h4> <pre class="diff"><span>
<span class="info">--- \
trunk/openidm-ui/openidm-ui-enduser/src/main/js/org/forgerock/openidm/ui/admin/main.js 2015-05-22 \
08:18:02 UTC (rev 5357)
+++ trunk/openidm-ui/openidm-ui-enduser/src/main/js/org/forgerock/openidm/ui/admin/main.js 2015-05-22 \
20:48:56 UTC (rev 5358) </span><span class="lines">@@ -31,16 +31,16 @@
</span><span class="cx"> "./users/AdminUserProfileView",
</span><span class="cx"> "./users/ChangeUserPasswordDialog",
</span><span class="cx"> "./users/UsersView",
</span><del>-
</del><ins>+
</ins><span class="cx"> "./workflow/FormManager",
</span><del>-
</del><ins>+
</ins><span class="cx"> "./workflow/tasks/TaskDetailsView",
</span><span class="cx"> "./workflow/tasks/AbstractTaskForm",
</span><span class="cx"> \
"./workflow/tasks/customview/ApplicationAcceptanceTask", </span><span \
class="cx"> "./workflow/tasks/TasksMenuView", </span><span class="cx"> \
"./workflow/tasks/TasksDashboard", </span><span class="cx"> \
"./workflow/tasks/TemplateTaskForm", </span><del>-
</del><ins>+
</ins><span class="cx"> "./workflow/processes/AbstractProcessForm",
</span><span class="cx"> \
"./workflow/processes/StartProcessDashboardView", </span><span class="cx">
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx"> "./Dashboard",
</span><span class="cx">
</span><span class="cx"> "./ManagedObjectNavigation",
</span><del>-
</del><ins>+
</ins><span class="cx"> "./notifications/NotificationDelegate",
</span><span class="cx"> "./notifications/NotificationsView",
</span><span class="cx"> "./notifications/NotificationViewHelper"
</span><del>-
</del><ins>+
</ins><span class="cx"> ]);
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkopenidmuipackagejson"></a>
<div class="modfile"><h4>Modified: trunk/openidm-ui/package.json (5357 => 5358)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/openidm-ui/package.json 2015-05-22 08:18:02 UTC (rev \
5357)
+++ trunk/openidm-ui/package.json 2015-05-22 20:48:56 UTC (rev 5358)
</span><span class="lines">@@ -10,4 +10,4 @@
</span><span class="cx"> "grunt-jslint": "1.1.8",
</span><span class="cx"> "grunt-contrib-qunit": "~0.4.0"
</span><span class="cx"> }
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
</ins></span></pre>
</div>
</div>
<div id="footer">Copyright (c) by ForgeRock. All rights reserved.</div>
</body>
</html>
_______________________________________________
CommitOpenIDM mailing list
CommitOpenIDM@forgerock.org
https://lists.forgerock.org/mailman/listinfo/commitopenidm
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic