Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re860_factory
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
waterword
re860_factory
Commits
4a6d1a08
Commit
4a6d1a08
authored
Sep 28, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化自动化测试
parent
c93b03fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
17 deletions
+45
-17
factoryTestItem/factory_autoFactory.evue
factoryTestItem/factory_autoFactory.evue
+15
-3
factoryTest_plugin/factory_autoFactoryTest.js
factoryTest_plugin/factory_autoFactoryTest.js
+14
-9
factoryTest_plugin/factory_autoFactoryTestUtil.js
factoryTest_plugin/factory_autoFactoryTestUtil.js
+16
-5
No files found.
factoryTestItem/factory_autoFactory.evue
View file @
4a6d1a08
...
...
@@ -83,12 +83,24 @@
this
.
gifIconSrc
=
"
"
;
this
.
$hide
(
"
id_testPng
"
)
this
.
checkFlagBash
(
0
)
this
.
$show
(
"
id_yes
"
)
this
.
$show
(
"
id_ng
"
)
this
.
$show
(
"
id_back
"
)
autoUtil
.
initPage
(
this
)
this
.
showButtonUI
(
"
show
"
)
},
showButtonUI
:
function
(
state
)
{
if
(
!
this
)
return
;
if
(
state
==
"
show
"
)
{
this
.
$show
(
"
id_yes
"
)
this
.
$show
(
"
id_ng
"
)
this
.
$show
(
"
id_back
"
)
}
if
(
state
==
"
hide
"
)
{
this
.
$hide
(
"
id_yes
"
)
this
.
$hide
(
"
id_ng
"
)
this
.
$hide
(
"
id_back
"
)
}
},
onHide
:
function
()
{
//console.log(this.$uri + "===========onHide=============")
...
...
factoryTest_plugin/factory_autoFactoryTest.js
View file @
4a6d1a08
...
...
@@ -50,9 +50,11 @@ function eventHex(fd, recvBuf) {
function
doStart
(
fd
)
{
setCountdownStatus
(
false
);
//关闭倒计时直到接到通知关闭
send
(
fd
,
'
+START
'
);
autoUtil
.
setAutoModeUI
(
"
INIT
"
);
autoUtil
.
initUI
();
// autoUtil.setAutoModeUI("INIT");
}
function
doGetRtc
(
fd
)
{
var
time
=
"
+
"
+
autoUtil
.
getRtcTimer
()
console
.
log
(
'
RTC:
'
+
time
);
...
...
@@ -96,14 +98,20 @@ function doOtg(fd) {
send
(
fd
,
'
+FAIL
'
);
}
}
var
cntLcd
=
0
;
function
doLcd
(
fd
)
{
cntLcd
+=
1
;
if
(
cntLcd
>
1
)
{
if
(
doLcd
.
cntLcd
==
undefined
)
{
doLcd
.
cntLcd
=
0
;
}
doLcd
.
cntLcd
+=
1
;
console
.
log
(
"
doLcd
"
+
doLcd
.
cntLcd
)
if
(
doLcd
.
cntLcd
>
1
)
{
autoUtil
.
ledTimerOut
();
manualLcdBz
();
send
(
fd
,
'
+OK
'
);
doLcd
.
cntLcd
=
0
;
}
else
{
// autoUtil.setAutoModeUI("INIT");
autoUtil
.
initUI
();
autoUtil
.
setAutoModeUI
(
"
LCD
"
);
}
...
...
@@ -174,6 +182,7 @@ function doWriteLic(fd, recvBuf) {
function
doKeyBz
(
fd
,
recvBuf
)
{
/* 人工弹窗可接 UI,这里直接返回 OK */
// autoUtil.setAutoModeUI("INIT");
autoUtil
.
initUI
();
autoUtil
.
setAutoModeUI
(
"
TOUCH
"
);
touchFlag
=
1
;
// send(fd, '+OK');
...
...
@@ -197,9 +206,6 @@ function manualKeyBz(buf) {
}
}
function
manualLcdBz
()
{
send
(
getFd
(),
'
+OK
'
);
}
function
initEvent
(
fd
)
{
...
...
@@ -457,6 +463,5 @@ function uart_set_mode(fd, mode) {
module
.
exports
=
{
autoFactoryTestTimer
:
autoFactoryTestTimer
,
manualKeyBz
:
manualKeyBz
,
manualLcdBz
:
manualLcdBz
,
restartUart
:
restartUart
}
factoryTest_plugin/factory_autoFactoryTestUtil.js
View file @
4a6d1a08
...
...
@@ -242,8 +242,17 @@ function getAutoStartMode() {
return
autoMode
}
function
initUI
(){
initUI
.
_isInit
=
false
;
if
(
initUI
.
_isInit
==
false
){
setAutoModeUI
(
"
INIT
"
);
initUI
.
_isInit
=
true
;
}
}
function
initPage
(
id
)
{
console
.
log
(
"
!!init id:
"
+
id
)
that
=
id
;
}
function
ledTimerOut
()
{
...
...
@@ -256,15 +265,16 @@ function setAutoModeUI(mode) {
switch
(
mode
)
{
case
"
LCD
"
:
that
.
ledtimerSet
()
that
.
$hide
(
"
id_yes
"
)
that
.
$hide
(
"
id_ng
"
)
that
.
$hide
(
"
id_back
"
)
// that.$hide("id_yes")
// that.$hide("id_ng")
// that.$hide("id_back")
that
.
showButtonUI
(
"
hide
"
);
break
;
case
"
TOUCH
"
:
console
.
log
(
"
111
"
)
that
.
exitLedTest
();
that
.
onshwKeyBuntton
();
console
.
that
.
showButtonUI
(
"
show
"
);
break
;
case
"
INIT
"
:
autoMode
=
mode
;
...
...
@@ -477,6 +487,7 @@ module.exports = {
formatHexWithSpace
:
formatHexWithSpace
,
initPage
:
initPage
,
setAutoModeUI
:
setAutoModeUI
,
initUI
:
initUI
,
ledTimerOut
:
ledTimerOut
,
exitAutoFactoryPage
:
exitAutoFactoryPage
,
licParce
:
licParce
,
...
...
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