Skip to content

Commit 319d4db

Browse files
authored
Merge pull request #2195 from opensource-workshop/dev-dusk
[ブラウザテスト] .envからDUSK_DRIVER_URLを取得できるよう修正
2 parents 5e68fdb + 0c86033 commit 319d4db

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ FACE_AI_API_KEY="${COMMON_API_KEY}"
168168

169169
# --- Connect-CMS Dusk option
170170

171+
#DUSK_DRIVER_URL=
172+
171173
# dusk use uploads dir.
172174
#UPLOADS_DIRECTORY_BASE=uploads_dusk/
173175

tests/DuskTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function driver()
8383
]);
8484

8585
return RemoteWebDriver::create(
86-
$_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515',
86+
$_ENV['DUSK_DRIVER_URL'] ?? env('DUSK_DRIVER_URL') ?? 'http://localhost:9515',
8787
DesiredCapabilities::chrome()->setCapability(
8888
ChromeOptions::CAPABILITY, $options
8989
)
@@ -146,6 +146,7 @@ protected function setUp(): void
146146
protected function login($user_id)
147147
{
148148
$this->browse(function (Browser $browser) use ($user_id) {
149+
149150
$browser->loginAs(User::find($user_id));
150151
$this->assertTrue(true);
151152
});

0 commit comments

Comments
 (0)