未验证 提交 99585716 编写于 作者: O openharmony_ci 提交者: Gitee

!3979 修改失败用例

Merge pull request !3979 from chenzhuo/monthly_20220614
...@@ -120,6 +120,7 @@ struct ButtonExample { ...@@ -120,6 +120,7 @@ struct ButtonExample {
.width(200) .width(200)
.height(100) .height(100)
.fontSize(20) .fontSize(20)
.position({x: 50,y: 400})
.onClick((event: ClickEvent) => { .onClick((event: ClickEvent) => {
console.info(this.text = 'Click Point:' + '\n screenX:' + event.screenX + '\n screenY:' + event.screenY console.info(this.text = 'Click Point:' + '\n screenX:' + event.screenX + '\n screenY:' + event.screenY
+ '\n x :' + event.x + '\n y:' + event.y + '\ntarget:' + '\n component globalPos:(' + '\n x :' + event.x + '\n y:' + event.y + '\ntarget:' + '\n component globalPos:('
......
...@@ -301,8 +301,8 @@ export default function buttonJsunit() { ...@@ -301,8 +301,8 @@ export default function buttonJsunit() {
let event = JSON.parse(eventData.data.event); let event = JSON.parse(eventData.data.event);
console.info("[testButton12] get event state result is: " + Math.trunc(event.screenY)); console.info("[testButton12] get event state result is: " + Math.trunc(event.screenY));
console.info("[testButton12] get event state result is: " + Math.trunc(event.screenX)); console.info("[testButton12] get event state result is: " + Math.trunc(event.screenX));
expect(event.screenX).assertEqual(135) expect(event.screenX).assertEqual(185)
expect(event.screenY).assertEqual(350) expect(event.screenY).assertEqual(485)
expect(event.x).assertEqual(100) expect(event.x).assertEqual(100)
expect(event.y).assertEqual(50) expect(event.y).assertEqual(50)
} }
......
...@@ -70,7 +70,6 @@ struct PageTransitionExample1 { ...@@ -70,7 +70,6 @@ struct PageTransitionExample1 {
onPageShow() { onPageShow() {
console.info('active page show called'); console.info('active page show called');
events_emitter.on(stateChangeEvent, this.stateChangCallBack)
var stateChangeEventOne = { var stateChangeEventOne = {
eventId: 145, eventId: 145,
......
...@@ -36,10 +36,12 @@ export default function navigationJsunit() { ...@@ -36,10 +36,12 @@ export default function navigationJsunit() {
*/ */
beforeEach(async function (done) { beforeEach(async function (done) {
console.info('[navigationTest] before each called') console.info('[navigationTest] before each called')
await sleep(1)
let options = { let options = {
uri: 'pages/Navigation', uri: 'pages/Navigation',
} }
try { try {
router.clear();
let result = router.push(options) let result = router.push(options)
console.info("push navigation page success " + JSON.stringify(result)); console.info("push navigation page success " + JSON.stringify(result));
} catch (err) { } catch (err) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册