@webex/internal-plugin-conversation 2.60.1-next.9 → 2.60.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.
@@ -154,7 +154,6 @@ describe('plugin-conversation', function () {
154
154
  scr: {
155
155
  loc: makeLocalUrl('/sample-image-small-one.png'),
156
156
  },
157
- url: makeLocalUrl('/sample-image-small-one.png')
158
157
  })
159
158
  .then((f) =>
160
159
  fh.isMatchingFile(f, sampleImageSmallOnePng).then((result) => assert.isTrue(result))
@@ -468,8 +467,7 @@ describe('plugin-conversation', function () {
468
467
  }));
469
468
  });
470
469
 
471
- // SPARK-413317
472
- describe.skip('with conversation from remote clusters', () => {
470
+ describe('with conversation from remote clusters', () => {
473
471
  let conversation3, conversation4;
474
472
 
475
473
  before('create conversations in EU cluster', () =>
@@ -961,7 +959,7 @@ describe('plugin-conversation', function () {
961
959
  .then(({edit}) => {
962
960
  assert.include(edit, parent.id);
963
961
  }));
964
-
962
+
965
963
  it('retrieves parent IDs for reactions', () =>
966
964
  webex.internal.conversation
967
965
  .addReaction(conversation, 'heart', parent)
@@ -34,88 +34,6 @@ describe('plugin-conversation', () => {
34
34
  webex.internal.services.getServiceUrlFromClusterId = sinon.stub().returns(convoUrl);
35
35
  });
36
36
 
37
- describe('addReaction()', () => {
38
- it('should add recipients to the payload if provided', () => {
39
- const {conversation} = webex.internal;
40
- const recipientId = 'example-recipient-id';
41
- const expected = {items: [{id: recipientId, objectType: 'person'}]}
42
- conversation.sendReaction = sinon.stub().returns(Promise.resolve())
43
- conversation.createReactionHmac = sinon.stub().returns(Promise.resolve('hmac'))
44
-
45
- return conversation.addReaction({}, 'example-display-name', {}, recipientId)
46
- .then(() => {
47
- assert.deepEqual(conversation.sendReaction.args[0][1].recipients, expected);
48
- });
49
- });
50
- });
51
-
52
- describe('deleteReaction()', () => {
53
- it('should add recipients to the payload if provided', () => {
54
- const {conversation} = webex.internal;
55
- const recipientId = 'example-recipient-id';
56
- const expected = {items: [{id: recipientId, objectType: 'person'}]}
57
- conversation.sendReaction = sinon.stub().returns(Promise.resolve())
58
-
59
- return conversation.deleteReaction({}, 'example-reaction-id', recipientId)
60
- .then(() => {
61
- assert.deepEqual(conversation.sendReaction.args[0][1].recipients, expected);
62
- });
63
- });
64
- });
65
-
66
- describe('prepare()', () => {
67
- it('should ammend activity recipients to the returned object', () => {
68
- const {conversation} = webex.internal;
69
- const activity = { recipients: 'example-recipients' };
70
-
71
- return conversation.prepare(activity)
72
- .then((results) => {
73
- assert.deepEqual(results.recipients, activity.recipients);
74
- });
75
- });
76
- });
77
-
78
- describe('addReaction()', () => {
79
- it('should add recipients to the payload if provided', () => {
80
- const {conversation} = webex.internal;
81
- const recipientId = 'example-recipient-id';
82
- const expected = {items: [{id: recipientId, objectType: 'person'}]}
83
- conversation.sendReaction = sinon.stub().returns(Promise.resolve())
84
- conversation.createReactionHmac = sinon.stub().returns(Promise.resolve('hmac'))
85
-
86
- return conversation.addReaction({}, 'example-display-name', {}, recipientId)
87
- .then(() => {
88
- assert.deepEqual(conversation.sendReaction.args[0][1].recipients, expected);
89
- });
90
- });
91
- });
92
-
93
- describe('deleteReaction()', () => {
94
- it('should add recipients to the payload if provided', () => {
95
- const {conversation} = webex.internal;
96
- const recipientId = 'example-recipient-id';
97
- const expected = {items: [{id: recipientId, objectType: 'person'}]}
98
- conversation.sendReaction = sinon.stub().returns(Promise.resolve())
99
-
100
- return conversation.deleteReaction({}, 'example-reaction-id', recipientId)
101
- .then(() => {
102
- assert.deepEqual(conversation.sendReaction.args[0][1].recipients, expected);
103
- });
104
- });
105
- });
106
-
107
- describe('prepare()', () => {
108
- it('should ammend activity recipients to the returned object', () => {
109
- const {conversation} = webex.internal;
110
- const activity = { recipients: 'example-recipients' };
111
-
112
- return conversation.prepare(activity)
113
- .then((results) => {
114
- assert.deepEqual(results.recipients, activity.recipients);
115
- });
116
- });
117
- });
118
-
119
37
  describe('processInmeetingchatEvent()', () => {
120
38
  beforeEach(() => {
121
39
  webex.transform = sinon.stub().callsFake((obj) => Promise.resolve(obj));
@@ -36,29 +36,6 @@ describe('plugin-conversation', () => {
36
36
  });
37
37
  });
38
38
 
39
- it('does not transform when object type is "policies" for a "meetingContainer" activity', async () => {
40
- const transform = transforms.find((t) => t.name === 'encryptActivity');
41
- const transformStub = sinon.stub().resolves();
42
-
43
- const ctx = {
44
- transform: transformStub,
45
- };
46
- const key = null;
47
- const activity = {
48
- object: {
49
- objectType: 'policies',
50
- },
51
- objectType: 'activity',
52
- target: {
53
- objectType: 'meetingContainer',
54
- },
55
- verb: 'update',
56
- };
57
-
58
- const results = await transform.fn(ctx, key, activity);
59
- assert.equal(results, undefined);
60
- });
61
-
62
39
  it('does transfom when created is not True', async () => {
63
40
  const transform = transforms.find((t) => t.name === 'encryptActivity');
64
41
  const transformStub = sinon.stub().resolves();