@@ -35,13 +35,25 @@ function createStore (analyticsOpts = {}, mockAnalyticsCachedState) {
35
35
}
36
36
37
37
describe ( 'new/returning user default behavior' , ( ) => {
38
+ // 2024-Q2: disabling and hiding all metrics for now
39
+ // https://github.com/ipfs/ipfs-webui/pull/2216
40
+ it ( 'should disable analytics by default and hide all UI compontents' , ( ) => {
41
+ const store = createStore ( )
42
+ expect ( store . selectAnalyticsEnabled ( ) ) . toBe ( false )
43
+ expect ( store . selectShowAnalyticsComponents ( ) ) . toBe ( false )
44
+ expect ( store . selectAnalyticsConsent ( ) ) . toEqual ( [ ] )
45
+ expect ( global . Countly . opt_in ) . not . toHaveBeenCalled ( )
46
+ expect ( global . Countly . opt_out ) . not . toHaveBeenCalled ( )
47
+ } )
48
+ /*
38
49
it('should enable analytics by default for new user who has not opted in or out', () => {
39
50
const store = createStore()
40
51
expect(global.Countly.opt_in).toHaveBeenCalled()
41
52
expect(global.Countly.opt_in.mock.calls.length).toBe(1)
42
53
// events will be sent as consents have been given by default
43
54
expect(store.selectAnalyticsConsent()).toEqual(['sessions', 'events', 'views', 'location'])
44
55
})
56
+ */
45
57
it ( 'should enable existing analytics by default for returning user who was opted_in' , ( ) => {
46
58
const mockDefaultState = {
47
59
lastEnabledAt : ( new Date ( '2022-01-02' ) ) . getTime ( ) ,
0 commit comments