From b54ee2257e77c15905048b47ef73676cfff34654 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 20 Dec 2017 13:32:07 -0800 Subject: [PATCH] [Layout] Don't use class name to query by id ...since ids may be invalid class names. Instead, use a data attribute. Fixes #1846 --- platform/features/layout/res/templates/layout.html | 3 ++- platform/features/layout/src/LayoutController.js | 2 +- platform/features/layout/test/LayoutControllerSpec.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/features/layout/res/templates/layout.html b/platform/features/layout/res/templates/layout.html index 36d9431258..fa8cf59be2 100644 --- a/platform/features/layout/res/templates/layout.html +++ b/platform/features/layout/res/templates/layout.html @@ -36,7 +36,8 @@ ng-style="{ 'background-size': '100% ' + controller.getGridSize() [1] + 'px' }"> -
"); + var testElement = $("
"); $element.append(testElement); spyOn(testElement[0], 'click'); - controller.selectIfNew('some-class', childObj); + controller.selectIfNew('some-id', childObj); jasmine.Clock.tick(0); expect(testElement[0].click).toHaveBeenCalled();