boydm / phoenix_integration

Lightweight server side integration test tools for Phoenix
Apache License 2.0
219 stars 26 forks source link

Floki v0.24.0 emits deprecations #29

Closed ZombieHarvester closed 4 years ago

ZombieHarvester commented 4 years ago

https://github.com/philss/floki version 0.24.0 emits deprecations on PhoenixIntegration v0.6

warning: deprecation: parse the HTML with parse_document or parse_fragment before using find/2
  lib/floki.ex:170: Floki.find/2
  (phoenix_integration) lib/phoenix_integration/requests.ex:675: PhoenixIntegration.Requests.find_html_link/3
  (phoenix_integration) lib/phoenix_integration/requests.ex:189: PhoenixIntegration.Requests.click_link/3
  (phoenix_integration) lib/phoenix_integration/requests.ex:251: PhoenixIntegration.Requests.follow_link/3
...
jonasschmidt commented 4 years ago

We also had to lock floki at < 0.24.0 to prevent those warnings.

boydm commented 4 years ago

How important is this to you guys? Also, is there a proposed fix? I'm going to roll an update to 0.6.1 to deal with the is_struct conflict with Elixir v1.10. If there is a preferred thing to do here, I'll try to get it in...

boydm commented 4 years ago

Hey guys. Fixing this to get rid of the deprecations may mean taking a requirement on a newer version of Floki.

Any objections?

boydm commented 4 years ago

Confirmed. Fixing it will require >= Floki 0.24.0

boydm commented 4 years ago

The fix is in the floki_update branch. I'll leave it there for a day, then merge it in if anybody wants to take a look.

ZombieHarvester commented 4 years ago

Looks good! Thanks.

boydm commented 4 years ago

OK. This is merged into master

ZombieHarvester commented 4 years ago

Floki released 0.25.0 🤷‍♂️ This time no braking changes, shouldn't be a problem to upgrade

boydm commented 4 years ago

I'm going to require >= 0.24.0 as that is the minimum version that it all works for. 0.25 is good too.

ZombieHarvester commented 4 years ago

currently it requires strict "0.24.0"

boydm commented 4 years ago

My bad. Should have been ">= 0.24.0" Fixing now

ZombieHarvester commented 4 years ago

Awesome, thanks

boydm commented 4 years ago

Fixed, and I just pushed 0.7.0 to hex.

ZombieHarvester commented 4 years ago

Perfect. Thanks for the great package, so much better than built in controller testing or wallaby/poison

boydm commented 4 years ago

Thanks! I appreciate that!

I'm always a fan of "simpler is better"

ZombieHarvester commented 4 years ago

simpler and FASTER

boydm commented 4 years ago

:-)

One usually leads to the other. Can't wait to show off the big C project I'm working on. Definitely follows that line of thinking.