paper.js/test/tests/load.js
sasensi 1bd67b2d9b Add mouse interaction tests
- Tests common mouse interactions scenarios to prevent regressions
when making changes. These tests are not run in node context.
- Prevent name collision between Javascript native classes and Paper.js
classes (Event and MouseEvent) by patching load.js.
- Uses a polyfill for MouseEvent which is missing in PhantomJS.
- Adds View._clearState() method and use it in tests to make sure that
each new test is started with a fresh state.
2018-10-17 14:40:05 +02:00

67 lines
1.4 KiB
JavaScript

/*
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
* http://scratchdisk.com/ & http://jonathanpuckey.com/
*
* Distributed under the MIT license. See LICENSE file for details.
*
* All rights reserved.
*/
/*#*/ include('Point.js');
/*#*/ include('Size.js');
/*#*/ include('Rectangle.js');
/*#*/ include('Matrix.js');
/*#*/ include('Color.js');
/*#*/ include('Emitter.js');
/*#*/ include('Project.js');
/*#*/ include('Item.js');
/*#*/ include('Item_Cloning.js');
/*#*/ include('Item_Order.js');
/*#*/ include('Item_Bounds.js');
/*#*/ include('Item_Getting.js');
/*#*/ include('Layer.js');
/*#*/ include('Group.js');
/*#*/ include('Segment.js');
/*#*/ include('Path.js');
/*#*/ include('Path_Constructors.js');
/*#*/ include('Path_Intersections.js');
/*#*/ include('Path_Boolean.js');
/*#*/ include('CompoundPath.js');
/*#*/ include('PathItem.js');
/*#*/ include('PathItem_Contains.js');
/*#*/ include('Shape.js');
/*#*/ include('Curve.js');
/*#*/ include('CurveLocation.js');
/*#*/ include('Style.js');
/*#*/ include('SymbolItem.js');
/*#*/ include('Raster.js');
/*#*/ include('TextItem.js');
/*#*/ include('HitResult.js');
/*#*/ include('JSON.js');
/*#*/ include('SvgImport.js');
/*#*/ include('SvgExport.js');
/*#*/ include('Numerical.js');
// There is no need to test interactions in node context.
if (!isNode) /*#*/ include('Interactions.js');