Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This way even entityIds like environmentIds or testCaseIds will be autocompleted

# octomind

Octomind cli tool. Version: 4.2.0. Additional documentation see https://octomind.dev/docs/api-reference/
Octomind cli tool. Version: 4.3.0. Additional documentation see https://octomind.dev/docs/api-reference/

**Usage:** `octomind [options] [command]`

Expand Down Expand Up @@ -237,7 +237,7 @@ Execute local YAML test cases
|:-------|:----------|:---------|:--------|
| `-j, --json` | Output raw JSON response | No | |
| `-u, --url <url>` | Url the tests should run against | Yes | |
| `-c, --test-case-id [uuid]` | Id of the test case you want to run, if not provided will run all test cases in the test target | No | |
| `-p, --test-case-path [string]` | Path of the test case you want to run, if not provided will run all test cases in the test target | No | |
| `-e, --environment-id [uuid]` | Id of the environment you want to run against, if not provided will run all test cases against the default environment | No | |
| `-t, --test-target-id [uuid]` | Id of the test target of the test case, if not provided will use the test target id from the config | No | |
| `--headless` | If we should run headless without the UI of playwright and the browser | No | |
Expand Down Expand Up @@ -445,6 +445,7 @@ Push local YAML test cases to the test target
|:-------|:----------|:---------|:--------|
| `-j, --json` | Output raw JSON response | No | |
| `-t, --test-target-id [id]` | Test target ID, if not provided will use the test target id from the config | No | |
| `-y, --yes` | Skip confirmation prompt | No | |

## create-test-case

Expand All @@ -459,7 +460,7 @@ Create a new test case
| `-j, --json` | Output raw JSON response | No | |
| `-t, --test-target-id [id]` | Test target ID, if not provided will use the test target id from the config | No | |
| `-n, --name <string>` | The name of the test case you want to create | Yes | |
| `-d, --dependency-path <path>` | The path of to test case you want to use as dependency | Yes | |
| `-d, --dependency-path [path]` | The path of to test case you want to use as dependency | No | |

## edit-test-case

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@octomind/octomind",
"version": "4.2.0",
"version": "4.3.0",
"description": "a command line client for octomind apis",
"main": "./dist/index.js",
"packageManager": "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48",
Expand Down
17 changes: 14 additions & 3 deletions src/tools/sync/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ type PushOptions = {

export const push = async (
options: PushOptions,
): Promise<{ success: boolean; versionIds: string[] } | undefined> => {
): Promise<
| { success: boolean; versionIds: string[]; pushResult: "drafts" | "enabled" }
| undefined
> => {
const testCases = readTestCasesFromDir(options.sourceDir);
checkForConsistency(testCases);
const context = await getGitContext();
Expand All @@ -38,9 +41,17 @@ export const push = async (
};

if (isDefaultBranch) {
return defaultPush(body, options);
const pushResult = await defaultPush(body, options);
if (!pushResult) {
return undefined;
}
return { ...pushResult, pushResult: "enabled" };
} else {
return draftPush(body, options);
const pushResult = await draftPush(body, options);
if (!pushResult) {
return undefined;
}
return { ...pushResult, pushResult: "drafts" };
}
};

Expand Down
7 changes: 5 additions & 2 deletions src/tools/test-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ export const pullTestTarget = async (
};

export const pushTestTarget = async (
options: { testTargetId: string; yes?: boolean } & ListOptions,
options: {
testTargetId: string;
yes?: boolean;
} & ListOptions,
): Promise<void> => {
const localThrobber = ora("Reading local test cases").start();
const sourceDir = await findOctomindFolder();
Expand Down Expand Up @@ -139,5 +142,5 @@ export const pushTestTarget = async (
logJson(data);
}

pushThrobber.succeed("Test cases pushed successfully");
pushThrobber.succeed(`Test cases pushed as ${data?.pushResult}`);
};