Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add set test #401

Merged
merged 3 commits into from
Jan 15, 2020
Merged

Add set test #401

merged 3 commits into from
Jan 15, 2020

Conversation

snewcomer
Copy link
Collaborator

@snewcomer snewcomer self-assigned this Jan 11, 2020
assert.equal(c.get('org.usa.mn'), 'undefined');
assert.equal(dummyModel.org.usa.ny, 'nil2');
assert.equal(dummyModel.org.usa.mn, 'undefined');
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josemarluedke Does this test look right to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Looks good! Interesting that it is passing. Not sure how to capture that bug in a test then.

README.md Outdated
<Input @value={{changeset.lastName}} />
<input
value={{model.firstName}}
oninput={{action (changeset-set this.changeset "model.lastName") value="target.value"}}>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josemarluedke Do these README updates look ok to you? ie. the model as the value as noted #398 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change is correct. I believe forms should always reflect the in-flight model. This way, we can revert changes and have forms reflect it without any issues. Also, If you have a form in a tab layout for example, and you hide half of the form then go back to that, the form would show the incorrect data, the user would think they have lost their changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted. Thanks a ton for the insight.

@snewcomer snewcomer merged commit 903175f into master Jan 15, 2020
@snewcomer snewcomer deleted the sn/add-test-set-key branch January 15, 2020 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants