UI: fix default values resetting form inputs (#22458)

This commit is contained in:
claire bontempo
2023-08-20 10:55:41 -07:00
committed by GitHub
parent 98523a6874
commit abd6324e50
3 changed files with 7 additions and 2 deletions

View File

@@ -26,7 +26,8 @@ module('Integration | Component | form field', function (hooks) {
};
const setup = async function (attr) {
const model = EmberObject.create({});
// ember sets model attrs from the defaultValue key, mimicking that behavior here
const model = EmberObject.create({ [attr.name]: attr.options?.defaultValue });
const spy = sinon.spy();
this.set('onChange', spy);
this.set('model', model);