test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests - #4795

Merged
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot
Jun 20, 2025
Merged

test(e2e): Adds Feedback Widget Capture Screenshot Maestro E2E tests#4795
antonis merged 264 commits into
mainfrom
antonis/feedback-e2e-screenshot

Conversation

@antonis

@antonisantonis commented May 1, 2025

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on #4604

📜 Description

Adds Feedback Widget Capture Screenshot tests

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (example of submitted feedback via the CI, Local:

Screen.Recording.2025-05-01.at.8.20.15.AM.mov

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

antonisand others added 30 commits November 29, 2024 23:15
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1199.79 ms1217.08 ms17.29 ms
Size2.63 MiB3.79 MiB1.15 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
bdb324a+dirty1229.33 ms1236.61 ms7.29 ms
1f1c420+dirty1216.77 ms1214.48 ms-2.29 ms
ec2a485+dirty1219.72 ms1224.66 ms4.94 ms
f2c6fa5+dirty1230.27 ms1236.20 ms5.93 ms
0e42017+dirty1225.89 ms1231.63 ms5.74 ms
69721ae+dirty1229.82 ms1226.00 ms-3.82 ms
940bd65+dirty1216.88 ms1225.23 ms8.35 ms
b4d6bde+dirty1223.22 ms1243.56 ms20.34 ms
e12044e+dirty1233.45 ms1233.66 ms0.21 ms
6e8a851+dirty1227.96 ms1235.61 ms7.65 ms

App size

RevisionPlainWith SentryDiff
bdb324a+dirty2.63 MiB3.79 MiB1.15 MiB
1f1c420+dirty2.63 MiB3.77 MiB1.14 MiB
ec2a485+dirty2.63 MiB3.78 MiB1.15 MiB
f2c6fa5+dirty2.63 MiB3.78 MiB1.15 MiB
0e42017+dirty2.63 MiB3.78 MiB1.15 MiB
69721ae+dirty2.63 MiB3.79 MiB1.15 MiB
940bd65+dirty2.63 MiB3.78 MiB1.15 MiB
b4d6bde+dirty2.63 MiB3.77 MiB1.14 MiB
e12044e+dirty2.63 MiB3.78 MiB1.15 MiB
6e8a851+dirty2.63 MiB3.78 MiB1.15 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty1216.98 ms1217.10 ms0.12 ms
4ba143f+dirty1215.92 ms1221.48 ms5.56 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty2.63 MiB3.77 MiB1.14 MiB
4ba143f+dirty2.63 MiB3.78 MiB1.15 MiB

@github-actions

github-actionsBot commented May 1, 2025

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time386.94 ms393.16 ms6.22 ms
Size7.15 MiB8.42 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
1f1c420+dirty383.31 ms386.98 ms3.67 ms
c352c30+dirty396.83 ms378.11 ms-18.72 ms
e12044e+dirty404.20 ms398.15 ms-6.06 ms
ec2a485+dirty397.67 ms390.91 ms-6.76 ms
f2c6fa5+dirty435.84 ms433.84 ms-2.00 ms
df5da5d+dirty415.54 ms456.96 ms41.42 ms
69721ae+dirty423.63 ms417.34 ms-6.29 ms
0e42017+dirty387.33 ms399.30 ms11.97 ms
b4d6bde+dirty390.51 ms385.60 ms-4.91 ms
940bd65+dirty408.45 ms419.75 ms11.30 ms

App size

RevisionPlainWith SentryDiff
1f1c420+dirty7.15 MiB8.42 MiB1.26 MiB
c352c30+dirty7.15 MiB8.42 MiB1.26 MiB
e12044e+dirty7.15 MiB8.42 MiB1.26 MiB
ec2a485+dirty7.15 MiB8.42 MiB1.26 MiB
f2c6fa5+dirty7.15 MiB8.42 MiB1.26 MiB
df5da5d+dirty7.15 MiB8.42 MiB1.26 MiB
69721ae+dirty7.15 MiB8.42 MiB1.26 MiB
0e42017+dirty7.15 MiB8.42 MiB1.26 MiB
b4d6bde+dirty7.15 MiB8.42 MiB1.26 MiB
940bd65+dirty7.15 MiB8.42 MiB1.26 MiB

Previous results on branch: antonis/feedback-e2e-screenshot

Startup times

RevisionPlainWith SentryDiff
4733ec6+dirty380.24 ms397.63 ms17.39 ms
4ba143f+dirty418.40 ms432.88 ms14.49 ms

App size

RevisionPlainWith SentryDiff
4733ec6+dirty7.15 MiB8.42 MiB1.26 MiB
4ba143f+dirty7.15 MiB8.42 MiB1.26 MiB

@antonis

Copy link
Copy Markdown
ContributorAuthor

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Maestro logs

08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text test@email.com COMPLETED
08:43:06.268 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" RUNNING
08:43:06.398 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=What's the bug? What did you expect?, accessibilityText=, hintText=What's the bug? What did you expect?, ignoreBoundsFiltering=false, resource-id=, clickable=true, bounds=[20,345][300,445], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.EditText}, children=[], clickable=true, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=20, y=345, width=280, height=100))
08:43:07.287 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:07.287 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 395) using hierarchy based logic for wait
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:07.287 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:08.157 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "What's the bug? What did you expect?" COMPLETED
08:43:08.158 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests RUNNING
08:43:08.158 [ INFO] maestro.Maestro.inputText: Inputting text: This is a test feedback message with a screenshot from CI e2e tests
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Input text This is a test feedback message with a screenshot from CI e2e tests COMPLETED
08:43:15.437 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. RUNNING
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Scrolling try count: 0, DeviceWidth: 320, DeviceWidth: 640
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Element bounds: Bounds(x=96, y=466, width=128, height=22)
08:43:15.608 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Visibility Percent: 0
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: Command centerElement: ScrollUntilVisibleCommand(selector=ElementSelector(textRegex=Take a screenshot, idRegex=null, size=null, below=null, above=null, leftOf=null, rightOf=null, containsChild=null, containsDescendants=null, traits=null, index=null, enabled=null, optional=false, selected=null, checked=null, focused=null, childOf=null), direction=DOWN, scrollDuration=601, visibilityPercentage=100, timeout=20000, waitToSettleTimeoutMs=null, centerElement=false, label=null, optional=false).centerElement
08:43:15.609 [ INFO] maestro.orchestra.Orchestra.scrollUntilVisible: visibilityPercentageNormalized: 1.0
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Scrolling DOWN until "Take a screenshot" is visible. COMPLETED
08:43:15.609 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" RUNNING
08:43:15.696 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take a screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-take-screenshot-button, clickable=false, bounds=[96,466][224,488], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=96, y=466, width=128, height=22))
08:43:16.603 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:16.603 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (160, 477) using hierarchy based logic for wait
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:16.603 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:17.755 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take a screenshot" COMPLETED
08:43:17.755 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" RUNNING
08:43:17.883 [ INFO] maestro.Maestro.tap-BUbHBYE: Tapping on element: UiElement(treeNode=TreeNode(attributes={text=Take Screenshot, accessibilityText=, hintText=, ignoreBoundsFiltering=false, resource-id=sentry-feedback-screenshot-button, clickable=false, bounds=[140,569][274,594], enabled=true, focused=false, checked=false, scrollable=false, selected=false, class=android.widget.TextView}, children=[], clickable=false, enabled=true, focused=false, checked=false, selected=false), bounds=Bounds(x=140, y=569, width=134, height=25))
08:43:18.778 [ INFO] maestro.Maestro.tap-BUbHBYE: Refreshed element
08:43:18.779 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Tapping at (207, 581) using hierarchy based logic for wait
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to byte array
08:43:18.779 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:20.000 [ INFO] maestro.Maestro.hierarchyBasedTap-hbl3e4M: Something have changed in the UI judging by view hierarchy. Proceed.
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Tap on "Take Screenshot" COMPLETED
08:43:20.000 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible RUNNING
08:43:25.267 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Assert that "Report a Bug" is visible FAILED
08:43:25.268 [ INFO] maestro.Maestro.takeScreenshot: Taking screenshot
08:43:25.268 [TRACE] maestro.utils.ScreenshotUtils.takeScreenshot: Taking screenshot to output sink
08:43:25.327 [ERROR] maestro.orchestra.Orchestra.executeCommands: [Command execution] CommandFailed: Assertion is false: "Report a Bug" is visible
08:43:25.327 [ INFO] maestro.cli.runner.TestSuiteInteractor.invoke: Run feedback/captureFlow-android.yml when Platform is ANDROID FAILED

