test: Add Playwright tests for mobile responsiveness

This commit is contained in:
2026-03-27 13:24:14 -07:00
parent ff8bbf3394
commit a8a465ac2b
3 changed files with 280 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# frozen_string_literal: true
require 'playwright'
RSpec.configure do |config|
config.before(:suite) do
puts "Starting Playwright..."
@playwright = Playwright.create(playwright_cli_executable_path: './node_modules/.bin/playwright')
@browser = @playwright.chromium.launch(headless: true)
end
config.after(:suite) do
@browser.close
@playwright.stop
puts "Playwright stopped."
end
# Make Playwright available to all specs
config.before(:all) do
@playwright = Playwright.create(playwright_cli_executable_path: './node_modules/.bin/playwright')
@browser = @playwright.chromium.launch(headless: true)
end
config.after(:all) do
@browser.close
@playwright.stop
end
end