本文整理汇总了TypeScript中@pipeline/io/pipeline_submit.buildPipelineSubmit类的典型用法代码示例。如果您正苦于以下问题:TypeScript buildPipelineSubmit类的具体用法?TypeScript buildPipelineSubmit怎么用?TypeScript buildPipelineSubmit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了buildPipelineSubmit类的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();
});
开发者ID:cfe-lab,项目名称:Kive,代码行数:30,代码来源:pipeline_submit.tests.ts
示例2: beforeEach
beforeEach(function() {
built_submit = buildPipelineSubmit.apply(null, args);
jasmine.Ajax.install();
});
开发者ID:cfe-lab,项目名称:Kive,代码行数:4,代码来源:pipeline_submit.tests.ts
示例3: expect
expect(function() {
buildPipelineSubmit.apply(null, args);
}).not.toThrow();
开发者ID:cfe-lab,项目名称:Kive,代码行数:3,代码来源:pipeline_submit.tests.ts
注:本文中的@pipeline/io/pipeline_submit.buildPipelineSubmit类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论