@@ -5,6 +5,7 @@ import {ProjectFixture} from 'sentry-fixture/project';
5
5
import { render , screen } from 'sentry-test/reactTestingLibrary' ;
6
6
7
7
import { ActionableItems } from 'sentry/components/events/interfaces/crashContent/exception/actionableItems' ;
8
+ import { JavascriptProcessingErrors } from 'sentry/constants/eventErrors' ;
8
9
import { EntryType } from 'sentry/types' ;
9
10
10
11
describe ( 'Actionable Items' , ( ) => {
@@ -115,6 +116,58 @@ describe('Actionable Items', () => {
115
116
expect ( await screen . findByText ( 'Expand' ) ) . toBeInTheDocument ( ) ;
116
117
} ) ;
117
118
119
+ it ( 'does not render hidden flutter web errors' , async ( ) => {
120
+ const eventErrors = [
121
+ {
122
+ type : JavascriptProcessingErrors . JS_MISSING_SOURCES_CONTENT ,
123
+ data : {
124
+ Source : "my_app/main.dart" ,
125
+ } ,
126
+ } ,
127
+ {
128
+ type : JavascriptProcessingErrors . JS_MISSING_SOURCES_CONTENT ,
129
+ data : {
130
+ Source : "http://localhost:64053/Documents/flutter/packages/flutter/lib/src/material/ink_well.dart" ,
131
+ } ,
132
+ } ,
133
+ {
134
+ type : JavascriptProcessingErrors . JS_MISSING_SOURCES_CONTENT ,
135
+ data : {
136
+ Source : "org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart" ,
137
+ } ,
138
+ } ,
139
+ {
140
+ type : JavascriptProcessingErrors . JS_MISSING_SOURCES_CONTENT ,
141
+ data : {
142
+ Source :
143
+ "org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart" ,
144
+ } ,
145
+ } ,
146
+ ] ;
147
+
148
+ MockApiClient . addMockResponse ( {
149
+ url,
150
+ body : {
151
+ errors : eventErrors ,
152
+ } ,
153
+ method : 'GET' ,
154
+ } ) ;
155
+
156
+ const eventWithErrors = EventFixture ( {
157
+ errors : eventErrors ,
158
+ sdk : {
159
+ name : 'sentry.dart.flutter' ,
160
+ } ,
161
+ } ) ;
162
+
163
+ render ( < ActionableItems { ...defaultProps } event = { eventWithErrors } /> ) ;
164
+
165
+ expect (
166
+ await screen . findByText ( 'Missing Sources Context (1)' )
167
+ ) . toBeInTheDocument ( ) ;
168
+ expect ( await screen . findByText ( 'Expand' ) ) . toBeInTheDocument ( ) ;
169
+ } ) ;
170
+
118
171
it ( 'displays missing mapping file' , async ( ) => {
119
172
const eventError = [
120
173
{
0 commit comments