From 11fd1824ab65ae8061f79b5d0c0eed4d3bd60c7a Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Wed, 16 May 2018 15:22:03 -0700 Subject: [PATCH] Fix dependency references and tests. --- packages/all.js | 3 +-- test/unit/mwc-button.test.js | 2 +- test/unit/mwc-checkbox.test.js | 13 +++++++------ test/unit/mwc-ripple.test.js | 16 ---------------- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/packages/all.js b/packages/all.js index 5396cf103..be871effd 100644 --- a/packages/all.js +++ b/packages/all.js @@ -15,7 +15,7 @@ */ export {Button} from '@material/mwc-button/mwc-button.js'; -export {Fab} from '@material/mwc-button/mwc-fab.js'; +export {Fab} from '@material/mwc-fab/mwc-fab.js'; export {Checkbox} from '@material/mwc-checkbox/mwc-checkbox.js'; export {Chip} from '@material/mwc-chips/mwc-chip.js'; export {ChipSet} from '@material/mwc-chips/mwc-chip-set.js'; @@ -28,7 +28,6 @@ export {ListItem} from '@material/mwc-list/mwc-list-item.js'; export {Menu} from '@material/mwc-menu/mwc-menu.js'; export {Radio} from '@material/mwc-radio/mwc-radio.js'; export {Ripple} from '@material/mwc-ripple/mwc-ripple.js'; -export {RippleSurface} from '@material/mwc-ripple/mwc-ripple-surface.js'; export {Select} from '@material/mwc-select/mwc-select.js'; export {Slider} from '@material/mwc-slider/mwc-slider.js'; export {Snackbar} from '@material/mwc-snackbar/mwc-snackbar.js'; diff --git a/test/unit/mwc-button.test.js b/test/unit/mwc-button.test.js index f9593b5fb..9a4182a76 100644 --- a/test/unit/mwc-button.test.js +++ b/test/unit/mwc-button.test.js @@ -16,7 +16,7 @@ import {assert} from 'chai'; import {Button} from '@material/mwc-button'; -import {Fab} from '@material/mwc-button/mwc-fab.js'; +import {Fab} from '@material/mwc-fab'; let element; diff --git a/test/unit/mwc-checkbox.test.js b/test/unit/mwc-checkbox.test.js index 21788c3eb..536081c10 100644 --- a/test/unit/mwc-checkbox.test.js +++ b/test/unit/mwc-checkbox.test.js @@ -41,11 +41,12 @@ test('element._formElement returns the native checkbox element', () => { assert.equal(element._formElement.localName, 'input'); }); -test('element._component returns the mdc checkbox component', () => { +test('element._component returns the mdc checkbox component', async () => { + await element.componentReady(); assert.instanceOf(element._component, MDCCheckbox); }); -test('get/set checked updates the checked property on the native checkbox element', () => { +test('get/set checked updates the checked property on the native checkbox element', async () => { element.checked = true; await element.componentReady(); assert.equal(element._component.checked, true); @@ -56,7 +57,7 @@ test('get/set checked updates the checked property on the native checkbox elemen assert.equal(element._formElement.checked, false); }); -test('get/set indeterminate updates the indeterminate property on the native checkbox element', () => { +test('get/set indeterminate updates the indeterminate property on the native checkbox element', async () => { element.indeterminate = true; await element.componentReady(); assert.equal(element._formElement.indeterminate, true); @@ -65,7 +66,7 @@ test('get/set indeterminate updates the indeterminate property on the native che assert.equal(element._formElement.indeterminate, false); }); -test('get/set disabled updates the disabled property on the native checkbox element', () => { +test('get/set disabled updates the disabled property on the native checkbox element', async () => { element.disabled = true; await element.componentReady(); assert.equal(element._formElement.disabled, true); @@ -74,7 +75,7 @@ test('get/set disabled updates the disabled property on the native checkbox elem assert.equal(element._formElement.disabled, false); }); -test('get/set value updates the value of the native checkbox element', () => { +test('get/set value updates the value of the native checkbox element', async () => { let value = 'new value'; element.value = value; await element.componentReady(); @@ -85,4 +86,4 @@ test('get/set value updates the value of the native checkbox element', () => { await element.componentReady(); assert.equal(element._component.value, value); assert.equal(element._formElement.value, value); -}); \ No newline at end of file +}); diff --git a/test/unit/mwc-ripple.test.js b/test/unit/mwc-ripple.test.js index 8512ea2f2..bd2825a69 100644 --- a/test/unit/mwc-ripple.test.js +++ b/test/unit/mwc-ripple.test.js @@ -16,7 +16,6 @@ import {assert} from 'chai'; import {Ripple} from '@material/mwc-ripple'; -import {RippleSurface} from '@material/mwc-ripple/mwc-ripple-surface.js'; let element; @@ -34,18 +33,3 @@ afterEach(() => { test('initializes as an mwc-ripple', () => { assert.instanceOf(element, Ripple); }); - -suite('mwc-ripple-surface'); - -beforeEach(() => { - element = document.createElement('mwc-ripple-surface'); - document.body.appendChild(element); -}); - -afterEach(() => { - document.body.removeChild(element); -}); - -test('initializes as an mwc-ripple-surface', () => { - assert.instanceOf(element, RippleSurface); -});