@testsmith/perfornium 0.6.0 → 0.6.1

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.
@@ -1097,18 +1097,24 @@ class DashboardServer {
1097
1097
  container.innerHTML = '<div class="empty-state"><h3>No tests found</h3><p>Add test files to your tests/ folder</p></div>';
1098
1098
  return;
1099
1099
  }
1100
- container.innerHTML = testFiles.map(t => \`
1100
+ container.innerHTML = testFiles.map((t, idx) => \`
1101
1101
  <div class="test-item">
1102
1102
  <div class="test-info">
1103
1103
  <div class="test-name">\${t.name}</div>
1104
1104
  <div class="test-path">\${t.relativePath}</div>
1105
1105
  </div>
1106
1106
  <span class="test-type \${t.type}">\${t.type}</span>
1107
- <button class="btn btn-primary btn-sm" style="margin-left: 12px;" onclick="runTest('\${t.path}')" \${runningTestId ? 'disabled' : ''}>Run</button>
1107
+ <button class="btn btn-primary btn-sm" style="margin-left: 12px;" onclick="runTestByIndex(\${idx})" \${runningTestId ? 'disabled' : ''}>Run</button>
1108
1108
  </div>
1109
1109
  \`).join('');
1110
1110
  }
1111
1111
 
1112
+ function runTestByIndex(idx) {
1113
+ if (idx >= 0 && idx < testFiles.length) {
1114
+ runTest(testFiles[idx].path);
1115
+ }
1116
+ }
1117
+
1112
1118
  async function runTest(testPath) {
1113
1119
  if (runningTestId) return;
1114
1120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testsmith/perfornium",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Flexible performance testing framework for REST, SOAP, and web applications",
5
5
  "author": "TestSmith",
6
6
  "license": "MIT",