@testsmith/testblocks 0.8.7 → 0.8.9

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.
@@ -16,8 +16,8 @@
16
16
  overflow: hidden;
17
17
  }
18
18
  </style>
19
- <script type="module" crossorigin src="/assets/index-BLK0dtIi.js"></script>
20
- <link rel="stylesheet" crossorigin href="/assets/index-OxNH9dW-.css">
19
+ <script type="module" crossorigin src="/assets/index-DGmSW0q0.js"></script>
20
+ <link rel="stylesheet" crossorigin href="/assets/index-C5yUtTzz.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
@@ -40,6 +40,7 @@ export interface TestCase {
40
40
  id: string;
41
41
  name: string;
42
42
  description?: string;
43
+ disabled?: boolean;
43
44
  data?: TestDataSet[];
44
45
  dataFile?: string;
45
46
  beforeEach?: TestStep[];
@@ -213,6 +213,20 @@ class TestExecutor {
213
213
  if (!beforeAllFailed) {
214
214
  // Run each test with beforeEach/afterEach
215
215
  for (const test of testFile.tests) {
216
+ // Skip disabled tests
217
+ if (test.disabled) {
218
+ results.push({
219
+ testId: test.id,
220
+ testName: test.name,
221
+ status: 'skipped',
222
+ duration: 0,
223
+ steps: [],
224
+ error: { message: 'Test is disabled' },
225
+ startedAt: new Date().toISOString(),
226
+ finishedAt: new Date().toISOString(),
227
+ });
228
+ continue;
229
+ }
216
230
  // Load data from file if specified
217
231
  let testData = test.data;
218
232
  if (test.dataFile && !testData) {
@@ -224,6 +224,19 @@ app.post('/api/run/:testId', async (req, res) => {
224
224
  if (!test) {
225
225
  return res.status(404).json({ error: `Test not found: ${testId}` });
226
226
  }
227
+ // Return skipped result for disabled tests
228
+ if (test.disabled) {
229
+ return res.json({
230
+ testId: test.id,
231
+ testName: test.name,
232
+ status: 'skipped',
233
+ duration: 0,
234
+ steps: [],
235
+ error: { message: 'Test is disabled' },
236
+ startedAt: new Date().toISOString(),
237
+ finishedAt: new Date().toISOString(),
238
+ });
239
+ }
227
240
  // For single test runs, merge folder beforeEach/afterEach hooks
228
241
  // (beforeAll/afterAll are handled at suite level)
229
242
  const mergedTestFile = mergeFolderHooksIntoTestFile(testFile, folderHooks || []);
@@ -274,6 +274,19 @@ async function startServer(options = {}) {
274
274
  if (!test) {
275
275
  return res.status(404).json({ error: `Test not found: ${testId}` });
276
276
  }
277
+ // Return skipped result for disabled tests
278
+ if (test.disabled) {
279
+ return res.json({
280
+ testId: test.id,
281
+ testName: test.name,
282
+ status: 'skipped',
283
+ duration: 0,
284
+ steps: [],
285
+ error: { message: 'Test is disabled' },
286
+ startedAt: new Date().toISOString(),
287
+ finishedAt: new Date().toISOString(),
288
+ });
289
+ }
277
290
  // Merge folder hooks for beforeEach/afterEach
278
291
  const mergedTestFile = mergeFolderHooksIntoTestFile(testFile, folderHooks || []);
279
292
  const globalVars = (0, globals_1.getGlobalVariables)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testsmith/testblocks",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "Visual test automation tool with Blockly - API and Playwright testing",
5
5
  "author": "Roy de Kleijn",
6
6
  "license": "MIT",