simonihmig / ember-native-dom-helpers-codemod

Codemod to transform your jQuery based ember tests to use ember-native-dom-helpers
MIT License
27 stars 9 forks source link

[WIP] Support for acceptance tests #7

Closed simonihmig closed 7 years ago

simonihmig commented 7 years ago

Tasks:

Closes #2

simonihmig commented 7 years ago

@cibernox mind having a look? So far I added transforms for all the event handling helpers. You can see what they do when looking at the tests fixtures: https://github.com/simonihmig/ember-native-dom-helpers-codemod/tree/acceptance/test/acceptance

The missing transform for find is still a bunch of work, as you probably would want to put the same smart transformations into it as for the integration tests, like converting find('.foo').text() to find('.foo').textContent etc.

Unfortunately that's something I do not really have that much time for, still I would like to finish this up sooner than later and release this... 😳

simonihmig commented 7 years ago

@cibernox Added the missing pieces. Tbh, did follow more the copy pasta principle than DRY (copied transforms for find calls from integration tests), but need to somehow finish this. The result should hopefully be ok, if you look at the tests or the updated Readme, this should cover a bunch of the most common cases for acceptance tests.

Do you see anything essential missing? Otherwise I would merge this and publish the first release...

cibernox commented 7 years ago

I missed this because I was on a deadline an then I forgot completely. This looks very good. Even if it's not perfect, I'd start advertising it.

simonihmig commented 7 years ago

@cibernox no problem, thanks for revisiting this! Will merge and release this then a bit later...