diff --git a/dist/v-accordion.css b/dist/v-accordion.css index 25160ed..b70ad94 100644 --- a/dist/v-accordion.css +++ b/dist/v-accordion.css @@ -1,6 +1,6 @@ /** * vAccordion - AngularJS multi-level accordion component - * @version v0.0.4 + * @version v0.1.0 * @link http://lukaszwatroba.github.io/v-accordion * @author Łukasz Wątroba * @license MIT License, http://www.opensource.org/licenses/MIT @@ -9,6 +9,7 @@ /*************************************** Accordion ***************************************/ +/* Settings */ /** * Example HTML: * diff --git a/dist/v-accordion.js b/dist/v-accordion.js index ed1314f..2ff5b72 100755 --- a/dist/v-accordion.js +++ b/dist/v-accordion.js @@ -1,6 +1,6 @@ /** * vAccordion - AngularJS multi-level accordion component - * @version v0.0.4 + * @version v0.1.0 * @link http://lukaszwatroba.github.io/v-accordion * @author Łukasz Wątroba * @license MIT License, http://www.opensource.org/licenses/MIT @@ -65,18 +65,18 @@ function vAccordionDirective (accordionConfig) { function checkCustomControlAPIMethods () { angular.forEach(protectedApiMethods, function (iteratedMethodName) { if (scope.control[iteratedMethodName]) { - throw new Error(iteratedMethodName + ' method can not be overwritten'); + throw new Error('The `' + iteratedMethodName + '` method can not be overwritten'); } }); } function checkCustomControlCallbacks () { if (!angular.isFunction( scope.control.onExpand )) { - throw new Error('onExpand callback must be a function'); + throw new Error('The `onExpand` callback must be a function'); } if (!angular.isFunction( scope.control.onCollapse )) { - throw new Error('onCollapse callback must be a function'); + throw new Error('The `onCollapse` callback must be a function'); } } @@ -142,7 +142,7 @@ function AccordionDirectiveController ($scope) { ctrl.addPane = function (pane) { if (!$scope.allowMultiple) { if (hasExpandedPane() && pane.isExpanded) { - throw new Error('allow-multiple attribute is not set'); + throw new Error('The `allow-multiple` attribute is not set'); } } @@ -201,7 +201,7 @@ function AccordionDirectiveController ($scope) { ctrl.expand(iteratedPane); }); } else { - throw new Error('allow-multiple attribute is not set'); + throw new Error('The `allow-multiple` attribute can\'t be found'); } }; @@ -323,11 +323,11 @@ function vPaneDirective ($timeout, $animate, accordionConfig) { paneContentNative = iElement[0].querySelector('.' + accordionConfig.classes.paneContent); if (!paneHeaderNative) { - throw new Error('v-pane-header not found'); + throw new Error('The `v-pane-header` directive can\'t be found'); } if (!paneContentNative) { - throw new Error('v-pane-content not found'); + throw new Error('The `v-pane-content` directive can\'t be found'); } var paneInnerNative = paneContentNative.querySelector('div'); diff --git a/dist/v-accordion.min.css b/dist/v-accordion.min.css index 27a8749..fb17003 100644 --- a/dist/v-accordion.min.css +++ b/dist/v-accordion.min.css @@ -1,6 +1,6 @@ /** * vAccordion - AngularJS multi-level accordion component - * @version v0.0.4 + * @version v0.1.0 * @link http://lukaszwatroba.github.io/v-accordion * @author Łukasz Wątroba * @license MIT License, http://www.opensource.org/licenses/MIT diff --git a/dist/v-accordion.min.js b/dist/v-accordion.min.js index 22a784c..4171127 100755 --- a/dist/v-accordion.min.js +++ b/dist/v-accordion.min.js @@ -1,9 +1,9 @@ /** * vAccordion - AngularJS multi-level accordion component - * @version v0.0.4 + * @version v0.1.0 * @link http://lukaszwatroba.github.io/v-accordion * @author Łukasz Wątroba * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(e){"use strict";function n(n){return{restrict:"EA",replace:!0,transclude:!0,template:"
",scope:{control:"=?",allowMultiple:"=?"},controllerAs:"accordionCtrl",controller:o,compile:function(o){return o.addClass(n.classes.accordion),function(n,o,t){function i(){e.forEach(l,function(e){if(n.control[e])throw new Error(e+" method can not be overwritten")})}function a(){if(!e.isFunction(n.control.onExpand))throw new Error("onExpand callback must be a function");if(!e.isFunction(n.control.onCollapse))throw new Error("onCollapse callback must be a function")}e.isDefined(n.allowMultiple)||(n.allowMultiple=e.isDefined(t.allowMultiple));var l=["toggle","expand","collapse","expandAll","collapseAll"];n.$watch("control",function(){if(n.control&&n.control!==n.internalControl){i();var o=e.extend({},n.internalControl,n.control);n.control=n.internalControl=o,a()}else e.isDefined(n.control)||(n.control=n.internalControl)})}}}}function o(n){var o=this;n.isDisabled=!1,n.panes=[];var t=function(){for(var e=!1,o=0,t=n.panes.length;t>o;o++){var i=n.panes[o];if(i.isExpanded){e=!0;break}}return e},i=function(e){return n.panes[e]},a=function(e){return n.panes.indexOf(e)};o.disable=function(){n.isDisabled=!0},o.enable=function(){n.isDisabled=!1},o.addPane=function(e){if(!n.allowMultiple&&t()&&e.isExpanded)throw new Error("allow-multiple attribute is not set");n.panes.push(e),e.isExpanded&&n.internalControl.onExpand(a(e))},o.toggle=function(e){!n.isDisabled&&e&&(n.allowMultiple||o.collapseAll(e),e.isExpanded=!e.isExpanded,e.isExpanded?n.internalControl.onExpand(a(e)):n.internalControl.onCollapse(a(e)))},o.expand=function(e){!n.isDisabled&&e&&(n.allowMultiple||o.collapseAll(e),e.isExpanded||(e.isExpanded=!0,n.internalControl.onExpand(a(e))))},o.collapse=function(e){!n.isDisabled&&e&&e.isExpanded&&(e.isExpanded=!1,n.internalControl.onCollapse(a(e)))},o.expandAll=function(){if(!n.isDisabled){if(!n.allowMultiple)throw new Error("allow-multiple attribute is not set");e.forEach(n.panes,function(e){o.expand(e)})}},o.collapseAll=function(t){n.isDisabled||e.forEach(n.panes,function(e){e!==t&&o.collapse(e)})},n.internalControl={toggle:function(e){o.toggle(i(e))},expand:function(e){o.expand(i(e))},collapse:function(e){o.collapse(i(e))},expandAll:o.expandAll,collapseAll:o.collapseAll,onExpand:function(){},onCollapse:function(){}}}function t(e){return{restrict:"EA",require:"^vPane",transclude:!0,replace:!0,template:"
",scope:{},compile:function(n){return n.addClass(e.classes.paneContent),function(e,n,o,t){e.paneCtrl=t}}}}function i(e){return{restrict:"EA",require:"^vPane",transclude:!0,replace:!0,template:'
',scope:{},compile:function(n){return n.addClass(e.classes.paneHeader),function(e,n,o,t){e.paneCtrl=t}}}}function a(n,o,t){return{restrict:"EA",require:"^vAccordion",transclude:!0,replace:!0,template:"
",scope:{isExpanded:"=?expanded"},controllerAs:"paneCtrl",controller:l,compile:function(i){return i.addClass(t.classes.pane),function(i,a,l,c){function r(){c.disable();var e=u.offsetHeight;p.style.maxHeight="0px",o.addClass(v,t.classes.expandedState).then(function(){c.enable(),p.style.maxHeight="none"}),setTimeout(function(){p.style.maxHeight=e+"px"},0),a.addClass(t.classes.expandedState),f.addClass(t.classes.expandedState)}function d(){c.disable();var e=u.offsetHeight;p.style.maxHeight=e+"px",o.removeClass(v,t.classes.expandedState).then(function(){c.enable()}),setTimeout(function(){p.style.maxHeight="0px"},0),a.removeClass(t.classes.expandedState),f.removeClass(t.classes.expandedState)}e.isDefined(i.isExpanded)||(i.isExpanded=e.isDefined(l.expanded));var s=a[0].querySelector("."+t.classes.paneHeader),p=a[0].querySelector("."+t.classes.paneContent);if(!s)throw new Error("v-pane-header not found");if(!p)throw new Error("v-pane-content not found");var u=p.querySelector("div"),f=e.element(s),v=e.element(p);c.addPane(i),i.accordionCtrl=c,p.style.maxHeight="0px",n(function(){i.isExpanded&&r()},100),i.$watch("isExpanded",function(e,n){return e===n?!0:(e?r():d(),void 0)})}}}}function l(e){var n=this;n.toggle=function(){e.isAnimating||e.accordionCtrl.toggle(e)}}e.module("vAccordion.config",[]).constant("accordionConfig",{classes:{accordion:"Accordion Accordion--dafault",pane:"Accordion-pane",paneHeader:"Accordion-paneHeader",paneContent:"Accordion-paneContent",expandedState:"is-expanded"}}),e.module("vAccordion.directives",["ngAnimate"]),e.module("vAccordion",["vAccordion.config","vAccordion.directives"]),e.module("vAccordion.directives").directive("vAccordion",n),n.$inject=["accordionConfig"],o.$inject=["$scope"],e.module("vAccordion.directives").directive("vPaneContent",t),t.$inject=["accordionConfig"],e.module("vAccordion.directives").directive("vPaneHeader",i),i.$inject=["accordionConfig"],e.module("vAccordion.directives").directive("vPane",a),a.$inject=["$timeout","$animate","accordionConfig"],l.$inject=["$scope"]}(angular); \ No newline at end of file +!function(e){"use strict";function n(n){return{restrict:"EA",replace:!0,transclude:!0,template:"
",scope:{control:"=?",allowMultiple:"=?"},controllerAs:"accordionCtrl",controller:o,compile:function(o){return o.addClass(n.classes.accordion),function(n,o,t){function i(){e.forEach(l,function(e){if(n.control[e])throw new Error("The `"+e+"` method can not be overwritten")})}function a(){if(!e.isFunction(n.control.onExpand))throw new Error("The `onExpand` callback must be a function");if(!e.isFunction(n.control.onCollapse))throw new Error("The `onCollapse` callback must be a function")}e.isDefined(n.allowMultiple)||(n.allowMultiple=e.isDefined(t.allowMultiple));var l=["toggle","expand","collapse","expandAll","collapseAll"];n.$watch("control",function(){if(n.control&&n.control!==n.internalControl){i();var o=e.extend({},n.internalControl,n.control);n.control=n.internalControl=o,a()}else e.isDefined(n.control)||(n.control=n.internalControl)})}}}}function o(n){var o=this;n.isDisabled=!1,n.panes=[];var t=function(){for(var e=!1,o=0,t=n.panes.length;t>o;o++){var i=n.panes[o];if(i.isExpanded){e=!0;break}}return e},i=function(e){return n.panes[e]},a=function(e){return n.panes.indexOf(e)};o.disable=function(){n.isDisabled=!0},o.enable=function(){n.isDisabled=!1},o.addPane=function(e){if(!n.allowMultiple&&t()&&e.isExpanded)throw new Error("The `allow-multiple` attribute is not set");n.panes.push(e),e.isExpanded&&n.internalControl.onExpand(a(e))},o.toggle=function(e){!n.isDisabled&&e&&(n.allowMultiple||o.collapseAll(e),e.isExpanded=!e.isExpanded,e.isExpanded?n.internalControl.onExpand(a(e)):n.internalControl.onCollapse(a(e)))},o.expand=function(e){!n.isDisabled&&e&&(n.allowMultiple||o.collapseAll(e),e.isExpanded||(e.isExpanded=!0,n.internalControl.onExpand(a(e))))},o.collapse=function(e){!n.isDisabled&&e&&e.isExpanded&&(e.isExpanded=!1,n.internalControl.onCollapse(a(e)))},o.expandAll=function(){if(!n.isDisabled){if(!n.allowMultiple)throw new Error("The `allow-multiple` attribute can't be found");e.forEach(n.panes,function(e){o.expand(e)})}},o.collapseAll=function(t){n.isDisabled||e.forEach(n.panes,function(e){e!==t&&o.collapse(e)})},n.internalControl={toggle:function(e){o.toggle(i(e))},expand:function(e){o.expand(i(e))},collapse:function(e){o.collapse(i(e))},expandAll:o.expandAll,collapseAll:o.collapseAll,onExpand:function(){},onCollapse:function(){}}}function t(e){return{restrict:"EA",require:"^vPane",transclude:!0,replace:!0,template:"
",scope:{},compile:function(n){return n.addClass(e.classes.paneContent),function(e,n,o,t){e.paneCtrl=t}}}}function i(e){return{restrict:"EA",require:"^vPane",transclude:!0,replace:!0,template:'
',scope:{},compile:function(n){return n.addClass(e.classes.paneHeader),function(e,n,o,t){e.paneCtrl=t}}}}function a(n,o,t){return{restrict:"EA",require:"^vAccordion",transclude:!0,replace:!0,template:"
",scope:{isExpanded:"=?expanded"},controllerAs:"paneCtrl",controller:l,compile:function(i){return i.addClass(t.classes.pane),function(i,a,l,c){function r(){c.disable();var e=u.offsetHeight;p.style.maxHeight="0px",o.addClass(v,t.classes.expandedState).then(function(){c.enable(),p.style.maxHeight="none"}),setTimeout(function(){p.style.maxHeight=e+"px"},0),a.addClass(t.classes.expandedState),f.addClass(t.classes.expandedState)}function d(){c.disable();var e=u.offsetHeight;p.style.maxHeight=e+"px",o.removeClass(v,t.classes.expandedState).then(function(){c.enable()}),setTimeout(function(){p.style.maxHeight="0px"},0),a.removeClass(t.classes.expandedState),f.removeClass(t.classes.expandedState)}e.isDefined(i.isExpanded)||(i.isExpanded=e.isDefined(l.expanded));var s=a[0].querySelector("."+t.classes.paneHeader),p=a[0].querySelector("."+t.classes.paneContent);if(!s)throw new Error("The `v-pane-header` directive can't be found");if(!p)throw new Error("The `v-pane-content` directive can't be found");var u=p.querySelector("div"),f=e.element(s),v=e.element(p);c.addPane(i),i.accordionCtrl=c,p.style.maxHeight="0px",n(function(){i.isExpanded&&r()},100),i.$watch("isExpanded",function(e,n){return e===n?!0:(e?r():d(),void 0)})}}}}function l(e){var n=this;n.toggle=function(){e.isAnimating||e.accordionCtrl.toggle(e)}}e.module("vAccordion.config",[]).constant("accordionConfig",{classes:{accordion:"Accordion Accordion--dafault",pane:"Accordion-pane",paneHeader:"Accordion-paneHeader",paneContent:"Accordion-paneContent",expandedState:"is-expanded"}}),e.module("vAccordion.directives",["ngAnimate"]),e.module("vAccordion",["vAccordion.config","vAccordion.directives"]),e.module("vAccordion.directives").directive("vAccordion",n),n.$inject=["accordionConfig"],o.$inject=["$scope"],e.module("vAccordion.directives").directive("vPaneContent",t),t.$inject=["accordionConfig"],e.module("vAccordion.directives").directive("vPaneHeader",i),i.$inject=["accordionConfig"],e.module("vAccordion.directives").directive("vPane",a),a.$inject=["$timeout","$animate","accordionConfig"],l.$inject=["$scope"]}(angular); \ No newline at end of file diff --git a/package.json b/package.json index 2d53660..13be96d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "v-accordion", "description": "vAccordion - AngularJS multi-level accordion component", - "version": "0.0.4", + "version": "0.1.0", "author": "Łukasz Wątroba ", "license": "MIT", "keywords": [ diff --git a/src/vAccordion/directives/v-accordion.js b/src/vAccordion/directives/v-accordion.js index 97f7c2a..8348b10 100644 --- a/src/vAccordion/directives/v-accordion.js +++ b/src/vAccordion/directives/v-accordion.js @@ -30,18 +30,18 @@ function vAccordionDirective (accordionConfig) { function checkCustomControlAPIMethods () { angular.forEach(protectedApiMethods, function (iteratedMethodName) { if (scope.control[iteratedMethodName]) { - throw new Error(iteratedMethodName + ' method can not be overwritten'); + throw new Error('The `' + iteratedMethodName + '` method can not be overwritten'); } }); } function checkCustomControlCallbacks () { if (!angular.isFunction( scope.control.onExpand )) { - throw new Error('onExpand callback must be a function'); + throw new Error('The `onExpand` callback must be a function'); } if (!angular.isFunction( scope.control.onCollapse )) { - throw new Error('onCollapse callback must be a function'); + throw new Error('The `onCollapse` callback must be a function'); } } @@ -107,7 +107,7 @@ function AccordionDirectiveController ($scope) { ctrl.addPane = function (pane) { if (!$scope.allowMultiple) { if (hasExpandedPane() && pane.isExpanded) { - throw new Error('allow-multiple attribute is not set'); + throw new Error('The `allow-multiple` attribute is not set'); } } @@ -166,7 +166,7 @@ function AccordionDirectiveController ($scope) { ctrl.expand(iteratedPane); }); } else { - throw new Error('allow-multiple attribute is not set'); + throw new Error('The `allow-multiple` attribute can\'t be found'); } }; diff --git a/src/vAccordion/directives/v-pane.js b/src/vAccordion/directives/v-pane.js index d4ba39e..172e892 100644 --- a/src/vAccordion/directives/v-pane.js +++ b/src/vAccordion/directives/v-pane.js @@ -29,11 +29,11 @@ function vPaneDirective ($timeout, $animate, accordionConfig) { paneContentNative = iElement[0].querySelector('.' + accordionConfig.classes.paneContent); if (!paneHeaderNative) { - throw new Error('v-pane-header not found'); + throw new Error('The `v-pane-header` directive can\'t be found'); } if (!paneContentNative) { - throw new Error('v-pane-content not found'); + throw new Error('The `v-pane-content` directive can\'t be found'); } var paneInnerNative = paneContentNative.querySelector('div'); diff --git a/src/vAccordion/styles/v-accordion.scss b/src/vAccordion/styles/v-accordion.scss index 157caba..3c541c9 100644 --- a/src/vAccordion/styles/v-accordion.scss +++ b/src/vAccordion/styles/v-accordion.scss @@ -3,6 +3,12 @@ ***************************************/ +/* Settings */ + +$accordion-spacing: 20px; +$accordion-expand-duration: 0.5s; + + /** * Example HTML: * @@ -15,9 +21,6 @@ */ -$accordion-spacing: 20px; -$accordion-expand-duration: 0.5s; - .Accordion { height: 100%; width: 100%; diff --git a/test/unit/vAccordion/directives/v-accordion.spec.js b/test/unit/vAccordion/directives/v-accordion.spec.js index 824359a..7ef56d3 100644 --- a/test/unit/vAccordion/directives/v-accordion.spec.js +++ b/test/unit/vAccordion/directives/v-accordion.spec.js @@ -43,7 +43,7 @@ describe('v-accordion directive', function () { - it('should replace v-accordion with div element and add a class', function () { + it('should replace `v-accordion` with `div` element and `Accordion` class', function () { var template = generateTemplate(); var accordion = $compile(template)(scope); @@ -66,7 +66,7 @@ describe('v-accordion directive', function () { }); - it('should allow multiple selections even if allow-multiple attribute has no value', function () { + it('should allow multiple selections if `allow-multiple` attribute is defined', function () { var template = generateTemplate({ allowMultiple: true }); var accordion = $compile(template)(scope); @@ -74,7 +74,7 @@ describe('v-accordion directive', function () { }); - it('should merge custom control object with internal control', function () { + it('should extend custom control object with internal control', function () { var template = generateTemplate({ customControl: true }); var accordion = $compile(template)(scope); @@ -141,7 +141,7 @@ describe('v-accordion directive', function () { - it('should add pane to array', function () { + it('should add new pane object to `panes` array', function () { var samplePane = generatePanes(1)[0]; expect(isolateScope.panes.length).toBe(0); @@ -152,7 +152,7 @@ describe('v-accordion directive', function () { }); - it('should expand pane and call onExpand callback', function () { + it('should expand pane and call `onExpand` callback', function () { var samplePanes = generatePanes(5); var paneToExpandIndex = 0; var paneToExpand = samplePanes[paneToExpandIndex]; diff --git a/test/unit/vAccordion/directives/v-pane-content.spec.js b/test/unit/vAccordion/directives/v-pane-content.spec.js index 82df8b8..778eb18 100644 --- a/test/unit/vAccordion/directives/v-pane-content.spec.js +++ b/test/unit/vAccordion/directives/v-pane-content.spec.js @@ -40,14 +40,14 @@ describe('v-pane-content directive', function () { - it('should throw an error if is used outside v-pane directive', function () { + it('should throw an error if `v-pane` directive controller can\'t be found', function () { var template = ''; expect(function () { $compile(template)(scope); }).toThrow(); }); - it('should replace v-pane-content with div element and add a class', function () { + it('should replace `v-pane-content` with `div` element and add `Pane-content` class', function () { var template = generateTemplate(); var accordion = $compile(template)(scope); @@ -58,7 +58,7 @@ describe('v-pane-content directive', function () { }); - it('should transclude scope and create inner div wrapper', function () { + it('should transclude scope and create inner `div` wrapper', function () { var message = 'Hello World!'; var template = generateTemplate({ transcludedContent: '{{ message }}' }); diff --git a/test/unit/vAccordion/directives/v-pane-header.spec.js b/test/unit/vAccordion/directives/v-pane-header.spec.js index 85c5807..5c9286d 100644 --- a/test/unit/vAccordion/directives/v-pane-header.spec.js +++ b/test/unit/vAccordion/directives/v-pane-header.spec.js @@ -41,14 +41,14 @@ describe('v-pane-header directive', function () { - it('should throw an error if is used outside v-pane directive', function () { + it('should throw an error if `v-pane` directive controller can\'t be found', function () { var template = ''; expect(function () { $compile(template)(scope); }).toThrow(); }); - it('should replace v-pane-header with div accordion and add a class', function () { + it('should replace `v-pane-header` with `div` accordion and add `Pane-header` class', function () { var template = generateTemplate(); var accordion = $compile(template)(scope); @@ -59,7 +59,7 @@ describe('v-pane-header directive', function () { }); - it('should transclude scope and create inner div wrapper', function () { + it('should transclude scope and create inner `div` wrapper', function () { var message = 'Hello World!'; var template = generateTemplate({ transcludedContent: '{{ message }}' }); diff --git a/test/unit/vAccordion/directives/v-pane.spec.js b/test/unit/vAccordion/directives/v-pane.spec.js index eb0e4d5..c6d4126 100644 --- a/test/unit/vAccordion/directives/v-pane.spec.js +++ b/test/unit/vAccordion/directives/v-pane.spec.js @@ -37,34 +37,34 @@ describe('v-pane directive', function () { - it('should throw an error if is used outside v-accordion directive', function () { + it('should throw an error if `v-accordion` directive controller can\'t be found', function () { var template = ''; expect(function () { $compile(template)(scope); }).toThrow(); }); - it('should throw an error if v-pane-header is not found', function () { + it('should throw an error if `v-pane-header` can\'t be found found', function () { var template = '\n' + ' \n' + ''; - expect(function () { $compile(template)(scope); }).toThrow(new Error('v-pane-header not found')); + expect(function () { $compile(template)(scope); }).toThrow(); }); - it('should throw an error if v-pane-content is not found', function () { + it('should throw an error if `v-pane-content` can\'t be found found', function () { var template = '\n' + ' \n' + ' \n' + ' \n' + ''; - expect(function () { $compile(template)(scope); }).toThrow(new Error('v-pane-content not found')); + expect(function () { $compile(template)(scope); }).toThrow(); }); - it('should replace v-pane with div element and add a class', function () { + it('should replace `v-pane` with `div` element and add `Pane` class', function () { var template = '\n' + ' \n' + ' \n' + @@ -101,7 +101,7 @@ describe('v-pane directive', function () { }); - it('should set isExpanded flag to true if expanded attribute is added and has no value', function () { + it('should set `isExpanded` flag to `true` if expanded attribute is added and has no value', function () { var template = '\n' + ' \n' + ' \n' + @@ -116,7 +116,7 @@ describe('v-pane directive', function () { }); - it('should throw an error if multiple panes has expanded attribute, but the allow-multiple is not set', function () { + it('should throw an error if multiple panes has `expanded` attribute, but the `allow-multiple` is not set', function () { var template = '\n' + ' \n' + ' \n' + @@ -132,7 +132,7 @@ describe('v-pane directive', function () { }); - it('should works with ng-repeat', function () { + it('should works with `ng-repeat` directive', function () { var length = 3; var template = '\n' + @@ -151,7 +151,7 @@ describe('v-pane directive', function () { }); - it('should watch the isExpanded value and add expanded state classes when it is changed to true', function () { + it('should watch the `isExpanded` value and add `is-expanded` class when it is changed to `true`', function () { var expandedStateClass = accordionConfig.classes.expandedState; var template = '\n' +