diff --git a/horizon/static/framework/widgets/action-list/action-list.single-button-dropdown.mock.html b/horizon/static/framework/widgets/action-list/action-list.single-button-dropdown.mock.html
new file mode 100644
index 0000000000..9fbc4dfa24
--- /dev/null
+++ b/horizon/static/framework/widgets/action-list/action-list.single-button-dropdown.mock.html
@@ -0,0 +1,11 @@
+
+ Actions
+
+
diff --git a/horizon/static/framework/widgets/action-list/action-list.spec.js b/horizon/static/framework/widgets/action-list/action-list.spec.js
index 6204ea51de..6d0a35d0ae 100644
--- a/horizon/static/framework/widgets/action-list/action-list.spec.js
+++ b/horizon/static/framework/widgets/action-list/action-list.spec.js
@@ -24,14 +24,16 @@
describe('action-list directive', function () {
beforeEach(module('templates'));
- beforeEach(module('horizon.framework.widgets'));
- beforeEach(module('horizon.framework.widgets.action-list'));
+ beforeEach(module('horizon.framework'));
describe('single button dropdown', function () {
var $scope, $element;
beforeEach(inject(function ($injector) {
var $compile = $injector.get('$compile');
+ var $templateCache = $injector.get('$templateCache');
+ var basePath = $injector.get('horizon.framework.widgets.basePath');
+
$scope = $injector.get('$rootScope').$new();
$scope.testList = [];
@@ -41,18 +43,8 @@
$scope.testList.push(item);
};
- var markup =
- '' +
- ' Actions' +
- ' ' +
- '';
+ var markup = $templateCache
+ .get(basePath + 'action-list/action-list.single-button-dropdown.mock.html');
$element = angular.element(markup);
$compile($element)($scope);
@@ -85,6 +77,8 @@
beforeEach(inject(function ($injector) {
var $compile = $injector.get('$compile');
+ var $templateCache = $injector.get('$templateCache');
+ var basePath = $injector.get('horizon.framework.widgets.basePath');
$scope = $injector.get('$rootScope').$new();
$scope.testList = [];
@@ -94,20 +88,8 @@
$scope.testList.push(item);
};
- var markup =
- '' +
- ' ' +
- ' View' +
- ' ' +
- ' ' +
- '';
+ var markup = $templateCache
+ .get(basePath + 'action-list/action-list.split-botton-dropdown.mock.html');
$element = angular.element(markup);
$compile($element)($scope);
@@ -151,6 +133,8 @@
beforeEach(inject(function ($injector) {
var $compile = $injector.get('$compile');
+ var $templateCache = $injector.get('$templateCache');
+ var basePath = $injector.get('horizon.framework.widgets.basePath');
$scope = $injector.get('$rootScope').$new();
$scope.testList = [];
@@ -160,11 +144,8 @@
$scope.testList.push(item);
};
- var markup = '' +
- ' View' +
- ' Edit' +
- ' Delete' +
- '';
+ var markup = $templateCache
+ .get(basePath + 'action-list/button-group.mock.html');
$element = angular.element(markup);
$compile($element)($scope);
diff --git a/horizon/static/framework/widgets/action-list/action-list.split-botton-dropdown.mock.html b/horizon/static/framework/widgets/action-list/action-list.split-botton-dropdown.mock.html
new file mode 100644
index 0000000000..522a75646e
--- /dev/null
+++ b/horizon/static/framework/widgets/action-list/action-list.split-botton-dropdown.mock.html
@@ -0,0 +1,13 @@
+
+
+ View
+
+
+
diff --git a/horizon/static/framework/widgets/action-list/button-group.mock.html b/horizon/static/framework/widgets/action-list/button-group.mock.html
new file mode 100644
index 0000000000..b803f0b917
--- /dev/null
+++ b/horizon/static/framework/widgets/action-list/button-group.mock.html
@@ -0,0 +1,5 @@
+
+ View
+ Edit
+ Delete
+