Base automatically changed from antonis/feedback-e2e to feedback-ui-2May 9, 2025 07:22
# Conflicts:
#	dev-packages/e2e-tests/maestro/feedback.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-android.yml
#	dev-packages/e2e-tests/maestro/feedback/happyFlow-ios.yml
Base automatically changed from feedback-ui-2 to mainMay 20, 2025 14:10

@antonisantonis left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Android app fails to open the widget on CI after the capture screenshot step. Leaving this PR in draft till the issue is investigated and fixed.

Did a couple of attempts with higher timeouts but the issue persists indicating that the app hangs on CI after the screenshot is captured.

disable-spellchecker: true
target: 'aosp_atd'
channel: canary # Necessary for ATDs
target: 'google_apis'

@antonisantonisMay 22, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google image seem to provide a more complete system image support for graphics operations fixing the capture screenshot failure. The downside is that it is heavier for the CI operations. Comparing two runs on main vs this PR showed an average 44s bump in the test duration.

Testmainthis PR
RN 0.65.3 legacy jsc android production no5m 32s6m 16s
RN 0.79.1 legacy hermes android production no5m 36s6m 49s
RN 0.79.1 new hermes android production no6m 53s7m 7s

Note that the screenshots functionality failed with the AOSP image even for the screenshots taken by the Maestro environment in case of failure (E.g. see this log artifcact were the image is blank).

@antonis
antonis marked this pull request as ready for review May 22, 2025 16:09

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! LGTM! once the test passes

@antonis
antonis merged commit 38a1af2 into mainJun 20, 2025
@antonis
antonis deleted the antonis/feedback-e2e-screenshot branch June 20, 2025 13:21
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

@antonis@lucas-zimerman