A platform for community discussion. Free, open, simple.
DEV: Simplify styleguide smoke tests (#36491)
Penar Musaraja74ae2559f06
diff --git a/plugins/styleguide/spec/system/smoke_test_spec.rb b/plugins/styleguide/spec/system/smoke_test_spec.rbindex 46c0b139eaf..dc3fae53804 100644--- a/plugins/styleguide/spec/system/smoke_test_spec.rb+++ b/plugins/styleguide/spec/system/smoke_test_spec.rb@@ -116,27 +116,9 @@ RSpec.describe "Styleguide Smoke Test", type: :system doskip_pages = %w[/organisms/chat /organisms/more-topics]skip "Skipping smoke test for #{item[:href]} page" if skip_pages.include?(item[:href])- page.driver.with_playwright_page do |playwright_page|- errors = []- warnings = []-- playwright_page.on(- "console",- ->(msg) do- case msg.type- when "error"- errors << msg.text- when "warning"- warnings << msg.text- end- end,- )-- visit "/styleguide/#{item[:href]}"-- expect(page).to have_css(".styleguide-contents h1.section-title", text: item[:title])- expect(errors).to be_empty, "Console errors found: #{errors.join(", ")}"- end+ visit "/styleguide/#{item[:href]}"++ expect(page).to have_css(".styleguide-contents h1.section-title", text: item[:title])endendend