Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webui tests #417

Merged
merged 16 commits into from
Dec 3, 2017
Merged

Webui tests #417

merged 16 commits into from
Dec 3, 2017

Conversation

ayusharma
Copy link
Member

Type: feature / unit test

The following has been addressed in the PR:

  • There is a related issue
  • Unit or Functional tests are included in the PR

Description:

Resolves #415

@juanpicado juanpicado self-requested a review December 2, 2017 15:36
@juanpicado
Copy link
Member

@ayusharma we have a conflict here jest.config.js

@ayusharma
Copy link
Member Author

resolving conflict.

package.json Outdated
@@ -56,6 +56,7 @@
"babel-jest": "^21.2.0",
"babel-loader": "7.1.2",
"babel-plugin-flow-runtime": "0.11.1",
"babel-plugin-syntax-async-functions": "^6.13.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not babel do it out of the box already? babel-plugin-syntax-async-functions . I think after all merges we have to review the policy of presets

@@ -0,0 +1,9 @@
/**
* Setup configuration for Jest
* This file includes gloabl settings for the JEST environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo --> gloabl

Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes, but the test are failing, Do you have any idea?

@juanpicado
Copy link
Member

juanpicado commented Dec 2, 2017

Well, I did not manage to fix it. Something is really bad with the babel configuration. We have to find a solution all test are broken now

@juanpicado
Copy link
Member

Issues:

The first one is on .babelrc configuration file.

  • "es2015" preset is not needed it. "es2015-node4" does already include all you need.
  • "transform-class-properties" does break the functional test. You don't need it.
     "test": {
-      "presets": [ "es2015-node4", "es2015", "flow", "react"],
+      "presets": [ "es2015-node4", "flow", "react"],
       "plugins": [
         "transform-class-properties",
         "transform-object-rest-spread",
-        "transform-class-properties",
         "syntax-async-functions"
       ]
     },

The second issue is on jest.config.js.

If you map storage

    'storage': '<rootDir>/test/webui/components/__mocks__/storage.js',

causes

    TypeError: Storage is not a constructor

I think you have to use something less generic than storage. I'd rename all those modules as eg: uiStorage to avoid future conflics.

There are more issues, this is what I found by far.

@juanpicado
Copy link
Member

If you update the circleci.yaml removing Node4, you are done here 👍

@lock
Copy link

lock bot commented Jun 1, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants