From c81b5f95959fef125a582c9d89c8da451fd45e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ko=C5=A1arko?= Date: Wed, 16 Feb 2022 11:04:15 +0100 Subject: [PATCH] skip website...under CC 4.0 BY in the shared footer --- src/new_theme/public/js/footer_data.mjs | 2 +- test/new_theme.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/new_theme/public/js/footer_data.mjs b/src/new_theme/public/js/footer_data.mjs index 8225a1e..40c4c33 100644 --- a/src/new_theme/public/js/footer_data.mjs +++ b/src/new_theme/public/js/footer_data.mjs @@ -233,7 +233,7 @@ class FooterData { THE LINDAT/CLARIAH-CZ PROJECT (LM2018101; formerly LM2010013, LM2015071) IS FULLY SUPPORTED BY THE MINISTRY OF EDUCATION, SPORTS AND YOUTH OF THE CZECH REPUBLIC UNDER THE PROGRAMME LM OF "LARGE INFRASTRUCTURES"
Icons © Smashicons and Freepik from flaticon.com licensed by CC 3.0 BY
-
website © 2022 by ÚFAL under CC 4.0 BY
+
website © 2022 by ÚFAL
${trackingScripts} diff --git a/test/new_theme.js b/test/new_theme.js index 071e3ad..cf4cfbe 100644 --- a/test/new_theme.js +++ b/test/new_theme.js @@ -58,12 +58,20 @@ describe('lindat-common matches drupal', function (){ let footer = await element(by.css("footer")) await browser.wait(EC.presenceOf(footer), waitingTime) let expected_footer_anchors = footer.all(by.css("a")); - expected_footer_anchors_count = await expected_footer_anchors.count(); expected_links = []; await expected_footer_anchors.each(async function (e, index){ let link = await e.getAttribute('href'); - expected_links.push(link.replace('http:', 'https:')); + let parent = await e.element(by.xpath('..')); + let parent_id = await parent.getAttribute('id'); + // The drupal footer adds `under CC 4.0 BY` + // it would be confusing if repo or services had this statement too + if (parent_id === 'ack-ufal' && link.includes('creativecommons.org')){ + ; + }else { + expected_links.push(link.replace('http:', 'https:')); + } + expected_footer_anchors_count = expected_links.length; }); await browser.get('/dist/example/index.html');