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:
Diffstat (limited to 'plugins/Transitions/tests/UI/Transitions_spec.js')
-rw-r--r--plugins/Transitions/tests/UI/Transitions_spec.js14
1 files changed, 10 insertions, 4 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');
});