artes 1.7.1 → 1.7.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -148,7 +148,7 @@ async function callLocalAI({ prompt, url, apiKey }) {
148
148
  }
149
149
 
150
150
 
151
- async function generateFailedBugReport({ resultCtx, pickleCtx, response, language, aiFlag, apiKey, url }) {
151
+ async function generateFailedBugReport({ resultCtx, pickleCtx, response, language, aiFlag, apiKey, url, maxTokens }) {
152
152
 
153
153
  const nameInstruction = pickleCtx.useMeaningfulName
154
154
  ? `The test case is named "${pickleCtx.scenarioName}" — use this as context for the bug report title.`
@@ -215,7 +215,7 @@ if (url) {
215
215
  return callAI({ prompt, aiFlag, apiKey, maxTokens });
216
216
  }
217
217
 
218
- async function generatePassedSummary({ pickleCtx, response, language, aiFlag, apiKey, url }) {
218
+ async function generatePassedSummary({ pickleCtx, response, language, aiFlag, apiKey, url, maxTokens }) {
219
219
  const lang = language ?? "English";
220
220
 
221
221
  const prompt = [
@@ -56,12 +56,12 @@ async function getEnvInfo() {
56
56
  Timeout: cucumberConfig.default.timeout ?? "N/A",
57
57
 
58
58
  // ── AI Config ─────────────────────────
59
- AI_Enabled: cucumberConfig.default.ai ?? false,
60
- AI_URL: cucumberConfig.default.url ?? "N/A",
61
- AI_Model: cucumberConfig.default.model ?? "gemini 2.5 flash",
62
- AI_Language: cucumberConfig.default.language ?? "English",
63
- AI_Max_Tokens: cucumberConfig.default.maxTokens ?? "4000",
64
- AI_Max_Reports: cucumberConfig.default.maxReports ?? 10,
59
+ AI_Enabled: cucumberConfig.ai.ai ?? false,
60
+ AI_URL: cucumberConfig.ai.url || "N/A",
61
+ AI_Model: cucumberConfig.ai.model || "N/A",
62
+ AI_Language: cucumberConfig.ai.language || "English",
63
+ AI_Max_Tokens: cucumberConfig.ai.maxTokens ?? "4000",
64
+ AI_Max_Reports: cucumberConfig.ai.maxReports ?? 10,
65
65
 
66
66
  // ── Git ─────────────────────────────────
67
67
  Git_Branch: process.env.GIT_BRANCH ?? process.env.BRANCH_NAME ?? "N/A",
@@ -68,7 +68,7 @@ function testCoverageCalculator({ silent = false } = {}) {
68
68
  });
69
69
 
70
70
  if (!silent && retriedTests.length > 0) {
71
- console.warn("\n\x1b[33mRetried test cases:");
71
+ console.warn(`\n\x1b[33mRetried ${retriedTests.length} test cases:`);
72
72
  retriedTests.forEach((t) => {
73
73
  console.warn(`- "${t.scenario}" ran ${t.count} times`);
74
74
  });
@@ -164,7 +164,7 @@ After(async function ({ result, pickle }) {
164
164
 
165
165
  await attachResponse(allure.attachment);
166
166
 
167
- if (shouldReport && cucumberConfig.ai.ai) {
167
+ if (shouldReport && cucumberConfig.ai.ai === "true") {
168
168
  await attachAiBugReport({
169
169
  result,
170
170
  pickle,