@testomatio/reporter 2.1.0-beta.3-filter-plan → 2.1.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.
package/lib/bin/cli.js CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -74,8 +74,11 @@ function parseFilterParams(opts) {
74
74
  * Returns undefined if the type is not valid.
75
75
  */
76
76
  function updateFilterType(type) {
77
- const typeLowerCase = type.toLowerCase();
78
- const filterTypes = ['tag-name', 'plan-id', 'label', 'jira-ticket'];
77
+ let typeLowerCase = type.toLowerCase();
78
+ const filterTypes = ['tag-name', 'plan', 'label', 'jira-ticket'];
79
+ if (typeLowerCase === 'plan-id') {
80
+ typeLowerCase = 'plan';
81
+ }
79
82
  const filterApi = [
80
83
  'tag',
81
84
  'plan',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "2.1.0-beta.3-filter-plan",
3
+ "version": "2.1.0",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "engines": {
6
6
  "node": ">=18"
package/src/bin/cli.js CHANGED
File without changes
File without changes
@@ -119,7 +119,8 @@ class TestomatioPipe {
119
119
  const resp = await this.client.request({
120
120
  method: 'GET',
121
121
  url: '/api/test_grep',
122
- params: q
122
+ params: q.params,
123
+ responseType: q.responseType
123
124
  });
124
125
 
125
126
  if (Array.isArray(resp.data?.tests) && resp.data?.tests?.length > 0) {
@@ -69,9 +69,13 @@ function parseFilterParams(opts) {
69
69
  * Returns undefined if the type is not valid.
70
70
  */
71
71
  function updateFilterType(type) {
72
- const typeLowerCase = type.toLowerCase();
72
+ let typeLowerCase = type.toLowerCase();
73
73
 
74
- const filterTypes = ['tag-name', 'plan-id', 'label', 'jira-ticket'];
74
+ const filterTypes = ['tag-name', 'plan', 'label', 'jira-ticket'];
75
+
76
+ if (typeLowerCase === 'plan-id') {
77
+ typeLowerCase = 'plan';
78
+ }
75
79
 
76
80
  const filterApi = [
77
81
  'tag',
@@ -1,21 +0,0 @@
1
- // const _reporter = require('../lib/reporter.js');
2
-
3
-
4
- // /**
5
- // * @typedef {import('../lib/reporter-functions.js').saveArtifact} artifact
6
- // * @typedef {import('../lib/reporter-functions.js').log} log
7
- // * @typedef {import('../lib/reporter-functions.js').logger} logger
8
- // * @typedef {import('../lib/reporter-functions.js')} meta
9
- // * @typedef {import('../lib/reporter-functions.js')} step
10
- // *
11
- // * "Reporter" type which is object containing all types from the above
12
- // * @typedef {{artifact: artifact, log: log, logger: logger, meta: meta, step: step, }} Reporter
13
- // */
14
-
15
- // // const reporter = _reporter;
16
-
17
- // /**
18
- // * @type {Reporter}
19
- // */
20
- // const reporter = _reporter;
21
- // module.exports = reporter;