This repository was archived by the owner on Jul 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +0
-33
lines changed Expand file tree Collapse file tree 2 files changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -168,8 +168,6 @@ export function AlertsTable() {
168
168
Type
169
169
</ Column >
170
170
< Column width = { 300 } > Trigger Token</ Column >
171
- < Column width = { 150 } > File</ Column >
172
- < Column width = { 250 } > Code</ Column >
173
171
</ Row >
174
172
</ TableHeader >
175
173
< TableBody >
@@ -185,18 +183,6 @@ export function AlertsTable() {
185
183
< Cell className = "overflow-auto whitespace-nowrap max-w-80" >
186
184
{ wrapObjectOutput ( alert . trigger_string ) }
187
185
</ Cell >
188
- < Cell className = "truncate" >
189
- { alert . code_snippet ?. filepath || "N/A" }
190
- </ Cell >
191
- < Cell className = "overflow-auto whitespace-nowrap max-w-80" >
192
- { alert . code_snippet ?. code ? (
193
- < pre className = "max-h-40 overflow-auto bg-gray-100 p-2 whitespace-pre-wrap" >
194
- < code > { alert . code_snippet . code } </ code >
195
- </ pre >
196
- ) : (
197
- "N/A"
198
- ) }
199
- </ Cell >
200
186
</ Row >
201
187
) ) }
202
188
</ TableBody >
Original file line number Diff line number Diff line change @@ -150,16 +150,6 @@ describe("Dashboard", () => {
150
150
} ) ,
151
151
) . toBeVisible ( ) ;
152
152
153
- expect (
154
- screen . getByRole ( "columnheader" , {
155
- name : / f i l e / i,
156
- } ) ,
157
- ) . toBeVisible ( ) ;
158
- expect (
159
- screen . getByRole ( "columnheader" , {
160
- name : / c o d e / i,
161
- } ) ,
162
- ) . toBeVisible ( ) ;
163
153
expect (
164
154
screen . getByRole ( "columnheader" , {
165
155
name : / t i m e / i,
@@ -176,17 +166,9 @@ describe("Dashboard", () => {
176
166
const firstRow = within ( screen . getByTestId ( "alerts-table" ) ) . getAllByRole (
177
167
"row" ,
178
168
) [ 1 ] as HTMLElement ;
179
- const secondRow = within ( screen . getByTestId ( "alerts-table" ) ) . getAllByRole (
180
- "row" ,
181
- ) [ 2 ] as HTMLElement ;
182
169
183
- expect ( within ( firstRow ) . getByText ( / g h p _ t o k e n / i) ) . toBeVisible ( ) ;
184
170
expect ( within ( firstRow ) . getByText ( / c o d e g a t e - s e c r e t s / i) ) . toBeVisible ( ) ;
185
- expect ( within ( firstRow ) . getAllByText ( / n \/ a / i) . length ) . toEqual ( 2 ) ;
186
171
expect ( within ( firstRow ) . getByText ( / [ 0 - 9 ] + .* a g o / i) ) . toBeVisible ( ) ;
187
-
188
- // check trigger_string null
189
- expect ( within ( secondRow ) . getAllByText ( / n \/ a / i) . length ) . toEqual ( 3 ) ;
190
172
} ) ;
191
173
192
174
it ( "should render malicious pkg" , async ( ) => {
@@ -294,7 +276,6 @@ describe("Dashboard", () => {
294
276
const row = within ( screen . getByTestId ( "alerts-table" ) ) . getAllByRole (
295
277
"row" ,
296
278
) [ 1 ] as HTMLElement ;
297
- expect ( within ( row ) . getByText ( / g h p _ t o k e n / i) ) . toBeVisible ( ) ;
298
279
expect ( within ( row ) . getByText ( / c o d e g a t e - s e c r e t s / i) ) . toBeVisible ( ) ;
299
280
} ) ;
300
281
You can’t perform that action at this time.
0 commit comments