Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 881E611CCA for ; Tue, 19 Aug 2014 01:50:55 +0000 (UTC) Received: (qmail 9752 invoked by uid 500); 19 Aug 2014 01:50:55 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 9723 invoked by uid 500); 19 Aug 2014 01:50:55 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 9714 invoked by uid 99); 19 Aug 2014 01:50:55 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 01:50:55 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id F15E29C6F18; Tue, 19 Aug 2014 01:50:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: purplecabbage@apache.org To: commits@cordova.apache.org Date: Tue, 19 Aug 2014 01:50:55 -0000 Message-Id: <94bbce6c296440c98cb59d532180c883@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: Merge renamed tests dir Merge renamed tests dir Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/e364377d Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/e364377d Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/e364377d Branch: refs/heads/master Commit: e364377d4f456f196b85b61ab68bb203867ebaee Parents: f833c39 395302e Author: Edna Morales Authored: Wed Aug 13 13:24:50 2014 -0400 Committer: Edna Morales Committed: Wed Aug 13 13:24:50 2014 -0400 ---------------------------------------------------------------------- RELEASENOTES.md | 6 +++++ plugin.xml | 2 +- test/tests.js | 62 --------------------------------------------------- tests/plugin.xml | 29 ++++++++++++++++++++++++ tests/tests.js | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 63 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/e364377d/tests/tests.js ---------------------------------------------------------------------- diff --cc tests/tests.js index 0000000,3f785ec..8c4d22b mode 000000,100644..100644 --- a/tests/tests.js +++ b/tests/tests.js @@@ -1,0 -1,55 +1,62 @@@ + /* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + + exports.defineAutoTest = function () { + describe('Splashscreen (cordova)', function () { + it("splashscreen.spec.1 should exist", function () { + expect(navigator.splashscreen).toBeDefined(); + }); + + it("splashscreen.spec.2 exec method should exist", function () { + expect(navigator.splashscreen.show).toBeDefined(); + expect(typeof navigator.splashscreen.show).toBe('function'); + }); + + it("splashscreen.spec.3 exec method should exist", function () { + expect(navigator.splashscreen.hide).toBeDefined(); + expect(typeof navigator.splashscreen.hide).toBe('function'); + }); + }); + }; + + exports.defineManualTests = function (contentEl, createActionButton) { + function showFor(duration) { + navigator.splashscreen.show(); + window.setTimeout(function () { + navigator.splashscreen.hide(); + }, 1000 * duration); + } + ++ contentEl.innerHTML = '

Splashscreen Tests

' + ++ '

Note for WP: AutoHideSplashScreen must be set to false in config.xml

' + ++ '
' + ++ 'Expected result: Will show the Cordova splashscreen for 1 second' + ++ '

' + ++ 'Expected result: Will show the Cordova splashscreen for 5 seconds'; ++ + createActionButton('Show for 1 second', function () { + showFor(1); - }); ++ }, 'show1'); + + createActionButton('Show for 5 seconds', function () { + showFor(5); - }); ++ }, 'show5'); + };