mirror of
https://github.com/material-components/material-web.git
synced 2024-08-17 09:30:27 +03:00
Fix dependency references and tests.
This commit is contained in:
parent
56b404cdfd
commit
11fd1824ab
@ -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';
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user