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 failing test around moduleName mutation #14194

Closed
wants to merge 1 commit into from

Conversation

asakusuma
Copy link
Contributor

Failing test that addresses #14192

cc @krisselden @rwjblue @trentmwillis

@@ -48,6 +48,20 @@ moduleFor('Components test: local lookup', class extends RenderingTest {
this.assertText('Nested template says: Hi!', 'Re-render works');
}

['@htmlbars moduleName remains unchanged']() {
Copy link
Member

Choose a reason for hiding this comment

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

There ain't no htmlbars up in here

Copy link
Member

Choose a reason for hiding this comment

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

You will need to target the PR against beta branch to get it to run tests.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm. I'm happy to land this test here though too. Can you remove the @htmlbars prefix, and open a separate PR against beta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


this.render('{{x-root}}');

let moduleName = this.owner.lookup('template:-top-level').meta.moduleName;
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this.owner.lookup('template:-top-level') is returning undefined (causing the Travis failures).

@asakusuma
Copy link
Contributor Author

Ah, so this test is testing an implementation detail that is engine specific. Meta is stored differently between glimmer and htmlbars. I've updated the test, but I'm thinking it should be glimmer only.

@rwjblue
Copy link
Member

rwjblue commented Sep 3, 2016

Yeah, we completely removed the htmlbars stuff. So targeting glimmer only is perfect.


this.render('{{x-root}}');

let moduleName = this.owner.lookup('template:-top-level').spec.meta.moduleName;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can make moduleName a getter on the template wrapper class...

@rwjblue
Copy link
Member

rwjblue commented Sep 9, 2016

@asakusuma - Can you update this test to work with the recent refactor (making meta available both on the factory and the instance)? We can test that deepEquals(owner._lookupFactory('template:-top-level').meta, owner.lookup('template:-top-level').meta) too.

@rwjblue
Copy link
Member

rwjblue commented Sep 13, 2016

@asakusuma - Ping?

@asakusuma
Copy link
Contributor Author

@rwjblue sorry I totally forgot about this, yes I will do that.

@homu
Copy link
Contributor

homu commented Oct 8, 2016

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

@rwjblue
Copy link
Member

rwjblue commented Nov 9, 2016

@asakusuma - I'm going to go ahead and close this for now, please submit a new PR if you have a chance to pick this up again...

@rwjblue rwjblue closed this Nov 9, 2016
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.

3 participants