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] Remove {{#view}} helper tests #13235

Closed

Conversation

chadhietala
Copy link
Contributor

This currently removes just the tests related to the view helper. I have left some tests in the file because I have a feeling that these tests are cross cutting and were used as coverage for components. I could be 100% incorrect about this but would like to hear from @rwjblue and @chancancode before they are removed 💣.

Furthermore, it looks like we will need to dereference all the view helpers in all of the tests before we can finally remove the helper. Luckily majority of the tests in #13127 should be addressing this.

Part of #13127

@chadhietala
Copy link
Contributor Author

Going to follow up with another PR to add some tests to curly-component tests that should cover these types of test cases.


QUnit.test('should teardown observers from bound properties on rerender', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chadhietala chadhietala changed the title [WIP] Remove {{#view}} helper [WIP Glimmer2] Remove {{#view}} helper Apr 2, 2016
QUnit.test('Child views created using the view helper should have their parent view set properly', function() {
var template = '{{#view}}{{#view}}{{view}}{{/view}}{{/view}}';

QUnit.test('Should not apply classes when bound property specified is false', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chadhietala
Copy link
Contributor Author

Will delete all the tests once I get a thumbs up.

QUnit.test('Child views created using the view helper should have their IDs registered for events', function() {
var template = '{{view}}{{view id="templateViewTest"}}';

QUnit.test('Should apply classes of the dasherized property name when bound property specified is true', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Appears to be {{#view}} specific.

@rwjblue
Copy link
Member

rwjblue commented Apr 3, 2016

Merged #13236, does this need to be updated?

@@ -35,7 +34,6 @@ registerPlugin('ast', AssertNoEachIn);

if (!_Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT) {
registerPlugin('ast', AssertNoViewAndControllerPaths);
registerPlugin('ast', AssertNoViewHelper);
Copy link
Member

Choose a reason for hiding this comment

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

This likely should stick around (moved outside the if) to provide feedback to folks that might try to use {{view 'foo'}} after {{view keyword was removed.

@chadhietala
Copy link
Contributor Author

@rwjblue Not sure how people feel about deleting the tests but keep the helper around. I was thinking we would wait till the {{#view}} is no longer used internally for tests before merging this. If people are ok with loosing the coverage for {{#view}} for the time being then I can address the transform issue and then this should be in a reviewable state.

@chadhietala
Copy link
Contributor Author

There are pending PRs that remove some of the {{#view}} helper usage and didn't want to potentially create merge conflicts against those PRs.

@rwjblue
Copy link
Member

rwjblue commented Apr 3, 2016

@chadhietala - I was suggesting that we want to keep the transform that asserts when using {{view 'foo'}} around until ~ 3.0.0. For example, in 2.0.0 we removed the transform that asserted on {{each foo in bar}} usage, and since that silently does absolutely nothing was a fairly large troll factor...

@chadhietala
Copy link
Contributor Author

@rwjblue Yea that makes sense. What your thoughts about the coverage? Is it ok if we just delete the tests and not the view helper implementation?

@rwjblue
Copy link
Member

rwjblue commented Apr 3, 2016

The deletion definitely needs to happen, but I'd rather keep queue up the deletions and rebase (or merge master in here) as we go to land it all at once.

@homu
Copy link
Contributor

homu commented Apr 3, 2016

☔ The latest upstream changes (presumably #13192) made this pull request unmergeable. Please resolve the merge conflicts.

@chadhietala chadhietala changed the title [WIP Glimmer2] Remove {{#view}} helper [Glimmer2] Remove {{#view}} helper tests Apr 3, 2016
@chadhietala
Copy link
Contributor Author

So lets land the test removals and then I'll open another PR that removes the helper, but it will needed to be shepherded until all the view helpers are removed from the tests.

@homu
Copy link
Contributor

homu commented Apr 16, 2016

☔ The latest upstream changes (presumably #13319) made this pull request unmergeable. Please resolve the merge conflicts.

@locks locks added the Glimmer2 label Apr 19, 2016
@rwjblue
Copy link
Member

rwjblue commented Jun 10, 2016

These files have been deleted, closing...

@rwjblue rwjblue closed this Jun 10, 2016
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.

None yet

4 participants