From 8444c2df98f739d24391300c11d6de77e9f42b1a Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Sat, 14 Dec 2024 09:24:52 +0100 Subject: [PATCH] Add css reload test --- test/css_reload_test.rb | 12 ++++++++++++ test/dummy/app/assets/stylesheets/base.css | 2 +- test/hotwire_spark_test.rb | 7 ------- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 test/css_reload_test.rb delete mode 100644 test/hotwire_spark_test.rb diff --git a/test/css_reload_test.rb b/test/css_reload_test.rb new file mode 100644 index 00000000..3ddd8c60 --- /dev/null +++ b/test/css_reload_test.rb @@ -0,0 +1,12 @@ +require "application_system_test_case" + +class CssReloadTest < ApplicationSystemTestCase + test "reload HTML changes" do + visit root_path + assert_text "This is pretty cool" + + change_file "app/assets/stylesheets/base.css", "visible", "hidden" + + assert_no_text "This is pretty cool" + end +end diff --git a/test/dummy/app/assets/stylesheets/base.css b/test/dummy/app/assets/stylesheets/base.css index 7cfe2bf4..1f4e1499 100644 --- a/test/dummy/app/assets/stylesheets/base.css +++ b/test/dummy/app/assets/stylesheets/base.css @@ -1,3 +1,3 @@ body { - color: blue; + visibility: visible; } diff --git a/test/hotwire_spark_test.rb b/test/hotwire_spark_test.rb deleted file mode 100644 index 440dd95f..00000000 --- a/test/hotwire_spark_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "test_helper" - -class PulseWireTest < ActiveSupport::TestCase - test "it has a version number" do - assert HotwireSpark::VERSION - end -end