Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Merge requests
!1628
Resolve "Add more integration tests"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Add more integration tests"
987-add-more-integration-tests
into
development
Overview
0
Commits
12
Pipelines
12
Changes
23
Merged
Dominik Hebeler
requested to merge
987-add-more-integration-tests
into
development
4 years ago
Overview
0
Commits
12
Pipelines
12
Changes
23
Expand
Closes
#987 (closed)
Edited
4 years ago
by
Dominik Hebeler
0
0
Merge request reports
Compare
development
version 9
216e1522
4 years ago
version 8
5dfd127c
4 years ago
version 7
f95d0d9f
4 years ago
version 6
d7a7e3e7
4 years ago
version 5
2fe96bab
4 years ago
version 4
e2e87c9b
4 years ago
version 3
3dd7ec07
4 years ago
version 2
14363eae
4 years ago
version 1
6096d80e
4 years ago
development (base)
and
latest version
latest version
4270c5ec
12 commits,
4 years ago
version 9
216e1522
11 commits,
4 years ago
version 8
5dfd127c
10 commits,
4 years ago
version 7
f95d0d9f
9 commits,
4 years ago
version 6
d7a7e3e7
7 commits,
4 years ago
version 5
2fe96bab
6 commits,
4 years ago
version 4
e2e87c9b
5 commits,
4 years ago
version 3
3dd7ec07
4 commits,
4 years ago
version 2
14363eae
3 commits,
4 years ago
version 1
6096d80e
2 commits,
4 years ago
23 files
+
1018
−
98
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
23
Search (e.g. *.vue) (Ctrl+P)
app/Traits/SupportsBrowserStack.php
0 → 100644
+
42
−
0
Options
<?php
namespace
App\Traits
;
use
BrowserStack\Local
;
use
Facebook\WebDriver\Remote\RemoteWebDriver
;
/**
* Run BrowserStack from your tests.
*/
trait
SupportsBrowserStack
{
protected
static
$bs_local
;
/**
* Create the BrowserStack WebDriver instance.
*/
public
function
createBrowserStackDriver
(
array
$config
=
null
):
RemoteWebDriver
{
if
(
$config
[
"capabilities"
][
"browserstack.local"
]
===
"true"
)
{
$this
->
bs_local
=
new
Local
();
$bs_local_args
=
[
"key"
=>
$config
[
"key"
],
];
$this
->
bs_local
->
start
(
$bs_local_args
);
}
return
RemoteWebDriver
::
create
(
"https://
$config[username]:$config[key]
@hub-cloud.browserstack.com/wd/hub"
,
$config
[
"capabilities"
]
);
}
/**
* @afterClass
*/
public
static
function
shutdown
()
{
if
(
static
::
$bs_local
&&
static
::
$bs_local
->
isRunning
())
{
static
::
$bs_local
->
stop
();
}
}
}
Loading