本文整理汇总了TypeScript中@pipeline/io/pipeline_submit.buildPipelineSubmit.apply方法的典型用法代码示例。如果您正苦于以下问题:TypeScript buildPipelineSubmit.apply方法的具体用法?TypeScript buildPipelineSubmit.apply怎么用?TypeScript buildPipelineSubmit.apply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@pipeline/io/pipeline_submit.buildPipelineSubmit
的用法示例。
在下文中一共展示了buildPipelineSubmit.apply方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should submit a new pipeline revision with a parent revision', function() {
mockPipeline();
args[1] = "revise";
args[7] = 1;
built_submit = buildPipelineSubmit.apply(null, args);
jasmine.Ajax.install();
built_submit(new Event('submit'));
// @types for JasmineAjaxRequest seems to be a bit spotty.
let request: any = jasmine.Ajax.requests.mostRecent();
expect(request.url).toBe("/api/pipelines/");
expect(request.method).toBe('POST');
let requestData = request.data();
expect(requestData.users_allowed).toEqual([ "b", "c" ]);
expect(requestData.groups_allowed).toEqual([ "b", "c" ]);
expect(requestData.family).toEqual('custom_family_name');
expect(requestData.family_desc).toEqual('custom_family_desc');
expect(requestData.revision_name).toEqual('custom_revision_name');
expect(requestData.revision_desc).toEqual('custom_revision_desc');
expect(requestData.revision_parent).toEqual(1);
expect(requestData.published).toEqual(false);
expect(requestData.canvas_width).toEqual(300);
expect(requestData.canvas_height).toEqual(150);
jasmine.Ajax.uninstall();
});
示例2: beforeEach
beforeEach(function() {
built_submit = buildPipelineSubmit.apply(null, args);
jasmine.Ajax.install();
});
示例3: expect
expect(function() {
buildPipelineSubmit.apply(null, args);
}).not.toThrow();