Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘照晖
DC-TOM
Commits
b982c9a9
Commit
b982c9a9
authored
Sep 03, 2025
by
Cai Wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(*): 添加测试脚本
parent
e16d6e0d
Pipeline
#1318
failed
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
8 deletions
+30
-8
.env.custom
.env.custom
+4
-4
.env.development
.env.development
+2
-2
generic-login.cy.js
cypress/e2e/generic-login.cy.js
+1
-1
spec.cy.js
cypress/e2e/spec.cy.js
+23
-1
No files found.
.env.custom
View file @
b982c9a9
# Custom Environment - 自定义测试环境
CYPRESS_BASE_URL=https://
your-custom-url.com
CYPRESS_API_URL=https://
your-custom-api-url.com
CYPRESS_USERNAME=
custom_user@example.com
CYPRESS_PASSWORD=
custom_password
CYPRESS_BASE_URL=https://
screen.bmetech.com/admin/dctom/
CYPRESS_API_URL=https://
screen.bmetech.com/admin/dctom/
CYPRESS_USERNAME=
zongheng_admin
CYPRESS_PASSWORD=
9%#F46vt
CYPRESS_REPORT_TITLE=Custom Tests
CYPRESS_REPORT_PAGE_TITLE=自定义环境测试报告
\ No newline at end of file
.env.development
View file @
b982c9a9
...
...
@@ -4,8 +4,8 @@
VITE_ENV = development
# Development Environment
CYPRESS_BASE_URL=http
://localhost:3000
CYPRESS_API_URL=http
://localhost:3000
CYPRESS_BASE_URL=http
s://screen.bmetech.com/admin/dctom/
CYPRESS_API_URL=http
s://screen.bmetech.com/admin/dctom/
CYPRESS_USERNAME=test@example.com
CYPRESS_PASSWORD=testpassword
CYPRESS_REPORT_TITLE=Development Tests
...
...
cypress/e2e/generic-login.cy.js
View file @
b982c9a9
// cypress/e2e/generic-login.cy.js
describe
(
'通用登录测试'
,
()
=>
{
beforeEach
(()
=>
{
cy
.
visit
(
'/'
)
cy
.
visit
(
'
https://screen.bmetech.com/admin/dctom
/'
)
})
it
(
'应该能够成功登录'
,
()
=>
{
...
...
cypress/e2e/spec.cy.js
View file @
b982c9a9
...
...
@@ -2,7 +2,7 @@ describe('template spec', () => {
/* ==== Test Created with Cypress Studio ==== */
it
(
'test'
,
function
()
{
/* ==== Generated with Cypress Studio ==== */
cy
.
visit
(
'http
://localhost:3000
/'
);
cy
.
visit
(
'http
s://screen.bmetech.com/admin/dctom
/'
);
cy
.
get
(
'[data-testid="login-username-input"]'
).
clear
(
'z'
);
cy
.
get
(
'[data-testid="login-username-input"]'
).
type
(
'zongheng_admin'
);
cy
.
get
(
'[data-testid="login-password-input"]'
).
click
();
...
...
@@ -16,4 +16,26 @@ describe('template spec', () => {
cy
.
get
(
'[data-testid="menu-item-dust-overview"] > span'
).
click
();
/* ==== End Cypress Studio ==== */
});
/* ==== Test Created with Cypress Studio ==== */
it
(
'test1'
,
function
()
{
/* ==== Generated with Cypress Studio ==== */
cy
.
visit
(
'https://screen.bmetech.com/admin/dctom/#/login'
);
cy
.
get
(
'[data-testid="login-username-input"]'
).
clear
(
'z'
);
cy
.
get
(
'[data-testid="login-username-input"]'
).
type
(
'zongheng_admin'
);
cy
.
get
(
'[data-testid="login-password-input"]'
).
click
();
cy
.
get
(
'[data-testid="login-password-input"]'
).
clear
(
'9%#F46vt'
);
cy
.
get
(
'[data-testid="login-password-input"]'
).
type
(
'9%#F46vt'
);
cy
.
get
(
'[data-testid="login-captcha-input"]'
).
clear
(
'7'
);
cy
.
get
(
'[data-testid="login-captcha-input"]'
).
type
(
'8888'
);
cy
.
get
(
'[data-testid="login-submit-button"] > span'
).
click
();
cy
.
get
(
'[data-testid="menu-item-dust-overview"] > span'
).
click
();
cy
.
get
(
'[data-testid="dust-production-line-select"] > .el-select__wrapper'
).
click
();
cy
.
get
(
'[data-testid="production-line-option-169108"]'
).
click
();
cy
.
get
(
'[data-testid="dust-search-button"] > span'
).
click
();
cy
.
get
(
'#el-id-4313-46'
).
click
();
cy
.
get
(
'[data-testid="production-line-option-169109"]'
).
click
();
cy
.
get
(
'[data-testid="dust-search-button"]'
).
click
();
/* ==== End Cypress Studio ==== */
});
})
\ No newline at end of file
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