From f2960f0405037dbfce064f0168916f14a54142ba Mon Sep 17 00:00:00 2001 From: fanniehuang Date: Mon, 19 Oct 2020 18:26:05 +0800 Subject: [PATCH] fix(e2e): fix e2e record btn css style & only record current page event re #80 --- packages/wxa-cli/src/tester/wxa-e2eTest/e2eRecordBtn.wxa | 3 +++ packages/wxa-cli/src/tester/wxa-e2eTest/e2eTestSuite.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/wxa-cli/src/tester/wxa-e2eTest/e2eRecordBtn.wxa b/packages/wxa-cli/src/tester/wxa-e2eTest/e2eRecordBtn.wxa index 2c09cf99..5ec55e2c 100644 --- a/packages/wxa-cli/src/tester/wxa-e2eTest/e2eRecordBtn.wxa +++ b/packages/wxa-cli/src/tester/wxa-e2eTest/e2eRecordBtn.wxa @@ -128,6 +128,9 @@ wxa.launchComponent(e2eBtn); width: 200rpx; left: 0; z-index: 99999999999; + background-color: #fff; + color: #333; + border: 1px solid #bbb; } .e2e-input{ background-color: #fff; diff --git a/packages/wxa-cli/src/tester/wxa-e2eTest/e2eTestSuite.js b/packages/wxa-cli/src/tester/wxa-e2eTest/e2eTestSuite.js index 7e930d38..1aa49ef3 100644 --- a/packages/wxa-cli/src/tester/wxa-e2eTest/e2eTestSuite.js +++ b/packages/wxa-cli/src/tester/wxa-e2eTest/e2eTestSuite.js @@ -32,7 +32,7 @@ const shouldRecord = function(type, ...args) { return false; } // 当前页面的操作才记录 - if (!this.$$isCurrentPage) { + if (getCurrentPages()[0].__wxWebviewId__ !== this.__wxWebviewId__){ return false; } if (e.target.dataset.e2ebtn === 'true') {