You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a recent update to Ember 3.8 I updated this addon and an existing test (last updated 2 years ago) began failing.
While saving, the record is updated and after the save finalizes the record claims to not have any dirty attributes.
test('String Array - changed and then changed back while inflight', function(assert) {
let record = this.testRecord;
// Sanity check the default values
assert.notOk(record.get('hasDirtyAttributes'), 'Record should start out clean');
assert.deepEqual(record.get('tags').toArray(), ['Kroger', 'Target', 'Meijer'], 'Should start out with the proper tags.');
// Sanity check for saving and dirtyness
Ember.run(function() { record.get('tags').addObject('Remke'); });
assert.deepEqual(record.get('tags').toArray(), ['Kroger', 'Target', 'Meijer', 'Remke'], 'Should have been updated.');
assert.ok(record.get('hasDirtyAttributes'), 'Record now be dirty');
Ember.run(() => { record.save(); });
Ember.run(() => { record.get('tags').removeObject('Remke'); });
Ember.run(() => { this.resumeSave(); });
Ember.run(() => {
// This is where hasDirtyAttributes is coming back false
assert.ok(record.get('hasDirtyAttributes'), 'Record should still be dirty because it was change back in flight');
assert.deepEqual(record.get('tags').toArray(), ['Kroger', 'Target', 'Meijer'], 'Should have been updated.');
});
});
The text was updated successfully, but these errors were encountered:
ELepolt
changed the title
Fragment changed inflight is not
Fragment changed inflight is not returning as dirty
Jun 5, 2019
In a recent update to Ember 3.8 I updated this addon and an existing test (last updated 2 years ago) began failing.
While saving, the record is updated and after the save finalizes the record claims to not have any dirty attributes.
The text was updated successfully, but these errors were encountered: