Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

"global failure" for last test when acceptance test is present #194

Description

@allthesignals

global failure:

beforeEach failed on global failure: Cannot read property 'setContext' of null:

Source: | TypeError: Cannot read property 'setContext' of null     at Object.beforeEach (http://localhost:7357/assets/test-support.js:9324:16)     at callHook (http://localhost:7357/assets/test-support.js:4072:25)     at runHook (http://localhost:7357/assets/test-support.js:4095:7)     at Object.advance (http://localhost:7357/assets/test-support.js:3691:26)     at Test.queue (http://localhost:7357/assets/test-support.js:4264:22)     at test (http://localhost:7357/assets/test-support.js:4498:12)     at Object.onError (http://localhost:7357/assets/test-support.js:5212:5)     at window.onerror (http://localhost:7357/assets/test-support.js:6558:18)

This global failure occurs when I have an acceptance test present in my tests directory. NOTE: The tests run fine (including acceptance) in chrome headless browser, but not in the interactive qunit interface. I'm not sure how to approach this...

Here is my package.json:

{
  "name": "labs-nyc-factfinder",
  "version": "0.0.0",
  "description": "Small description for labs-nyc-factfinder goes here",
  "license": "MIT",
  "author": "",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "repository": "",
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "devDependencies": {
    "babel-eslint": "^7.2.3",
    "broccoli-asset-rev": "^2.4.5",
    "broccoli-clean-css": "^1.1.0",
    "d3": "^4.11.0",
    "ember-ajax": "^3.0.0",
    "ember-browserify": "^1.2.0",
    "ember-cli": "~2.14.0",
    "ember-cli-app-version": "^3.0.0",
    "ember-cli-babel": "^6.3.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-eslint": "^3.0.0",
    "ember-cli-foundation-6-sass": "0.0.24",
    "ember-cli-htmlbars": "^2.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.4.3",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-numeral": "^1.0.0",
    "ember-cli-qunit": "^4.0.0",
    "ember-cli-sass": "^6.2.0",
    "ember-cli-shims": "^1.1.0",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-d3": "^0.3.4",
    "ember-data": "~2.14.3",
    "ember-decorators": "^1.3.1",
    "ember-export-application-global": "^2.0.0",
    "ember-fetch": "^3.4.3",
    "ember-font-awesome": "^4.0.0-alpha.13",
    "ember-load-initializers": "^1.0.0",
    "ember-lodash": "^4.17.5",
    "ember-math-helpers": "^2.3.0",
    "ember-native-dom-helpers": "^0.5.4",
    "ember-resize": "0.0.17",
    "ember-resolver": "^4.0.0",
    "ember-source": "~2.14.0",
    "ember-test-helpers": "^0.7.0-beta.4",
    "eslint": "^4.3.0",
    "eslint-config-airbnb": "^15.1.0",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-jsx-a11y": "^5.1.1",
    "eslint-plugin-react": "^7.1.0",
    "foundation-sites": "^6.4.3",
    "loader.js": "^4.2.3"
  },
  "engines": {
    "node": "^4.5 || 6.* || >= 7.*"
  },
  "private": true,
  "dependencies": {
    "@turf/bbox": "^5.0.0",
    "babel-eslint": "^8.0.1",
    "ember-jane-maps": "0.0.5",
    "numeral": "^2.0.6"
  }
}

It seems to be caused by the visit('/report/demographic'); helper.

Here's the full test:

import { test } from 'qunit';
import moduleForAcceptance from 'labs-nyc-factfinder/tests/helpers/module-for-acceptance';

moduleForAcceptance('Acceptance | report shows correct statistics');

test('visiting /report', function(assert) {
  visit('/report/demographic');

  andThen(function() {
    assert.equal(currentURL(), '/report/demographic');
  });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions