@@ -22,7 +22,7 @@ import { act } from "react-dom/test-utils";
22
22
import { Room } from 'matrix-js-sdk' ;
23
23
24
24
import ExportDialog ,
25
- { getSafeForceRoomExportSettings , ForceRoomExportSettings }
25
+ { getSafeForceRoomExportParameters , ForceRoomExportParameters }
26
26
from '../../../../src/components/views/dialogs/ExportDialog' ;
27
27
import { ExportType , ExportFormat } from '../../../../src/utils/exportUtils/exportUtils' ;
28
28
import { createTestClient , mkStubRoom } from '../../../test-utils' ;
@@ -140,7 +140,7 @@ describe('<ExportDialog />', () => {
140
140
expect ( htmlExporterInstance . export ) . toHaveBeenCalled ( ) ;
141
141
} ) ;
142
142
143
- it ( 'exports room using values set from ForceRoomExportSettings ' , async ( ) => {
143
+ it ( 'exports room using values set from ForceRoomExportParameters ' , async ( ) => {
144
144
SettingsStoreMock . getValue . mockReturnValue ( {
145
145
format : ExportFormat . PlainText ,
146
146
range : ExportType . Beginning ,
@@ -188,12 +188,12 @@ describe('<ExportDialog />', () => {
188
188
expect ( getExportFormatInput ( component , ExportFormat . Html ) . props ( ) . checked ) . toBeFalsy ( ) ;
189
189
} ) ;
190
190
191
- it ( 'hides export format input when format is valid in ForceRoomExportSettings ' , ( ) => {
191
+ it ( 'hides export format input when format is valid in ForceRoomExportParameters ' , ( ) => {
192
192
const component = getComponent ( ) ;
193
193
expect ( getExportFormatInput ( component , ExportFormat . Html ) . props ( ) . checked ) . toBeTruthy ( ) ;
194
194
} ) ;
195
195
196
- it ( 'does not render export format when set in ForceRoomExportSettings ' , ( ) => {
196
+ it ( 'does not render export format when set in ForceRoomExportParameters ' , ( ) => {
197
197
SettingsStoreMock . getValue . mockReturnValue ( {
198
198
format : ExportFormat . PlainText ,
199
199
} ) ;
@@ -214,7 +214,7 @@ describe('<ExportDialog />', () => {
214
214
expect ( getExportTypeInput ( component ) . props ( ) . value ) . toEqual ( ExportType . Beginning ) ;
215
215
} ) ;
216
216
217
- it ( 'does not render export type when set in ForceRoomExportSettings ' , ( ) => {
217
+ it ( 'does not render export type when set in ForceRoomExportParameters ' , ( ) => {
218
218
SettingsStoreMock . getValue . mockReturnValue ( {
219
219
range : ExportType . Beginning ,
220
220
} ) ;
@@ -305,7 +305,7 @@ describe('<ExportDialog />', () => {
305
305
expect ( htmlExporterInstance . export ) . toHaveBeenCalled ( ) ;
306
306
} ) ;
307
307
308
- it ( 'does not render size limit input when set in ForceRoomExportSettings ' , ( ) => {
308
+ it ( 'does not render size limit input when set in ForceRoomExportParameters ' , ( ) => {
309
309
SettingsStoreMock . getValue . mockReturnValue ( {
310
310
sizeMb : 10000 ,
311
311
} ) ;
@@ -316,7 +316,7 @@ describe('<ExportDialog />', () => {
316
316
/**
317
317
* 2000mb size limit does not apply when higher limit is configured in config
318
318
*/
319
- it ( 'exports when size limit set in ForceRoomExportSettings is larger than 2000' , async ( ) => {
319
+ it ( 'exports when size limit set in ForceRoomExportParameters is larger than 2000' , async ( ) => {
320
320
SettingsStoreMock . getValue . mockReturnValue ( {
321
321
sizeMb : 10000 ,
322
322
} ) ;
@@ -339,7 +339,7 @@ describe('<ExportDialog />', () => {
339
339
expect ( getAttachmentsCheckbox ( component ) . props ( ) . checked ) . toEqual ( true ) ;
340
340
} ) ;
341
341
342
- it ( 'does not render input when set in ForceRoomExportSettings ' , ( ) => {
342
+ it ( 'does not render input when set in ForceRoomExportParameters ' , ( ) => {
343
343
SettingsStoreMock . getValue . mockReturnValue ( {
344
344
includeAttachments : false ,
345
345
} ) ;
@@ -348,8 +348,8 @@ describe('<ExportDialog />', () => {
348
348
} ) ;
349
349
} ) ;
350
350
351
- describe ( 'getSafeForceRoomExportSettings ()' , ( ) => {
352
- const testCases : [ string , ForceRoomExportSettings , ForceRoomExportSettings ] [ ] = [
351
+ describe ( 'getSafeForceRoomExportParameters ()' , ( ) => {
352
+ const testCases : [ string , ForceRoomExportParameters , ForceRoomExportParameters ] [ ] = [
353
353
[ 'setting is falsy' , undefined , { } ] ,
354
354
[ 'setting is configured to string' , 'test' as unknown , { } ] ,
355
355
[ 'setting is empty' , { } , { } ] ,
@@ -373,7 +373,7 @@ describe('<ExportDialog />', () => {
373
373
it . each ( testCases ) ( 'sanitizes correctly when %s' , ( _d , setting , expected ) => {
374
374
SettingsStoreMock . getValue . mockReturnValue ( setting ) ;
375
375
376
- expect ( getSafeForceRoomExportSettings ( ) ) . toEqual ( expected ) ;
376
+ expect ( getSafeForceRoomExportParameters ( ) ) . toEqual ( expected ) ;
377
377
} ) ;
378
378
} ) ;
379
379
} ) ;
0 commit comments