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

blueprints/component-test: Add RFC232 variants #15934

Merged
merged 3 commits into from
Dec 6, 2017

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 6, 2017

Addresses the component-test and test framework detector parts of #15933

/cc @rwjblue @alexander-alvarez

@Turbo87 Turbo87 force-pushed the qunit-rfc-232-files branch from 16ab906 to 141c386 Compare December 6, 2017 20:37
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

Minor comments, but generally LGTM...

@@ -11,14 +11,22 @@ module.exports = function(blueprint) {
var type;

var dependencies = this.project.dependencies();
if ('ember-qunit' in dependencies || 'ember-cli-qunit' in dependencies) {
if ('ember-qunit' in dependencies) {
type = 'qunit';
Copy link
Member

Choose a reason for hiding this comment

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

I think this can actually be tweaked to assume "new style" can't it? Basically, there are no known (to me at least) versions of ember-qunit taht supported usage as an addon but did not support the RFC232 style...

Copy link
Member Author

Choose a reason for hiding this comment

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

whoops, that was supposed to be the case, but I forgot to change it...

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

} else if ('ember-mocha' in dependencies) {
type = 'mocha-0.12';

} else if ('ember-cli-mocha' in dependencies) {
var checker = new VersionChecker({ root: this.project.root });
let checker = new VersionChecker({root: this.project.root});
Copy link
Member

Choose a reason for hiding this comment

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

Should probably just be passing in this.project I think (not that this is a change you made)

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

assert.equal(this.element.textContent.trim(), '');

// Template block usage:
await(hbs`
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be await render(?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@Turbo87 Turbo87 force-pushed the qunit-rfc-232-files branch from 141c386 to b3fd27c Compare December 6, 2017 20:42
@Turbo87 Turbo87 force-pushed the qunit-rfc-232-files branch from b3fd27c to 27b852a Compare December 6, 2017 20:43

test('it renders', async function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });
Copy link
Contributor

Choose a reason for hiding this comment

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

// Handle any actions with this.set('myAction', function(val) { ... });

should this be this.on ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, because with the new system this.on does not exist anymore

@rwjblue correct me if I'm wrong

Copy link
Contributor

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.

yeah, and it's only needed for old-style actions, with closure actions the thing I put in there is all that's needed

Copy link
Contributor

Choose a reason for hiding this comment

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

got it.. 👌


test('it renders', async function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });
Copy link
Contributor

Choose a reason for hiding this comment

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

this.on

@rwjblue rwjblue merged commit d9b2b1f into emberjs:master Dec 6, 2017
@rwjblue
Copy link
Member

rwjblue commented Dec 6, 2017

LETS DO IT!

@Turbo87 Turbo87 deleted the qunit-rfc-232-files branch December 6, 2017 21:38
alexander-alvarez added a commit to alexander-alvarez/ember-qunit-nested-module-blueprints-polyfill that referenced this pull request Dec 8, 2017
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.

4 participants