Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Many Payments Panel tests failing #5951

Closed
willy-b opened this issue Nov 30, 2016 · 3 comments
Closed

Many Payments Panel tests failing #5951

willy-b opened this issue Nov 30, 2016 · 3 comments

Comments

@willy-b
Copy link
Contributor

willy-b commented Nov 30, 2016

Did you search for similar issues before submitting this one?
Yes. This is related to #5887.

Describe the issue you encountered:
On latest master, if I run the tests just for the Payments Panel, most are failing (4/7):

NODE_ENV=test mocha --require babel-register --require babel-polyfill --recursive test/components/ledgerPanelTest.js
(node:26848) DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead.


  Payments Panel
    can setup payments
      ✓ shows welcome page (864ms)
      1) payments can be enabled
      2) payments can be disabled
      ✓ advanced settings is hidden by default (897ms)
      3) advanced settings is visible when payments are enabled
      4) can create wallet

  synopsis
    ✓ no table if empty synopsis 
    5) creates synopsis table after visiting a site
    6) can sort synopsis table
    7) can disable site


  3 passing (2m)
  7 failing

  1) Payments Panel can setup payments payments can be enabled:
     Error: Promise was rejected with the following reason: Error: unknown error: Cannot read property 'state' of undefined
  

  2) Payments Panel can setup payments payments can be disabled:
     WaitUntilTimeoutError: Promise was rejected with the following reason: Error: unknown error: Cannot read property 'state' of undefined
      at execute(<Function>) - brave.js:293:19

  3) Payments Panel can setup payments advanced settings is visible when payments are enabled:
     Error: element (.advancedSettings) still not visible after 10000ms
  

  4) Payments Panel can setup payments can create wallet:
     Error: Promise was rejected with the following reason: timeout
  

  5) synopsis creates synopsis table after visiting a site:
     WaitUntilTimeoutError: Promise was rejected with the following reason: timeout
      at getText("div") - ledgerPanelTest.js:153:21

  6) synopsis can sort synopsis table:
     WaitUntilTimeoutError: element ([data-l10n-id="publisher"]) still not visible after 5000ms
      at isVisible("[data-l10n-id="publisher"]") - waitForVisible.js:37:22

  7) synopsis can disable site:
     WaitUntilTimeoutError: element ([data-l10n-id="publisher"]) still not visible after 5000ms
      at isVisible("[data-l10n-id="publisher"]") - waitForVisible.js:37:22

Expected behavior:
The expected behavior is that tests on master should pass.

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    Linux, Ubuntu 14.04 LTS.

  • Brave Version:
    Latest master, but I first saw this in early October.

  • Steps to reproduce:

    1. Run tests in tests/components/ledgerPanelTest.js
      e.g. with NODE_ENV=test mocha --require babel-register --require babel-polyfill --recursive test/components/ledgerPanelTest.js
    2. Observe 4/7 tests do not pass
  • Any related issues:
    Add unit tests for ledger backup and minimum visits #5887

@luixxiul luixxiul added this to the 1.0.0 milestone Dec 4, 2016
@bsclifton
Copy link
Member

Should be fixed w/ #6009; updating milestone

@bsclifton bsclifton modified the milestones: 0.13.0, 1.0.0 Dec 5, 2016
@bsclifton bsclifton self-assigned this Dec 6, 2016
@willy-b
Copy link
Contributor Author

willy-b commented Dec 7, 2016

sweet. btw, I was using npm run watch instead of npm run watch-all ; thanks for including the full test steps in your commit @bsclifton, npm run watch-all happens to fix some other issues I had.

@bsclifton
Copy link
Member

bsclifton commented Dec 7, 2016

@willy-b ahh- that explains it 😄 npm run watch is great for running the app, but it won't work properly for tests. npm run watch-all is your best bet. If you only want to run tests, you can do npm run watch-test. If you choose to run unit tests, those don't need a watch process running (and can be triggered w/ npm run unittest)

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

No branches or pull requests

4 participants