Skip to content

Commit 5834160

Browse files
committed
Lift fixtures to top level
1 parent 0702bbd commit 5834160

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

packages/controls/test/src/widget_upload_test.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ function getProxyButton(view: widgets.FileUploadView): HTMLButtonElement {
1414
return elem as HTMLButtonElement;
1515
}
1616

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+
1733
function simulateUpload(fileInput: HTMLInputElement, files: Array<File>) {
1834
// The 'files' property on an input element is normally not writeable
1935
// programmatically, so we explicitly overwrite it.
@@ -29,7 +45,7 @@ function simulateUpload(fileInput: HTMLInputElement, files: Array<File>) {
2945
fileInput.dispatchEvent(new Event('change', { bubbles: true }));
3046
}
3147

32-
describe.only('FileUploadView construction', function() {
48+
describe('FileUploadView', function() {
3349
beforeEach(async function() {
3450
this.manager = new DummyManager();
3551
const modelId = 'u-u-i-d';
@@ -44,22 +60,6 @@ describe.only('FileUploadView construction', function() {
4460
);
4561
});
4662

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-
6363
it('construction', function() {
6464
const options = { model: this.model };
6565
const view = new widgets.FileUploadView(options);

0 commit comments

Comments
 (0)