cumulocity-hellowidget-plugin
Advanced tools
Comparing version 1.3.3 to 1.4.0
@@ -6,4 +6,3 @@ const _ = require('lodash'); | ||
join, | ||
dirname, | ||
basename | ||
dirname | ||
} = require('path'); | ||
@@ -64,3 +63,3 @@ | ||
ngHtml2JsPreprocessor: { | ||
cacheIdFromPath: filepath => join(computePluginPath(filepath), basename(filepath)), | ||
cacheIdFromPath: filepath => filepath.replace(/^plugins\//i, ''), | ||
moduleName: 'c8yHtml.test' | ||
@@ -67,0 +66,0 @@ }, |
{ | ||
"name": "cumulocity-hellowidget-plugin", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"description": "A demo app for showcasing creation of a custom Cumulocity UI widget plugin", | ||
@@ -36,3 +36,3 @@ "keywords": [ | ||
"dependencies": { | ||
"cumulocity-ui-build": "http://resources.cumulocity.com/webapps/ui/7.43.2.tar.gz" | ||
"cumulocity-ui-build": "http://resources.cumulocity.com/webapps/ui/8.0.0.tar.gz" | ||
}, | ||
@@ -39,0 +39,0 @@ "devDependencies": { |
@@ -31,8 +31,5 @@ /** | ||
describe('configuring text', function () { | ||
var $scope; | ||
var element; | ||
beforeEach(function () { | ||
//////////// stubbing dependencies | ||
//////////// stubbing dependencies | ||
}); | ||
@@ -56,22 +53,25 @@ | ||
// when | ||
var template = '<c8y-hello-text-input hello-text="config.helloText"></c8y-hello-text-input>'; | ||
initComponent(template); | ||
var template = '<c8y-hello-text-input hello-text="config.helloText" />'; | ||
var element = createComponent(template); | ||
if (_.isString(helloText)) { | ||
element.controller('c8yHelloTextInput').helloText = helloText; | ||
$scope.$digest(); | ||
$rootScope.$apply(); | ||
} | ||
// then | ||
expect($scope.config.helloText) | ||
expect(element.scope().config.helloText) | ||
.toEqual(expectedConfiguredText); | ||
} | ||
function initComponent(template, bindings) { | ||
$scope = _.assign($rootScope.$new(), bindings); | ||
function createComponent(template, bindings) { | ||
var $scope = _.assign($rootScope.$new(), bindings); | ||
element = $compile(template)($scope); | ||
$scope.$digest(); | ||
var element = $compile(template)($scope); | ||
$scope.$apply(); | ||
return element; | ||
} | ||
}); | ||
}); |
@@ -29,4 +29,4 @@ /** | ||
beforeEach(function () { | ||
//////////// stubbing dependencies | ||
//////////// stubbing dependencies | ||
}); | ||
@@ -33,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
HTTP dependency
Supply chain riskContains a dependency which resolves to a remote HTTP URL which could be used to inject untrusted code and reduce overall package reliability.
Found 1 instance in 1 package
4533683
426