Skip to content

test(e2e): Adds Feedback Widget Maestro E2E tests #4604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 238 commits into
base: feedback-ui-2
Choose a base branch
from

Conversation

antonis
Copy link
Collaborator

@antonis antonis commented Feb 26, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on: #4726

PR Chain:

📜 Description

Adds Feedback Widget Maestro E2E tests for the happy path flow for RN 0.77.1:

  • Show feedback button
  • Open the feedback widget
  • Fill and submit the form

💡 Motivation and Context

Part of #4302

💚 How did you test it?

CI (submitted E2E test feedback), Manual

Note: To run Android locally you might need to change the build architecture android.patch

📝 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

Base automatically changed from antonis/ios-accessibility to feedback-ui-2 April 14, 2025 14:50
@antonis antonis changed the base branch from feedback-ui-2 to antonis/capture-screenshot-error April 16, 2025 13:22
antonis added 2 commits April 16, 2025 16:22
…-e2e

# Conflicts:
#	CHANGELOG.md
#	packages/core/android/src/oldarch/java/io/sentry/react/RNSentryModule.java
#	packages/core/src/js/feedback/FeedbackWidget.tsx
#	packages/core/src/js/feedback/ScreenshotButton.tsx
#	packages/core/src/js/tracing/reactnativeprofiler.tsx
#	packages/core/test/feedback/ScreenshotButton.test.tsx
#	packages/core/test/feedback/__snapshots__/FeedbackWidgetManager.test.tsx.snap
Base automatically changed from antonis/capture-screenshot-error to feedback-ui-2 April 17, 2025 07:13

- runFlow:
when:
visible: 'Engine: Hermes for RN 0.77.1' # Skipping for 0.65.3
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As discussed and documented the Modal implementation is fully supported on React Native 0.71 and up.
To avoid complicating the e2e-tests/cli.mjs implementation to independently run each .yml test in order to separate the feedback.yml execution I skipped the test with Maestro. We can probably iterate by injecting the <FeedbackWidget> form in the test App if we want to cover 0.65.3 with the E2E tests.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for the note. The Modal is fully supported in 0.71 in the new architecture,

but for the legacy architecture, the test should pass (the modal should work) even for 0.65.3.

If it doesn't it might be unrelated to the modal, but we can discuss it.

Copy link
Collaborator Author

@antonis antonis Apr 29, 2025

Choose a reason for hiding this comment

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

but for the legacy architecture, the test should pass (the modal should work) even for 0.65.3.

I haven't been able to successfully run the tests on 0.65.3 legacy architecture either. From the logs it seems that the modal does not open but I'll need to investigate this further to understand why this is happening.

@antonis antonis marked this pull request as ready for review April 28, 2025 08:37
@antonis
Copy link
Collaborator Author

antonis commented Apr 28, 2025

Note that End-to-End Tests / metrics (new, ios) (pull_request) already fail in the feature branch PR and will be handled with #4784

Copy link
Member

Choose a reason for hiding this comment

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

The test looks good!

/>
)}
</View>

{config.showName && (
<>
<Text style={styles.label}>
<Text style={styles.label} testID='name-label' accessibilityLabel={text.nameLabel}>
Copy link
Member

Choose a reason for hiding this comment

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

Do we need the additional testId and accessibilityLabel?

I would prefer not using the testIDs if not needed to avoid conflicting with user apps.

If we need them then lets prefix them with something unique like sentry-feedback-*.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated with 8176d4f:

  • I've cleaned up all the unneeded test-id and used the sentry-feedback-* prefix for those used.
  • Removed the unneeded accessibility labels.

Sign up for free to 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