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

'data-test-' attributes are incorrectly prefixed with 'this' for curly bracket components #48

Closed
chbonser opened this issue Dec 10, 2019 · 7 comments

Comments

@chbonser
Copy link

data-test- attributes are prefixed with this for curly bracket invoked components. Example diff:

-{{#paper-card data-test-job-profile-status as |card|}}
+{{#paper-card this.data-test-job-profile-status as |card|}}

The same attributes are handled properly for angle bracket invoked components.

I suppose I could run https://github.com/ember-codemods/ember-angle-brackets-codemod first. If that is the expectation then perhaps adding a note to the readme would be called for.

@suchitadoshi1987
Copy link

@chbonser Could you confirm if this is happening only for valueless data params?

@chbonser
Copy link
Author

@suchitadoshi1987, you are correct.

@suchitadoshi1987
Copy link

@chbonser #51 should fix that issue

@suchitadoshi1987
Copy link

@chbonser try setting the flag --dontAssumeThis=true when you are running the codemod, that would potentially fix the issue too

@Turbo87
Copy link
Contributor

Turbo87 commented Dec 15, 2019

@suchitadoshi1987 @chbonser https://github.com/simplabs/ember-test-selectors-params-codemod 😉

@suchitadoshi1987
Copy link

suchitadoshi1987 commented Dec 16, 2019

oh... that's even better :). Thank you @Turbo87

@chbonser
Copy link
Author

That's great. Thanks @Turbo87

@Turbo87 Turbo87 closed this as completed Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants