Skip to content

Commit

Permalink
test: remove scheme in saved html (#10099)
Browse files Browse the repository at this point in the history
* test: remove scheme in saved html

---------

Co-authored-by: Stéphane Gigandet <[email protected]>
  • Loading branch information
alexgarel and stephanegigandet authored Apr 8, 2024
1 parent d741bcc commit bdc0168
Show file tree
Hide file tree
Showing 52 changed files with 3,299 additions and 3,293 deletions.
5 changes: 5 additions & 0 deletions lib/ProductOpener/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -847,6 +849,9 @@ sub normalize_html_for_test_comparison ($html_ref) {
# <time datetime="2024-03-26T18:43:45">26 mars 2024, 18:43:45 CET</time>
$$html_ref =~ s/<time datetime="[^"]+">[^<]+<\/time>/<time datetime="--ignore--">--ignore--<\/time>/g;

# normalize URLs be removing scheme to avoid false positive alerts on security
$$html_ref =~ s/https?:\/\//\/\//g;

return;
}

Expand Down
1 change: 1 addition & 0 deletions stop_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Ciqual
CIQUAL
citrique
CodeOnline
CodeQL
colza
Config
contenant
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions tests/integration/expected_test_results/web_html/fr-brands.html

Large diffs are not rendered by default.

136 changes: 68 additions & 68 deletions tests/integration/expected_test_results/web_html/fr-categories.html

Large diffs are not rendered by default.

122 changes: 61 additions & 61 deletions tests/integration/expected_test_results/web_html/fr-countries.html

Large diffs are not rendered by default.

156 changes: 78 additions & 78 deletions tests/integration/expected_test_results/web_html/fr-edit-product.html

Large diffs are not rendered by default.

130 changes: 65 additions & 65 deletions tests/integration/expected_test_results/web_html/fr-index.html

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions tests/integration/expected_test_results/web_html/fr-labels.html

Large diffs are not rendered by default.

216 changes: 108 additions & 108 deletions tests/integration/expected_test_results/web_html/fr-product-2.html

Large diffs are not rendered by default.

216 changes: 108 additions & 108 deletions tests/integration/expected_test_results/web_html/fr-product.html

Large diffs are not rendered by default.

108 changes: 54 additions & 54 deletions tests/integration/expected_test_results/web_html/fr-search-form.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions tests/integration/expected_test_results/web_html/user-register.html

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions tests/integration/expected_test_results/web_html/world-brands.html

Large diffs are not rendered by default.

136 changes: 68 additions & 68 deletions tests/integration/expected_test_results/web_html/world-categories.html

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions tests/integration/expected_test_results/web_html/world-countries.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

138 changes: 69 additions & 69 deletions tests/integration/expected_test_results/web_html/world-index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

112 changes: 56 additions & 56 deletions tests/integration/expected_test_results/web_html/world-labels.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

216 changes: 108 additions & 108 deletions tests/integration/expected_test_results/web_html/world-product.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit bdc0168

Please sign in to comment.