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

Implement supportsDataTestProperties to disable tagless component assertion #291

Closed
wants to merge 2 commits into from

Conversation

bendemboski
Copy link
Contributor

Fixes #290

Copy link
Collaborator

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

nice work, @bendemboski! pretty much exactly what I had in mind 😅

});

bindDataTestAttributes(instance);
assert.ok(true, 'did not throw');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would prefer assert.expect(0); at the top of the test instead of this constant-condition assertion

I wish QUnit had a doesNotThrow() assertion...

let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` +
`automatically because tagName is empty.`;
let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` +
`automatically because tagName is empty.`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

might make sense to add a link here to the new README section. something like "if this was intentional have a look at xyz to see how to avoid this assertion"

@samselikoff
Copy link
Contributor

Thanks for your work on this @bendemboski , excited to get this in for AddonDocs & our own projects!

@ssutar
Copy link

ssutar commented Jan 31, 2019

Thanks @bendemboski waiting to get this released!

@bendemboski
Copy link
Contributor Author

@samselikoff @ssutar The update on this PR is that I'm waiting on @Turbo87 to reply to this comment to ensure that we want to add code to disable the assertion, rather than just removing it entirely.

@bendemboski
Copy link
Contributor Author

bendemboski commented Jan 31, 2019

@Turbo87 pushed a commit with PR feedback, but didn't squash to make review easier -- feel free to squash/rebase when you merge as I don't think the second commit really needs to be its own commit for posterity.

Also, in case your notifications came out of order or something, please have a look at this comment before merging!

@ssutar
Copy link

ssutar commented Feb 14, 2019

@bendemboski @Turbo87 Any update on this would be released?

@ssutar
Copy link

ssutar commented Feb 21, 2019

@bendemboski @Turbo87 Thanks! I tried using this PR locally however it throws an error:

You cannot use `attributeBindings` on a tag-less component

I tried to fix it with #323 which essentially extends this PR, please have a look.

This is a blocker for native classes migration as it has babel 7 support as a prerequisite. I am currently working on ES6 classes codemods with @pzuraq

Your feedback is much appreciated!!

@scalvert @tomdale @rwjblue FYI

@Turbo87
Copy link
Collaborator

Turbo87 commented Feb 22, 2019

thanks for testing and coming up with a fix @ssutar, I'll review in details once more as soon as I find a bit of free time

@Turbo87
Copy link
Collaborator

Turbo87 commented Mar 15, 2019

closing in favor of #323

@Turbo87 Turbo87 closed this Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants