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
13f12d97
Unverified
Commit
13f12d97
authored
1 year ago
by
shaun
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
allow cypress specs to be written in TypeScript (#36813)
parent
0b009811
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
e2e/runner/cypress-runner-run-tests.js
+1
-1
1 addition, 1 deletion
e2e/runner/cypress-runner-run-tests.js
e2e/support/config.js
+3
-3
3 additions, 3 deletions
e2e/support/config.js
e2e/validate-e2e-test-files.js
+2
-2
2 additions, 2 deletions
e2e/validate-e2e-test-files.js
with
6 additions
and
6 deletions
e2e/runner/cypress-runner-run-tests.js
+
1
−
1
View file @
13f12d97
...
...
@@ -12,7 +12,7 @@ const isFolder = !!folder;
const
isOpenMode
=
args
[
"
--open
"
];
const
getSourceFolder
=
folder
=>
{
return
`./e2e/test/scenarios/
${
folder
}
/**/*.cy.spec.js`
;
return
`./e2e/test/scenarios/
${
folder
}
/**/*.cy.spec.
{
js
,ts}
`
;
};
const
runCypress
=
async
(
baseUrl
,
exitFunction
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
e2e/support/config.js
+
3
−
3
View file @
13f12d97
...
...
@@ -119,7 +119,7 @@ const defaultConfig = {
// New `specPattern` is the combination of the old:
// 1. testFiles and
// 2. integrationFolder
specPattern
:
"
e2e/test/**/*.cy.spec.js
"
,
specPattern
:
"
e2e/test/**/*.cy.spec.
{
js
,ts}
"
,
};
const
mainConfig
=
{
...
...
@@ -147,13 +147,13 @@ const snapshotsConfig = {
const
crossVersionSourceConfig
=
{
...
defaultConfig
,
baseUrl
:
"
http://localhost:3000
"
,
specPattern
:
"
e2e/test/scenarios/cross-version/source/**/*.cy.spec.js
"
,
specPattern
:
"
e2e/test/scenarios/cross-version/source/**/*.cy.spec.
{
js
,ts}
"
,
};
const
crossVersionTargetConfig
=
{
...
defaultConfig
,
baseUrl
:
"
http://localhost:3001
"
,
specPattern
:
"
e2e/test/scenarios/cross-version/target/**/*.cy.spec.js
"
,
specPattern
:
"
e2e/test/scenarios/cross-version/target/**/*.cy.spec.
{
js
,ts}
"
,
};
const
stressTestConfig
=
{
...
...
This diff is collapsed.
Click to expand it.
e2e/validate-e2e-test-files.js
+
2
−
2
View file @
13f12d97
...
...
@@ -5,7 +5,7 @@ const path = require("path");
const
glob
=
require
(
"
glob
"
);
const
chalk
=
require
(
"
chalk
"
);
const
E2E_FILE_EXTENSION
=
"
.cy.spec
.js
"
;
const
E2E_FILE_EXTENSION
=
/
\
.
cy
\
.
spec
\.(
js|ts
)
$/
;
const
E2E_HOME
=
"
e2e/test/
"
;
init
();
...
...
@@ -16,7 +16,7 @@ function validateE2EFileNames(files) {
}
const
invalidFileNames
=
files
.
filter
(
fullPath
=>
{
return
!
path
.
basename
(
fullPath
).
endsWit
h
(
E2E_FILE_EXTENSION
);
return
!
path
.
basename
(
fullPath
).
matc
h
(
E2E_FILE_EXTENSION
);
});
printFeedback
(
invalidFileNames
);
...
...
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