Remove .size() that was deprecated in 1.8

pull/5078/head
Oliver Günther 8 years ago
parent b32fb8e103
commit 7247b24040
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 2
      frontend/app/components/filters/query-filters/query-filters.directive.html
  2. 8
      frontend/app/components/filters/toggled-multiselect/toggled-multiselect.directive.test.ts
  3. 2
      frontend/app/components/wp-table/table-pagination/table-pagination.directive.test.js
  4. 6
      frontend/app/layout/menu-item-factory.js

@ -142,7 +142,7 @@
</div>
</li>
<li class="advanced-filters--spacer" ng-if="query.getActiveFilters().size() > 0"></li>
<li class="advanced-filters--spacer" ng-if="query.getActiveFilters().length > 0"></li>
<li class="advanced-filters--add-filter">
<!-- Add filters -->

@ -83,8 +83,8 @@ describe('toggledMultiselect Directive', function() {
});
it('should render only one select', function() {
expect(element.find('select').size()).to.equal(1);
expect(element.find('select.ng-hide').size()).to.equal(0);
expect(element.find('select').length).to.equal(1);
expect(element.find('select.ng-hide').length).to.equal(0);
});
it('should render two OPTIONs + Please select for displayed SELECT', function() {
@ -100,10 +100,10 @@ describe('toggledMultiselect Directive', function() {
xit('should render a link that toggles multi-select', function() {
var a = element.find('a');
expect(element.find('select.ng-hide').size()).to.equal(1);
expect(element.find('select.ng-hide').length).to.equal(1);
a.click();
scope.$apply();
expect(element.find('select.ng-hide').size()).to.equal(1);
expect(element.find('select.ng-hide').length).to.equal(1);
});
});
});

@ -108,7 +108,7 @@ describe('tablePagination Directive', function () {
it('should display correct number of page number links', function () {
var numberOfPageNumberLinks = function () {
return element.find('a[rel="next"]').size();
return element.find('a[rel="next"]').length;
};
compile();

@ -92,12 +92,12 @@ module.exports = function($rootScope, $compile, $http, $templateCache, $animate)
function previousMenuItem(title) {
var allItems = getContainer().find('li'),
previousElement = angular.element(allItems[allItems.size() - 1]),
i = allItems.size() - 2;
previousElement = angular.element(allItems[allItems.length - 1]),
i = allItems.length - 2;
for (i; i >= 0; i--) {
if ((title > previousElement.find('a').attr('title')) ||
(previousElement.find('.' + type).size() === 0))
(previousElement.find('.' + type).length === 0))
{
return previousElement;
}

Loading…
Cancel
Save