1

I have a simple acceptance script below which only checks for the currentURL. However whenever I run the test it only gives me timeout.

import { test } from 'qunit';
import moduleForAcceptance from 'rates-ui/tests/helpers/module-for-acceptance';

moduleForAcceptance('Acceptance | filter panel');

test('visiting /', function(assert) {
  visit('/');
  andThen(function() {
    assert.equal(currentURL(), '/');
  });
  // assert.ok('ok', 'ok');
});
Emil Reña Enriquez
  • 2,929
  • 1
  • 29
  • 32
  • I guess we need more information; such as what are you doing within `model` hook of `index` route? if you do not do anything it simply should work. check out the following [twiddle](https://ember-twiddle.com/9ded17afcbe96f072b678ece254572a9?openFiles=tests.acceptance.my-acceptance-test.js%2C). – feanor07 May 23 '17 at 06:32
  • Update: I found out that the initializer is the culprit for the timeout. however I need some data which is defined inside the initializer. @alptugd – Emil Reña Enriquez May 23 '17 at 09:30
  • so did you solve your problem? did you achieve waiting for the initializer? – feanor07 May 24 '17 at 06:29

1 Answers1

0

So the reason behind the time out is that there is an initializer which is required for one of my add-ons.

so for testing, I checked if the app is running on test environment. if it doesn't then I execute the initializer.

Emil Reña Enriquez
  • 2,929
  • 1
  • 29
  • 32