Datenschutzbestimmungen hinzugefügt, theme wird sofort aktiviert
This commit is contained in:
@@ -465,6 +465,44 @@ test('SendUserstats', async t => {
|
||||
await testLocalStorageSet("matomoShouldTrack", "1");
|
||||
});
|
||||
|
||||
|
||||
test.only('SendUserstatsInPrivacyPolicy', async t => {
|
||||
await waitForMainMenu(t);
|
||||
let matomoCheck = ClientFunction(() => {
|
||||
return new Promise((resolve) => {
|
||||
function check() {
|
||||
window["_paq"].push([function () {
|
||||
resolve(!this["isUserOptedOut"]());
|
||||
}]);
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
check();
|
||||
});
|
||||
if (document.readyState === 'complete') {
|
||||
check();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
await t
|
||||
.click(Selector(".action [data-translation-title='settings']"))
|
||||
.click(Selector("#privacy-policy-button"))
|
||||
.expect(Selector("#track-switch").checked).ok();
|
||||
let res = await matomoCheck();
|
||||
await t.expect(res).ok()
|
||||
.click(Selector(".switch [data-translation='track']"))
|
||||
.expect(Selector("#track-switch").checked).eql(false);
|
||||
res = await matomoCheck();
|
||||
await t.expect(res).eql(false)
|
||||
.click(Selector(".switch [data-translation='track']"))
|
||||
.expect(Selector("#track-switch").checked).ok();
|
||||
res = await matomoCheck();
|
||||
await t.expect(res).ok()
|
||||
}).before(async t => {
|
||||
await testLocalStorageSet("matomoShouldTrack", "1");
|
||||
});
|
||||
|
||||
test('Themes', async t => {
|
||||
await waitForMainMenu(t);
|
||||
await t
|
||||
|
||||
Reference in New Issue
Block a user