Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(tests): remove invalid use of css private names
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Mar 5, 2016
1 parent 54573b3 commit d35c3bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/menuBar/menu-bar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('material.components.menuBar', function() {

function getOpenSubMenu() {
debugger;
var containers = document.body.querySelectorAll('._md-open-menu-container._md-active');
var containers = document.body.querySelectorAll('.md-open-menu-container.md-active');
var lastContainer = containers.item(containers.length - 1);

return angular.element(lastContainer.querySelector('md-menu-content'));
Expand Down
13 changes: 13 additions & 0 deletions src/core/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,19 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
return current;
},

/**
* Parses an attribute value, mostly a string.
* By default checks for negated values and returns `false´ if present.
* Negated values are: (native falsy) and negative strings like:
* `false` or `0`.
* @param value Attribute value which should be parsed.
* @param negatedCheck When set to false, won't check for negated values.
* @returns {boolean}
*/
parseAttributeBoolean: function(value, negatedCheck) {
return value === '' || !!value && (negatedCheck === false || value !== 'false' && value !== '0');
},

hasComputedStyle: hasComputedStyle
};

Expand Down

0 comments on commit d35c3bb

Please sign in to comment.