fix: blockaid report url in redesigned pages#25702
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #25702 +/- ##
===========================================
+ Coverage 69.79% 69.81% +0.01%
===========================================
Files 1377 1377
Lines 48435 48452 +17
Branches 13354 13362 +8
===========================================
+ Hits 33805 33823 +18
+ Misses 14630 14629 -1 ☔ View full report in Codecov by Sentry. |
Builds ready [7d6874e]
Page Load Metrics (306 ± 271 ms)
Bundle size diffs
|
|
|
||
| expect(result.current).toHaveLength(1); | ||
| expect(result.current[0].reportUrl).toBeDefined(); | ||
| delete result.current[0].reportUrl; |
There was a problem hiding this comment.
why not add the reportUrl to the EXPECTED_ALERT?
There was a problem hiding this comment.
reportUrl generated are different on local and CI I think due to zip utility and that breaks the unit test.
There was a problem hiding this comment.
could we add this as a comment where we delete reportUrl?
| let reportUrl = ZENDESK_URLS.SUPPORT_URL; | ||
| if (stringifiedJSONData) { | ||
| const encodedData = | ||
| zlib?.gzipSync?.(stringifiedJSONData) ?? stringifiedJSONData; | ||
|
|
||
| reportUrl = `${FALSE_POSITIVE_REPORT_BASE_URL}?data=${encodeURIComponent( | ||
| encodedData.toString('base64'), | ||
| )}&utm_source=${SECURITY_PROVIDER_UTM_SOURCE}`; | ||
| } | ||
|
|
||
| return [normalizeProviderAlert(securityAlertResponse, t, reportUrl)]; |
There was a problem hiding this comment.
is this duplicating existing logic that is already in blackaid-banner-alert.js?
There was a problem hiding this comment.
blackaid-banner-alert is old code that we will eventually get rid of and replace by this code.
| /** | ||
| * URL to report issue. | ||
| */ | ||
| reportUrl?: string; |
There was a problem hiding this comment.
Will reportUrl always be present? If so , should we update the type?



Description
Fix blockaid reportUrl in redesigned pages.
Related issues
Fixes: #25656
Manual testing steps
Screenshots/Recordings
NA
Pre-merge author checklist
Pre-merge reviewer checklist