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

[Glimmer2] Port {{#each-in}} tests #13136

Merged
merged 3 commits into from
Mar 21, 2016
Merged

Conversation

mmun
Copy link
Member

@mmun mmun commented Mar 19, 2016

Part of #13127.

  • Adds a simple assertStableRerender helper because it was a pattern I kept reusing.
  • Ports the each-in tests and uses BasicConditionalsTest to test the inverse behaviour.

cc @chancancode.

this.assertStableRerender();
}

[`@test it renders the inverse block when given a falsy value`]() {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Fiiiiine. I'll try.

@mmun mmun force-pushed the port-each-in-tests branch from 21d5b92 to 9210251 Compare March 20, 2016 00:43
@mmun
Copy link
Member Author

mmun commented Mar 20, 2016

Updated.

}
});

this.assertStableRerender();
Copy link
Member

Choose a reason for hiding this comment

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

Can you move assertStableRerender after assertHTML? (After a brief pause, I realize they are isomorphic because assertStableRerender takes a snapshot and assert that they are the same, but the "initial render -> assert result -> assertStableRerender" flow matches other test cases and make the intention more clear.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, my bad. I should have left it how it was!

@chancancode
Copy link
Member

Added some comments about the INUR test pattern, otherwise looks great 👀

@chancancode
Copy link
Member

(I added a few FIXMEs in packages/ember-glimmer/tests/integration/content-test.js in #13141. When you rebase, can you also swap them with your new helper? 😬)

@mmun mmun force-pushed the port-each-in-tests branch from 9210251 to b9f30cf Compare March 21, 2016 01:51
@mmun mmun force-pushed the port-each-in-tests branch from b9f30cf to 124c5be Compare March 21, 2016 01:55
@mmun
Copy link
Member Author

mmun commented Mar 21, 2016

@chancancode Ready for another round of review! I added a couple comments in the parts where we force a this.rerender().

chancancode added a commit that referenced this pull request Mar 21, 2016
[Glimmer2] Port {{#each-in}} tests
@chancancode chancancode merged commit e444625 into emberjs:master Mar 21, 2016
@mmun mmun deleted the port-each-in-tests branch March 21, 2016 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants