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

Start addressing the tests #604

Closed
wants to merge 27 commits into from
Closed

Start addressing the tests #604

wants to merge 27 commits into from

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Jan 27, 2018

Ref.: #50

Starting by testing the components directory.

This uses feat/components as base. Can only be merged after #596

@hacdias
Copy link
Member Author

hacdias commented Jan 27, 2018

With the current configuration, I'm getting this:

----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |  Unknown |  Unknown |  Unknown |  Unknown |                |
----------|----------|----------|----------|----------|----------------|

@victorbjelkholm do you think you could help with this? nyc doesn't seem to be working correctly. I added the configuration to package.json and the instabul plugin to Babel.

Never mind Victor 😄 Although, I'd like to know if it is possible to integrate aegir here (for testing and coverage publishing).

@victorb
Copy link
Member

victorb commented Jan 27, 2018

I think you should start with setting up tests with spectron/acceptance testing. Main idea is to just make sure the core UI functionality works. Then you can start adding unit tests for making sure every detail is working. About coverage, we still working on making sure the secret management in Jenkins is stable and secure. So not gonna do that from jenkins just yet.

Another point, in general you should avoid having files with big and small letters, as you'll hit confusing errors when you name some file HelloWorld.md and on the OS you're developing you can load it as helloworld.js but it won't work on others (or vice-versa). It's easier to always have lower-case naming and use underscore instead.

@hacdias
Copy link
Member Author

hacdias commented Jan 27, 2018

I think you should start with setting up tests with spectron/acceptance testing. Main idea is to just make sure the core UI functionality works.

I'd like to do that but it isn't simply working... yet! Our electron is using some pre-compilers for LESS and Babel and I wasn't still able to decipher how to use that with Spectron.

Another point, in general you should avoid having files with big and small letters...

I'm just using CamelCase for files with components to follow React's best practices, but I can change that. Should I?

@codecov-io
Copy link

codecov-io commented Jan 27, 2018

Codecov Report

❗ No coverage uploaded for pull request base (feat/components@28608cd). Click here to learn what that means.
The diff coverage is 8.75%.

Impacted file tree graph

@@                Coverage Diff                @@
##             feat/components    #604   +/-   ##
=================================================
  Coverage                   ?   4.29%           
=================================================
  Files                      ?      56           
  Lines                      ?     839           
  Branches                   ?       0           
=================================================
  Hits                       ?      36           
  Misses                     ?     803           
  Partials                   ?       0
Impacted Files Coverage Δ
src/config.js 0% <ø> (ø)
src/components/MenuOption.js 0% <ø> (ø)
src/panes/Intro.js 0% <ø> (ø)
src/screens/welcome.js 0% <ø> (ø)
src/panes/Loader.js 0% <ø> (ø)
src/components/InfoBlock.js 0% <ø> (ø)
src/components/Button.js 100% <ø> (ø)
src/components/Footer.js 0% <ø> (ø)
src/components/IconButton.js 0% <ø> (ø)
src/components/IconDropdownList.js 0% <ø> (ø)
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28608cd...fd444fc. Read the comment docs.

@hacdias
Copy link
Member Author

hacdias commented Jan 27, 2018

@victorbjelkholm I'm trying to make this simply start the app and nothing seems to happen. I'll increase the timeout for something like 10 mins and see what happens.

image

Ref.: electron-userland/electron-compile#178

Edit: same thing. Nothing seems to happen after app.start()

@hacdias
Copy link
Member Author

hacdias commented Jan 27, 2018

Many conflicts.

@hacdias hacdias closed this Jan 27, 2018
@hacdias hacdias deleted the tests branch January 27, 2018 20:11
@hacdias
Copy link
Member Author

hacdias commented Jan 27, 2018

This tests got merged on #596. Keep working on #596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants