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

Tailwind scaffolding generates tests that will fail #519

Closed
rubys opened this issue Mar 18, 2025 · 3 comments
Closed

Tailwind scaffolding generates tests that will fail #519

rubys opened this issue Mar 18, 2025 · 3 comments

Comments

@rubys
Copy link
Contributor

rubys commented Mar 18, 2025

Reproduction instructions:

rails new blog --css tailwind
cd blog
bin/rails generate scaffold Post title:string body:text
bin/rails db:migrate
bin/rails test:system

Results:

Image

Results if --css tailwind is omitted:

Running 4 tests in a single process (parallelization threshold is 50)
Run options: --seed 22878

# Running:

Capybara starting Puma...
* Version 6.6.0, codename: Return to Forever
* Min threads: 0, max threads: 4
* Listening on http://127.0.0.1:50646
....

Finished in 1.903383s, 2.1015 runs/s, 2.1015 assertions/s.
4 runs, 4 assertions, 0 failures, 0 errors, 0 skips
@patriciomacadden
Copy link
Contributor

we added back a confirm prompt in #498 .

System tests are created by a generator in rails, not here. Which is why it doesn't consider having a turbo confirm.

The original PR conditionally added the turbo-confirm data attribute if turbo was set up in your project, but that wouldn't solve the issue as the system tests are generated by rails and rails doesn't consider turbo confirm prompts.

I'll give it a go and see if we can add that to the test somehow.

patriciomacadden added a commit to patriciomacadden/tailwindcss-rails that referenced this issue Mar 19, 2025
flavorjones added a commit that referenced this issue Mar 19, 2025
add accept_confirm if turbo is available so system tests don't fail. fixes #519
@flavorjones
Copy link
Member

@rubys
Copy link
Contributor Author

rubys commented Mar 19, 2025

Thanks! For context, Agile Web Development with Rails 8 uses tailwind, and I didn't want to have to explain why the tests fail 😃

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

No branches or pull requests

3 participants