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

Draft
wants to merge 232 commits into
base: feedback-ui-2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
817eac8
Update the client implementation to use the new capture feedback js api
antonis Nov 27, 2024
5370a99
Updates SDK API
antonis Nov 27, 2024
42e2fa1
Adds new feedback button in the sample
antonis Nov 27, 2024
514b102
Adds changelog
antonis Nov 27, 2024
0935bbd
Removes unused mock
antonis Nov 27, 2024
9ea5496
Update CHANGELOG.md
antonis Nov 28, 2024
da0d4ac
Directly use captureFeedback from sentry/core
antonis Nov 28, 2024
3e36c6d
Use import from core
antonis Nov 28, 2024
5f3df64
Fixes imports order lint issue
antonis Nov 28, 2024
71b28e8
Fixes build issue
antonis Nov 28, 2024
f9d2b59
Adds captureFeedback tests from sentry-javascript
antonis Nov 28, 2024
d05d531
Update CHANGELOG.md
krystofwoldrich Nov 28, 2024
2bb104b
Only deprecate client captureUserFeedback
antonis Nov 28, 2024
4339274
Add simple form UI
antonis Nov 29, 2024
6ce799b
Adds basic form functionality
antonis Nov 29, 2024
f2cefc6
Update imports
antonis Nov 29, 2024
694ee33
Update imports
antonis Dec 2, 2024
18b1c33
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 2, 2024
034efde
Remove useState hook to avoid multiple react instances issues
antonis Dec 2, 2024
67a492d
Move types and styles in different files
antonis Dec 2, 2024
8eaa61d
Removes attachment button to be added back separately along with the …
antonis Dec 2, 2024
0b88cc5
Add basic field validation
antonis Dec 2, 2024
ae11b8d
Adds changelog
antonis Dec 2, 2024
7f2ca06
Updates changelog
antonis Dec 2, 2024
064b6c4
Updates changelog
antonis Dec 2, 2024
e2add4a
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 2, 2024
e21718a
Trim whitespaces from the submitted feedback
antonis Dec 2, 2024
407f179
Adds tests
antonis Dec 2, 2024
14ac005
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 2, 2024
ddade00
Renames FeedbackFormScreen to FeedbackForm
antonis Dec 6, 2024
1bc1e4c
Add beta label
antonis Dec 6, 2024
7934756
Extract default text to constants
antonis Dec 6, 2024
95e1e0f
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 10, 2024
a169362
Moves constant to a separate file and aligns naming with JS
antonis Dec 10, 2024
4b5df7a
Adds input text labels
antonis Dec 10, 2024
4fa81ce
Close screen before sending the feedback to minimise wait time
antonis Dec 10, 2024
4fff82f
Rename file for consistency
antonis Dec 10, 2024
0258bf2
Flatten configuration hierarchy and clean up
antonis Dec 10, 2024
458ebc2
Align required values with JS
antonis Dec 10, 2024
f0e1bef
Use Sentry user email and name when set
antonis Dec 10, 2024
b9235f2
Simplifies email validation
antonis Dec 10, 2024
6717a84
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 11, 2024
39a67bd
Show success alert message
antonis Dec 11, 2024
501a134
Aligns naming with JS and unmounts the form by default
antonis Dec 11, 2024
4b290a2
Use the minimum config without props in the changelog
antonis Dec 11, 2024
7109deb
Adds development not for unimplemented function
antonis Dec 11, 2024
c80c5cb
Show email and name conditionally
antonis Dec 11, 2024
8c56753
Adds sentry branding (png logo)
antonis Dec 11, 2024
d6e9229
Adds sentry logo resource
antonis Dec 11, 2024
5292475
Add assets in module exports
antonis Dec 11, 2024
efd809f
Revert "Add assets in module exports"
antonis Dec 11, 2024
bc7ae65
Revert "Adds sentry logo resource"
antonis Dec 11, 2024
79ee5ba
Revert "Adds sentry branding (png logo)"
antonis Dec 11, 2024
ba13320
Add last event id
antonis Dec 11, 2024
1f5fb56
Mock lastEventId
antonis Dec 11, 2024
439367a
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 13, 2024
9831482
Adds beta note in the changelog
antonis Dec 13, 2024
d92ea89
Autoinject feedback form
antonis Dec 13, 2024
4097347
Updates changelog
antonis Dec 13, 2024
f8a82fd
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 13, 2024
8b9f4d5
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 13, 2024
30a7b10
Align colors with JS
antonis Dec 13, 2024
3eccf25
Update CHANGELOG.md
antonis Dec 13, 2024
bc96fce
Update CHANGELOG.md
antonis Dec 13, 2024
995a9ca
Update CHANGELOG.md
antonis Dec 13, 2024
3aacaf7
Use regular fonts for both buttons
antonis Dec 13, 2024
20e3a6c
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' of https://git…
antonis Dec 13, 2024
78e412c
Handle keyboard properly
antonis Dec 13, 2024
c45a5e6
Adds an option on whether the email should be validated
antonis Dec 13, 2024
6e39119
Merge properties only once
antonis Dec 13, 2024
57d99e9
Loads current user data on form construction
antonis Dec 13, 2024
6fb8ab4
Remove unneeded extra padding
antonis Dec 13, 2024
fd2e317
Fix background color issue
antonis Dec 13, 2024
0261e04
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 13, 2024
d4168c1
Adds feedback button
antonis Dec 16, 2024
5a9c02d
Updates the changelog
antonis Dec 16, 2024
b793937
Fixes changelog typo
antonis Dec 16, 2024
b209ad6
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 16, 2024
4408071
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 16, 2024
bdee51b
Merge branch 'antonis/4358-Feedback-Form-Autoinject' into antonis/435…
antonis Dec 16, 2024
a40fde6
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 17, 2024
2a8f13f
Updates styles background color
antonis Dec 17, 2024
0f3a244
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 17, 2024
9a96e74
Use defaultProps
antonis Dec 17, 2024
10c1c0e
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 17, 2024
2be08a6
Correct defaultProps
antonis Dec 17, 2024
0588552
Adds test to verify when getUser is called
antonis Dec 17, 2024
89c66d3
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 17, 2024
851b63e
Merge branch 'antonis/4358-Feedback-Form-Autoinject' into antonis/435…
antonis Dec 17, 2024
f05497c
Use smaller image
antonis Dec 18, 2024
0eb4f68
Add margin next to the icon
antonis Dec 18, 2024
fbc8f77
Adds bottom spacing in the ErrorScreen so that the feedback button do…
antonis Dec 18, 2024
e0ec92d
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 18, 2024
fada0fb
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 18, 2024
2d30fd7
Merge branch 'antonis/4358-Feedback-Form-Autoinject' into antonis/435…
antonis Dec 18, 2024
265e629
(2.2) feat: Add Feedback Form UI Branding logo (#4357)
antonis Dec 19, 2024
da0e3ea
Autoinject feedback form (#4370)
antonis Dec 19, 2024
a931ba9
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 19, 2024
5de8841
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 19, 2024
5f9dec6
Align changelog entry
antonis Dec 19, 2024
8359696
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 19, 2024
1e8aa8f
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 19, 2024
76518cc
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 23, 2024
cabd570
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Dec 23, 2024
b0384ed
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Dec 30, 2024
61886c2
Merge branch 'main' into antonis/3859-newCaptureFeedbackAPI-Form
antonis Jan 9, 2025
9853630
Update changelog
antonis Jan 9, 2025
209a29b
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/4…
antonis Jan 9, 2025
fe3dc15
Disable bouncing
antonis Jan 30, 2025
72eef2d
Add modal ui appearance
antonis Jan 30, 2025
ccc808b
Update snapshot tests
antonis Jan 30, 2025
fd47fd2
Fix bottom margin
antonis Jan 30, 2025
dcc5d3b
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Jan 31, 2025
9ecd8a2
Fix sheet height
antonis Jan 31, 2025
05f94f8
Remove extra modal border
antonis Jan 31, 2025
d88a599
Do not expose modal styles
antonis Jan 31, 2025
ce1de86
Animate background color
antonis Jan 31, 2025
a7a4e56
Avoid keyboard in modal
antonis Jan 31, 2025
22fd47b
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis Feb 3, 2025
8779886
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Feb 3, 2025
7832765
Merge branch 'antonis/feedback-modal-ui' into antonis/4358-Feedback-F…
antonis Feb 3, 2025
447e3fe
Update changelog
antonis Feb 3, 2025
47f0fc4
Fix changelog
antonis Feb 3, 2025
63bfc6d
Updates comment
antonis Feb 3, 2025
6f60162
Extract FeedbackButtonProps
antonis Feb 3, 2025
ae80f7d
Merge branch 'feedback-ui' into antonis/feedback-modal-ui
antonis Feb 7, 2025
079a436
Merge branch 'antonis/feedback-modal-ui' into antonis/4358-Feedback-F…
antonis Feb 7, 2025
3e5be69
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis Feb 11, 2025
0dc5f27
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis Feb 14, 2025
f80a48d
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis Feb 18, 2025
b3eec7e
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis Feb 20, 2025
a79951c
Merge branch 'feedback-ui' into antonis/4358-Feedback-Form-Autoinject…
antonis Feb 20, 2025
b08debb
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis Feb 25, 2025
e601785
Add public function description to satisfy lint check
antonis Feb 25, 2025
2e0e5d2
Adds tests
antonis Feb 25, 2025
2620101
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis Feb 25, 2025
9f631e2
Fix tests
antonis Feb 25, 2025
620d273
Add test ids in feedback widget
antonis Feb 26, 2025
e24238d
Add feedback widget button in test app
antonis Feb 26, 2025
d90dc52
WIP: Add feedback test
antonis Feb 26, 2025
30c3b28
Merge branch 'main' into antonis/feedback-e2e
antonis Mar 5, 2025
3d66cfc
Update snapshot tests with the added test ids
antonis Mar 5, 2025
5b793ee
Merge branch 'main' into antonis/feedback-e2e
antonis Mar 5, 2025
1d96dff
Android happy path test
antonis Mar 5, 2025
cd693a7
Check field validation
antonis Mar 5, 2025
ead0e9e
Scroll if button is not visible
antonis Mar 6, 2025
6851c5a
Adds accessibility labels
antonis Mar 6, 2025
fa3bdfc
Remove extended initial checks due to flakiness
antonis Mar 6, 2025
90402cb
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis Mar 7, 2025
1b1d1c8
Merge branch 'main' into antonis/feedback-e2e
antonis Mar 12, 2025
ca18f5c
Revert "Remove extended initial checks due to flakiness"
antonis Mar 12, 2025
307839d
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis Mar 21, 2025
df1653b
Add hardcoded dark and light color themes
antonis Mar 21, 2025
13bf507
Rename theme options
antonis Mar 24, 2025
0b3e4cb
Update snapshot tests
antonis Mar 24, 2025
2fbbf11
Include in the feedback integration
antonis Mar 24, 2025
bae1620
Fix circular dependency
antonis Mar 24, 2025
0f3faa2
Merge branch 'antonis/4358-Feedback-Form-Autoinject-Button' into anto…
antonis Mar 24, 2025
522e24f
Add theme integration options
antonis Mar 24, 2025
110069c
Adds changelog
antonis Mar 24, 2025
3bd4682
Add comment note
antonis Mar 24, 2025
183796c
Align with JS api
antonis Mar 24, 2025
be791cd
Remove unneeded line
antonis Mar 26, 2025
13de5af
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis Mar 26, 2025
04f1a8d
Place widget button below the feedback widget shadow
antonis Mar 26, 2025
06adadd
Expose showFeedbackButton/hideFeedbackButton methods
antonis Mar 26, 2025
7473c58
Add dummy integration for tracking usage
antonis Mar 26, 2025
24b3df0
Adds button border
antonis Mar 26, 2025
10a70a3
Fixes tests
antonis Mar 26, 2025
c05fc5f
Merge branch 'antonis/4358-Feedback-Form-Autoinject-Button' into anto…
antonis Mar 27, 2025
c831eee
Add accentBackground and accentForeground colors
antonis Mar 27, 2025
6e7b61b
Extract integration getter in a helper function
antonis Mar 27, 2025
b3fe27c
Merge branch 'feedback-ui-2' into antonis/4358-Feedback-Form-Autoinje…
antonis Mar 27, 2025
0a37f7f
Merge branch 'antonis/4358-Feedback-Form-Autoinject-Button' into anto…
antonis Mar 27, 2025
7a331b6
Adds dynamic theming support
antonis Mar 28, 2025
6c63d03
Add snapshot tests
antonis Mar 28, 2025
3285669
Show screenshot button UI
antonis Mar 31, 2025
013fc26
Add screenshot button integration
antonis Mar 31, 2025
4b51b45
Add screenshot icon
antonis Apr 1, 2025
7ee09d2
Adds Take a screenshot button in FeedbackWidget
antonis Apr 1, 2025
184c9c4
Updates snapshot tests
antonis Apr 1, 2025
e28d388
Fix circularDepCheck
antonis Apr 1, 2025
67fcf61
Fix circularDepCheck
antonis Apr 2, 2025
96c6324
Attache captured screenshot
antonis Apr 2, 2025
30cae3d
Hide the take screenshot button when there is a screenshot
antonis Apr 2, 2025
7660f80
Convert uint8Array to Base64 on the native side
antonis Apr 3, 2025
7b77183
ref(feedback): Extracts FeedbackWidgetProvider in a separate file
antonis Apr 3, 2025
8ad3494
Updates exposed comments
antonis Apr 3, 2025
a6d0c48
Adds snapshot tests
antonis Apr 3, 2025
00f65b9
Disable functionality on the Web
antonis Apr 4, 2025
2aabccf
Add screenshot button in the sample expo app
antonis Apr 4, 2025
07c2ba6
Merge branch 'antonis/screenshot-button' into antonis/ref-feedback-cy…
antonis Apr 4, 2025
573f3b7
Merge branch 'feedback-ui-2' into antonis/feedback-theme
antonis Apr 7, 2025
ba98685
Adds system theme tests
antonis Apr 7, 2025
3b4a1de
Test dynamically changed theme
antonis Apr 7, 2025
1fdf125
Remove showScreenshotButton and hideScreenshotButton from the exposed…
antonis Apr 7, 2025
7af42d3
Fix function name typo
antonis Apr 7, 2025
476d181
Adds enableTakeScreenshot option
antonis Apr 7, 2025
a33e0e1
Merge branch 'antonis/feedback-theme' into antonis/screenshot-button
antonis Apr 7, 2025
631d43b
Adds happy flow test
antonis Apr 7, 2025
1089557
Make flow tests more granular
antonis Apr 8, 2025
d6990ef
Increate wait time out to fix flakiness on ci
antonis Apr 8, 2025
a8785d8
Reset widget state after each test
antonis Apr 8, 2025
a0c4842
Fix CI flakiness
antonis Apr 8, 2025
3afd74e
Merge branch 'antonis/screenshot-button' into antonis/ref-feedback-cy…
antonis Apr 8, 2025
885399c
Remove flaky test
antonis Apr 8, 2025
4d4400c
Merge branch 'antonis/screenshot-button' into antonis/ref-feedback-cy…
antonis Apr 8, 2025
f5cc248
fix(feedback): Fixes accessibility issue on iOS
antonis Apr 9, 2025
85d4f9e
Add changelog
antonis Apr 9, 2025
a911e39
Merge branch 'antonis/ios-accessibility' into antonis/feedback-e2e
antonis Apr 9, 2025
45b3bd4
Properly wrap root app component
antonis Apr 10, 2025
2fc5c16
Handle undefined AppRegistryIntegration.onRunApplication gracefully
antonis Apr 10, 2025
8cd61bc
Fix lint issue
antonis Apr 10, 2025
719f91d
Do not validate all fields for visibility
antonis Apr 10, 2025
3e361a1
Take screenshots for debugging
antonis Apr 11, 2025
eaec268
Revert "Take screenshots for debugging"
antonis Apr 11, 2025
a8ab86f
Simplify test scenario
antonis Apr 11, 2025
6308038
Try without hiding the keyboard
antonis Apr 11, 2025
304824f
Test Feedback button
antonis Apr 11, 2025
8913ffc
Test screenshot capture
antonis Apr 11, 2025
32f1c8b
Show an error if screenshot capture fails
antonis Apr 16, 2025
9590707
Test error flow
antonis Apr 16, 2025
f6e950e
Merge branch 'feedback-ui-2' into antonis/capture-screenshot-error
antonis Apr 16, 2025
5e7bc3d
Merge branch 'antonis/capture-screenshot-error' into antonis/feedback…
antonis Apr 16, 2025
accfccf
Revert unneeded change
antonis Apr 16, 2025
e7c31bf
Test with latest Maestro
antonis Apr 17, 2025
c5d1d5f
Revert "Test with latest Maestro"
antonis Apr 17, 2025
3822f5b
Revert "Test screenshot capture"
antonis Apr 18, 2025
dc75821
Merge branch 'feedback-ui-2' into antonis/feedback-e2e
antonis Apr 18, 2025
b385650
Skip for 0.65.3
antonis Apr 18, 2025
8c67cea
Remove version check
antonis Apr 22, 2025
39a69c2
Merge branch 'feedback-ui-2' into antonis/feedback-e2e
antonis Apr 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions dev-packages/e2e-tests/maestro/feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
appId: ${APP_ID}
jsEngine: graaljs
---
- runFlow: utils/launchTestAppClear.yml

- runFlow: feedback/happyFlow.yml
44 changes: 44 additions & 0 deletions dev-packages/e2e-tests/maestro/feedback/happyFlow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a happy path test for the feedback widget
# It verifies that the feedback form can be opened, filled out, and submitted successfully
appId: ${APP_ID}
jsEngine: graaljs
---

# Show feedback button
- tapOn: 'Feedback'

# Open feedback widget
- tapOn: 'Report a Bug'

# Assert that the feedback form is visible
- extendedWaitUntil:
visible:
id: 'form-title'
timeout: 5_000

# Fill out name field
- tapOn:
id: 'name-input'
- inputText: 'John Doe'

# Fill out email field
- tapOn:
id: 'email-input'
- inputText: '[email protected]'

# Fill out message field
- tapOn:
id: 'message-input'
- inputText: 'This is a test feedback message from CI e2e tests'

# Submit feedback
- scrollUntilVisible:
element:
id: 'submit-button'
- tapOn:
id: 'submit-button'
- assertVisible: 'Thank you for your report!'
- tapOn: 'OK'

# Verify feedback form is closed and the home screen is visible
- assertVisible: 'Welcome to React Native'
4 changes: 3 additions & 1 deletion dev-packages/e2e-tests/patch-scripts/rn.patch.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const e2eComponentPatch = '<EndToEndTestsScreen />';
const lastImportRex = /^([^]*)(import\s+[^;]*?;$)/m;
const patchRex = '@sentry/react-native';
const headerComponentRex = /<Header \/>/gm;
const exportDefaultRex = /export\s+default\s+App;/m;

const jsPath = path.join(args.app, 'App.js');
const tsxPath = path.join(args.app, 'App.tsx');
Expand All @@ -50,7 +51,8 @@ const isPatched = app.match(patchRex);
if (!isPatched) {
const patched = app
.replace(lastImportRex, m => m + initPatch)
.replace(headerComponentRex, m => e2eComponentPatch + m);
.replace(headerComponentRex, m => e2eComponentPatch + m)
.replace(exportDefaultRex, 'export default Sentry.wrap(App);');

fs.writeFileSync(appPath, patched);
logger.info('Patched RN App.(js|tsx) successfully!');
Expand Down
5 changes: 5 additions & 0 deletions dev-packages/e2e-tests/src/EndToEndTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ const EndToEndTestsScreen = (): JSX.Element => {
name: 'Unhandled Promise Rejection',
action: async () => await Promise.reject(new Error('Unhandled Promise Rejection')),
},
{
id: 'feedback',
name: 'Feedback',
action: () => Sentry.showFeedbackButton(),
},
{
id: 'close',
name: 'Close',
Expand Down
27 changes: 19 additions & 8 deletions packages/core/src/js/feedback/FeedbackWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,24 +273,27 @@ export class FeedbackWidget extends React.Component<FeedbackWidgetProps, Feedbac
>
<View style={styles.container}>
<View style={styles.titleContainer}>
<Text style={styles.title}>{text.formTitle}</Text>
<Text style={styles.title} testID='form-title'>{text.formTitle}</Text>
{config.showBranding && (
<Image
source={{ uri: sentryLogo }}
style={styles.sentryLogo}
testID='sentry-logo'
accessibilityLabel='Sentry logo'
/>
)}
</View>

{config.showName && (
<>
<Text style={styles.label}>
<Text style={styles.label} testID='name-label' accessibilityLabel={text.nameLabel}>
{text.nameLabel}
{config.isNameRequired && ` ${text.isRequiredLabel}`}
</Text>
<TextInput
style={styles.input}
testID='name-input'
accessibilityLabel={text.namePlaceholder}
placeholder={text.namePlaceholder}
value={name}
onChangeText={(value) => this.setState({ name: value })}
Expand All @@ -300,12 +303,14 @@ export class FeedbackWidget extends React.Component<FeedbackWidgetProps, Feedbac

{config.showEmail && (
<>
<Text style={styles.label}>
<Text style={styles.label} testID='email-label' accessibilityLabel={text.emailLabel}>
{text.emailLabel}
{config.isEmailRequired && ` ${text.isRequiredLabel}`}
</Text>
<TextInput
style={styles.input}
testID='email-input'
accessibilityLabel={text.emailPlaceholder}
placeholder={text.emailPlaceholder}
keyboardType={'email-address' as KeyboardTypeOptions}
value={email}
Expand All @@ -314,12 +319,14 @@ export class FeedbackWidget extends React.Component<FeedbackWidgetProps, Feedbac
</>
)}

<Text style={styles.label}>
<Text style={styles.label} testID='message-label' accessibilityLabel={text.messageLabel}>
{text.messageLabel}
{` ${text.isRequiredLabel}`}
</Text>
<TextInput
style={[styles.input, styles.textArea]}
testID='message-input'
accessibilityLabel={text.messagePlaceholder}
placeholder={text.messagePlaceholder}
value={description}
onChangeText={(value) => this.setState({ description: value })}
Expand All @@ -331,10 +338,14 @@ export class FeedbackWidget extends React.Component<FeedbackWidgetProps, Feedbac
<Image
source={{ uri: this.state.attachmentUri }}
style={styles.screenshotThumbnail}
testID='screenshot-thumbnail'
accessibilityLabel='Screenshot thumbnail'
/>
)}
<TouchableOpacity style={styles.screenshotButton} onPress={this.onScreenshotButtonPress}>
<Text style={styles.screenshotText}>
<Text style={styles.screenshotText} testID='screenshot-button' accessibilityLabel={!this._hasScreenshot()
? text.addScreenshotButtonLabel
: text.removeScreenshotButtonLabel}>
{!this._hasScreenshot()
? text.addScreenshotButtonLabel
: text.removeScreenshotButtonLabel}
Expand All @@ -348,15 +359,15 @@ export class FeedbackWidget extends React.Component<FeedbackWidgetProps, Feedbac
onCancel();
showScreenshotButton();
}}>
<Text style={styles.takeScreenshotText}>{text.captureScreenshotButtonLabel}</Text>
<Text style={styles.takeScreenshotText} testID='capture-screenshot-button' accessibilityLabel={text.captureScreenshotButtonLabel}>{text.captureScreenshotButtonLabel}</Text>
</TouchableOpacity>
)}
<TouchableOpacity style={styles.submitButton} onPress={this.handleFeedbackSubmit}>
<Text style={styles.submitText}>{text.submitButtonLabel}</Text>
<Text style={styles.submitText} testID='submit-button' accessibilityLabel={text.submitButtonLabel}>{text.submitButtonLabel}</Text>
</TouchableOpacity>

<TouchableOpacity style={styles.cancelButton} onPress={onCancel}>
<Text style={styles.cancelText}>{text.cancelButtonLabel}</Text>
<Text style={styles.cancelText} testID='cancel-button' accessibilityLabel={text.cancelButtonLabel}>{text.cancelButtonLabel}</Text>
</TouchableOpacity>
</View>
</TouchableWithoutFeedback>
Expand Down
Loading
Loading