Replace $$ with shadowRoot.querySelector
`$$` is deprecated: https://polymer-library.polymer-project.org/2.0/docs/upgrade One exception here is for gr-select as its not a shadow dom component, so use `this.querySelector` instead Change-Id: Ib3fd45298da1b44325d47932e53e6185d25c13de
This commit is contained in:
@@ -72,11 +72,13 @@ limitations under the License.
|
||||
const element = fixture('basic');
|
||||
flush(() => {
|
||||
const [menuItemEl, itemEl] = element;
|
||||
const menuItem = menuItemEl.$$('gr-settings-menu-item');
|
||||
const menuItem = menuItemEl.shadowRoot
|
||||
.querySelector('gr-settings-menu-item');
|
||||
assert.isOk(menuItem);
|
||||
assert.equal(menuItem.title, 'foo');
|
||||
assert.equal(menuItem.href, '#x/testplugin/bar');
|
||||
const item = itemEl.$$('gr-settings-item');
|
||||
const item = itemEl.shadowRoot
|
||||
.querySelector('gr-settings-item');
|
||||
assert.isOk(item);
|
||||
assert.equal(item.title, 'foo');
|
||||
assert.equal(item.anchor, 'x/testplugin/bar');
|
||||
|
||||
Reference in New Issue
Block a user