@testomatio/reporter 0.7.0-beta.4 → 0.7.0-beta.6

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.
Files changed (61) hide show
  1. package/Changelog.md +1 -0
  2. package/README.md +16 -7
  3. package/lib/adapter/codecept.js +1 -1
  4. package/lib/adapter/cucumber/current.js +13 -15
  5. package/lib/adapter/cucumber.js +10 -10
  6. package/lib/adapter/cypress-plugin/index.js +4 -1
  7. package/lib/adapter/mocha.js +1 -0
  8. package/lib/adapter/webdriver.js +1 -0
  9. package/lib/junit-adapter/csharp.js +18 -0
  10. package/lib/xmlReader.js +71 -2
  11. package/package.json +10 -8
  12. package/testcafe/package-lock.json +51 -0
  13. package/.eslintrc.js +0 -35
  14. package/.github/workflows/node.js.yml +0 -30
  15. package/.prettierrc.js +0 -12
  16. package/example/codecept/codecept.conf.js +0 -29
  17. package/example/codecept/index_test.js +0 -10
  18. package/example/codecept/jsconfig.json +0 -5
  19. package/example/codecept/sample_test.js +0 -6
  20. package/example/codecept/steps.d.ts +0 -16
  21. package/example/codecept/steps_file.js +0 -10
  22. package/example/core/index.js +0 -15
  23. package/example/jest/index.test.js +0 -9
  24. package/example/jest/jest.config.js +0 -188
  25. package/example/jest/package.json +0 -13
  26. package/example/jest/sample.test.js +0 -13
  27. package/example/jest/yarn.lock +0 -8
  28. package/example/mocha/test/index.test.js +0 -13
  29. package/tests/adapter/config/index.js +0 -10
  30. package/tests/adapter/examples/codecept/codecept.conf.js +0 -33
  31. package/tests/adapter/examples/codecept/index_test.js +0 -11
  32. package/tests/adapter/examples/codecept/jsconfig.json +0 -5
  33. package/tests/adapter/examples/codecept/output/Test_for_suite_2_@Tc2171bd2.failed.png +0 -0
  34. package/tests/adapter/examples/codecept/output/Test_issue_for_suite_1_@Tca70c8c4.failed.png +0 -0
  35. package/tests/adapter/examples/codecept/sample_test.js +0 -7
  36. package/tests/adapter/examples/codecept/steps_file.js +0 -10
  37. package/tests/adapter/examples/cucumber/cucumber.js +0 -4
  38. package/tests/adapter/examples/cucumber/features/dummy.feature +0 -9
  39. package/tests/adapter/examples/cucumber/features/steps/steps.js +0 -9
  40. package/tests/adapter/examples/jasmine/index.test.js +0 -11
  41. package/tests/adapter/examples/jasmine/passReporterOpts.sh +0 -8
  42. package/tests/adapter/examples/jest/index.test.js +0 -11
  43. package/tests/adapter/examples/jest/jest.config.js +0 -4
  44. package/tests/adapter/examples/mocha/index.test.js +0 -13
  45. package/tests/adapter/examples/mocha/mocha.config.js +0 -4
  46. package/tests/adapter/index.test.js +0 -142
  47. package/tests/adapter/utils/index.js +0 -40
  48. package/tests/data/artifacts/failed_test.png +0 -0
  49. package/tests/data/artifacts/screenshot1.png +0 -0
  50. package/tests/data/cli/RunCest.php +0 -1024
  51. package/tests/data/cli/SnapshotCest.php +0 -97
  52. package/tests/data/codecept.xml +0 -150
  53. package/tests/data/codecept2.xml +0 -25
  54. package/tests/data/java.xml +0 -25
  55. package/tests/data/junit1.xml +0 -70
  56. package/tests/data/minitest.xml +0 -25
  57. package/tests/data/phpunit.xml +0 -65
  58. package/tests/data/pytest.xml +0 -13
  59. package/tests/data/src/services/search_service_test.rb +0 -146
  60. package/tests/util_test.js +0 -51
  61. package/tests/xmlReader_test.js +0 -232
package/Changelog.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # 0.7.0
2
2
 
3
3
  * Support for `@cucumber/cucumber` (>= 7.0) added
4
+ * Initial support for C# and NUnit
4
5
 
5
6
  # 0.6.10
6
7
 
