From bdc0168a81671f894950821d9a8313f15595087c Mon Sep 17 00:00:00 2001 From: Alex Garel Date: Mon, 8 Apr 2024 16:25:36 +0200 Subject: [PATCH] test: remove scheme in saved html (#10099) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: remove scheme in saved html --------- Co-authored-by: Stéphane Gigandet --- lib/ProductOpener/Test.pm | 5 + stop_words.txt | 1 + .../get-auth-bad-user-password.html | 108 ++++----- .../post-product-auth-bad-user-password.html | 110 ++++----- .../crawler-access-category-facet-page.html | 118 +++++----- .../crawler-access-product-page.html | 216 +++++++++--------- ...r-does-not-get-facet-knowledge-panels.html | 126 +++++----- ...ormal-user-access-category-facet-page.html | 120 +++++----- .../normal-user-access-editor-facet-page.html | 108 ++++----- .../normal-user-access-list-of-tags.html | 112 ++++----- .../normal-user-access-nested-facet-page.html | 120 +++++----- .../normal-user-access-product-page.html | 216 +++++++++--------- ...ormal-user-get-facet-knowledge-panels.html | 128 +++++------ .../normal-user-get-non-official-cc-lc.html | 114 ++++----- .../product_read/get-existing-product.html | 214 ++++++++--------- .../product_read/get-unexisting-product.html | 114 ++++----- ...-protected-product-web-form-moderator.html | 116 +++++----- .../edit-protected-product-web-form.html | 116 +++++----- .../edit-unprotected-product-web-form.html | 116 +++++----- .../country-cambodia-exists-but-empty.html | 124 +++++----- ...ountry-doesnotexist-ingredients-apple.html | 112 ++++----- .../country-doesnotexist-ingredients.html | 108 ++++----- .../unknown_tags/country-doesnotexist.html | 112 ++++----- .../unknown_tags/country-france-exists.html | 120 +++++----- .../unknown_tags/ingredient-apple-exists.html | 128 +++++------ ...tyingredient-does-not-exist-and-empty.html | 112 ++++----- ...t-does-not-exist-but-not-empty-labels.html | 114 ++++----- ...gredient-does-not-exist-but-not-empty.html | 120 +++++----- .../unknown_tags/unknown-product.html | 114 ++++----- .../web_html/fr-brands.html | 116 +++++----- .../web_html/fr-categories.html | 136 +++++------ .../web_html/fr-countries.html | 122 +++++----- .../web_html/fr-edit-product.html | 156 ++++++------- .../web_html/fr-index.html | 130 +++++------ .../web_html/fr-labels.html | 116 +++++----- .../web_html/fr-product-2.html | 216 +++++++++--------- .../web_html/fr-product.html | 216 +++++++++--------- .../web_html/fr-search-form.html | 108 ++++----- .../web_html/fr-search-results.html | 118 +++++----- .../web_html/user-register.html | 110 ++++----- .../web_html/world-brands.html | 112 ++++----- .../web_html/world-categories.html | 136 +++++------ .../web_html/world-countries.html | 118 +++++----- .../web_html/world-edit-product.html | 156 ++++++------- .../web_html/world-index-signedin.html | 138 +++++------ .../web_html/world-index.html | 138 +++++------ .../web_html/world-label-organic.html | 134 +++++------ .../web_html/world-labels.html | 112 ++++----- .../web_html/world-product-not-found.html | 114 ++++----- .../web_html/world-product.html | 216 +++++++++--------- .../web_html/world-search-form.html | 108 ++++----- .../web_html/world-search-results.html | 124 +++++----- 52 files changed, 3299 insertions(+), 3293 deletions(-) diff --git a/lib/ProductOpener/Test.pm b/lib/ProductOpener/Test.pm index b744e93e73580..c1479af7e2e54 100644 --- a/lib/ProductOpener/Test.pm +++ b/lib/ProductOpener/Test.pm @@ -831,6 +831,8 @@ Normalize the HTML of a web page to be able to compare them across tests runs. We remove time dependent fields. +We also normalize URLS to avoid the scheme prefix (so that we avoid false positives in CodeQL) + =head3 Arguments =head4 product_ref - Hash ref containing product information @@ -847,6 +849,9 @@ sub normalize_html_for_test_comparison ($html_ref) { # $$html_ref =~ s/