Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
0f835eec
Commit
0f835eec
authored
May 13, 2022
by
Dominik Hebeler
Browse files
local tests now working
parent
c2bf04c9
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
.env
View file @
0f835eec
APP_ENV=development
\ No newline at end of file
APP_ENV=development
# Variables for Testing
SELENIUM_IMAGE=selenium/standalone-firefox:99.0
\ No newline at end of file
docker-compose.yml
View file @
0f835eec
...
...
@@ -52,7 +52,12 @@ services:
-
./metager:/metager/metager_app
healthcheck
:
test
:
"
curl
-f
http://nginx:8080/health-check/liveness-worker"
selenium_standalone_firefox
:
image
:
${SELENIUM_IMAGE}
restart
:
always
shm_size
:
2GB
ports
:
-
"
7900:7900"
composer
:
build
:
<<
:
*fpm_build
...
...
metager/.env.example
View file @
0f835eec
...
...
@@ -44,5 +44,6 @@ COMMIT_NAME=Testing
BROWSERSTACK_BROWSER=WINDOWS_10_FIREFOX
BROWSERSTACK_SEPARATE_SESSIONS=true
SELENIUM_HOST=selenium_standalone_firefox
#PROXY_HOST=
#PROXY_PORT=
metager/composer.json
View file @
0f835eec
...
...
@@ -24,8 +24,6 @@
},
"require-dev"
:
{
"brianium/paratest"
:
"^6.3"
,
"browserstack/browserstack-local"
:
"^1.1"
,
"chinleung/laravel-browserstack"
:
"^1.4"
,
"facade/ignition"
:
"^2.5"
,
"fakerphp/faker"
:
"^1.9.1"
,
"laravel/dusk"
:
"^6.15"
,
...
...
metager/composer.lock
View file @
0f835eec
This diff is collapsed.
Click to expand it.
metager/config/browserstack.php
deleted
100644 → 0
View file @
c2bf04c9
<?php
return
[
/*
|--------------------------------------------------------------------------
| Credentials
|--------------------------------------------------------------------------
|
| Your username and access key for BrowserStack.
| https://www.browserstack.com/accounts/settings
|
*/
'username'
=>
env
(
'BROWSERSTACK_USERNAME'
),
'key'
=>
env
(
'BROWSERSTACK_ACCESS_KEY'
),
/*
|--------------------------------------------------------------------------
| Browser
|--------------------------------------------------------------------------
|
| The browser slug to run on BrowserStack.
|
*/
'browser'
=>
env
(
'BROWSERSTACK_BROWSER'
,
'WINDOWS_10_FIREFOX'
),
/*
|--------------------------------------------------------------------------
| Session
|--------------------------------------------------------------------------
|
| Configuration to make BrowserStack run each tests in a different
| session.
|
*/
'separate_sessions'
=>
env
(
'BROWSERSTACK_SEPARATE_SESSIONS'
,
true
),
/*
|--------------------------------------------------------------------------
| Capabilities
|--------------------------------------------------------------------------
|
| The configuration for capabilities of the browser.
| https://www.browserstack.com/automate/capabilities
|
*/
'capabilities'
=>
[
'acceptSslCerts'
=>
env
(
'BROWSERSTACK_ACCEPT_SSL'
,
true
),
'browserstack'
=>
[
'console'
=>
env
(
'BROWSERSTACK_CONSOLE'
,
'verbose'
),
'local'
=>
env
(
'BROWSERSTACK_LOCAL_TUNNEL'
,
false
),
'timezone'
=>
env
(
'BROWSERSTACK_TIMEZONE'
,
config
(
'app.timezone'
)),
"timezone"
=>
"Europe/Berlin"
,
],
"resolution"
=>
"1920x1080"
,
"project"
=>
env
(
"PROJECT_NAME"
,
"Not Set"
),
"build"
=>
env
(
"BRANCH_NAME"
,
"Not Set"
),
"name"
=>
env
(
"COMMIT_NAME"
,
"Not Set"
),
'resolution'
=>
env
(
'BROWSERSTACK_RESOLUTION'
,
'1920x1080'
),
],
/*
|--------------------------------------------------------------------------
| Command Arguments
|--------------------------------------------------------------------------
|
| The arguments and flags to use for the BrowserStack local connection.
|
*/
'arguments'
=>
[
'binaryPath'
=>
env
(
'BROWSERSTACK_CLI_BINARY_PATH'
),
'logFile'
=>
env
(
'BROWSERSTACK_CLI_LOG_FILE'
),
'v'
=>
env
(
'BROWSERSTACK_CLI_VERBOSE'
),
'force'
=>
env
(
'BROWSERSTACK_CLI_FORCE'
),
'only'
=>
env
(
'BROWSERSTACK_CLI_ONLY'
),
'onlyAutomate'
=>
env
(
'BROWSERSTACK_CLI_ONLY_AUTOMATE'
),
'forcelocal'
=>
env
(
'BROWSERSTACK_CLI_FORCE_LOCAL'
,
env
(
'BROWSERSTACK_LOCAL_TUNNEL'
,
false
)
),
'localIdentifier'
=>
env
(
'BROWSERSTACK_CLI_LOCAL_IDENTIFIER'
),
'proxyHost'
=>
env
(
'BROWSERSTACK_CLI_PROXY_HOST'
),
'proxyPort'
=>
env
(
'BROWSERSTACK_CLI_PROXY_PORT'
),
'proxyUser'
=>
env
(
'BROWSERSTACK_CLI_PROXY_USER'
),
'proxyPass'
=>
env
(
'BROWSERSTACK_CLI_PROXY_PASSWORD'
),
'forceproxy'
=>
env
(
'BROWSERSTACK_CLI_FORCE_PROXY'
),
'hosts'
=>
env
(
'BROWSERSTACK_CLI_HOSTS'
),
'f'
=>
env
(
'BROWSERSTACK_CLI_F'
),
],
];
metager/config/metager/metager.php
View file @
0f835eec
...
...
@@ -66,9 +66,7 @@ return [
"branch_name"
=>
env
(
"BRANCH_NAME"
,
"Not Set"
),
"commit_name"
=>
env
(
"COMMIT_NAME"
,
"Not Set"
),
],
"browserstack"
=>
[
"username"
=>
env
(
"BROWSERSTACK_USERNAME"
,
""
),
"access_key"
=>
env
(
"BROWSERSTACK_ACCESS_KEY"
,
""
),
"local_tunnel"
=>
false
,
"selenium"
=>
[
"host"
=>
env
(
"SELENIUM_HOST"
,
"localhost"
),
],
];
metager/tests/DuskTestCase.php
View file @
0f835eec
...
...
@@ -2,12 +2,13 @@
namespace
Tests
;
use
Facebook\WebDriver\Remote\DesiredCapabilities
;
use
Facebook\WebDriver\Remote\RemoteWebDriver
;
use
Laravel\Dusk\TestCase
as
BaseTestCase
;
use
\
ChinLeung\BrowserStack\RunsOnBrowserStack
;
abstract
class
DuskTestCase
extends
BaseTestCase
{
use
CreatesApplication
,
RunsOnBrowserStack
;
use
CreatesApplication
;
/**
* Prepare for Dusk test execution.
...
...
@@ -19,8 +20,15 @@ abstract class DuskTestCase extends BaseTestCase
{
}
protected
function
getBuildName
():
string
/**
* Create the RemoteWebDriver instance.
*
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
*/
protected
function
driver
()
{
return
config
(
"metager.metager.git.branch_name"
);
return
RemoteWebDriver
::
create
(
"http://"
.
config
(
"metager.metager.selenium.host"
)
.
":4444/wd/hub"
,
DesiredCapabilities
::
firefox
()
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment