ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pravin Dsilva (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-18808) mocha-phantomjs tests do not run using PhantomJS version 2.1.1
Date Mon, 07 Nov 2016 11:25:00 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-18808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15643914#comment-15643914
] 

Pravin Dsilva commented on AMBARI-18808:
----------------------------------------

To resolve this issue, added code to call 'window.initMochaPhantomJS()' before calling 'mocha.ui('bdd')'
method in the ambari-web/app/assets/test/test.html file.

ambari-web/app/assets/test/test.html
     $.mocho = true;
     $.hostName = 'localhost:3333';
+    window.initMochaPhantomJS && window.initMochaPhantomJS();
     mocha.ui('bdd');
     mocha.reporter('html');
     expect = chai.expect;


> mocha-phantomjs tests do not run using PhantomJS version 2.1.1
> --------------------------------------------------------------
>
>                 Key: AMBARI-18808
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18808
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-web
>    Affects Versions: 2.4.0
>         Environment: x86, ppc64le
> Red Hat Enterprise Linux Server release 7.2 (Maipo)
>            Reporter: Pravin Dsilva
>            Priority: Minor
>
> We are trying to build Ambari on ppc64le architecture. The current working version for
PhantomJS on ppc64le is version 2.1.1. 
> For running mocha-phantomjs tests using PhantomJS 2.1.1 the following version changes
have been made in ambari-web/package.json:
> --- a/ambari-web/package.json
> +++ b/ambari-web/package.json
> @@ -19,8 +19,8 @@
>    },
>    "devDependencies": {
> --    "phantomjs": "^1.9.2",
> --    "mocha":"1.9.0",
> --    "mocha-phantomjs": "~3.1.6",
> +    "phantomjs": "2.1.1",
> +    "mocha":"1.21.5",
> +    "mocha-phantomjs": "~4.1.0",
> On running the tests, the below error is seen:
> mocha-phantomjs   -R min public/test/test.html
> CLDR.pluralForm not found. Em.I18n will not support count-based inflection.
> STATEMANAGER: Entering root
> STATEMANAGER: Sending event 'navigateAway' to state root.
> STATEMANAGER: Sending event 'unroutePath' to state root.
> STATEMANAGER: Sending event 'routePath' to state root.
> STATEMANAGER: Entering root.index
> STATEMANAGER: Entering root.login
> STATEMANAGER: Entering root
> Error loading resource file:///img/logo-white.png (203). Details: Error opening /img/logo-white.png:
No such file or directory
> Likely due to external resource loading and timing, your tests require calling `window.initMochaPhantomJS()`
before calling any mocha setup functions. See https://github.com/nathanboktae/mocha-phantomjs-core/issues/12



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message