rails / rails-dom-testing

Extracting DomAssertions and SelectorAssertions from ActionView.
MIT License
175 stars 57 forks source link

Remove deprecation, document alias #92

Closed seanpdoyle closed 3 years ago

seanpdoyle commented 3 years ago

Remove all deprecations of assert_select-prefixed methods, but document the assert_dom variations.

kaspth commented 3 years ago

Won't we need an alias_method :assert_select, :assert_dom etc. while we're deprecating? Or are you thinking we just ship this as 2.0?

What's Rails' and Rails apps' upgrade path for this change? Just bumping the required version in the Gemfile?

seanpdoyle commented 3 years ago

@kaspth ah, good point about aliasing. Maybe I could have included that in #91.

Rails might be a search and replace? I'm not totally sure. Rails depends on the gem for its test suite, but also generates new apps with a dependency on this, so we'd need to account for both.

rafaelfranca commented 3 years ago

Do we need to remove assert_select or even deprecate it? I'd just keep it as an alias and recommend the new name. Deprecating and removing will be annoying not only for us but also to the users.

seanpdoyle commented 3 years ago

@rafaelfranca that seems like a more straightforward compromise.

I've switched this branch to remove the deprecations, but I've kept the documentation changes in place to encourage usage of the assert_dom variation.

seanpdoyle commented 3 years ago

@rafaelfranca I've rolled back the majority of https://github.com/rails/rails/pull/41500 to take a similar approach.