123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- // Jest Snapshot v1, https://goo.gl/fbAQLP
-
- exports[`selection creates a code control: generated code controls from code 1`] = `
- Object {
- "test-number-control": Object {
- "id": "test-number-control",
- "label": "x",
- "step": 1,
- "type": "number",
- "value": 0,
- },
- }
- `;
-
- exports[`selection generates a draw shape: generated draw from code 1`] = `
- Array [
- Object {
- "childIndex": 1,
- "id": "test-draw",
- "isGenerated": true,
- "name": "Test draw",
- "parentId": "page1",
- "point": Array [
- 0,
- 0,
- ],
- "points": Array [
- Array [
- 100,
- 100,
- ],
- Array [
- 200,
- 200,
- ],
- Array [
- 300,
- 300,
- ],
- ],
- "rotation": 0,
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Medium",
- },
- "type": "draw",
- },
- ]
- `;
-
- exports[`selection generates a rectangle shape: generated rectangle from code 1`] = `
- Array [
- Object {
- "childIndex": 1,
- "id": "test-rectangle",
- "isGenerated": true,
- "name": "Test Rectangle",
- "parentId": "page1",
- "point": Array [
- 100,
- 100,
- ],
- "radius": 2,
- "rotation": 0,
- "size": Array [
- 200,
- 200,
- ],
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Medium",
- },
- "type": "rectangle",
- },
- ]
- `;
-
- exports[`selection generates a text shape: generated draw from code 1`] = `
- Array [
- Object {
- "childIndex": 1,
- "id": "test-text",
- "isGenerated": true,
- "name": "Test text",
- "parentId": "page1",
- "point": Array [
- 100,
- 100,
- ],
- "rotation": 0,
- "scale": 1,
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Large",
- },
- "text": "Hello world!",
- "type": "text",
- },
- ]
- `;
-
- exports[`selection generates an arrow shape: generated draw from code 1`] = `
- Array [
- Object {
- "bend": 0,
- "childIndex": 1,
- "decorations": Object {
- "end": "Arrow",
- "middle": null,
- "start": null,
- },
- "handles": Object {
- "bend": Object {
- "id": "bend",
- "index": 2,
- "point": Array [
- 50,
- 50,
- ],
- },
- "end": Object {
- "id": "end",
- "index": 1,
- "point": Array [
- 100,
- 100,
- ],
- },
- "start": Object {
- "id": "start",
- "index": 0,
- "point": Array [
- 0,
- 0,
- ],
- },
- },
- "id": "test-draw",
- "isGenerated": true,
- "name": "Test draw",
- "parentId": "page1",
- "point": Array [
- 0,
- 0,
- ],
- "points": Array [
- Array [
- 100,
- 100,
- ],
- Array [
- 200,
- 200,
- ],
- Array [
- 300,
- 300,
- ],
- ],
- "rotation": 0,
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Medium",
- },
- "type": "arrow",
- },
- ]
- `;
-
- exports[`selection generates an ellipse shape: generated ellipse from code 1`] = `
- Array [
- Object {
- "childIndex": 1,
- "id": "test-ellipse",
- "isGenerated": true,
- "name": "Test ellipse",
- "parentId": "page1",
- "point": Array [
- 100,
- 100,
- ],
- "radiusX": 100,
- "radiusY": 200,
- "rotation": 0,
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Medium",
- },
- "type": "ellipse",
- },
- ]
- `;
-
- exports[`selection generates shapes: generated rectangle from code 1`] = `
- Array [
- Object {
- "childIndex": 1,
- "id": "test-rectangle",
- "isGenerated": true,
- "name": "Test Rectangle",
- "parentId": "page1",
- "point": Array [
- 100,
- 100,
- ],
- "radius": 2,
- "rotation": 0,
- "size": Array [
- 200,
- 200,
- ],
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Medium",
- },
- "type": "rectangle",
- },
- ]
- `;
-
- exports[`selection updates a code control: data in state after changing control 1`] = `
- Object {
- "test-number-control": Object {
- "id": "test-number-control",
- "label": "x",
- "step": 1,
- "type": "number",
- "value": 100,
- },
- "test-vector-control": Object {
- "id": "test-vector-control",
- "isNormalized": false,
- "label": "size",
- "type": "vector",
- "value": Array [
- 0,
- 0,
- ],
- },
- }
- `;
-
- exports[`selection updates a code control: rectangle in state after changing code control 1`] = `
- Object {
- "childIndex": 1,
- "id": "test-rectangle",
- "isGenerated": true,
- "name": "Test Rectangle",
- "parentId": "page1",
- "point": Array [
- 0,
- 100,
- ],
- "radius": 2,
- "rotation": 0,
- "size": Array [
- 0,
- 0,
- ],
- "style": Object {
- "color": "Red",
- "dash": "Dotted",
- "isFilled": false,
- "size": "Medium",
- },
- "type": "rectangle",
- }
- `;
|