Commit graph

55 commits

Author SHA1 Message Date
Jürg Lehni
db82f41151 Update year, author email addresses and links 2020-05-23 22:24:42 +02:00
Jürg Lehni
ef8ba35911 Implement unit tests for 3ff5560c0c
Closes #1419, closes #1263
2019-06-22 18:21:47 +02:00
Jürg Lehni
aca3059814 Move color owner handling directly to Color class
There was already Color#_owner, now there is Color#_setter too
2019-06-09 18:01:42 +02:00
Jürg Lehni
c5b304bb78 Exclude gradients-2 test again on phantomjs
Reverting 5cb93ec46e 🤦‍♂️
The isNode() shenanigans was masking this issue
2019-06-09 14:57:02 +02:00
sasensi
5a3cf624aa Fix importSVG() linear gradient x2 default values 2019-06-09 14:42:52 +02:00
Jürg Lehni
1e2bbbdef2 Fix handling of native classes in tests again
Reverting breaking change in 10bdafa826
2019-06-09 14:34:32 +02:00
Jürg Lehni
7e850d0e55 Fix resemble.js warnings during tests 2019-06-09 13:55:41 +02:00
Jürg Lehni
10bdafa826 Simplify preserving of native classes in tests 2019-06-09 13:42:20 +02:00
Jürg Lehni
da137fa8e4 Use comparePixels() instead of compareCanvas() 2019-06-05 18:16:56 +02:00
Jürg Lehni
88c4275fa3 Keep code on 80 chars per line 2019-06-05 17:36:56 +02:00
sapics
be4199b6eb Update copyright year to 2019 2018-12-27 16:13:01 +09:00
sapics
cfc5a912da Replace url to avoid redirection
Replace http://jonathanpuckey.com to https://puckey.studio
2018-11-14 11:24:32 +01:00
sasensi
655a4dabd0 Add tolerance parameter to test method compareCanvas() 2018-11-06 12:07:01 +01:00
sasensi
337538b21a Remove reference to CanvasProvider in test methods 2018-11-06 11:26:12 +01:00
sasensi
2e75467fb4 Fix group selected bounds and position color
Group selected color was applied differently to its bounds and position
depending on whether it had children or not when selected color was set.
This resulted in an unpredictable behaviour from a user point of view.
To change that:
- When `item.setSelectedColor()` is called, value is now always stored
in `item._style._values`, independently from the fact that item has
children or not.
- An helper method `compareCanvas()` is added to the test suite to allow
comparing selection rendering of a known working case to a failing one.
Two provided callbacks are executed in a dedicated `<canvas>`/`Project`
context and both results are compared with `resemble.js`.
2018-11-06 11:26:12 +01:00
sasensi
07d2edac74 Fix mouse interactions tests error
Mouse interactions tests only passed in `gulp load` context.
This make sure that native event classes are used in built context.
This also remove the reference to `CanvasProvider` which is not
available in built context.
Fixes bug introduced in #1570
2018-10-17 18:08:54 +02:00
Jürg Lehni
d325fce909 Travis CI: Fix error during tests 2018-10-17 17:38:42 +02:00
sasensi
3fd73f92f2 Minor code refactoring 2018-10-17 14:40:05 +02:00
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
Jürg Lehni
10f464edfc Boolean: Check that overlaps are on the right path
Closes #1321
2017-10-04 17:52:09 +02:00
Jürg Lehni
15471c76ab Boolean: Always return CompoundPath items.
Relates to #1221
2017-03-22 23:26:26 +01:00
Jürg Lehni
3c9d2eea1d Boolean: Implement options.trace, and add unit tests for options.trace = false
Relates to #1221
2017-03-22 15:03:11 +01:00
Jürg Lehni
7448aedf67 Tests: Show SVG path data when boolean results are different. 2017-03-07 11:04:11 +01:00
Jürg Lehni
3c43a78c53 Properly handle generated IDs in SVG export.
Closes #1138
2016-11-20 20:53:41 -05:00
Jürg Lehni
b4f6cde203 Tests: Handle null values when comparing items. 2016-09-20 18:43:02 -04:00
Jürg Lehni
f988445dad Boolean: Implement optimization for operands without crossings.
Closes #1113
2016-07-20 16:15:10 +02:00
Jürg Lehni
c338e9a6ec Tests: Add another SVG path data test. 2016-07-20 15:10:23 +02:00
Jürg Lehni
8a45c5dff9 Fix Node.js unit-tests, and add CHANGELOG entry for #1103 2016-07-12 19:27:35 +02:00
Jürg Lehni
89c60b1a05 Loosely couple Node.js code to canvas module.
Treat absence of canvas module like a web worker context.
Relates to #1103
2016-07-12 19:11:09 +02:00
Jürg Lehni
cb0810d18a QUnit: Fix tests on Node v6. 2016-05-22 15:59:05 +02:00
Jürg Lehni
eceb133686 Tests: Second attempt to find fitting tolerance for failing gradient SVG export. 2016-04-13 14:37:13 -07:00
Jürg Lehni
d6ce4705b7 Travis CI: Use Arial in all SVG tests and reduce tolerance. 2016-03-17 11:35:06 +01:00
Jürg Lehni
84d2a2f908 SVG Import: Fix issues with viewBox. 2016-03-15 19:00:35 +01:00
Jürg Lehni
7a4794dacf Add more unit tests for SvgImport.
Some currently failing.
2016-03-15 18:52:38 +01:00
Jürg Lehni
3d330da4fc Fix failing unit tests. 2016-02-15 09:21:11 +01:00
Jürg Lehni
08e51b5ca4 Fix failing SVG unit test. 2016-02-15 08:42:59 +01:00
Jürg Lehni
6f4890c63c Implement new options to control bounding box in SVG Export
And use it to support SvgExport unit tests. Relates to #972
2016-02-15 00:13:38 +01:00
Jürg Lehni
0e2498bdce Switch to PathItem.create() in unit tests. 2016-02-14 23:22:39 +01:00
Jürg Lehni
dba4eb371d SvgImport: Implement options.insert to control insertion.
Also use settings.insertItems for faster import. Closes #763
2016-02-14 22:51:50 +01:00
Jürg Lehni
4a947317fb Implement #hitTestAll() on Item and Project
Along with unit tests and documentation.
Closes #536
2016-02-14 12:39:35 +01:00
Jürg Lehni
c3fff9fa83 Switch from new Base() to Base.set({}) where possible. 2016-02-13 23:10:09 +01:00
Jürg Lehni
3348fb736f Boolean: Implement proper handling of fully overlapping (identical) paths and sub-paths.
Closes #923, closes #958
2016-02-13 22:41:09 +01:00
Jürg Lehni
55c5f42716 Part 1 of large refactoring of bounds handling. 2016-02-12 17:59:37 +01:00
Jürg Lehni
c0b39c4b8f Tests: Implement additional tests for SvgImport. 2016-02-11 12:51:48 +01:00
Jürg Lehni
df57c4adb9 SVGImport: Improve consistency of style handling. 2016-02-11 11:06:09 +01:00
Jürg Lehni
8542eb62b4 Gulp: Add test:browser task, to solve CORS issues on Chrome. 2016-02-11 10:05:21 +01:00
Jürg Lehni
5e53939006 Do not include text-styles in items that don't relate to text.
Closes #934
2016-02-02 21:43:44 +01:00
Jürg Lehni
45595b2b1d Fix unit test error on Node.js 2016-02-01 20:20:38 +01:00
Jürg Lehni
a12e99e387 Implement unit tests for SVG Importing, based on visual comparison.
For now, one test for #932
2016-02-01 20:15:37 +01:00
Jürg Lehni
af5984747f SVG: Rename 'SVG' prefix to 'Svg'
- To make it clear it's not browser-provided functionality
- To reflect how DomElement / DomEvent are already named, for the same reason
2016-02-01 12:50:22 +01:00