@kineticdata/bundle-queue 6.0.2 → 6.0.3

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.
@@ -2,87 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
4
  var _react = _interopRequireDefault(require("react"));
5
- var _enzyme = require("enzyme");
6
5
  var _bundleCommon = require("@kineticdata/bundle-common");
7
6
  var _QueueItemDetails = require("./QueueItemDetails");
8
- var _ViewOriginalRequest = require("./ViewOriginalRequest");
9
- describe('<QueueItemDetails />', function () {
10
- var props;
11
- beforeEach(function () {
12
- props = {
13
- queueItem: {
14
- id: 'id',
15
- handle: 'handle',
16
- coreState: 'Draft',
17
- values: {
18
- Summary: 'this is the summary'
19
- },
20
- form: {
21
- name: 'test form'
22
- },
23
- children: []
24
- },
25
- isAssigning: false,
26
- toggleAssigning: jest.fn(),
27
- setIsAssigning: jest.fn(),
28
- setAssignment: jest.fn(),
29
- assignments: [],
30
- openNewItemMenu: jest.fn(),
31
- prohibitSubtasks: false,
32
- kappSlug: 'queue'
33
- };
34
- });
35
- test('snapshot', function () {
36
- var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_QueueItemDetails.QueueItemDetails, props));
37
- expect(wrapper).toMatchSnapshot();
38
- });
39
- describe('View Original Item action button', function () {
40
- describe('when there is no parent', function () {
41
- test('it does not render the button', function () {
42
- props.queueItem.parent = null;
43
- props.queueItem.origin = null;
44
- var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_QueueItemDetails.QueueItemDetails, props));
45
- expect(wrapper.find('a.request-button')).toHaveLength(0);
46
- });
47
- });
48
- describe('when the parent form is not a queue form', function () {
49
- test('it renders the button with the appropriate text', function () {
50
- props.queueItem.parent = {
51
- id: 'id1',
52
- form: {
53
- kapp: {
54
- slug: 'services'
55
- }
56
- }
57
- };
58
- props.queueItem.origin = {
59
- id: 'id1'
60
- };
61
- var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_QueueItemDetails.QueueItemDetails, props));
62
- var originButton = wrapper.find(_ViewOriginalRequest.ViewOriginalRequest);
63
- expect(originButton).toHaveLength(1);
64
- expect(originButton.first().prop('queueItem')).toBe(props.queueItem);
65
- });
66
- });
67
- describe('when the parent form is a queue form', function () {
68
- test('it renders the button with the appropriate text', function () {
69
- props.queueItem.parent = {
70
- id: 'id1',
71
- form: {
72
- kapp: {
73
- slug: 'queue'
74
- }
75
- }
76
- };
77
- props.queueItem.origin = {
78
- id: 'id1'
79
- };
80
- var wrapper = (0, _enzyme.shallow)( /*#__PURE__*/_react["default"].createElement(_QueueItemDetails.QueueItemDetails, props));
81
- var originButton = wrapper.find(_bundleCommon.KappLink);
82
- expect(originButton).toHaveLength(1);
83
- expect(originButton.first().prop('children')).toBe('View Parent');
84
- expect(originButton.first().prop('to')).toContain(props.queueItem.parent.id);
85
- });
86
- });
87
- });
88
- });
7
+ var _ViewOriginalRequest = require("./ViewOriginalRequest");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kineticdata/bundle-queue",
3
- "version": "6.0.2",
3
+ "version": "6.0.3",
4
4
  "main": "./lib/index.js",
5
5
  "files": [
6
6
  "assets",
@@ -16,8 +16,8 @@
16
16
  "prepublishOnly": "yarn build"
17
17
  },
18
18
  "dependencies": {
19
- "@kineticdata/bundle-common": "6.0.2",
20
- "@kineticdata/react": "6.0.2",
19
+ "@kineticdata/bundle-common": "6.0.3",
20
+ "@kineticdata/react": "6.0.3",
21
21
  "@reach/router": "https://github.com/kineticdata/router.git",
22
22
  "axios": "^0.21.1",
23
23
  "bootstrap": "^4.3.1",
@@ -54,5 +54,5 @@
54
54
  ]
55
55
  ]
56
56
  },
57
- "gitHead": "68e895f9bb49d039a9c79da64b39a6bbc2243cb2"
57
+ "gitHead": "ed053959bc74a8673ef9f09884f4a6eba83ec317"
58
58
  }