当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript directivetest.configure函数代码示例

本文整理汇总了TypeScript中mocks/loot/directivetest.configure函数的典型用法代码示例。如果您正苦于以下问题:TypeScript configure函数的具体用法?TypeScript configure怎么用?TypeScript configure使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了configure函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

	beforeEach(inject((_$sce_: angular.ISCEService, directiveTest: DirectiveTest, _transactionModel_: TransactionModelMock): void => {
		$sce = _$sce_;
		transactionStatus = directiveTest;
		transactionStatus.configure("transaction-status", "div");
		transactionStatus.scope.model = {account: createAccount({id: 123}), transaction: createBasicTransaction({id: 456})};
		transactionModel = _transactionModel_;
	}));
开发者ID:scottohara,项目名称:loot,代码行数:7,代码来源:status.ts

示例2: beforeEach

	beforeEach(inject((directiveTest: DirectiveTest): void => {
		ogFavourite = directiveTest;
		ogFavourite.configure("og-favourite", "i");
		ogFavourite.scope.model = {
			context: false,
			type: "test"
		};
		ogFavourite.compile({"og-favourite": "model"}, true);
	}));
开发者ID:scottohara,项目名称:loot,代码行数:9,代码来源:og-favourite.ts

示例3: beforeEach

	beforeEach(inject((_$window_: angular.IWindowService, _$timeout_: angular.ITimeoutService, ogInputCurrencyControllerMock: OgInputCurrencyControllerMock, ogInputNumberControllerMock: OgInputNumberControllerMock, ogInputCurrencyDirective: OgInputCurrencyDirective[], ogInputNumberDirective: OgInputNumberDirective[], directiveTest: DirectiveTest): void => {
		$window = _$window_;
		$timeout = _$timeout_;

		// Swap the input currency/number directive controllers with the mock versions
		(ogInputCurrencyDirective[0] as angular.IDirective).controller = ogInputCurrencyControllerMock;
		(ogInputNumberDirective[0] as angular.IDirective).controller = ogInputNumberControllerMock;

		ogInputCalculator = directiveTest;
		ogInputCalculator.configure("og-input-calculator", "input");
		ogInputCalculator.compile({"og-input-currency": ""}, true);
		ogInputCalculator.scope.$digest();
		ogInputCalculator["element"] = ogInputCalculator["element"].find("input");
		scope = ogInputCalculator.scope as OgInputCalculatorScope;
	}));
开发者ID:scottohara,项目名称:loot,代码行数:15,代码来源:og-input-calculator.ts

示例4: beforeEach

	beforeEach(inject((_$window_: angular.IWindowService, _$timeout_: angular.ITimeoutService, directiveTest: DirectiveTest): void => {
		$window = _$window_;
		$timeout = _$timeout_;
		ogInputAutoselect = directiveTest;
		ogInputAutoselect.configure("og-input-autoselect", "input");
		ogInputAutoselect.compile();
		scope = ogInputAutoselect.scope as OgInputAutoSelectScope;

		mockJQueryInstance = {
			select: sinon.stub()
		};

		realJQueryInstance = $window.$;
		$window.$ = sinon.stub();
		$window.$.withArgs(sinon.match((value: JQuery<Element>): boolean => value[0] === ogInputAutoselect["element"][0])).returns(mockJQueryInstance);
	}));
开发者ID:scottohara,项目名称:loot,代码行数:16,代码来源:og-input-autoselect.ts

示例5: beforeEach

	beforeEach(inject((_$window_: angular.IWindowService, directiveTest: DirectiveTest, _ogTableNavigableService_: OgTableNavigableService): void => {
		$window = _$window_;
		ogTableNavigableService = _ogTableNavigableService_;
		ogTableNavigable = directiveTest;
		ogTableNavigable.configure("og-table-navigable", "table", "<tbody><tr ng-repeat=\"row in rows\"><td></td></tr></tbody>");
		scope = ogTableNavigable.scope as OgTableNavigableScope & {rows: {}[]; model: OgTableActions};
		scope.rows = [{}, {}];
		scope.model = {
			selectAction: sinon.stub(),
			cancelAction: sinon.stub(),
			insertAction: sinon.stub(),
			deleteAction: sinon.stub(),
			editAction: sinon.stub(),
			focusAction: sinon.stub()
		};
		ogTableNavigable.compile({"og-table-navigable": "model"});
		ogTableNavigable.scope.$digest();
		isolateScope = ogTableNavigable["element"].isolateScope();
	}));
开发者ID:scottohara,项目名称:loot,代码行数:19,代码来源:og-table-navigable.ts

示例6: beforeEach

	beforeEach(inject((directiveTest: DirectiveTest): void => {
		ogInputCurrency = directiveTest;
		ogInputCurrency.configure("og-input-currency", "input");
		ogInputCurrency.compile();
		ogInputCurrency.scope.$digest();
	}));
开发者ID:scottohara,项目名称:loot,代码行数:6,代码来源:og-input-currency.ts

示例7: beforeEach

	beforeEach(inject((directiveTest: DirectiveTest): void => {
		ogLoadingSpinner = directiveTest;
		ogLoadingSpinner.configure("og-loading-spinner");
		ogLoadingSpinner.scope.model = "test message";
		ogLoadingSpinner.compile({"og-loading-spinner": "model"});
	}));
开发者ID:scottohara,项目名称:loot,代码行数:6,代码来源:og-loading-spinner.ts

示例8: beforeEach

	beforeEach(inject((directiveTest: DirectiveTest): void => {
		ogInputNumber = directiveTest;
		ogInputNumber.configure("og-input-number", "input");
		ogInputNumber.compile();
		ogInputNumber.scope.$digest();
	}));
开发者ID:scottohara,项目名称:loot,代码行数:6,代码来源:og-input-number.ts

示例9: beforeEach

	beforeEach(inject((directiveTest: DirectiveTest): void => {
		ogTableLoading = directiveTest;
		ogTableLoading.configure("og-table-loading", "tr");
		ogTableLoading.scope.model = false;
		ogTableLoading.compile({"og-table-loading": "model"}, true);
	}));
开发者ID:scottohara,项目名称:loot,代码行数:6,代码来源:og-table-loading.ts


注:本文中的mocks/loot/directivetest.configure函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。