From 21e5996d11a1a4dbcdc89cc6c199b89ec743c6ad Mon Sep 17 00:00:00 2001 From: tianwenzhe Date: Mon, 21 Aug 2023 17:42:31 +0800 Subject: [PATCH] change bug Signed-off-by: tian-wenzhe411 --- .../main/ets/pages/Experience/KeyboardDisplayTest.ets | 7 ++++--- .../src/main/ets/pages/Experience/KeyboardInputTest.ets | 7 +++++-- .../src/main/ets/pages/Experience/ScrollPhotosList.ets | 7 +++++-- .../main/ets/pages/Experience/StartBackgroundTask.ets | 7 +++++-- .../src/main/ets/pages/Experience/StartNotification.ets | 7 +++++-- .../src/main/ets/pages/Experience/StartTaskManager.ets | 7 +++++-- .../src/main/ets/pages/Experience/ViewPhotoTest.ets | 9 ++++++--- 7 files changed, 35 insertions(+), 16 deletions(-) diff --git a/validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets b/validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets index ff6bfb313..67b232481 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/KeyboardDisplayTest.ets @@ -25,7 +25,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示点击输入框等待键盘加载'+'\n'+'预期结果:输入键盘弹出时延小于1000ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -86,10 +86,11 @@ struct CustomContainerUser { let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time); + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 1000 ) { this.Vue = true; - }else if ( isNaN(this.time )){ + } else if ( isNaN(this.time) ){ this.time = -1000; } globalThis.HideFloatingWindow(); diff --git a/validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets b/validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets index 872367f78..9976e1301 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/KeyboardInputTest.ets @@ -24,7 +24,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示点击键盘按键'+'\n'+'预期结果:键盘输入响应时延小于150ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -85,9 +85,12 @@ struct CustomContainerUser { let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time) + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 150 ) { this.Vue = true; + } else if ( isNaN(this.time) ){ + this.time = -1000; } globalThis.HideFloatingWindow(); }) diff --git a/validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets b/validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets index 9efd7ab97..17b3b7ac0 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/ScrollPhotosList.ets @@ -24,7 +24,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示滑动图库缩略表'+'\n'+'预期结果:滑动响应时延小于150ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -85,9 +85,12 @@ struct CustomContainerUser { let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time) + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 150 ) { this.Vue = true; + } else if ( isNaN(this.time) ){ + this.time = -1000; } globalThis.HideFloatingWindow(); }) diff --git a/validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets b/validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets index da8107582..bce147d07 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/StartBackgroundTask.ets @@ -27,7 +27,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示打开后台任务'+'\n'+'预期结果:打开后台任务时延小于600ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -85,9 +85,12 @@ struct CustomContainerUser { let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time) + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 600 ) { this.Vue = true; + } else if ( isNaN(this.time) ){ + this.time = -1000; } globalThis.HideFloatingWindow(); }) diff --git a/validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets b/validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets index 133b0adf3..2d2c78295 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/StartNotification.ets @@ -27,7 +27,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示下拉通知栏'+'\n'+'预期结果:下拉通知栏时延小于150ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -85,9 +85,12 @@ struct CustomContainerUser { let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time) + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 150 ) { this.Vue = true; + } else if ( isNaN(this.time) ){ + this.time = -1000; } globalThis.HideFloatingWindow(); }) diff --git a/validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets b/validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets index 9f7ad174b..cd1a05660 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/StartTaskManager.ets @@ -27,7 +27,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示打开任务管理器'+'\n'+'预期结果:打开任务管理器时延小于1000ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -85,9 +85,12 @@ struct CustomContainerUser { let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time) + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 1000 ) { this.Vue = true; + } else if ( isNaN(this.time) ){ + this.time = -1000; } globalThis.HideFloatingWindow(); }) diff --git a/validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets b/validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets index 7ee149634..5f72225d5 100644 --- a/validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets +++ b/validator/acts_validator/src/main/ets/pages/Experience/ViewPhotoTest.ets @@ -24,7 +24,7 @@ struct CustomContainerUser { @State StepTips: string = '操作步骤:根据操作提示点击图片等待加载'+'\n'+'预期结果:图片响应时延小于150ms测试通过'; @State Vue: boolean = false; @State StartEnable: boolean = true; - @State time: string = '0'; + @State time: number = 0; scroller: Scroller = new Scroller(); async aboutToAppear(){ await FirstDialog.ChooseDialog(this.StepTips,this.name); @@ -81,13 +81,16 @@ struct CustomContainerUser { .enabled(!this.StartEnable) .opacity(!this.StartEnable? 1 : 0.4) .onClick(() => { - this.StartEnable = !this.StartEnable + this.StartEnable = !this.StartEnable; let report = globalThis.resultNum; let head = report.indexOf(":"); this.time = report.substring(head+1); - let time = parseFloat(this.time) + // let time = parseFloat(this.time) + let time = this.time; if( 0 < time && time < 150 ) { this.Vue = true; + } else if ( isNaN(this.time) ){ + this.time = -1000; } globalThis.HideFloatingWindow(); }) -- GitLab