@auxcode/auxta 1.3.45-beta.1 → 1.3.45-beta.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.
@@ -26,14 +26,14 @@ function onTestEnd(body, featureName, scenarioName, statusCode, screenshotBuffer
26
26
  const stepsArr = log_service_1.default.returnScenarioReport();
27
27
  try {
28
28
  const stepRes = yield (0, report_service_1.uploadStep)(stepsArr, scenarioName, screenshotBuffer, errMessage);
29
- const featureRes = yield (0, report_service_1.uploadFeature)(stepRes, featureName, (0, path_1.basename)(__filename), (statusCode != 200));
29
+ const scenarioRes = yield (0, report_service_1.uploadScenario)(stepRes, featureName, (0, path_1.basename)(__filename), (statusCode != 200));
30
30
  const scenario = {
31
- scenarioId: featureRes.featureRef,
32
- scenarioName: featureRes.name,
33
- scenarioUri: featureRes.uri,
34
- status: featureRes.status,
35
- scenariosCount: featureRes.scenariosCount,
36
- lastFiveStepsHash: featureRes.lastFiveStepsHash
31
+ scenarioId: scenarioRes.scenarioRef,
32
+ scenarioName: scenarioRes.name,
33
+ scenarioUri: scenarioRes.uri,
34
+ status: scenarioRes.status,
35
+ scenariosCount: scenarioRes.scenariosCount,
36
+ lastFiveStepsHash: scenarioRes.lastFiveStepsHash
37
37
  };
38
38
  const stepCounts = {
39
39
  failedSteps: log_service_1.default.getStatusCount(status_of_step_1.StatusOfStep.FAILED),
@@ -22,7 +22,7 @@ export declare function uploadStep(stepLog: Step[], scenarioName: string, screen
22
22
  status: any;
23
23
  stepsCount: any;
24
24
  }[]>;
25
- export declare function uploadFeature(stepRes: any[], scenarioName: string, uri: string, hasFailed: boolean): Promise<any>;
25
+ export declare function uploadScenario(stepRes: any[], scenarioName: string, uri: string, hasFailed: boolean): Promise<any>;
26
26
  export declare function updateReport(reportId: string, scenario: Scenarios, steps: Steps, isFinal: boolean): Promise<void>;
27
27
  export declare function getReport(reportId: string): Promise<any>;
28
28
  export declare function getLastDayResults(): Promise<any>;
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.postNotificationsOnFail = exports.postNotifications = exports.getLastDayResults = exports.getReport = exports.updateReport = exports.uploadFeature = exports.uploadStep = exports.createEmptyReport = void 0;
15
+ exports.postNotificationsOnFail = exports.postNotifications = exports.getLastDayResults = exports.getReport = exports.updateReport = exports.uploadScenario = exports.uploadStep = exports.createEmptyReport = void 0;
16
16
  const axios_1 = __importDefault(require("axios"));
17
17
  const config_1 = require("../configs/config");
18
18
  function headers(token) {
@@ -92,7 +92,7 @@ function uploadStep(stepLog, scenarioName, screenshot, errMessage) {
92
92
  });
93
93
  }
94
94
  exports.uploadStep = uploadStep;
95
- function uploadFeature(stepRes, scenarioName, uri, hasFailed) {
95
+ function uploadScenario(stepRes, scenarioName, uri, hasFailed) {
96
96
  return __awaiter(this, void 0, void 0, function* () {
97
97
  let token = yield auth();
98
98
  return (yield axios_1.default.post(config_1.config.auxtaURL + "create-feature", {
@@ -105,7 +105,7 @@ function uploadFeature(stepRes, scenarioName, uri, hasFailed) {
105
105
  }, headers(token))).data;
106
106
  });
107
107
  }
108
- exports.uploadFeature = uploadFeature;
108
+ exports.uploadScenario = uploadScenario;
109
109
  function updateReport(reportId, scenario, steps, isFinal) {
110
110
  return __awaiter(this, void 0, void 0, function* () {
111
111
  let token = yield auth();
@@ -113,7 +113,7 @@ function updateReport(reportId, scenario, steps, isFinal) {
113
113
  reportId: reportId,
114
114
  isFinal: isFinal,
115
115
  data: Object.assign({ scenario: {
116
- stepRef: scenario.scenarioId,
116
+ scenarioRef: scenario.scenarioId,
117
117
  name: scenario.scenarioName,
118
118
  uri: scenario.scenarioUri,
119
119
  status: scenario.status,
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { basename } from 'path';
11
11
  import log from "../services/log.service";
12
- import { postNotifications, updateReport, uploadFeature, uploadStep } from '../services/report.service';
12
+ import { postNotifications, updateReport, uploadScenario, uploadStep } from '../services/report.service';
13
13
  import { startSuite } from '../utilities/start-suite.helper';
14
14
  import { StatusOfStep } from "../enums/status-of.step";
15
15
  export function onTestEnd(body, featureName, scenarioName, statusCode, screenshotBuffer, errMessage) {
@@ -20,14 +20,14 @@ export function onTestEnd(body, featureName, scenarioName, statusCode, screensho
20
20
  const stepsArr = log.returnScenarioReport();
21
21
  try {
22
22
  const stepRes = yield uploadStep(stepsArr, scenarioName, screenshotBuffer, errMessage);
23
- const featureRes = yield uploadFeature(stepRes, featureName, basename(__filename), (statusCode != 200));
23
+ const scenarioRes = yield uploadScenario(stepRes, featureName, basename(__filename), (statusCode != 200));
24
24
  const scenario = {
25
- scenarioId: featureRes.featureRef,
26
- scenarioName: featureRes.name,
27
- scenarioUri: featureRes.uri,
28
- status: featureRes.status,
29
- scenariosCount: featureRes.scenariosCount,
30
- lastFiveStepsHash: featureRes.lastFiveStepsHash
25
+ scenarioId: scenarioRes.scenarioRef,
26
+ scenarioName: scenarioRes.name,
27
+ scenarioUri: scenarioRes.uri,
28
+ status: scenarioRes.status,
29
+ scenariosCount: scenarioRes.scenariosCount,
30
+ lastFiveStepsHash: scenarioRes.lastFiveStepsHash
31
31
  };
32
32
  const stepCounts = {
33
33
  failedSteps: log.getStatusCount(StatusOfStep.FAILED),
@@ -22,7 +22,7 @@ export declare function uploadStep(stepLog: Step[], scenarioName: string, screen
22
22
  status: any;
23
23
  stepsCount: any;
24
24
  }[]>;
25
- export declare function uploadFeature(stepRes: any[], scenarioName: string, uri: string, hasFailed: boolean): Promise<any>;
25
+ export declare function uploadScenario(stepRes: any[], scenarioName: string, uri: string, hasFailed: boolean): Promise<any>;
26
26
  export declare function updateReport(reportId: string, scenario: Scenarios, steps: Steps, isFinal: boolean): Promise<void>;
27
27
  export declare function getReport(reportId: string): Promise<any>;
28
28
  export declare function getLastDayResults(): Promise<any>;
@@ -84,7 +84,7 @@ export function uploadStep(stepLog, scenarioName, screenshot, errMessage) {
84
84
  return scenarios;
85
85
  });
86
86
  }
87
- export function uploadFeature(stepRes, scenarioName, uri, hasFailed) {
87
+ export function uploadScenario(stepRes, scenarioName, uri, hasFailed) {
88
88
  return __awaiter(this, void 0, void 0, function* () {
89
89
  let token = yield auth();
90
90
  return (yield axios.post(config.auxtaURL + "create-feature", {
@@ -104,7 +104,7 @@ export function updateReport(reportId, scenario, steps, isFinal) {
104
104
  reportId: reportId,
105
105
  isFinal: isFinal,
106
106
  data: Object.assign({ scenario: {
107
- stepRef: scenario.scenarioId,
107
+ scenarioRef: scenario.scenarioId,
108
108
  name: scenario.scenarioName,
109
109
  uri: scenario.scenarioUri,
110
110
  status: scenario.status,