linkedin / linkedin/spaniel

Tests are flaky

Open
#49 0 comments 0 reactions 1 assignee View on GitHub

@SparshithNR is already working on this.

Since May 30, 2017.

Dominant language
JavaScript
Stars
92
Forks
34
PR merge metrics
No merged PRs in 30d

Description

The test are very dependent on `nightmare.wait()`. The asynchronous nature of the implementation makes things hard to test, but there are some tests that are flaky on local machines. A few potential fixes:

### Improve timing issues
1. Introduce `IMPRESSION_THRESHOLD` and `RAF_THRESHOLD` constants so that it's not a pain to change all the test `wait()` values every time we want to change thresholds or tweak global timing variables.
2. Increase the default [impression threshold](https://github.com/linkedin/spaniel/blob/master/test/app/index.js#L24) for tests
3. Increase RAF/general sync padding

### Try another headless browser
Like headless chrome. We would just need to re-implement [SpanielContext](https://github.com/linkedin/spaniel/blob/master/test/headless/spaniel-context.js) and [Context](https://github.com/linkedin/spaniel/blob/master/test/headless/context.js)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.