From b5a8eb9f96914cf4070d1acc088f4fe8816ce768 Mon Sep 17 00:00:00 2001 From: juliandescottes Date: Thu, 11 May 2017 02:18:33 +0200 Subject: [PATCH] Feature #683 - add drawing test for duplicate layer --- test/drawing/DrawingTests.browser.js | 1 + test/drawing/DrawingTests.casper.js | 1 + test/drawing/tests/layers.duplicate.json | 207 +++++++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 test/drawing/tests/layers.duplicate.json diff --git a/test/drawing/DrawingTests.browser.js b/test/drawing/DrawingTests.browser.js index 4cf74677..48df71f0 100644 --- a/test/drawing/DrawingTests.browser.js +++ b/test/drawing/DrawingTests.browser.js @@ -5,6 +5,7 @@ "color.picker.json", "frames.fun.json", "history.basic.json", + "layers.duplicate.json", "layers.fun.json", "layers.merge.json", "lighten.darken.json", diff --git a/test/drawing/DrawingTests.casper.js b/test/drawing/DrawingTests.casper.js index 222da583..8603f960 100644 --- a/test/drawing/DrawingTests.casper.js +++ b/test/drawing/DrawingTests.casper.js @@ -4,6 +4,7 @@ "color.picker.json", "frames.fun.json", "history.basic.json", + "layers.duplicate.json", "layers.fun.json", "layers.merge.json", "move.json", diff --git a/test/drawing/tests/layers.duplicate.json b/test/drawing/tests/layers.duplicate.json new file mode 100644 index 00000000..e9c109dc --- /dev/null +++ b/test/drawing/tests/layers.duplicate.json @@ -0,0 +1,207 @@ +{ + "events": [ + { + "event": { + "type": "mousedown", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 0, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mousemove", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 0, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mousemove", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 1, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mousemove", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 2, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mouseup", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 2, + "y": 0 + }, + "type": "mouse-event" + }, + { + "type": "instrumented-event", + "methodName": "duplicateFrameAt", + "args": [ + 0 + ] + }, + { + "type": "color-event", + "color": "#ff0000", + "isPrimary": true + }, + { + "event": { + "type": "mousedown", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 0, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mousemove", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 0, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mousemove", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 1, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mousemove", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 2, + "y": 0 + }, + "type": "mouse-event" + }, + { + "event": { + "type": "mouseup", + "button": 0, + "shiftKey": false, + "altKey": false, + "ctrlKey": false + }, + "coords": { + "x": 2, + "y": 0 + }, + "type": "mouse-event" + }, + { + "type": "instrumented-event", + "methodName": "duplicateCurrentLayer", + "args": [] + }, + { + "type": "transformtool-event", + "toolId": "tool-rotate", + "event": { + "shiftKey": true, + "altKey": false, + "ctrlKey": false + } + }, + { + "type": "instrumented-event", + "methodName": "duplicateCurrentLayer", + "args": [] + }, + { + "type": "transformtool-event", + "toolId": "tool-rotate", + "event": { + "shiftKey": true, + "altKey": false, + "ctrlKey": false + } + }, + { + "type": "keyboard-event", + "event": { + "which": 90, + "shiftKey": false, + "altKey": false, + "ctrlKey": true, + "target": { + "nodeName": "BODY" + } + } + } + ], + "initialState": { + "size": { + "width": 2, + "height": 2 + }, + "primaryColor": "#000000", + "secondaryColor": "rgba(0, 0, 0, 0)", + "selectedTool": "tool-pen", + "penSize": 1 + }, + "png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAAHUlEQVQYV2NkYGD4zwAjGBgYGKFsxv8MDP8ZgXwAURIFAdLn5x4AAAAASUVORK5CYII=" +} \ No newline at end of file