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

Add Rails 7 support #526

Merged
merged 5 commits into from
Jan 17, 2022
Merged

Add Rails 7 support #526

merged 5 commits into from
Jan 17, 2022

Conversation

mgrunberg
Copy link
Contributor

Summary

Fixes #523

The PR was built based on issue comments.

Three tests were failing. Two because Rails 7 uses modern HTML control (input type "datetime-local") for datepickers. Capybara helper acts differently based on Rails version

The other test was failing because Destroy link is not present on index action anymore. The test changed to navigate the corresponding page based on Rails version.

Three test were failing. Two because Rails 7 uses modern HTML control
(input type "datetime-local") for datepickers. It was necessary to
change capybara helper based on Rails version.

The other issue is that Destroy link is not present on index action
anymore. The test description changed to navigate the corresponding page
based on Rails version.
@mgrunberg mgrunberg mentioned this pull request Jan 15, 2022
@tagliala
Copy link

Hi, I can see that specs are failing against Ruby 2.5 but it looks like an issue not related to this change

@mgrunberg
Copy link
Contributor Author

Yes, the issue is not related to rails 7 changes. Made another PR that doesn't change the code and ruby 2.5 fails too.

I'm looking for solutions / explanations. Maybe drop ruby 2.5 support is an alternative.

@tagliala
Copy link

  webdrivers was resolved to 4.6.1, which depends on
    selenium-webdriver was resolved to 3.142.7, which depends on
      childprocess

maybe it requires an older version of webdrivers, selenium-webdriver, or childprocess. I wasn't able to replicate on my development machine, so I'm not sure

Test fail on ruby 2.5. Bundler fails to fetch a gem. Seems an environment problem that can be solved by update rubygems.
@mgrunberg
Copy link
Contributor Author

From what I can tell is an issue of the environment (ruby + bundler + rubygems) because bundler fails fetching.
Fixed the problem by running gem update --system
Just with that all test pass

@luke-hill
Copy link
Contributor

Yes, I found an issue of webdrivers compatibility on another gem I support. See here: https://github.com/site-prism/site_prism/blob/main/gemfiles/Gemfile.low_spec#L9

Copy link
Contributor

@luke-hill luke-hill left a comment

Choose a reason for hiding this comment

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

Couple of minor tweaks

@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('cucumber', ['>= 3.2', '< 8']) # Support cucumber in the 3.x <-> 7.x revision range
s.add_runtime_dependency('mime-types', ['~> 3.3']) # Only support the latest major (3+ years old)
s.add_runtime_dependency('nokogiri', '~> 1.10') # Only support the latest major (3+ years old)
s.add_runtime_dependency('railties', ['>= 5.0', '< 7']) # We support any version of Rails in the 5.x and 6.x series
s.add_runtime_dependency('railties', ['>= 5.0', '< 7.1']) # We support any version of Rails in the 5.x, 6.x and 7.0.x series
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be permissible for all 7.x series gems.

end
end

When('I am on destroy {string} page') do |name|
Copy link
Contributor

Choose a reason for hiding this comment

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

can we change this to be a Given step

@mgrunberg
Copy link
Contributor Author

@luke-hill I asked for review and then saw your approval, sorry.

@mgrunberg mgrunberg merged commit 8b0838c into cucumber:main Jan 17, 2022
@mgrunberg mgrunberg deleted the rails-7 branch January 17, 2022 13:43
@mgrunberg mgrunberg mentioned this pull request Jan 17, 2022
@tagliala
Copy link

Thanks!

@mgrunberg mgrunberg mentioned this pull request Jan 18, 2022
@jeygeethan
Copy link

Is this version released?

@luke-hill
Copy link
Contributor

We're currently merging in lots of items. A release will be cut when appropriate.

@julitrows
Copy link

Hi, thanks for the hard work on getting the gem RoR7-ready! ❤️

Any ETA on the new version being cut and released? 😬

Thanks a heap 🙇

@luke-hill
Copy link
Contributor

Honestly we don't sorry.

I will commit to it being out in the next month, I appreciate that's not a great answer. Just a few things going on atm.

@luke-hill
Copy link
Contributor

https://rubygems.org/gems/cucumber-rails/versions/2.5.0 is now released.

@mathieujobin
Copy link
Contributor

Thanks a lot @luke-hill

Just in time for the sakura 桜🌸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Rails 7
6 participants