-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Support for Rails 7 #523
Comments
You're a bit keen on the gun :) But yes I will get to this as/when appropriate. I fully expect the next 2/3 weeks to have little to no uptake (% wise), of rails 7. So we should have some time on our hands. EDIT: The errors seem to be related to browser rendering. If you are able to debug. That is the first place you should start. Try debugging what website loads up. I bet it's some form of "error" page. |
Yes, as we are discussing, your PR isn't quite valid. As a bare minimum we need to check
|
Hmmm I can see that CI doesn't seem to cover Rails 7... Do you know where to add that? |
Yes, there is already a spiked branch and PR above. If you check the OP. |
Hi @erikaxel , I've investigated the failures
depend by the fact that Rails 7 generates a form with a A possible fix: diff --git a/features/capybara_javascript_drivers.feature b/features/capybara_javascript_drivers.feature
index 271639d..92f4f6b 100644
--- a/features/capybara_javascript_drivers.feature
+++ b/features/capybara_javascript_drivers.feature
@@ -4,6 +4,7 @@ Feature: Capybara Javascript Drivers
Given I have created a new Rails app and installed cucumber-rails
And I force selenium to run Firefox in headless mode
When I run `bundle exec rails g scaffold appointment name:string when:datetime`
+ When I run `sed -i -e 's/datetime_field/datetime_select/' app/views/appointments/_form.html.erb`
And I write to "features/create_appointment.feature" with:
"""
@javascript
@@ -89,6 +90,7 @@ Feature: Capybara Javascript Drivers
Given I have created a new Rails app and installed cucumber-rails without database_cleaner
And I force selenium to run Firefox in headless mode
When I run `bundle exec rails g scaffold appointment name:string when:datetime`
+ When I run `sed -i -e 's/datetime_field/datetime_select/' app/views/appointments/_form.html.erb`
And I write to "features/create_appointment.feature" with:
"""
@javascript
failes because the default scaffold in Rails 7 does not provide anymore a link to delete an object in the index That link is provided as a button to destroy inside the show I do not have a fast solution for this |
If that's the issue, then the desired solution would be to amend the datepicker and select the datepicker in 2 different ways. We had a helper for rails6, evidently we need one for rails7 too :) I will have some time on the bridge week to work on this, if no-one picks it up before then |
Hi @luke-hill , thanks I don't know if I will have time, but the third and last failure can be fixed in a similar way (following a different path when it runs on Rails 7) |
Thanks for triaging. It'll make it easier as/when someone picks it up. I'll look at this in a couple of weeks if no-one gets to it before then. Atm I imagine the rails7 uptake is miniscule. |
I kept getting hit by '~@javascript' in In case someone else also hits that issue, and also looks/searches through issues -- hopefully this'll save them some time. |
As mentioned in the earlier posts, this is to be expected. Unfortunately I caught covid over the xmas break. There have been bits and pieces commits which have fixed part of the issue. But essentially this just needs working on. |
Not sure if this help, but I made this branch to get me forward, I was hoping to open a PR, but it isn't complete.
|
I made #526 based on the tagliala comments but with a different workaround. mathieujobin, sorry for not continuing your branch but I wanted to take a different approach and leave drop old rails and ruby support for a separate PR. |
Rails 7 has been released and it would be great if cucumber-rails could support it.
I did an initial "fix" where I just relaxed the gemspec requirement and added test runners for 7.0 in erikaxel@6b22561
However that seems to be insufficient since a couple of tests fail. I'm not very familiar with this project so I'm a bit stumped on where to continue. Happy to help if I can, but it would be great with some pointers on where to start. The errors on the CI can be seen here: https://github.com/erikaxel/cucumber-rails/actions/runs/1587333272
PS: Also happy to make my initial commit with tests running on 7.0 into a PR if that is helpful.
The text was updated successfully, but these errors were encountered: