Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Commit

Permalink
Replace dot with hash mark
Browse files Browse the repository at this point in the history
  • Loading branch information
Fengyuan Chen committed Apr 29, 2016
1 parent f84e4d5 commit ffb5400
Show file tree
Hide file tree
Showing 61 changed files with 102 additions and 102 deletions.
8 changes: 4 additions & 4 deletions test/events/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {

$image.one('build.cropper', function (e) {

QUnit.test('events.build', function (assert) {
QUnit.test('events#build', function (assert) {
assert.equal(e.type, 'build');
assert.equal(e.namespace, 'cropper');
});
Expand All @@ -15,14 +15,14 @@ $(function () {

}).one('built.cropper', function () {

QUnit.test('events.build: default prevented', function (assert) {
QUnit.test('events#build: default prevented', function (assert) {
assert.ok(false);
});

}).cropper({
build: function (e) {

QUnit.test('options.build', function (assert) {
QUnit.test('options#build', function (assert) {
assert.equal(e.type, 'build');
assert.equal(e.namespace, 'cropper');
});
Expand All @@ -33,7 +33,7 @@ $(function () {

built: function () {

QUnit.test('options.build: default prevented', function (assert) {
QUnit.test('options#build: default prevented', function (assert) {
assert.ok(false);
});

Expand Down
4 changes: 2 additions & 2 deletions test/events/built.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ $(function () {

$image.one('built.cropper', function (e) {

QUnit.test('events.built', function (assert) {
QUnit.test('events#built', function (assert) {
assert.equal(e.type, 'built');
assert.equal(e.namespace, 'cropper');
});

}).cropper({
built: function (e) {

QUnit.test('options.built', function (assert) {
QUnit.test('options#built', function (assert) {
assert.equal(e.type, 'built');
assert.equal(e.namespace, 'cropper');
});
Expand Down
4 changes: 2 additions & 2 deletions test/events/crop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(function () {

$image.on('crop.cropper', function (e) {

QUnit.test('events.crop', function (assert) {
QUnit.test('events#crop', function (assert) {
assert.equal(e.type, 'crop');
assert.equal(e.namespace, 'cropper');
assert.ok(isNumber(e.x));
Expand All @@ -32,7 +32,7 @@ $(function () {

crop: function (e) {

QUnit.test('options.crop', function (assert) {
QUnit.test('options#crop', function (assert) {
assert.equal(e.type, 'crop');
assert.equal(e.namespace, 'cropper');
assert.ok(isNumber(e.x));
Expand Down
4 changes: 2 additions & 2 deletions test/events/cropend.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {

$image.on('cropend.cropper', function (e) {

QUnit.test('events.cropend', function (assert) {
QUnit.test('events#cropend', function (assert) {
assert.equal(e.type, 'cropend');
assert.equal(e.namespace, 'cropper');
assert.equal(e.action, 'crop');
Expand All @@ -22,7 +22,7 @@ $(function () {

cropend: function (e) {

QUnit.test('options.cropend', function (assert) {
QUnit.test('options#cropend', function (assert) {
assert.equal(e.type, 'cropend');
assert.equal(e.namespace, 'cropper');
assert.equal(e.action, 'crop');
Expand Down
4 changes: 2 additions & 2 deletions test/events/cropmove.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {

$image.on('cropmove.cropper', function (e) {

QUnit.test('events.cropmove', function (assert) {
QUnit.test('events#cropmove', function (assert) {
assert.equal(e.type, 'cropmove');
assert.equal(e.namespace, 'cropper');
assert.equal(e.action, 'crop');
Expand All @@ -22,7 +22,7 @@ $(function () {

cropmove: function (e) {

QUnit.test('options.cropmove', function (assert) {
QUnit.test('options#cropmove', function (assert) {
assert.equal(e.type, 'cropmove');
assert.equal(e.namespace, 'cropper');
assert.equal(e.action, 'crop');
Expand Down
4 changes: 2 additions & 2 deletions test/events/cropstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {

$image.on('cropstart.cropper', function (e) {

QUnit.test('events.cropstart', function (assert) {
QUnit.test('events#cropstart', function (assert) {
assert.equal(e.type, 'cropstart');
assert.equal(e.namespace, 'cropper');
assert.equal(e.action, 'crop');
Expand All @@ -22,7 +22,7 @@ $(function () {

cropstart: function (e) {

QUnit.test('options.cropstart', function (assert) {
QUnit.test('options#cropstart', function (assert) {
assert.equal(e.type, 'cropstart');
assert.equal(e.namespace, 'cropper');
assert.equal(e.action, 'crop');
Expand Down
4 changes: 2 additions & 2 deletions test/events/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {

$image.one('zoom.cropper', function (e) {

QUnit.test('events.zoom', function (assert) {
QUnit.test('events#zoom', function (assert) {
assert.equal(e.type, 'zoom');
assert.equal(e.namespace, 'cropper');
assert.ok(e.ratio > e.oldRatio);
Expand All @@ -19,7 +19,7 @@ $(function () {

zoom: function (e) {

QUnit.test('options.zoom', function (assert) {
QUnit.test('options#zoom', function (assert) {
assert.equal(e.type, 'zoom');
assert.equal(e.namespace, 'cropper');
assert.ok(e.ratio > e.oldRatio);
Expand Down
2 changes: 1 addition & 1 deletion test/methods/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function () {
built: function () {
var cropper = $image.data('cropper');

QUnit.test('methods.clear', function (assert) {
QUnit.test('methods#clear', function (assert) {
$image.cropper('clear');
assert.equal(cropper.isCropped, false);
assert.ok(cropper.$cropBox.is(':hidden'));
Expand Down
2 changes: 1 addition & 1 deletion test/methods/crop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(function () {
built: function () {
var cropper = $image.data('cropper');

QUnit.test('methods.crop', function (assert) {
QUnit.test('methods#crop', function (assert) {
$image.cropper('crop');
assert.equal(cropper.isCropped, true);
assert.ok(cropper.$cropBox.is(':visible'));
Expand Down
4 changes: 2 additions & 2 deletions test/methods/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ $(function () {

var $image = $(window.createCropperImage());

QUnit.test('methods.destroy: before built', function (assert) {
QUnit.test('methods#destroy: before built', function (assert) {
$image.cropper();
assert.ok(typeof $image.data('cropper') === 'object');

$image.cropper('destroy');
assert.ok(typeof $image.data('cropper') === 'undefined');

QUnit.test('methods.destroy: after built', function (assert) {
QUnit.test('methods#destroy: after built', function (assert) {
var done = assert.async();

$image.cropper({
Expand Down
14 changes: 7 additions & 7 deletions test/methods/disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,39 @@ $(function () {

$image.cropper('disable');

QUnit.test('methods.disable', function (assert) {
QUnit.test('methods#disable', function (assert) {
assert.equal(cropper.isDisabled, true);
assert.ok(cropper.$cropper.hasClass('cropper-disabled'));
});

QUnit.test('methods.disable: setAspectRatio', function (assert) {
QUnit.test('methods#disable: setAspectRatio', function (assert) {
$image.cropper('setAspectRatio', 1.618);
assert.ok(isNaN(options.aspectRatio));
assert.notEqual(options.aspectRatio, 1.618);
});

QUnit.test('methods.disable: move', function (assert) {
QUnit.test('methods#disable: move', function (assert) {
var imageData = $image.cropper('getImageData');

$image.cropper('move', 10, 10);
assert.deepEqual($image.cropper('getImageData'), imageData);
});

QUnit.test('methods.disable: zoom', function (assert) {
QUnit.test('methods#disable: zoom', function (assert) {
var ratio = cropper.image.ratio;

$image.cropper('zoom', 0.5);
assert.equal(cropper.image.ratio, ratio);
});

QUnit.test('methods.disable: rotate', function (assert) {
QUnit.test('methods#disable: rotate', function (assert) {
var rotate = cropper.image.rotate;

$image.cropper('rotate', 15);
assert.equal(cropper.image.rotate, rotate);
});

QUnit.test('methods.disable: setCanvasData', function (assert) {
QUnit.test('methods#disable: setCanvasData', function (assert) {
var canvasData = $image.cropper('getCanvasData');

$image.cropper('setCanvasData', {
Expand All @@ -53,7 +53,7 @@ $(function () {
assert.deepEqual($image.cropper('getCanvasData'), canvasData);
});

QUnit.test('methods.disable: setCropBoxData', function (assert) {
QUnit.test('methods#disable: setCropBoxData', function (assert) {
var cropBoxData = $image.cropper('getCropBoxData');

$image.cropper('setCropBoxData', {
Expand Down
2 changes: 1 addition & 1 deletion test/methods/enable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function () {
built: function () {
var cropper = $image.data('cropper');

QUnit.test('methods.enable', function (assert) {
QUnit.test('methods#enable', function (assert) {
$image.cropper('disable').cropper('enable');
assert.equal(cropper.isDisabled, false);
assert.ok(!cropper.$cropper.hasClass('cropper-disabled'));
Expand Down
2 changes: 1 addition & 1 deletion test/methods/getCanvasData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.getCanvasData', function (assert) {
QUnit.test('methods#getCanvasData', function (assert) {
var data = $image.cropper('getCanvasData');

assert.ok(isNumber(data.left));
Expand Down
2 changes: 1 addition & 1 deletion test/methods/getContainerData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.getContainerData', function (assert) {
QUnit.test('methods#getContainerData', function (assert) {
var data = $image.cropper('getContainerData');

assert.ok(isNumber(data.width));
Expand Down
2 changes: 1 addition & 1 deletion test/methods/getCropBoxData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.getCropBoxData', function (assert) {
QUnit.test('methods#getCropBoxData', function (assert) {
var data = $image.cropper('getCropBoxData');

assert.ok(isNumber(data.left));
Expand Down
8 changes: 4 additions & 4 deletions test/methods/getCroppedCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.getCroppedCanvas', function (assert) {
QUnit.test('methods#getCroppedCanvas', function (assert) {
var canvas = $image.cropper('getCroppedCanvas');

assert.ok(canvas instanceof HTMLCanvasElement);
});

QUnit.test('methods.getCroppedCanvas: resize', function (assert) {
QUnit.test('methods#getCroppedCanvas: resize', function (assert) {
var canvas = $image.cropper('getCroppedCanvas', {
width: 160,
height: 90
Expand All @@ -23,7 +23,7 @@ $(function () {
assert.equal(canvas.height, 90);
});

QUnit.test('methods.getCroppedCanvas: fillColor', function (assert) {
QUnit.test('methods#getCroppedCanvas: fillColor', function (assert) {
var canvas = $image.cropper('rotate', 90).cropper('getCroppedCanvas', {
fillColor: '#010101'
});
Expand All @@ -36,7 +36,7 @@ $(function () {

});

QUnit.test('methods.getCroppedCanvas: clear', function (assert) {
QUnit.test('methods#getCroppedCanvas: clear', function (assert) {
$image.cropper('clear');
var canvas = $image.cropper('getCroppedCanvas');

Expand Down
2 changes: 1 addition & 1 deletion test/methods/getData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.getData', function (assert) {
QUnit.test('methods#getData', function (assert) {
var data = $image.cropper('getData');

assert.ok(isNumber(data.x));
Expand Down
2 changes: 1 addition & 1 deletion test/methods/getImageData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.getImageData', function (assert) {
QUnit.test('methods#getImageData', function (assert) {
var data = $image.cropper('getImageData');

// Not rotate
Expand Down
2 changes: 1 addition & 1 deletion test/methods/move.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.move', function (assert) {
QUnit.test('methods#move', function (assert) {
var canvasData = $image.cropper('getCanvasData');
var changedCanvasData = $image.cropper('move', 1, 1).cropper('getCanvasData');

Expand Down
2 changes: 1 addition & 1 deletion test/methods/moveTo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.moveTo', function (assert) {
QUnit.test('methods#moveTo', function (assert) {
var canvasData = $image.cropper('moveTo', 0, 0).cropper('getCanvasData');

assert.equal(canvasData.left, 0);
Expand Down
2 changes: 1 addition & 1 deletion test/methods/replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $(function () {

$image.one('built.cropper', function () {

QUnit.test('methods.replace', function (assert) {
QUnit.test('methods#replace', function (assert) {
var done = assert.async();

$image.one('built.cropper', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/methods/reset.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(function () {
var canvasData = $image.cropper('getCanvasData');
var cropBoxData = $image.cropper('getCropBoxData');

QUnit.test('methods.reset', function (assert) {
QUnit.test('methods#reset', function (assert) {
$image.cropper('setCanvasData', {
top: canvasData.top + 10,
width: canvasData.width - 10
Expand Down
2 changes: 1 addition & 1 deletion test/methods/rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.rotate', function (assert) {
QUnit.test('methods#rotate', function (assert) {
$image.cropper('rotate', 360);
assert.equal($image.cropper('getImageData').rotate, 0);

Expand Down
2 changes: 1 addition & 1 deletion test/methods/rotateTo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function () {
$image.cropper({
built: function () {

QUnit.test('methods.rotateTo', function (assert) {
QUnit.test('methods#rotateTo', function (assert) {
assert.equal($image.cropper('rotateTo', 360).cropper('getImageData').rotate, 0);
assert.equal($image.cropper('rotateTo', 90).cropper('getImageData').rotate, 90);
assert.equal($image.cropper('rotateTo', 0).cropper('getImageData').rotate, 0);
Expand Down
2 changes: 1 addition & 1 deletion test/methods/scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function () {

built: function () {

QUnit.test('methods.scale', function (assert) {
QUnit.test('methods#scale', function (assert) {
var imageData = $image.cropper('scale', -1, -1).cropper('getImageData');

assert.equal(imageData.scaleX, -1);
Expand Down
2 changes: 1 addition & 1 deletion test/methods/scaleX.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function () {

built: function () {

QUnit.test('methods.scaleX', function (assert) {
QUnit.test('methods#scaleX', function (assert) {
var imageData = $image.cropper('scaleX', -1).cropper('getImageData');

assert.equal(imageData.scaleX, -1);
Expand Down
Loading

0 comments on commit ffb5400

Please sign in to comment.