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

utils/bind-data-test-attributes: Handle failing set() with assert instead of warning #205

Merged
merged 2 commits into from
Sep 14, 2018

Conversation

mathieupoteriepeopledoc
Copy link
Contributor

@mathieupoteriepeopledoc mathieupoteriepeopledoc commented Aug 28, 2018

Wrote an integration test in order to test that the error is thrown when a data-test attribute is set on a tagless component.

close #204

@mathieupoteriepeopledoc mathieupoteriepeopledoc changed the title utils/bind-data-test-attributes: Handle failing with assert instead of warning utils/bind-data-test-attributes: Handle failing set() with assert instead of warning Aug 28, 2018
@Turbo87
Copy link
Collaborator

Turbo87 commented Aug 28, 2018

looks like CI is failing

@mathieupoteriepeopledoc
Copy link
Contributor Author

@Turbo87 I will take a look this afternoon. It was working locally. :)

@mathieupoteriepeopledoc
Copy link
Contributor Author

I updated the PR, in order to pass the test for every ember versions. I keep working on it and will let you know when I found a satisfying solution.

@mathieupoteriepeopledoc
Copy link
Contributor Author

@Turbo87 , the CI is failing, but on the same stage than the other PR (in the ember-release scenario). A colleague and I try to investigate on this issue. If we find anything, we will let you know.

@Turbo87
Copy link
Collaborator

Turbo87 commented Aug 31, 2018

@mathieupoteriepeopledoc CI should be fixed now. can you rebase your changes on top of master?

@mathieupoteriepeopledoc
Copy link
Contributor Author

@Turbo87 , this is done, thanks to @xcambar :)


import bindDataTestAttributes from 'ember-test-selectors/utils/bind-data-test-attributes';

module('Unit | Utility | bind data test attributes');

test('it adds missing attributeBindings array', function(assert) {
let Fixture = EmberObject.extend({
'data-test-from-factory': 'foo',
'data-test-from-factory': 'foo'
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you remove these unrelated changes? the PR should only contain the changed functionality. Styling changes should be proposed in a seperate PR.

@mathieupoteriepeopledoc mathieupoteriepeopledoc force-pushed the set_assert branch 2 times, most recently from 1465c25 to ca673f5 Compare September 3, 2018 14:21
@mathieupoteriepeopledoc mathieupoteriepeopledoc force-pushed the set_assert branch 2 times, most recently from bc48d18 to ad03823 Compare September 3, 2018 15:02
@mathieupoteriepeopledoc
Copy link
Contributor Author

@Turbo87, this is fixed, and git history of this PR has been cleaned.

let Fixture = EmberObject.extend({
tagName: '',
'data-test-from-factory': 'foo',
if (!config.stripTestSelectors) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand this. Why are you checking config.stripTestSelectors here? The bindDataTestAttributes() function doesn't seem to care about that config option 🤔

@mathieupoteriepeopledoc
Copy link
Contributor Author

@Turbo87 , sorry it was some code remaining from an integration test made previously.
I think it's okay now, sorry for the many feedbacks ;)

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.

awesome, thanks! and sorry that it took so long to review 😞

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.

utils/bind-data-test-attributes: Handle failing set() with assert instead of warning
3 participants