Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

Reset the window before every screenshot

Guido Boykeec43168e563c
diff --git a/spec/marketing/screenshots_spec.rb b/spec/marketing/screenshots_spec.rb
index 6f93dce..79be4ab 100644
--- a/spec/marketing/screenshots_spec.rb
+++ b/spec/marketing/screenshots_spec.rb
@@ -43,6 +43,9 @@ RSpec.describe 'Marketing screenshots', :marketing_screenshots, type: :system do
before do
driven_by :marketing_chrome
+ # The browser outlives the example: without this, the narrower window of the
+ # assistant picture stays for every picture after it.
+ page.driver.browser.manage.window.resize_to(MarketingScreenshots::WIDTH, MarketingScreenshots::HEIGHT)
Prosopite.pause
travel_to NordlichtFiction::NOW
set_browser_clock