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:
authorThomas Steur <tsteur@users.noreply.github.com>2019-05-09 01:26:39 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-05-09 01:26:39 +0300
commit76e60590f486f33a38e7ea08bf941fa57ac904c5 (patch)
tree695bafa55fcd74d79322ed3885e90c4a17ff3e01 /plugins/CorePluginsAdmin
parent461a48e6d7050f73b1c25db98b6f96cff86bd043 (diff)
Switch UI tests from phantomjs to chrome headless (#14421)
* Make sure xss entries is always an array. * Update expected test files and submodule. * Regenerate broken omnifixture dump. * poc conversion to chrome headless for UI tests, single test works locally * Get single test to pass on travis & local w/ headless chrome. * Remove old diff viewer generation, and get output to look the same as before when there is a failure. * Add global timeout & get ViewDataTableTest to pass. * Convert BarGraph_spec.js. * Convert EmptySite_spec. * Update EvolutionGraph spec for chrome headless. * Convert GoalsTable test & find/replace for common changes. * Convert MeasurableManager. * Another find & replace. * Get Menus/OptOutForm to pass w/ chrome headless * Convert PeriodSelector, PieGraph & PivotByDimension UI tests. * undo unrelated debugging change * Convert QuickAccess UI tests * Converts ActionsDataTable UI tests * reset viewport after each testsuite * Converts RowEvolution UI tests * Converts Theme UI tests * Converts SiteSelector UI tests * Converts CustomVariables UI test * Converts DBStats UI test * Ignore empty responses when calling api/controller * Converts Dashboard UI tests * Converts Live UI tests * Converts SimpleUI tests * Converts Installation UI tests * Converts ImageGraph UI tests * Converts Login UI tests * Converts Marketplace UI tests * Converts Insights UI tests * Converts ReportExporting UI tests * Converts UIIntegration tests * Updates ViewDataTable UI tests * Converts CoreUpdater UI tests * Converts UsersManager UI tests * Converts Morpheus UI tests * Converts MultiSites UI tests * Fix testEnvironment.callApi handling of array parameters * Converts Overlay UI tests * Converts PrivacyManager UI tests * Converts ScheduledReports UI tests * Converts SegmentEditor UI tests * compare pixel difference in images * Converts PeriodSelector UI tests * allow a pixel difference * Converts SingleMetricView UI tests * Converts SitesManager UI tests * Converts Transitions UI tests * Converts MeasurableManager UI tests * Move Mouse out of screen after each test suite * Converts PieGraph UI tests * Ensure cursor is not shown in focused input elements * Converts VisitorMap UI tests * Converts CustomLogo UI tests * Converts BarGraph UI tests * Converts EvolutionGraph UI tests * Converts IntranetMeasurable UI tests * Converts TrackingFailures UI tests * Converts CampaignBuilder UI tests * Converts TagManagerTeaser UI tests * fix request url rewrite for changed port * Converts TwoFactorAuth UI tests * do not print full responses in logs, but size instead * improve additional style injection * use submodule branches * fix request interception * update dependencies * [TEMP] disable dangerous link checks * [TEMP] limit tests * Use puppeteer@next and make sure diffs get uploaded properly. * Use correct fs function. * Allow timeout to be specified on command line for UI tests and debug console logs. * timeout option tweak * Setup diff dir once before running tests not before each suite. * fix last commit * Update screenshots and fix some specs. * Convert some tests that were not converted during merge. * updating screenshots * Updating screenshots and fixing some tests. * more test fixes * couple more test fixes * More test fixes and plugin updates. * wait for jquery * Fix some screenshots and tests. * more test fixes * debug travis test failure * remove .only * more test fixes and updated expected files * another test fixing iteration * typo * another quick test change * more tests updates * Test fixes and & more debugging. * more debugging and test fixes * more fixes and debugging. * remove .only * Another round of fixed tests. * more debugging & fixes * more test changes * more debugging and fixes * Fixing more tests + some bug fixes. * Couple more fixes. * Couple more fixes. * Fixing tracking failures test * more fixes * Last couple fixes hopefully. * couple more test fixes * more fixes, bug fix in usersmanager, some test updates * Some more test fixes/changes. * more and more fixes * hoping for a green build * Do not compare against existing files in dashboard_spec. * more fixes, re-enabling travis * really re-enable travis * Install puppeteer on travis-ci. * more fixes * try to fix random failues * remove return * Convert some login tests I forgot and update UsersManager expected file * Fix test for primary key update * Update AddPrimaryKey.php * More test fixes + implement synchronous comparison threshold (so no resemblejs) * More wait fixes + reset token detection fix. * couple more fixes * Fix login/overlay screenshot issue & magick command running issue. * identify is the executable on travis (hopefully) + fix some random failures * Another run. * Last fix. * two more tweaks * typo
Diffstat (limited to 'plugins/CorePluginsAdmin')
-rw-r--r--plugins/CorePluginsAdmin/tests/UI/TagManagerTeaser_spec.js50
-rw-r--r--plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page.png4
-rw-r--r--plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page_disable.png4
-rw-r--r--plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_super_user_activate_plugin.png4
-rw-r--r--plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_superuser_page.png4
5 files changed, 28 insertions, 38 deletions
diff --git a/plugins/CorePluginsAdmin/tests/UI/TagManagerTeaser_spec.js b/plugins/CorePluginsAdmin/tests/UI/TagManagerTeaser_spec.js
index f892f42bed..7aeddd3fdf 100644
--- a/plugins/CorePluginsAdmin/tests/UI/TagManagerTeaser_spec.js
+++ b/plugins/CorePluginsAdmin/tests/UI/TagManagerTeaser_spec.js
@@ -15,7 +15,7 @@ describe("TagManagerTeaser", function () {
function setPluginsToLoad(plugins)
{
- testEnvironment.pluginsToLoad = plugins
+ testEnvironment.pluginsToLoad = plugins;
testEnvironment.save();
}
@@ -49,44 +49,34 @@ describe("TagManagerTeaser", function () {
afterEach(reset);
- function capturePage(done, screenshotName, test, selector)
- {
- if (!selector) {
- selector = pageSelector;
- }
- expect.screenshot(screenshotName).to.be.captureSelector(selector, test, done);
- }
-
- it('should show teaser to super user', function (done) {
+ it('should show teaser to super user', async function () {
unloadTagManager();
- capturePage(done, 'superuser_page', function (page) {
- unloadTagManager();
- page.load(urlBase);
- });
+ await page.goto(urlBase);
+ expect(await page.screenshotSelector(pageSelector)).to.matchImage('superuser_page');
});
- it('should be possible to activate plugin and redirect to tag manager', function (done) {
- capturePage(done, 'super_user_activate_plugin', function (page) {
- page.click('.activateTagManager .activateTagManagerPlugin');
- }, '.pageWrap');
+ it('should be possible to activate plugin and redirect to tag manager', async function () {
+ await page.click('.activateTagManager .activateTagManagerPlugin');
+ await page.waitForNetworkIdle();
+ await page.waitFor(250);
+ expect(await page.screenshotSelector('.pageWrap')).to.matchImage('super_user_activate_plugin');
});
- it('should show teaser to admin', function (done) {
+ it('should show teaser to admin', async function () {
unloadTagManager();
setAdminUser();
- capturePage(done, 'admin_page', function (page) {
- unloadTagManager();
- setAdminUser();
- page.load(urlBase);
- });
+ await page.goto(urlBase);
+ expect(await page.screenshotSelector(pageSelector)).to.matchImage('admin_page');
});
- it('should be possible to disable page and redirect to home', function (done) {
- capturePage(done, 'admin_page_disable', function (page) {
- unloadTagManager();
- setAdminUser();
- page.click('.activateTagManager .dontShowAgainBtn');
- }, '.pageWrap');
+ it('should be possible to disable page and redirect to home', async function () {
+ unloadTagManager();
+ setAdminUser();
+ await page.click('.activateTagManager .dontShowAgainBtn');
+ await page.waitForNetworkIdle();
+ await page.waitFor('.widget');
+ await page.waitForNetworkIdle();
+ expect(await page.screenshotSelector('.pageWrap')).to.matchImage('admin_page_disable');
});
}); \ No newline at end of file
diff --git a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page.png b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page.png
index 39b2696e57..c54863324a 100644
--- a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page.png
+++ b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c30d88c1c7c15ecef37d28b00397a055867b181417fdebdd64c1cd47ad4af46f
-size 152301
+oid sha256:c24e65b0a28ac382aacd03df880f1fa6f73ea861fc303e530a7acea1940f289e
+size 146300
diff --git a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page_disable.png b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page_disable.png
index 02aba5850f..e331f87184 100644
--- a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page_disable.png
+++ b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page_disable.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e5c4f0dc29963d29582b6d1d27d0625d758d92405ca31851cdf6980eefa856d0
-size 140476
+oid sha256:874f9bb14bdb6e4a3eae691415b65db04a7dbd3ec95ac6f229a07e6f9a946eea
+size 137758
diff --git a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_super_user_activate_plugin.png b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_super_user_activate_plugin.png
index 89ba4175b7..e410f225b7 100644
--- a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_super_user_activate_plugin.png
+++ b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_super_user_activate_plugin.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c8db6482ac4f210b9b62b1c2d87b8583b6881a4ad2a4e6384e4c5460410b1b4d
-size 206173
+oid sha256:aeaafaaf04b6cdce82ca1bcc80e51ed87dbfae7982321f2f06edcd464f2be11c
+size 201355
diff --git a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_superuser_page.png b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_superuser_page.png
index f0be4a9238..7da5c892a3 100644
--- a/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_superuser_page.png
+++ b/plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_superuser_page.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:51594e0475e6acf01bfec48fd6389854de7e739c67f5eeb06f4adde5228256b0
-size 199572
+oid sha256:57bf995c2489df3d2af0e831bf5b78b53ba62349c3b2780dc2be1ee02273ed6e
+size 193019