Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-09-01 16:37:38 +0300
committerGitHub <noreply@github.com>2021-09-01 16:37:38 +0300
commita3ee690ea3863ff16a828ac0afbc77243bb45f5b (patch)
tree77f3341e86608894b1020725700b348bbcd44567 /plugins/Transitions
parentba1facfd1ecb4e618f3162aedbdb3170e9461e50 (diff)
Use newer version of Puppeteer for UI tests (#17880)
* Use latest version of Puppeteer for UI tests * use newer node on travis * test * use waitForTimeout / waitForSelector instead of waitFor * Handle BC for removed waitFor method * Updates expected UI test files * update submodules * improve/fix some UI tests * Updates expected UI test files * improve/fix some UI tests * update url-parse dependency * simplify some UI tests * update screenshot * avoid using merged assets that are broken * fix expected compare exit code * don't use merged assets for TwoFactorAuth UI tests it seems due to too many requests to login, logout and other pages merging the CoreJS assets somehow fails, and results in returning an empty file. Even the reload fails to serve the correct content, so maybe the file, the content should be written to, is somehow locked. Disabling the merged assets seems to fix this issue for this tests. Locally the tests are also running correctly with merged assets. * improve handling of automatic css / js reloading in UI tests * increase timeouts of TwoFactorAuth UI tests * fix 2fa ui test * revert change * update new screenshot * updates UI screenshots * submodule updates
Diffstat (limited to 'plugins/Transitions')
-rw-r--r--plugins/Transitions/tests/UI/Transitions_spec.js14
-rw-r--r--plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png4
-rw-r--r--plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_no_data_widget.png4
-rw-r--r--plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_switch_type_title.png2
-rw-r--r--plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_with_data_widget.png4
5 files changed, 17 insertions, 11 deletions
diff --git a/plugins/Transitions/tests/UI/Transitions_spec.js b/plugins/Transitions/tests/UI/Transitions_spec.js
index 4d2ebb61ad..ed125f3078 100644
--- a/plugins/Transitions/tests/UI/Transitions_spec.js
+++ b/plugins/Transitions/tests/UI/Transitions_spec.js
@@ -19,7 +19,7 @@ describe("Transitions", function () {
await page.webpage.evaluate((field) => {
$(field + ' input.select-dropdown').click()
}, field);
- await page.waitFor(500);
+ await page.waitForTimeout(500);
await page.webpage.evaluate((field, title) => {
$(field + ' .dropdown-content li:contains("' + title + '"):first').click()
}, field, title);
@@ -33,7 +33,7 @@ describe("Transitions", function () {
await (await page.jQuery('a.actionTransitions:visible')).click();
await page.waitForNetworkIdle();
- await page.waitFor('.ui-dialog', { visible: true });
+ await page.waitForSelector('.ui-dialog', { visible: true });
expect(await page.screenshotSelector('.ui-dialog')).to.matchImage('transitions_popup_titles');
});
@@ -42,9 +42,15 @@ describe("Transitions", function () {
await page.goto('about:blank');
await page.goto("?" + urlBase + "#?" + generalParams + "&category=General_Actions&subcategory=General_Pages&"
+ "popover=RowAction$3ATransitions$3Aurl$3Ahttp$3A$2F$2Fpiwik.net$2Fdocs$2Fmanage-websites$2F");
- await page.waitFor(500);
await page.waitForNetworkIdle();
- await page.hover('.Transitions_CurveTextRight');
+ await page.waitForTimeout(500);
+
+ // for some reason the tooltip isn't shown on the screenshot (even if the whole page is taken)
+ // but it seems to be placed in the HTML code so, we check for it's contents
+ await (await page.$('.Transitions_CurveTextRight')).hover();
+ await page.waitForSelector('.ui-tooltip');
+ const toolTipHtml = await page.evaluate(() => $('.ui-tooltip:visible').html());
+ expect(toolTipHtml).to.equal('<div class="ui-tooltip-content"><strong>4 (out of 4)</strong> to internal pages</div>');
expect(await page.screenshotSelector('.ui-dialog')).to.matchImage('transitions_popup_urls');
});
diff --git a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png
index a4ed3ec4d3..73bdf1897e 100644
--- a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png
+++ b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_popup_urls.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:094206c9db59ca1a7936dacf6252f491222688d92e135078b125b7e10d1fe6df
-size 79642
+oid sha256:4aae9a8770b93e45cc82d0b5b34eb048edf1a638f4f8b936032aed97efcec3a4
+size 77649
diff --git a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_no_data_widget.png b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_no_data_widget.png
index 488247eba2..3694b57ccd 100644
--- a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_no_data_widget.png
+++ b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_no_data_widget.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6b4d90fd87ff7a11ecb22c53a383aa032f57803a0788518afba9ad04529ae31c
-size 25927
+oid sha256:d27573ead1eb43a421c5a3ca586ca149e581cbe91ea87b36e070cc657421cf3f
+size 25933
diff --git a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_switch_type_title.png b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_switch_type_title.png
index 86a29c6a75..92e2784696 100644
--- a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_switch_type_title.png
+++ b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_switch_type_title.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:34dcc72032f6ee30d7bf93cb9ed3921688113e4d4634b2ff4badf1dca8cb7e1d
+oid sha256:cb37e59ffb65412f6a9c17a5969f6308477acd8a7bc520a599552214e232c763
size 181158
diff --git a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_with_data_widget.png b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_with_data_widget.png
index 66841f5114..da525d534f 100644
--- a/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_with_data_widget.png
+++ b/plugins/Transitions/tests/UI/expected-screenshots/Transitions_transitions_report_with_data_widget.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a227f3053e2a31c107f2bd671bc55f0778fec680d4cc0e8fab057db3b50a13c7
-size 105193
+oid sha256:50f3434e0d0641f5231f05e3a769bf2210cd2e8d3ca070237a9172d9413fc05d
+size 105201