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
3232 protected function driver()
3333 {
3434 $options = (new ChromeOptions)->addArguments(collect([
35- '--window-size=1920,1080',
35+ $this->shouldStartMaximized() ? '--start-maximized' : '--window-size=1920,1080',
3636 ])->unless($this->hasHeadlessDisabled(), function ($items) {
3737 return $items->merge([
3838 '--disable-gpu',
@@ -58,4 +58,15 @@ abstract class DuskTestCase extends BaseTestCase
5858 return isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
5959 isset($_ENV['DUSK_HEADLESS_DISABLED']);
6060 }
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+ }
6172}
You can’t perform that action at this time.
0 commit comments