Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ed32669
Adding a check on WidgetLoader.vue if response status is 401 (Unautho…
chippison Nov 13, 2025
b239e3c
making sure we add http response code to the returned exception or me…
chippison Nov 13, 2025
16d0e63
adding 401 as part of status that we don't show error message on the …
chippison Nov 13, 2025
dfaf4d2
added rebuilt umd files
chippison Nov 13, 2025
b9f42bb
removed console logs
chippison Nov 13, 2025
f39b3be
Build vue files
innocraft-automation Nov 13, 2025
817fe3a
Tidy up code
chippison Nov 13, 2025
299e8ac
fixing changes in those dist folders
chippison Nov 14, 2025
b3085fb
adding new test for widgetloader that it redirects to new page if ses…
chippison Nov 17, 2025
ea2e07c
add new screenshot
chippison Nov 17, 2025
6c2d364
adding a check that log in was successful by waiting for #dashboard t…
chippison Nov 17, 2025
3b4a765
adding suggested change
chippison Nov 18, 2025
b26fa85
put back old code; we do not want to suppress the error message since…
chippison Nov 20, 2025
2495716
moved force of http_response_code to Login Controller
chippison Nov 20, 2025
1cc9e03
fixed up ui test so that it just clicks dashboard menu item instead o…
chippison Nov 20, 2025
2dfafbc
Put back redirect to login page; seems to work properly now even w/o …
chippison Nov 20, 2025
8132d36
redirecting back to the same page so that we can return back to the s…
chippison Nov 20, 2025
8602d01
adding session expired text to translatable texts in CoreHome so that…
chippison Nov 20, 2025
4697b81
changing test so we don't need to do screenshots and just do some DOM…
chippison Nov 20, 2025
3efd269
deleting the screenshot that we no longer need
chippison Nov 20, 2025
058f2a3
Update WidgetLoader to use refreshAfter instead of just plain redirect
chippison Nov 22, 2025
a91a324
Adding the change to AjaxHelper instead of WidgetLoader
chippison Nov 24, 2025
1fc11d6
Merge branch '5.x-dev' into ux-305
chippison Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/CoreHome/CoreHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ public function getClientSideTranslationKeys(&$translationKeys)
$translationKeys[] = 'CoreHome_CopyModalNote';
$translationKeys[] = 'CoreHome_CopyX';
$translationKeys[] = 'CoreHome_CopyXDescription';
$translationKeys[] = 'General_YourSessionHasExpired';

// add admin menu translations
if (
Expand Down
51 changes: 51 additions & 0 deletions plugins/CoreHome/tests/UI/WidgetLoader_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*!
* Matomo - free/libre analytics platform
*
* WidgetLoader screenshot tests.
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/

describe('WidgetLoader', function () {
this.timeout(0);

this.fixture = "Piwik\\Tests\\Fixtures\\OneVisit";

before(function () {
testEnvironment.testUseMockAuth = 0;
testEnvironment.save();
});

it('should redirect to the landing page when the session cookie is cleared during widget loading', async function () {
// We try to do an actual login
await page.goto("");
await page.type("#login_form_login", superUserLogin);
await page.type("#login_form_password", superUserPassword);
await page.click('#login_form_submit');
await page.waitForNetworkIdle();

// check dashboard is shown
await page.waitForSelector('#dashboard');
expect(await page.$('#dashboard')).to.be.ok;
await page.clearCookies();

//Click on Dashboard menu item
const dashboardMenuSelector = 'div.reportingMenu ul li[data-category-id="Dashboard_Dashboard"] ul li:nth-child(1) a';
await page.click(dashboardMenuSelector);
await page.waitForNetworkIdle();

const loginForm = await page.waitForSelector('#login_form');
expect(loginForm).to.be.ok;

const errorNotification = await page.waitForSelector('div.system.notification-error');
expect(errorNotification).to.be.ok;

const errorText = await page.evaluate(() => _pk_translate('General_Error'));
const expectedErrorNotificationText = await page.evaluate(() => _pk_translate('General_YourSessionHasExpired'));
const expectedText = errorText + ': ' + expectedErrorNotificationText;
const notificationText = await page.$eval('div.system.notification-error .notification-body', el => el.textContent.trim());
expect(notificationText).to.equal(expectedText);

});
});
30 changes: 17 additions & 13 deletions plugins/CoreHome/vue/dist/CoreHome.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading