Skip to content

Commit

Permalink
adds some UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Oct 14, 2024
1 parent 7a981c6 commit 461e1fd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions plugins/UserId/tests/UI/UserId_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*!
* Matomo - free/libre analytics platform
*
* Screenshot tests for IPReports plugin
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

describe("UserId", function () {
this.fixture = "Piwik\\Plugins\\UserId\\tests\\Fixtures\\TrackFewVisitsAndCreateUsers";

it('should show user id report', async function () {
await page.goto('?module=CoreHome&action=index&idSite=1&period=day&date=2010-02-04#?idSite=1&period=day&date=2010-02-04&category=General_Visitors&subcategory=UserId_UserReportTitle');
await page.waitForNetworkIdle();
expect(await page.screenshotSelector('#widgetUserIdgetUsers')).to.matchImage('report');
});

it('should switch to table with engagement metrics', async function () {
await page.click('.activateVisualizationSelection > span');
await page.click('.tableIcon[data-footer-icon-id=tableAllColumns]');
await page.mouse.move(-10, -10);
await page.waitForNetworkIdle();
expect(await page.screenshotSelector('#widgetUserIdgetUsers')).to.matchImage('report_engagement');
});


});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 461e1fd

Please sign in to comment.