Skip to content

fix: normalize Slack blob links in Playwright test health report - #274

Merged
cmd-ob merged 1 commit into
mainfrom
fix/mmqa-2013-slack-spec-blob-links
Aug 3, 2026
Merged

fix: normalize Slack blob links in Playwright test health report#274
cmd-ob merged 1 commit into
mainfrom
fix/mmqa-2013-slack-spec-blob-links

Conversation

@cmd-ob

@cmd-obcmd-ob commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Normalize Playwright test.path values before building Slack GitHub blob links so Mobile Appium health-report spec URLs stop 404ing (MMQA-2013)
  • Add optional test-source-prefix action input (e.g. tests/smoke-appium) for testDir-relative paths
  • Strip CI absolute checkout paths (e.g. /Users/runner/work/.../tests/...) to repo-relative paths

Test plan

  • node --test .github/actions/playwright-test-health-report/lib/report-health.test.mjs (10/10 pass)
  • Verified via metamask-mobile CI: [Flaky test report — playwright-test-health-report job]

Map Playwright testDir-relative and CI absolute paths to repo-relative
GitHub blob URLs so Mobile Appium health-report spec links stop 404ing
(MMQA-2013).
Co-authored-by: Cursor <cursoragent@cursor.com>
@cmd-ob
cmd-ob merged commit a4a179a into mainAug 3, 2026
10 checks passed
@cmd-ob
cmd-ob deleted the fix/mmqa-2013-slack-spec-blob-links branch August 3, 2026 12:49
pullBot pushed a commit to Reality2byte/metamask-mobile that referenced this pull request Aug 3, 2026
…(MMQA-2013) (MetaMask#34188)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## **Description**
Complements
[MetaMask/github-tools#274](MetaMask/github-tools#274)
(**merged**) for
[MMQA-2013](https://consensyssoftware.atlassian.net/browse/MMQA-2013).
Slack links from the Playwright Appium test health report were 404ing
because Playwright reports paths relative to `testDir`
(`tests/smoke-appium`), e.g. `accounts/foo.spec.ts`, while GitHub blob
URLs need the repo-relative path.
This PR:
1. Pins `playwright-test-health-report` to the **merged** github-tools
`main` commit (`a4a179a`) that adds path normalization and the
`test-source-prefix` input
2. Passes `test-source-prefix: tests/smoke-appium` from
`.github/workflows/flaky-test-report.yml`
### Validation
Manual `workflow_dispatch` on this branch succeeded:
https://github.com/MetaMask/metamask-mobile/actions/runs/30814511794
That run used `test-source-prefix: tests/smoke-appium` against the
pre-merge github-tools commit; pin was then retargeted to the merged
`main` SHA (`a4a179a`).
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: MMQA-2013
Refs: MetaMask/github-tools#274
## **Manual testing steps**
```gherkin
Feature: Appium Playwright health report Slack links
Scenario: workflow dispatch generates report with valid blob URLs
Given MetaMask/github-tools#274 is merged on main
And secrets for the Playwright health Slack webhook are configured
When a maintainer runs workflow_dispatch on "Flaky test report" with job=appium
Then the Slack report spec links resolve to files under tests/smoke-appium/
And absolute CI paths under tests/ also resolve without 404s
```
Validated via workflow_dispatch:
https://github.com/MetaMask/metamask-mobile/actions/runs/30814511794
(success).
## **Screenshots/Recordings**
N/A — CI workflow / Slack link formatting only; no app UI changes.
### **Before**
N/A
### **After**
N/A
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-5930e9be-91ea-4be3-928a-706d928cebd2?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-5930e9be-91ea-4be3-928a-706d928cebd2&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>
[MMQA-2013]:
https://consensyssoftware.atlassian.net/browse/MMQA-2013?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cmd-ob <cmd-ob@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@cmd-ob@vivek-consensys