File tree Expand file tree Collapse file tree 7 files changed +39
-9
lines changed Expand file tree Collapse file tree 7 files changed +39
-9
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export const Toast: FC<Props> = ({
86
86
< DialogOverlay
87
87
className = { classNames ( overlayStyles . bg , overlayStyles . animate ) }
88
88
/>
89
- < DialogContent asChild >
89
+ < DialogContent aria-describedby = { undefined } asChild >
90
90
< DialogClose
91
91
className = { classNames (
92
92
overlayStyles . overlay ,
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ export class PosthogAnalytics {
144
144
advanced_disable_decide : true ,
145
145
} ) ;
146
146
this . enabled = true ;
147
- } else {
147
+ } else if ( import . meta . env . MODE !== "test" ) {
148
148
logger . info (
149
149
"Posthog is not enabled because there is no api key or no host given in the config" ,
150
150
) ;
Original file line number Diff line number Diff line change @@ -178,7 +178,8 @@ export const widget = ((): WidgetHelpers | null => {
178
178
179
179
return { api, lazyActions, client : clientPromise } ;
180
180
} else {
181
- logger . info ( "No widget API available" ) ;
181
+ if ( import . meta. env . MODE !== "test" )
182
+ logger . info ( "No widget API available" ) ;
182
183
return null ;
183
184
}
184
185
} catch ( e ) {
Original file line number Diff line number Diff line change 2
2
3
3
exports [` Toast renders 1` ] = `
4
4
<button
5
- aria-describedby = " radix-:r5:"
6
5
aria-labelledby = " radix-:r4:"
7
6
class = " overlay animate toast"
8
7
data-state = " open"
Original file line number Diff line number Diff line change @@ -24,11 +24,9 @@ import { ClientProvider } from "../../src/ClientContext";
24
24
describe ( "CallList" , ( ) => {
25
25
const renderComponent = ( rooms : GroupCallRoom [ ] ) : RenderResult => {
26
26
return render (
27
- < ClientProvider >
28
- < MemoryRouter >
29
- < CallList client = { { } as MatrixClient } rooms = { rooms } />
30
- </ MemoryRouter >
31
- </ ClientProvider > ,
27
+ < MemoryRouter >
28
+ < CallList client = { { } as MatrixClient } rooms = { rooms } />
29
+ </ MemoryRouter > ,
32
30
) ;
33
31
} ;
34
32
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2024 New Vector Ltd
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ import i18n from "i18next" ;
18
+ import posthog from "posthog-js" ;
19
+ import { initReactI18next } from "react-i18next" ;
20
+
21
+ // Bare-minimum i18n config
22
+ i18n . use ( initReactI18next ) . init ( {
23
+ lng : "en-GB" ,
24
+ fallbackLng : "en-GB" ,
25
+ interpolation : {
26
+ escapeValue : false , // React has built-in XSS protections
27
+ } ,
28
+ } ) ;
29
+
30
+ posthog . opt_out_capturing ( ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export default defineConfig((configEnv) =>
14
14
} ,
15
15
} ,
16
16
include : [ "test/**/*-test.[jt]s?(x)" ] ,
17
+ isolate : false ,
18
+ setupFiles : [ "test/setup.ts" ] ,
17
19
coverage : {
18
20
reporter : [ "html" , "json" ] ,
19
21
include : [ "src/" ] ,
You can’t perform that action at this time.
0 commit comments