File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
src/sentry/static/sentry/app/views/organizationEventsV2
tests/js/spec/views/organizationEventsV2 Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import styled from 'react-emotion' ;
3
- import qs from 'query-string' ;
4
3
5
4
import { deepFreeze } from 'app/utils' ;
6
5
import DynamicWrapper from 'app/components/dynamicWrapper' ;
@@ -71,17 +70,13 @@ export const SPECIAL_FIELDS = {
71
70
event : {
72
71
fields : [ 'title' , 'id' , 'project.name' ] ,
73
72
renderFunc : ( data , { organization, location} ) => {
74
- const newQuery = qs . stringify ( {
75
- ... location . query ,
76
- eventSlug : `${ data [ 'project.name' ] } :${ data . id } ` ,
77
- } ) ;
73
+ const target = {
74
+ pathname : `/organizations/ ${ organization . slug } /events/` ,
75
+ query : { ... location . query , eventSlug : `${ data [ 'project.name' ] } :${ data . id } ` } ,
76
+ } ;
78
77
return (
79
78
< Container >
80
- < Link
81
- css = { overflowEllipsis }
82
- to = { `/organizations/${ organization . slug } /events/?${ newQuery } ` }
83
- data-test-id = "event-title"
84
- >
79
+ < Link css = { overflowEllipsis } to = { target } data-test-id = "event-title" >
85
80
{ data . title }
86
81
</ Link >
87
82
</ Container >
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe('OrganizationEventsV2', function() {
64
64
) ;
65
65
66
66
const link = wrapper . find ( 'Table Link[data-test-id="event-title"]' ) . first ( ) ;
67
- expect ( link . props ( ) . to ) . toEqual ( expect . stringContaining ( ' eventSlug= project-slug' ) ) ;
67
+ expect ( link . props ( ) . to . query ) . toEqual ( { eventSlug : ' project-slug:deadbeef' } ) ;
68
68
} ) ;
69
69
70
70
it ( 'opens a modal when eventSlug is present' , async function ( ) {
You can’t perform that action at this time.
0 commit comments