cibernox / ember-power-select

The extensible select component built for ember.
http://www.ember-power-select.com
Other
540 stars 377 forks source link

Cannot call writableTag after the object is destroyed. (in acceptance tests) #920

Open MartinMalinda opened 7 years ago

MartinMalinda commented 7 years ago

Power select makes tests randomly fail for me. The error does not occur when the acceptance test is run alone, but only when run in a series of other tests. It seems like something is not getting cleaned up.

"ember-power-select": "^1.8.4",
"ember-source": "~2.13.0-beta.1",
"ember-cli-qunit": "^3.1.2",

I am using the selectChoose helper.

export default (startAt, endAt, optionIndex) => {
  run(() => {
    fillIn('.email', 'malindacz@gmail.com');
  });

  clickDatePicker('.startAt', startAt);
  clickDatePicker('.endAt', endAt);

  andThen(() => {
    run(() => {
      selectChoose('.new-booking-form', '.ember-power-select-option', optionIndex);
    });

    run(() => {
      click('.new-booking-form [data-save-button]');      
    });
  });
}

It may or may not be related to some PublicAPI call..?

screen shot 2017-05-27 at 09 59 15

Reproduction repo: https://github.com/MartinMalinda/booking-demo (until this commit: https://github.com/MartinMalinda/booking-demo/commit/775d037c9087ed18507133d4ab90656f83e08667)

MartinMalinda commented 7 years ago

I will try different versions of PS and Ember to see if it makes any difference.

cibernox commented 7 years ago

The You modified XXX twice in a single render is usually a symptom of another thing erroring. But I have never seen this writableTag thing before.

My only suggestion is that, since selectChoose is async, you might want to put the folloing click in another andThen. That is the only possible source of race condition I see, assuming it's not related with the datepicker.