blob: e82fbed82b282c6d95c22dfc3864dba6e897845c (
plain) (
tree)
|
|
describe('modal (option)', () => {
it('should show the modal by default', (done) => {
const image = window.createImage();
const cropper = new Cropper(image, {
ready() {
expect(cropper.dragBox.className).to.include('cropper-modal');
done();
},
});
expect(cropper.options.modal).to.be.true;
});
it('should not show the modal', (done) => {
const image = window.createImage();
const cropper = new Cropper(image, {
modal: false,
ready() {
expect(cropper.dragBox.className).to.not.include('cropper-modal');
done();
},
});
expect(cropper.options.modal).to.be.false;
});
});
|