@pie-element/hotspot 7.9.10-next.12 → 7.9.10-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot",
3
- "version": "7.9.10-next.12+9f80f957f",
3
+ "version": "7.9.10-next.2+036cb25b0",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "author": "pie framework developers",
20
20
  "license": "ISC",
21
- "gitHead": "9f80f957fbd75495babbc70ecc4b775422aa1a25",
21
+ "gitHead": "036cb25b08006ce6cbb09b50102d0c807996c6fc",
22
22
  "scripts": {
23
23
  "postpublish": "../../scripts/postpublish"
24
24
  },
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
+ import _ from 'lodash';
2
3
  import { shallow } from 'enzyme';
3
4
  import toJson from 'enzyme-to-json';
4
5
  import Konva from 'konva';
5
6
 
6
7
  import { shallowChild } from '@pie-lib/pie-toolbox/test-utils';
7
- import { CorrectAnswerToggle } from '@pie-lib/pie-toolbox/correct-answer-toggle';
8
+ import {CorrectAnswerToggle} from '@pie-lib/pie-toolbox/correct-answer-toggle';
8
9
 
9
10
  import Container, { Container as ContainerComp } from '../hotspot/container';
10
11
  import HotspotComponent from '../hotspot/index';
@@ -128,22 +129,28 @@ describe('Container', () => {
128
129
  let onSelectChoice, wrapper;
129
130
 
130
131
  const mkWrapper = (opts = {}) => {
131
- opts =
132
- {
133
- classes: { base: 'base' },
134
- dimensions: { height: 0, width: 0, },
135
- disabled: false,
136
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
137
- imageUrl: '',
138
- isEvaluateMode: false,
139
- outlineColor: 'blue',
140
- session: { answers: [] },
141
- shapes: {
142
- rectangles: [],
143
- polygons: [],
132
+ opts = _.extend(
133
+ {
134
+ classes: {
135
+ base: 'base',
136
+ },
137
+ dimensions: {
138
+ height: 0,
139
+ width: 0,
140
+ },
141
+ disabled: false,
142
+ hotspotColor: 'rgba(137, 183, 244, 0.65)',
143
+ imageUrl: '',
144
+ isEvaluateMode: false,
145
+ outlineColor: 'blue',
146
+ session: { answers: [] },
147
+ shapes: {
148
+ rectangles: [],
149
+ polygons: [],
150
+ },
144
151
  },
145
- ...opts,
146
- }
152
+ opts,
153
+ );
147
154
 
148
155
  return shallow(<Container {...opts} onSelectChoice={onSelectChoice} />);
149
156
  };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import _ from 'lodash';
2
3
  import { shallow } from 'enzyme';
3
4
  import toJson from 'enzyme-to-json';
4
5
  import Konva from 'konva';
@@ -16,24 +17,28 @@ describe('Polygon', () => {
16
17
  let onClick, wrapper;
17
18
 
18
19
  const mkWrapper = (opts = {}) => {
19
- opts = {
20
- classes: { base: 'base' },
21
- height: 200,
22
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
23
- id: '1',
24
- isCorrect: false,
25
- isEvaluateMode: false,
26
- evaluateText: null,
27
- disabled: false,
28
- outlineColor: 'blue',
29
- selected: false,
30
- points: [
31
- { x: 94, y: 4 },
32
- { x: 89, y: 4 },
33
- { x: 36, y: 40 },
34
- ],
35
- ...opts,
36
- };
20
+ opts = _.extend(
21
+ {
22
+ classes: {
23
+ base: 'base',
24
+ },
25
+ height: 200,
26
+ hotspotColor: 'rgba(137, 183, 244, 0.65)',
27
+ id: '1',
28
+ isCorrect: false,
29
+ isEvaluateMode: false,
30
+ evaluateText: null,
31
+ disabled: false,
32
+ outlineColor: 'blue',
33
+ selected: false,
34
+ points: [
35
+ { x: 94, y: 4 },
36
+ { x: 89, y: 4 },
37
+ { x: 36, y: 40 },
38
+ ],
39
+ },
40
+ opts,
41
+ );
37
42
 
38
43
  return shallow(<Polygon {...opts} onClick={onClick} />);
39
44
  };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import _ from 'lodash';
2
3
  import { shallow } from 'enzyme';
3
4
  import toJson from 'enzyme-to-json';
4
5
  import Konva from 'konva';
@@ -22,22 +23,26 @@ describe('Rectangle', () => {
22
23
  let onClick, wrapper;
23
24
 
24
25
  const mkWrapper = (opts = {}) => {
25
- opts = {
26
- classes: { base: 'base' },
27
- height: 200,
28
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
29
- id: '1',
30
- isCorrect: false,
31
- isEvaluateMode: false,
32
- evaluateText: null,
33
- disabled: false,
34
- outlineColor: 'blue',
35
- selected: false,
36
- width: 300,
37
- x: 5,
38
- y: 5,
39
- ...opts,
40
- };
26
+ opts = _.extend(
27
+ {
28
+ classes: {
29
+ base: 'base',
30
+ },
31
+ height: 200,
32
+ hotspotColor: 'rgba(137, 183, 244, 0.65)',
33
+ id: '1',
34
+ isCorrect: false,
35
+ isEvaluateMode: false,
36
+ evaluateText: null,
37
+ disabled: false,
38
+ outlineColor: 'blue',
39
+ selected: false,
40
+ width: 300,
41
+ x: 5,
42
+ y: 5,
43
+ },
44
+ opts,
45
+ );
41
46
 
42
47
  return shallow(<Rectangle {...opts} onClick={onClick} />);
43
48
  };