@@ -14,6 +14,22 @@ function getProxyButton(view: widgets.FileUploadView): HTMLButtonElement {
14
14
return elem as HTMLButtonElement ;
15
15
}
16
16
17
+ function fileInputForModel ( model : widgets . FileUploadModel ) {
18
+ // For a given model, create and render a view and return the
19
+ // view's input.
20
+ const options = { model } ;
21
+ const view = new widgets . FileUploadView ( options ) ;
22
+ view . render ( ) ;
23
+ return getFileInput ( view ) ;
24
+ }
25
+
26
+ function proxyButtonForModel ( model : widgets . FileUploadModel ) {
27
+ const options = { model } ;
28
+ const view = new widgets . FileUploadView ( options ) ;
29
+ view . render ( ) ;
30
+ return getProxyButton ( view ) ;
31
+ }
32
+
17
33
function simulateUpload ( fileInput : HTMLInputElement , files : Array < File > ) {
18
34
// The 'files' property on an input element is normally not writeable
19
35
// programmatically, so we explicitly overwrite it.
@@ -29,7 +45,7 @@ function simulateUpload(fileInput: HTMLInputElement, files: Array<File>) {
29
45
fileInput . dispatchEvent ( new Event ( 'change' , { bubbles : true } ) ) ;
30
46
}
31
47
32
- describe . only ( 'FileUploadView construction ' , function ( ) {
48
+ describe ( 'FileUploadView' , function ( ) {
33
49
beforeEach ( async function ( ) {
34
50
this . manager = new DummyManager ( ) ;
35
51
const modelId = 'u-u-i-d' ;
@@ -44,22 +60,6 @@ describe.only('FileUploadView construction', function() {
44
60
) ;
45
61
} ) ;
46
62
47
- function fileInputForModel ( model : widgets . FileUploadModel ) {
48
- // For a given model, create and render a view and return the
49
- // view's input.
50
- const options = { model } ;
51
- const view = new widgets . FileUploadView ( options ) ;
52
- view . render ( ) ;
53
- return getFileInput ( view ) ;
54
- }
55
-
56
- function proxyButtonForModel ( model : widgets . FileUploadModel ) {
57
- const options = { model } ;
58
- const view = new widgets . FileUploadView ( options ) ;
59
- view . render ( ) ;
60
- return getProxyButton ( view ) ;
61
- }
62
-
63
63
it ( 'construction' , function ( ) {
64
64
const options = { model : this . model } ;
65
65
const view = new widgets . FileUploadView ( options ) ;
0 commit comments