1
- import { ConfigFixture } from 'sentry-fixture/config' ;
2
1
import { ThemeFixture } from 'sentry-fixture/theme' ;
3
2
import { UserFixture } from 'sentry-fixture/user' ;
4
3
5
4
import { initializeOrg } from 'sentry-test/initializeOrg' ;
6
5
import { act , render , screen , waitFor } from 'sentry-test/reactTestingLibrary' ;
7
6
8
- import ConfigStore from 'sentry/stores/configStore' ;
9
7
import ProjectsStore from 'sentry/stores/projectsStore' ;
10
8
import EventView from 'sentry/utils/discover/eventView' ;
11
9
import { getFieldRenderer } from 'sentry/utils/discover/fieldRenderers' ;
@@ -148,26 +146,13 @@ describe('getFieldRenderer', function () {
148
146
} ) ;
149
147
150
148
describe ( 'date' , function ( ) {
151
- beforeEach ( function ( ) {
152
- ConfigStore . loadInitialData (
153
- ConfigFixture ( {
154
- user : UserFixture ( {
155
- options : {
156
- ...UserFixture ( ) . options ,
157
- timezone : 'America/Los_Angeles' ,
158
- } ,
159
- } ) ,
160
- } )
161
- ) ;
162
- } ) ;
163
-
164
149
it ( 'can render date fields' , async function ( ) {
165
150
const renderer = getFieldRenderer ( 'createdAt' , { createdAt : 'date' } ) ;
166
151
render (
167
152
renderer ( data , { location, organization, theme} ) as React . ReactElement < any , any >
168
153
) ;
169
154
170
- await screen . findByText ( 'Oct 3, 2019 9 :13:14 AM PDT ' ) ;
155
+ await screen . findByText ( 'Oct 3, 2019 4 :13:14 PM UTC ' ) ;
171
156
} ) ;
172
157
173
158
it ( 'can render date fields using utc when query string has utc set to true' , async function ( ) {
@@ -194,18 +179,6 @@ describe('getFieldRenderer', function () {
194
179
} ) ;
195
180
196
181
it ( 'can render timestamp.to_day' , function ( ) {
197
- // Set timezone
198
- ConfigStore . loadInitialData (
199
- ConfigFixture ( {
200
- user : UserFixture ( {
201
- options : {
202
- ...UserFixture ( ) . options ,
203
- timezone : 'America/Los_Angeles' ,
204
- } ,
205
- } ) ,
206
- } )
207
- ) ;
208
-
209
182
const renderer = getFieldRenderer ( 'timestamp.to_day' , { 'timestamp.to_day' : 'date' } ) ;
210
183
render (
211
184
renderer ( data , { location, organization, theme} ) as React . ReactElement < any , any >
0 commit comments