Datenschutzbestimmungen hinzugefügt, theme wird sofort aktiviert

This commit is contained in:
silas
2018-10-11 23:36:09 +02:00
parent 1c8ec944f7
commit 864530ecf1
9 changed files with 196 additions and 39 deletions

View File

@@ -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