From ab986635f85b97b8ee35ec6895281e51e207ca7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20So=C3=B3s?= Date: Thu, 12 Dec 2024 10:32:26 +0100 Subject: [PATCH] Mask out sparkline points from templates tests. (#8402) --- app/test/frontend/golden/pkg_activity_log_page.html | 4 ++-- app/test/frontend/golden/pkg_admin_page.html | 4 ++-- app/test/frontend/golden/pkg_changelog_page.html | 4 ++-- app/test/frontend/golden/pkg_example_page.html | 4 ++-- app/test/frontend/golden/pkg_install_page.html | 4 ++-- app/test/frontend/golden/pkg_score_page.html | 4 ++-- .../golden/pkg_score_page_with_downloads_chart.html | 4 ++-- app/test/frontend/golden/pkg_show_page.html | 4 ++-- app/test/frontend/golden/pkg_show_page_discontinued.html | 4 ++-- app/test/frontend/golden/pkg_show_page_flutter_plugin.html | 4 ++-- app/test/frontend/golden/pkg_show_page_publisher.html | 4 ++-- app/test/frontend/golden/pkg_show_page_retracted.html | 4 ++-- .../pkg_show_page_retracted_non_retracted_version.html | 4 ++-- app/test/frontend/golden/pkg_show_version_page.html | 4 ++-- app/test/frontend/golden/pkg_versions_page.html | 4 ++-- app/test/frontend/templates_test.dart | 6 ++++-- 16 files changed, 34 insertions(+), 32 deletions(-) diff --git a/app/test/frontend/golden/pkg_activity_log_page.html b/app/test/frontend/golden/pkg_activity_log_page.html index 6c56dbcf6..b5c8f3bbe 100644 --- a/app/test/frontend/golden/pkg_activity_log_page.html +++ b/app/test/frontend/golden/pkg_activity_log_page.html @@ -383,7 +383,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -461,7 +461,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_admin_page.html b/app/test/frontend/golden/pkg_admin_page.html index 5194f0990..8cb795dde 100644 --- a/app/test/frontend/golden/pkg_admin_page.html +++ b/app/test/frontend/golden/pkg_admin_page.html @@ -668,7 +668,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -746,7 +746,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_changelog_page.html b/app/test/frontend/golden/pkg_changelog_page.html index a4fa695e9..789fe43ba 100644 --- a/app/test/frontend/golden/pkg_changelog_page.html +++ b/app/test/frontend/golden/pkg_changelog_page.html @@ -253,7 +253,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -332,7 +332,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_example_page.html b/app/test/frontend/golden/pkg_example_page.html index ecf52b5f8..6def196bd 100644 --- a/app/test/frontend/golden/pkg_example_page.html +++ b/app/test/frontend/golden/pkg_example_page.html @@ -250,7 +250,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -329,7 +329,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_install_page.html b/app/test/frontend/golden/pkg_install_page.html index 1f883a0ff..d9578ef82 100644 --- a/app/test/frontend/golden/pkg_install_page.html +++ b/app/test/frontend/golden/pkg_install_page.html @@ -276,7 +276,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -355,7 +355,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_score_page.html b/app/test/frontend/golden/pkg_score_page.html index e778dc93a..23fc48a92 100644 --- a/app/test/frontend/golden/pkg_score_page.html +++ b/app/test/frontend/golden/pkg_score_page.html @@ -338,7 +338,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -417,7 +417,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_score_page_with_downloads_chart.html b/app/test/frontend/golden/pkg_score_page_with_downloads_chart.html index c26560122..23fc48a92 100644 --- a/app/test/frontend/golden/pkg_score_page_with_downloads_chart.html +++ b/app/test/frontend/golden/pkg_score_page_with_downloads_chart.html @@ -338,7 +338,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -417,7 +417,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_show_page.html b/app/test/frontend/golden/pkg_show_page.html index 57dcfc533..576cb4200 100644 --- a/app/test/frontend/golden/pkg_show_page.html +++ b/app/test/frontend/golden/pkg_show_page.html @@ -253,7 +253,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -332,7 +332,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_show_page_discontinued.html b/app/test/frontend/golden/pkg_show_page_discontinued.html index e7ef2fb4f..d8e814a66 100644 --- a/app/test/frontend/golden/pkg_show_page_discontinued.html +++ b/app/test/frontend/golden/pkg_show_page_discontinued.html @@ -246,7 +246,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

pkg is awesome

@@ -325,7 +325,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

pkg is awesome

diff --git a/app/test/frontend/golden/pkg_show_page_flutter_plugin.html b/app/test/frontend/golden/pkg_show_page_flutter_plugin.html index bfbdfea16..5fc296b47 100644 --- a/app/test/frontend/golden/pkg_show_page_flutter_plugin.html +++ b/app/test/frontend/golden/pkg_show_page_flutter_plugin.html @@ -242,7 +242,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

flutter_titanium is awesome

@@ -325,7 +325,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

flutter_titanium is awesome

diff --git a/app/test/frontend/golden/pkg_show_page_publisher.html b/app/test/frontend/golden/pkg_show_page_publisher.html index 2bec8c82c..c4a9ce5b7 100644 --- a/app/test/frontend/golden/pkg_show_page_publisher.html +++ b/app/test/frontend/golden/pkg_show_page_publisher.html @@ -244,7 +244,7 @@

Publisher

Weekly Downloads

-
+

Metadata

neon is awesome

@@ -326,7 +326,7 @@

Publisher

Weekly Downloads

-
+

Metadata

neon is awesome

diff --git a/app/test/frontend/golden/pkg_show_page_retracted.html b/app/test/frontend/golden/pkg_show_page_retracted.html index ff1e34fea..b38cf0e00 100644 --- a/app/test/frontend/golden/pkg_show_page_retracted.html +++ b/app/test/frontend/golden/pkg_show_page_retracted.html @@ -229,7 +229,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

pkg is awesome

@@ -301,7 +301,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

pkg is awesome

diff --git a/app/test/frontend/golden/pkg_show_page_retracted_non_retracted_version.html b/app/test/frontend/golden/pkg_show_page_retracted_non_retracted_version.html index 24840b888..90ec9e9a3 100644 --- a/app/test/frontend/golden/pkg_show_page_retracted_non_retracted_version.html +++ b/app/test/frontend/golden/pkg_show_page_retracted_non_retracted_version.html @@ -237,7 +237,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

pkg is awesome

@@ -316,7 +316,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

pkg is awesome

diff --git a/app/test/frontend/golden/pkg_show_version_page.html b/app/test/frontend/golden/pkg_show_version_page.html index cd5ccc00a..0d147baa5 100644 --- a/app/test/frontend/golden/pkg_show_version_page.html +++ b/app/test/frontend/golden/pkg_show_version_page.html @@ -247,7 +247,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -326,7 +326,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/golden/pkg_versions_page.html b/app/test/frontend/golden/pkg_versions_page.html index c61067d98..a92e00f99 100644 --- a/app/test/frontend/golden/pkg_versions_page.html +++ b/app/test/frontend/golden/pkg_versions_page.html @@ -360,7 +360,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

@@ -439,7 +439,7 @@

Publisher

unverified uploader

Weekly Downloads

-
+

Metadata

oxygen is awesome

diff --git a/app/test/frontend/templates_test.dart b/app/test/frontend/templates_test.dart index a1c3badd6..f7f63ac80 100644 --- a/app/test/frontend/templates_test.dart +++ b/app/test/frontend/templates_test.dart @@ -99,8 +99,10 @@ void main() { 'Pana %%pana-version%%,') .replaceAll('Dart $toolStableDartSdkVersion', 'Dart %%stable-dart-version%%') - .replaceAll('/static/hash-${staticFileCache.etag}/', - '/static/hash-%%etag%%/'); + .replaceAll( + '/static/hash-${staticFileCache.etag}/', '/static/hash-%%etag%%/') + .replaceAll(RegExp('data-weekly-sparkline-points=".*?"'), + 'data-weekly-sparkline-points="%%sparkline-points%%"'); final csrfToken = requestContext.sessionData?.csrfToken; if (csrfToken != null) { replacedContent =