package/README.md CHANGED
@@ -224,6 +224,7 @@ Tested Frameworks:
224
224
  * Python (Pytest)
225
225
  * Minitest (Ruby)
226
226
  * PHPUnit (PHP)
227
+ * NUnit (C#)
227
228
 
228
229
 
229
230
  To import JUnit reports into Testomat.io **NodeJS >=14 is required**.
@@ -231,14 +232,9 @@ To import JUnit reports into Testomat.io **NodeJS >=14 is required**.
231
232
  Package `@testomatio/reporter` should be installed:
232
233
 
233
234
  ```
234
- npm i @testomatio/reporter@latest
235
+ npm i @testomatio/reporter@latest --save-dev
235
236
  ```
236
237
 
237
- For local development it is recommended to install @testomatio/reporter globally:
238
-
239
- ```
240
- npm i -g @testomatio/reporter@latest
241
- ```
242
238
 
243
239
  Run your test framework and generate a JUnit report.
244
240
 
@@ -249,7 +245,12 @@ TESTOMATIO={API_KEY} npx report-xml "{pattern}" --lang={lang}
249
245
  ```
250
246
 
251
247
  * `pattern` - is a glob pattern to match all XML files from report. For instance, `"test/report/**.xml"` or just `report.xml`
252
- * `--lang` option can be specified to identify source code of the project. Example: `--lang=Ruby` or `--lang=Java` or `--lang=Python`.
248
+ * `--lang` option can be specified to identify source code of the project. Example: `--lang=Ruby` or `--lang=Java` or `--lang=Python`. Possible values:
249
+ * `c#`
250
+ * `java`
251
+ * `ruby`
252
+ * `python`
253
+ * `php`
253
254
  * `--java-tests` option is avaiable for Java projects, and can be set if path to tests is different then `src/test/java`. When this option is enable, `lang` option is automatically set to `java`
254
255
  * `--env-file <envfile>` option to load environment variables from .env file. Inside env file TESTOMATIO credentials like `TESTOMATIO` api key or [S3 config](#attaching-test-artifacts) can be stored.
255
256
 
@@ -288,6 +289,14 @@ TESTOMATIO={API_KEY} npx report-xml "target/surefire-reports/*.xml" --java-tests
288
289
 
289
290
  > You can specify `--java-test` option to set a path to tests if they are located in path other than `src/test/java`
290
291
 
292
+ #### Example: NUnit
293
+
294
+ Generate NUnit XML report and run the following code:
295
+
296
+ ```
297
+ TESTOMATIO={API_KEY} npx report-xml "report.xml" --lang="c#"
298
+ ```
299
+
291
300
  #### Example: Ruby on Rails with Minitest
292
301
 
293
302
  ```ruby
@@ -1,5 +1,5 @@
1
1
  if (!global.codeceptjs) {
2
- // eslint-disable-next-line global-require
2
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
3
3
  global.codeceptjs = require('codeceptjs');
4
4
  }
5
5
 
@@ -1,11 +1,11 @@
1
- const { Formatter, Status, formatterHelpers } = require("@cucumber/cucumber");
1
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
2
+ const { Formatter, formatterHelpers } = require("@cucumber/cucumber");
2
3
  const chalk = require('chalk');
3
4
  const fs = require('fs');
4
5
  const { TestomatClient, TRConstants } = require('../../reporter');
5
- const { parseTest } = require('../../util');
6
- const { formatLocation, GherkinDocumentParser, PickleParser } = formatterHelpers
6
+
7
+ const { GherkinDocumentParser, PickleParser } = formatterHelpers
7
8
  const {
8
- getGherkinScenarioMap,
9
9
  getGherkinScenarioLocationMap,
10
10
  getGherkinStepMap,
11
11
  } = GherkinDocumentParser
@@ -37,7 +37,6 @@ class CucumberReporter extends Formatter {
37
37
 
38
38
  onTestCaseFinished(testCaseFinished) {
39
39
  const testCaseAttempt = this.eventDataCollector.getTestCaseAttempt(testCaseFinished.testCaseStartedId);
40
- const statuses = [...new Set(Object.values(testCaseAttempt.stepResults || {}).map(r => r.status))]
41
40
 
42
41
  let example;
43
42
  let status = TRConstants.PASSED;
@@ -83,9 +82,7 @@ class CucumberReporter extends Formatter {
83
82
 
84
83
  const time = Object.values(testCaseAttempt.stepResults)
85
84
  .map(t => t.duration)
86
- .reduce((sum, duration) => {
87
- return sum + (duration.seconds * 1000) + (duration.nanos / 1000000)
88
- }, 0)
85
+ .reduce((sum, duration) => sum + (duration.seconds * 1000) + (duration.nanos / 1000000), 0)
89
86
 
90
87
  if (!this.client) return;
91
88
 
@@ -93,7 +90,7 @@ class CucumberReporter extends Formatter {
93
90
  // error: testCaseAttempt.worstTestStepResult.message,
94
91
  message,
95
92
  steps: getSteps(testCaseAttempt).map(s => s.toString()).join('\n').trim(),
96
- example: Object.assign({}, example),
93
+ example: { ...example},
97
94
  title: scenario,
98
95
  time,
99
96
  });
@@ -124,8 +121,9 @@ class CucumberReporter extends Formatter {
124
121
  const { testRunFinished } = envelope;
125
122
 
126
123
  const bgColor = testRunFinished.success ? 'bgGreen' : 'bgRed';
124
+ const prefixSummary = `${chalk.bold(testRunFinished.success ? ' SUCCESS ' : ' FALIURE ')}`;
127
125
  console.log();
128
- console.log(chalk[bgColor](chalk.bold(testRunFinished.success ? ' SUCCESS ' : ' FALIURE ') + `| Total Scenarios: ${chalk.bold(this.cases.length)} `));
126
+ console.log(chalk[bgColor](` ${prefixSummary} | Total Scenarios: ${chalk.bold(this.cases.length)} `));
129
127
 
130
128
  if (!this.client) return;
131
129
 
@@ -137,7 +135,7 @@ function getSteps(tc) {
137
135
  const stepIds = Object.keys(tc.stepResults);
138
136
  const pickleSteps = getPickleStepMap(tc.pickle)
139
137
  return stepIds.map(stepId => {
140
- const ts = tc.testCase.testSteps.find(ts => ts.id === stepId);
138
+ const ts = tc.testCase.testSteps.find(t => t.id === stepId);
141
139
  if (!ts) return;
142
140
  if (!ts.pickleStepId) return;
143
141
  const result = tc.stepResults[stepId];
@@ -152,12 +150,12 @@ function getSteps(tc) {
152
150
  if (sourceStepId && getGherkinStepMap(tc.gherkinDocument)[sourceStepId]) {
153
151
  step.keyword = getGherkinStepMap(tc.gherkinDocument)[sourceStepId].keyword;
154
152
  }
155
- step.toString = function() {
153
+ step.toString = () => {
156
154
  const duration = step.duration.seconds * 1000 + (step.duration.nanos / 1000000)
157
- const durationString = ' ' + chalk.gray(`(${Number(duration).toFixed(2)}ms)`);
155
+ const durationString = ` ${ chalk.gray(`(${Number(duration).toFixed(2)}ms)`)}`;
158
156
  const stepString = `${chalk.bold(this.keyword)}${this.text}`.trim();
159
- if (color == 'red') return chalk.red(stepString) + durationString;
160
- if (color == 'yellow') return chalk.yellow(stepString) + durationString;
157
+ if (color === 'red') return chalk.red(stepString) + durationString;
158
+ if (color === 'yellow') return chalk.yellow(stepString) + durationString;
161
159
  return stepString + durationString;
162
160
  }
163
161
  return step;
@@ -1,16 +1,16 @@
1
- // eslint-disable-next-line import/no-unresolved
2
1
  try {
3
- let paths = require.resolve.paths('@cucumber/cucumber')
4
- paths = paths.filter(p => p.startsWith(process.cwd()))
5
- console.log(paths) // we need only local cucumber
6
- require.resolve("@cucumber/cucumber", { paths });
2
+ // eslint-disable-next-line import/no-unresolved
3
+ require.resolve("@cucumber/cucumber");
4
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
7
5
  module.exports = require('./cucumber/current');
8
- } catch (err) {
9
- require.resolve('cucumber');
10
- module.exports = require('./cucumber/legacy');
6
+ } catch (_e) {
11
7
  try {
12
- } catch (err) {
13
- console.error('Cucumber was not detected. Report won\'t be sent', err);
8
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
9
+ require.resolve('cucumber');
10
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
11
+ module.exports = require('./cucumber/legacy');
12
+ } catch (_err) {
13
+ console.error('Cucumber packages: "@cucumber/cucumber" or "cucumber" were not detected. Report won\'t be sent');
14
14
  module.exports = {}
15
15
  }
16
16
  }
@@ -55,11 +55,14 @@ const testomatioReporter = on => {
55
55
 
56
56
  const files = [...videos, ...screenshots];
57
57
 
58
+ let state;
58
59
  switch (test.state) {
59
60
  case 'passed': state = TRConstants.PASSED; break;
60
61
  case 'failed': state = TRConstants.FAILED; break;
61
62
  case 'skipped':
62
- case 'pending': state = TRConstants.SKIPPED;
63
+ case 'pending':
64
+ default:
65
+ state = TRConstants.SKIPPED;
63
66
  }
64
67
 
65
68
  addSpecTestsPromises.push(client.addTestRun(testId, state, {
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
1
2
  const Mocha = require('mocha');
2
3
  const TestomatClient = require('../client');
3
4
  const TRConstants = require('../constants');
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line global-require, import/no-extraneous-dependencies
1
2
  const WDIOReporter = require('@wdio/reporter').default;
2
3
  const TestomatClient = require('../client');
3
4
  const { parseTest } = require('../util');
@@ -0,0 +1,18 @@
1
+ const Adapter = require('./adapter');
2
+
3
+ class CSharpAdapter extends Adapter {
4
+
5
+ formatTest(t) {
6
+ const title = t.title.replace(/\(.*?\)/, '').trim();
7
+ const example = t.title.match(/\((.*?)\)/);
8
+ if (example) t.example = { ...example[1].split(',')};
9
+ const suite = t.suite_title.split('.')
10
+ t.suite_title = suite.pop();
11
+ t.file = suite.join('/');
12
+ t.title = title.trim();
13
+ return t;
14
+ }
15
+ }
16
+
17
+
18
+ module.exports = CSharpAdapter;
package/lib/xmlReader.js CHANGED
@@ -5,7 +5,7 @@ const fs = require("fs");
5
5
 
6
6
  // const util = require("util"); // you can see a result
7
7
  const { XMLParser } = require("fast-xml-parser");
8
- const { APP_PREFIX } = require('./constants');
8
+ const { APP_PREFIX, PASSED, FAILED, SKIPPED } = require('./constants');
9
9
  const { isValidUrl, fetchFilesFromStackTrace, fetchSourceCode, fetchSourceCodeFromStackTrace } = require('./util');
10
10
  const upload = require('./fileUploader');
11
11
  const Adapter = require('./junit-adapter/adapter');
@@ -13,6 +13,7 @@ const JavaScriptAdapter = require('./junit-adapter/javascript');
13
13
  const JavaAdapter = require('./junit-adapter/java');
14
14
  const PythonAdapter = require('./junit-adapter/python');
15
15
  const RubyAdapter = require('./junit-adapter/ruby');
16
+ const CSharpAdapter = require('./junit-adapter/csharp');
16
17
 
17
18
  const TESTOMATIO_URL = process.env.TESTOMATIO_URL || "https://app.testomat.io";
18
19
  const TESTOMATIO = process.env.TESTOMATIO; // key?
@@ -62,21 +63,32 @@ class XmlReader {
62
63
  if (this.stats.language === 'ruby') {
63
64
  this.adapter = new RubyAdapter(this.opts);
64
65
  }
66
+ if (this.stats.language === 'c#' || this.stats.language === 'csharp') {
67
+ this.adapter = new CSharpAdapter(this.opts);
68
+ }
65
69
  }
66
70
 
67
71
  parse(fileName) {
68
72
  const xmlData = fs.readFileSync(path.resolve(fileName));
69
73
  const jsonResult = this.parser.parse(xmlData);
70
74
  let jsonSuite;
71
-
75
+
72
76
  if (jsonResult.testsuites) {
73
77
  jsonSuite = jsonResult.testsuites;
74
78
  } else if (jsonResult.testsuite) {
75
79
  jsonSuite = jsonResult;
80
+ } else if (jsonResult.TestRun) {
81
+
82
+ return this.processNUnit(jsonResult);
76
83
  } else {
77
84
  console.log(jsonResult)
78
85
  throw new Error("Format can't be parsed")
79
86
  }
87
+
88
+ return this.processJUnit(jsonSuite);
89
+ }
90
+
91
+ processJUnit(jsonSuite) {
80
92
  const { testsuite, name, tests, failures, errors } = jsonSuite;
81
93
 
82
94
  reduceOptions.preferClassname = this.stats.language === 'python';
@@ -99,6 +111,62 @@ class XmlReader {
99
111
  };
100
112
  }
101
113
 
114
+ processNUnit(jsonSuite) {
115
+ const tests = jsonSuite?.TestRun?.TestDefinitions?.UnitTest?.map(td => {
116
+ const title = td.name.replace(/\(.*?\)/, '').trim();
117
+ let example = td.name.match(/\((.*?)\)/);
118
+ if (example) example = { ...example[1].split(',')};
119
+ const suite = td.TestMethod.className.split('.');
120
+ const suite_title = suite.pop();
121
+ return {
122
+ title,
123
+ example,
124
+ file: suite.join('/'),
125
+ suite_title,
126
+ id: td.Execution.id,
127
+ }
128
+ }) || [];
129
+
130
+ const results = jsonSuite?.TestRun?.Results?.UnitTestResult?.map(td => ({
131
+ id: td.executionId,
132
+ run_time: td.duration,
133
+ status: td.outcome,
134
+ stack: td.Output.StdOut
135
+ }));
136
+
137
+ results.forEach(r => {
138
+ const test = tests.find(t => t.id === r.id) || {};
139
+ r.suite_title = test.suite_title;
140
+ r.title = test.title?.trim();
141
+ if (test.example) r.example = test.example;
142
+ if (test.file) r.file = test.file;
143
+ r.create = true;
144
+ if (r.status === 'Passed') r.status = PASSED;
145
+ if (r.status === 'Failed') r.status = FAILED;
146
+ if (r.status === 'Skipped') r.status = SKIPPED;
147
+ delete r.id;
148
+ });
149
+
150
+ const counters = jsonSuite?.TestRun?.ResultSummary?.Counters || {};
151
+
152
+ const failed_count = parseInt(counters.failed, 10) + parseInt(counters.error, 10);
153
+
154
+ let status = PASSED;
155
+ if (failed_count > 0) status = FAILED;
156
+
157
+ this.tests = results;
158
+
159
+ return {
160
+ status,
161
+ create_tests: true,
162
+ tests_count: parseInt(counters.total, 10),
163
+ passed_count: parseInt(counters.passed, 10),
164
+ skipped_count: parseInt(counters.notExecuted, 10),
165
+ failed_count,
166
+ tests: results,
167
+ };
168
+ }
169
+
102
170
  calculateStats() {
103
171
  this.stats = {
104
172
  ...this.stats,
@@ -163,6 +231,7 @@ class XmlReader {
163
231
  // remove standard prefixes
164
232
  .replace(/^test\s/, '')
165
233
  .replace(/^should\s/, '')
234
+ .trim();
166
235
  });
167
236
  }
168
237
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "0.7.0-beta.4",
3
+ "version": "0.7.0-beta.6",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "repository": "git@github.com:testomatio/reporter.git",
7
- "author": "Koushik Mohan <koushikmohan1996@gmail.com>",
7
+ "author": "Michael Bodnarchuk <davert@testomat.io>,Koushik Mohan <koushikmohan1996@gmail.com>",
8
8
  "license": "MIT",
9
9
  "dependencies": {
10
10
  "aws-sdk": "^2.1072.0",
@@ -20,24 +20,26 @@
20
20
  "json-cycle": "^1.3.0",
21
21
  "lodash.memoize": "^4.1.2"
22
22
  },
23
+ "files": [
24
+ "bin",
25
+ "lib",
26
+ "testcafe"
27
+ ],
23
28
  "scripts": {
24
29
  "pretty": "prettier --write .",
25
30
  "lint": "eslint lib",
26
31
  "lint:fix": "eslint lib --fix",
27
32
  "test": "mocha tests/**",
33
+ "init": "cd ./tests/adapter/examples/cucumber && npm i",
28
34
  "test:unit": "mocha tests",
29
35
  "test:adapter": "mocha './tests/adapter/index.test.js'",
30
36
  "test:adapter:jest:example": "jest './tests/adapter/examples/jest/index.test.js' --config='./tests/adapter/examples/jest/jest.config.js'",
31
37
  "test:adapter:mocha:example": "mocha './tests/adapter/examples/mocha/index.test.js' --config='./tests/adapter/examples/mocha/mocha.config.js'",
32
38
  "test:adapter:jasmine:example": "./tests/adapter/examples/jasmine/passReporterOpts.sh && jasmine './tests/adapter/examples/jasmine/index.test.js' --reporter=./../../../lib/adapter/jasmine.js",
33
39
  "test:adapter:codecept:example": "codeceptjs run --config='./tests/adapter/examples/codecept/codecept.conf.js'",
34
- "test:adapter:cucumber:example": "cd ./tests/adapter/examples/cucumber && cucumber-js"
35
- },
36
- "peerDependencies": {
37
- "@wdio/reporter": "*",
38
- "codeceptjs": "*",
39
- "mocha": "*"
40
+ "test:adapter:cucumber:example": "cd ./tests/adapter/examples/cucumber && npx cucumber-js"
40
41
  },
42
+ "peerDependencies": {},
41
43
  "devDependencies": {
42
44
  "@cucumber/cucumber": "^8.6.0",
43
45
  "@wdio/reporter": "^7.16.13",
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "testcafe-reporter-testomatio",
3
+ "version": "0.1.0",
4
+ "lockfileVersion": 1,
5
+ "requires": true,
6
+ "dependencies": {
7
+ "@testomatio/reporter": {
8
+ "version": "0.1.8",
9
+ "resolved": "https://registry.npmjs.org/@testomatio/reporter/-/reporter-0.1.8.tgz",
10
+ "integrity": "sha512-4qu8fvB0RQJawZ98nq/DklxsT3ya8MtQjnpgVqCqEMGQdXFaEvnexKfwQK/rselWznCKgHvBTmywanIfFne+KA==",
11
+ "requires": {
12
+ "axios": "^0.19.2",
13
+ "commander": "^4.1.1"
14
+ }
15
+ },
16
+ "axios": {
17
+ "version": "0.19.2",
18
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
19
+ "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
20
+ "requires": {
21
+ "follow-redirects": "1.5.10"
22
+ }
23
+ },
24
+ "commander": {
25
+ "version": "4.1.1",
26
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
27
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="
28
+ },
29
+ "debug": {
30
+ "version": "3.1.0",
31
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
32
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
33
+ "requires": {
34
+ "ms": "2.0.0"
35
+ }
36
+ },
37
+ "follow-redirects": {
38
+ "version": "1.5.10",
39
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
40
+ "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
41
+ "requires": {
42
+ "debug": "=3.1.0"
43
+ }
44
+ },
45
+ "ms": {
46
+ "version": "2.0.0",
47
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
48
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
49
+ }
50
+ }
51
+ }
package/.eslintrc.js DELETED
@@ -1,35 +0,0 @@
1
- module.exports = {
2
- env: {
3
- commonjs: true,
4
- es6: true,
5
- node: true,
6
- mocha: true,
7
- },
8
- extends: ['airbnb-base', 'prettier'],
9
- globals: {
10
- Atomics: 'readonly',
11
- SharedArrayBuffer: 'readonly',
12
- },
13
- parserOptions: {
14
- ecmaVersion: 2020,
15
- },
16
- rules: {
17
- 'max-len': ['error', { code: 120 }],
18
- 'arrow-parens': 0,
19
- 'no-underscore-dangle': 0,
20
- 'class-methods-use-this': 0,
21
- 'no-restricted-syntax': 0,
22
- quotes: 0,
23
- 'no-console': 0,
24
- 'no-continue': 0,
25
- 'no-use-before-define': 0,
26
- 'object-curly-newline': 0,
27
- 'consistent-return': 0,
28
- 'no-await-in-loop': 0,
29
- 'no-param-reassign': 0,
30
- 'operator-linebreak': 0,
31
- 'prefer-destructuring': 0,
32
- 'no-plusplus': 0,
33
- camelcase: 0,
34
- },
35
- };
@@ -1,30 +0,0 @@
1
- # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
-
4
- name: Node.js CI
5
-
6
- on:
7
- push:
8
- branches: [master]
9
- pull_request:
10
- branches: [master]
11
-
12
- jobs:
13
- build:
14
- runs-on: ubuntu-latest
15
-
16
- strategy:
17
- matrix:
18
- node-version: [14.x, 16.x]
19
- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20
-
21
- steps:
22
- - uses: actions/checkout@v2
23
- - name: Use Node.js ${{ matrix.node-version }}
24
- uses: actions/setup-node@v2
25
- with:
26
- node-version: ${{ matrix.node-version }}
27
- cache: 'npm'
28
- - run: npm i
29
- - run: npm run lint
30
- - run: npm run test
package/.prettierrc.js DELETED
@@ -1,12 +0,0 @@
1
- module.exports = {
2
- printWidth: 120,
3
- tabWidth: 2,
4
- useTabs: false,
5
- semi: true,
6
- singleQuote: true,
7
- quoteProps: 'as-needed',
8
- trailingComma: 'all',
9
- bracketSpacing: true,
10
- arrowParens: 'avoid',
11
- endOfLine: 'lf',
12
- };
@@ -1,29 +0,0 @@
1
- exports.config = {
2
- tests: './*_test.js',
3
- output: './output',
4
- helpers: {
5
- Puppeteer: {
6
- url: 'http://localhost',
7
- show: true,
8
- },
9
- },
10
- include: {
11
- I: './steps_file.js',
12
- },
13
- bootstrap: null,
14
- mocha: {},
15
- name: 'codecept',
16
- plugins: {
17
- retryFailedStep: {
18
- enabled: false,
19
- },
20
- screenshotOnFail: {
21
- enabled: false,
22
- },
23
- testomat: {
24
- enabled: true,
25
- require: '../../lib/adapter/codecept',
26
- apiKey: 'lz8ea4948ud5',
27
- },
28
- },
29
- };
@@ -1,10 +0,0 @@
1
- Feature('Suite 1 @S25e19ba9');
2
-
3
- Scenario('Test issue for suite 1 @Tca70c8c4', I => {
4
- I.amOnPage('https://github.com/login');
5
- I.see('GitHub');
6
- I.fillField('login', 'randomuser_kmk');
7
- I.fillField('password', 'randomuser_kmk');
8
- I.click('Sign in');
9
- I.see('Repositories');
10
- });
@@ -1,5 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true
4
- }
5
- }
@@ -1,6 +0,0 @@
1
- Feature('Suite 2 @S2bf55e11');
2
-
3
- Scenario('Test for suite 2 @Tc2171bd2', I => {
4
- I.amOnPage('https://github.com/login');
5
- I.see('GitHub');
6
- });
@@ -1,16 +0,0 @@
1
- /// <reference types='codeceptjs' />
2
- type steps_file = typeof import('./steps_file.js');
3
-
4
- declare namespace CodeceptJS {
5
- interface SupportObject {
6
- I: CodeceptJS.I;
7
- }
8
- interface CallbackOrder {
9
- [0]: CodeceptJS.I;
10
- }
11
- interface Methods extends CodeceptJS.Puppeteer {}
12
- interface I extends ReturnType<steps_file> {}
13
- namespace Translation {
14
- interface Actions {}
15
- }
16
- }
@@ -1,10 +0,0 @@
1
- // in this file you can append custom step methods to 'I' object
2
-
3
- module.exports = function() {
4
- return actor({
5
-
6
- // Define custom steps here, use 'this' to access default methods of I.
7
- // It is recommended to place a general 'login' function here.
8
-
9
- });
10
- }
@@ -1,15 +0,0 @@
1
- const { TestomatClient, TRConstants } = require('testomat-reporter');
2
-
3
- const client = new TestomatClient({ apiKey: 'l5x5d5cd6pc3' });
4
-
5
- client
6
- .createRun()
7
- .then(async () => {
8
- await client.addTestRun('cc883e99', TRConstants.PASSED);
9
- await client.addTestRun('7af2c281', TRConstants.PASSED);
10
- await client.addTestRun('6603c29e', TRConstants.PASSED);
11
- await client.addTestRun('95956b60', TRConstants.FAILED, 'Test case failed');
12
-
13
- client.updateRunStatus(TRConstants.FAILED);
14
- })
15
- .catch(console.log);
@@ -1,9 +0,0 @@
1
- describe('Suite 1', () => {
2
- test('Test addition', () => {
3
- expect(1 + 2).toBe(4);
4
- });
5
-
6
- test('Test some more addition', () => {
7
- expect(1 + 2).toBe(3);
8
- });
9
- });