File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ abstract class DuskTestCase extends BaseTestCase
32
32
protected function driver()
33
33
{
34
34
$options = (new ChromeOptions)->addArguments(collect([
35
- '--window-size=1920,1080',
35
+ $this->shouldStartMaximized() ? '--start-maximized' : '--window-size=1920,1080',
36
36
])->unless($this->hasHeadlessDisabled(), function ($items) {
37
37
return $items->merge([
38
38
'--disable-gpu',
@@ -58,4 +58,15 @@ abstract class DuskTestCase extends BaseTestCase
58
58
return isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
59
59
isset($_ENV['DUSK_HEADLESS_DISABLED']);
60
60
}
61
+
62
+ /**
63
+ * Determine if the browser window should start maximized.
64
+ *
65
+ * @return bool
66
+ */
67
+ protected function shouldStartMaximized()
68
+ {
69
+ return isset($_SERVER['DUSK_START_MAXIMIZED']) ||
70
+ isset($_ENV['DUSK_START_MAXIMIZED']);
71
+ }
61
72
}
You can’t perform that action at this time.
0 commit comments