Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
ef2cc2a4
Unverified
Commit
ef2cc2a4
authored
3 years ago
by
Nemanja Glumac
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve Cypress runner command line config (#15854)
parent
77862352
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/__runner__/run_cypress_tests.js
+19
-8
19 additions, 8 deletions
frontend/test/__runner__/run_cypress_tests.js
with
19 additions
and
8 deletions
frontend/test/__runner__/run_cypress_tests.js
+
19
−
8
View file @
ef2cc2a4
...
...
@@ -73,15 +73,26 @@ const init = async () => {
await
generateSnapshots
();
console
.
log
(
chalk
.
bold
(
"
Starting Cypress
"
));
let
commandLin
eConfig
=
`
baseUrl
=
${
server
.
host
}
`
;
if
(
sourceFolder
)
{
commandLineConfig
=
`
${
commandLineConfig
}
,
integrationFolder
=
${
sourceFolderLocation
}
`
;
}
else
if
(
singleFile
)
{
co
mmandLineConfig
=
`
${
commandLineConfig
}
,
testFiles
=
${
singleFileName
}
`
;
}
else
{
const
bas
eConfig
=
{
baseUrl
:
server
.
host
};
const
folderConfig
=
sourceFolder
&&
{
integrationFolder
:
sourceFolderLocation
,
}
;
co
nst
specsConfig
=
singleFile
&&
{
testFiles
:
singleFileName
};
const
ignoreConfig
=
// if we're not running specific tests, avoid including db and smoketests
commandLineConfig
=
`
${
commandLineConfig
}
,ignoreTestFiles=**/metabase-{smoketest,db}/**`
;
}
folderConfig
||
specsConfig
?
null
:
{
ignoreTestFiles
:
"
**/metabase-{smoketest,db}/**
"
};
const
config
=
{
...
baseConfig
,
...
folderConfig
,
...
specsConfig
,
...
ignoreConfig
,
};
// Cypress suggests using JSON.stringified object for more complex configuration objects
// See: https://docs.cypress.io/guides/references/configuration#Command-Line
const
commandLineConfig
=
JSON
.
stringify
(
config
);
// These env vars provide the token to the backend.
// If they're not present, we skip some tests that depend on a valid token.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment