From b79a76d6f83d53a704033702c839b960505aaf32 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Fri, 4 May 2018 17:31:20 +0800 Subject: [PATCH] Add nil-check to fix failing browser test --- test/browser_test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index ef158a54a..93a01c6f3 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -104,7 +104,7 @@ class TestCase < Test::Unit::TestCase browser_width = ENV['BROWSER_WIDTH'] || 1024 browser_height = ENV['BROWSER_HEIGHT'] || 800 local_browser.manage.window.resize_to(browser_width, browser_height) - unless ENV['REMOTE_URL'].match?(/saucelabs|(grid|ci)\.(zammad\.org|znuny\.com)/i) + unless ENV['REMOTE_URL']&.match?(/saucelabs|(grid|ci)\.(zammad\.org|znuny\.com)/i) if @browsers.count == 1 local_browser.manage.window.move_to(0, 0) else