question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Acceptance test times out

See original GitHub issue
import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from 'map/tests/helpers/start-app';
import PO from '../page-object';

const {
  fillable,
  visitable,
  text,
  clickable
} = PO;
var application;

module('Acceptance | submit feedback', {
  beforeEach: function() {
    application = startApp();
  },

  afterEach: function() {
    Ember.run(application, 'destroy');
  }
});

test('visiting /feedback', function(assert) {
  const feedback = PO.build({
    visit: visitable('/feedback'),
    closeModal: clickable('.modal .btn-primary'),

    form: {
      email: fillable('#feedback-email'),
      comment: fillable('#feedback-message'),
      submit: clickable('[type=submit]'),
      message: text('.ember-notify')
    }
  });


  feedback.visit()
    .closeModal();

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

  feedback.form()
    .email('test@blah.com')
    .comment('hello')
    .submit();

  andThen(function() {
    assert.equal(currentURL(), '');
    assert.equal(feedback.form().message(), 'Thank you for your feedback!');
  });
});

Which has mirage setup with the defaults, namespace set to ‘api’ and renamed the contact fixture/factory to feedback. Only the post is used, this.post('/feedbacks');.

Everything works manually in development (not in test).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:28 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
PratheepVcommented, Jan 9, 2017

Is there any way to debug this issue. I am getting it only in my CI. Local its working fine.

1reaction
visualjeffcommented, Mar 7, 2016

So I greped my projects app directory and found one use of Ember.run. It pertained to foundationjs.

So I went from…

import Ember from 'ember';

export default Ember.Component.extend({
  didInsertElement: function() {
      this._super();
      Ember.run.scheduleOnce('afterRender', this, function() {
          Ember.$(document).foundation();
      });
  }
});

To…

import Ember from 'ember';

export default Ember.Component.extend({
  didInsertElement: function() {
      this._super();
      Ember.$(document).foundation();
  }
});

So I removed the Ember.run. But I still see a timeout out in the acceptance tests.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling provider acceptance test failures when "go test
Identify which tests failed and which were skipped (as in go test timed out before that test was run). These are indicated by...
Read more >
Ember-cli acceptance test times out on await click(); qunit error ...
So it looks like if I run the test correctly with await click(btnSubmit) , the test times out on the click(), but if...
Read more >
Different ways to handle timeouts in your tests - Testim.io
Navigate to the properties panel of the step · Select “Override timeout” option · Change the default timeout value from 30 seconds to...
Read more >
Terraform appears to hang, acceptance tests are timing out
I ran the TestAccAzureRMVirtualNetworkPeering_importBasic with a 10m timeout, this test has never exceeded this time in my experience. Debug Log.
Read more >
What is Acceptance Testing (A Complete Guide)
This unique tutorial on Acceptance Testing will give you a complete overview of the meaning, types, uses, and various other factors involved in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found