@testim/testim-cli 3.222.0 → 3.223.0

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.
@@ -127,6 +127,7 @@ function reportExecutionStarted({
127
127
  remoteRunId,
128
128
  localRunUserId,
129
129
  isLocalRun,
130
+ intersections,
130
131
  }) {
131
132
  const isCiRun = require('../cli/isCiRun').isCi;
132
133
  return postAuth({
@@ -142,6 +143,7 @@ function reportExecutionStarted({
142
143
  config,
143
144
  resultLabels,
144
145
  remoteRunId,
146
+ intersections,
145
147
  metadata: {
146
148
  isCiRun,
147
149
  localRunUserId,
@@ -167,28 +169,18 @@ function reportExecutionFinished(status, executionId, projectId, success, tmsOpt
167
169
  }), DEFAULT_REQUEST_RETRY);
168
170
  }
169
171
 
170
- async function getTestPlanTestList(projectId, names, planIds, branch, options = {}) {
171
- const intersections = {
172
- intersectWithLabels: options.intersectWithLabels,
173
- intersectWithSuiteNames: options.intersectWithSuiteNames,
174
- intersectWithSuiteIds: options.intersectWithSuiteIds,
175
- };
172
+ async function getTestPlanTestList(projectId, names, planIds, branch, intersections) {
176
173
  return utils.runWithRetries(() => postAuth({
177
174
  url: '/testPlan/list',
178
- body: { projectId, names, planIds, branch, ...intersections },
175
+ body: { projectId, names, planIds, branch, intersections },
179
176
  // people who send insane lists get a timeout :(
180
177
  timeout: 120000,
181
178
  }));
182
179
  }
183
180
 
184
181
  function getSuiteTestList({
185
- projectId, labels, testIds, testNames, testConfigNames, suiteNames, suiteIds, branch, rerunFailedByRunId, testConfigIds, options,
182
+ projectId, labels, testIds, testNames, testConfigNames, suiteNames, suiteIds, branch, rerunFailedByRunId, testConfigIds, intersections,
186
183
  }) {
187
- const intersections = {
188
- intersectWithLabels: options.intersectWithLabels,
189
- intersectWithSuiteNames: options.intersectWithSuiteNames,
190
- intersectWithSuiteIds: options.intersectWithSuiteIds,
191
- };
192
184
  return utils.runWithRetries(() => postAuth({
193
185
  url: '/suite/v2/list',
194
186
  body: {
@@ -202,7 +194,7 @@ function getSuiteTestList({
202
194
  branch,
203
195
  rerunFailedByRunId,
204
196
  testConfigIds,
205
- ...intersections,
197
+ intersections,
206
198
  },
207
199
  }));
208
200
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.222.0",
3
+ "version": "3.223.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@testim/testim-cli",
9
- "version": "3.222.0",
9
+ "version": "3.223.0",
10
10
  "license": "Proprietary",
11
11
  "dependencies": {
12
12
  "@applitools/eyes-sdk-core": "13.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.222.0",
3
+ "version": "3.223.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
package/runOptions.js CHANGED
@@ -1186,9 +1186,11 @@ module.exports = {
1186
1186
  disableSockets: program.disableSockets,
1187
1187
 
1188
1188
  // intersections
1189
- intersectWithLabels: program.intersectWithLabel.length ? [].concat(program.intersectWithLabel) : undefined,
1190
- intersectWithSuiteNames: program.intersectWithSuite.length ? [].concat(program.intersectWithSuite) : undefined,
1191
- intersectWithSuiteIds: program.intersectWithSuiteId.length ? [].concat(program.intersectWithSuiteId) : undefined,
1189
+ intersections: {
1190
+ labels: program.intersectWithLabel.length ? [program.intersectWithLabel].flat() : undefined,
1191
+ suiteNames: program.intersectWithSuite.length ? [program.intersectWithSuite].flat() : undefined,
1192
+ suiteIds: program.intersectWithSuiteId.length ? [program.intersectWithSuiteId].flat() : undefined,
1193
+ },
1192
1194
  });
1193
1195
  },
1194
1196
  };
@@ -230,7 +230,7 @@ class TestPlanRunner {
230
230
  const testPlansTests = {};
231
231
  const projectId = options.project;
232
232
 
233
- const data = await testimServicesApi.getTestPlanTestList(projectId, options.testPlan, options.testPlanIds, branchToUse, options);
233
+ const data = await testimServicesApi.getTestPlanTestList(projectId, options.testPlan, options.testPlanIds, branchToUse, options.intersections);
234
234
  const testPlans = data.testPlans;
235
235
  const testPlansData = data.testPlansData;
236
236
  if (!testPlans || testPlans.length === 0) {
@@ -35,7 +35,7 @@ async function getSuite(options, branchToUse) {
35
35
  branch: branchToUse,
36
36
  rerunFailedByRunId: options.rerunFailedByRunId,
37
37
  testConfigIds: options.testConfigIds,
38
- options,
38
+ intersections: options.intersections,
39
39
  });
40
40
  }
41
41
 
package/testRunStatus.js CHANGED
@@ -397,6 +397,7 @@ RunStatus.prototype.executionStart = function (executionId, projectId, startTime
397
397
  remoteRunId: options.remoteRunId,
398
398
  localRunUserId: options.user,
399
399
  isLocalRun,
400
+ intersections: options.intersections,
400
401
  };
401
402
  const ret = servicesApi.reportExecutionStarted(data);
402
403
  this.executionStartedPromise = ret;