@testsmith/testblocks 0.8.8 → 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.
- package/dist/cli/index.js +1 -1
- package/dist/server/index.js +13 -0
- package/dist/server/startServer.js +13 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -447,7 +447,7 @@ program
|
|
|
447
447
|
'test:ci': 'testblocks run tests/**/*.testblocks.json -r console,html,junit -o reports',
|
|
448
448
|
},
|
|
449
449
|
devDependencies: {
|
|
450
|
-
'@testsmith/testblocks': '^0.8.
|
|
450
|
+
'@testsmith/testblocks': '^0.8.9',
|
|
451
451
|
},
|
|
452
452
|
};
|
|
453
453
|
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2));
|
package/dist/server/index.js
CHANGED
|
@@ -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)();
|