From a29c9778214b875aadc4ae9c977f35b46227fc67 Mon Sep 17 00:00:00 2001 From: Jian Weng Date: Fri, 23 Jan 2026 20:33:06 +0300 Subject: [PATCH] [#595][refactor] Consolidate test helper by removing redundant wrapper Remove tests/helpers-open-issue.sh which only sourced helpers-gh-mock.sh without adding functionality. Update 5 e2e tests to source the mock helper directly. Co-Authored-By: Claude Opus 4.5 --- tests/e2e/test-open-issue-draft-non-plan.sh | 2 +- tests/e2e/test-open-issue-update-maintains-format.sh | 2 +- tests/e2e/test-open-issue-update-mode.sh | 2 +- tests/e2e/test-open-issue-with-draft.sh | 2 +- tests/e2e/test-open-issue-without-draft.sh | 2 +- tests/helpers-open-issue.sh | 6 ------ 6 files changed, 5 insertions(+), 11 deletions(-) delete mode 100755 tests/helpers-open-issue.sh diff --git a/tests/e2e/test-open-issue-draft-non-plan.sh b/tests/e2e/test-open-issue-draft-non-plan.sh index e145df92..d35fc5e0 100755 --- a/tests/e2e/test-open-issue-draft-non-plan.sh +++ b/tests/e2e/test-open-issue-draft-non-plan.sh @@ -2,7 +2,7 @@ # Test: Non-plan issue format (bug report) source "$(dirname "$0")/../common.sh" -source "$(dirname "$0")/../helpers-open-issue.sh" +source "$(dirname "$0")/../helpers-gh-mock.sh" test_info "Non-plan issue format (bug report)" diff --git a/tests/e2e/test-open-issue-update-maintains-format.sh b/tests/e2e/test-open-issue-update-maintains-format.sh index 90056215..e50dc747 100755 --- a/tests/e2e/test-open-issue-update-maintains-format.sh +++ b/tests/e2e/test-open-issue-update-maintains-format.sh @@ -2,7 +2,7 @@ # Test: --update maintains [plan][tag] format source "$(dirname "$0")/../common.sh" -source "$(dirname "$0")/../helpers-open-issue.sh" +source "$(dirname "$0")/../helpers-gh-mock.sh" test_info "--update maintains [plan][tag] format" diff --git a/tests/e2e/test-open-issue-update-mode.sh b/tests/e2e/test-open-issue-update-mode.sh index 78e57476..cc2a1a90 100755 --- a/tests/e2e/test-open-issue-update-mode.sh +++ b/tests/e2e/test-open-issue-update-mode.sh @@ -2,7 +2,7 @@ # Test: --update mode uses gh issue edit source "$(dirname "$0")/../common.sh" -source "$(dirname "$0")/../helpers-open-issue.sh" +source "$(dirname "$0")/../helpers-gh-mock.sh" test_info "--update mode uses gh issue edit" diff --git a/tests/e2e/test-open-issue-with-draft.sh b/tests/e2e/test-open-issue-with-draft.sh index 5d77ccd9..58952950 100755 --- a/tests/e2e/test-open-issue-with-draft.sh +++ b/tests/e2e/test-open-issue-with-draft.sh @@ -2,7 +2,7 @@ # Test: Plan issue title format source "$(dirname "$0")/../common.sh" -source "$(dirname "$0")/../helpers-open-issue.sh" +source "$(dirname "$0")/../helpers-gh-mock.sh" test_info "Plan issue title format" diff --git a/tests/e2e/test-open-issue-without-draft.sh b/tests/e2e/test-open-issue-without-draft.sh index 270a86a1..9c3675a4 100755 --- a/tests/e2e/test-open-issue-without-draft.sh +++ b/tests/e2e/test-open-issue-without-draft.sh @@ -2,7 +2,7 @@ # Test: Plan issue baseline format source "$(dirname "$0")/../common.sh" -source "$(dirname "$0")/../helpers-open-issue.sh" +source "$(dirname "$0")/../helpers-gh-mock.sh" test_info "Plan issue baseline format" diff --git a/tests/helpers-open-issue.sh b/tests/helpers-open-issue.sh deleted file mode 100755 index 896f1c90..00000000 --- a/tests/helpers-open-issue.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -# Purpose: Shared helper providing gh mock setup for /open-issue skill tests -# Expected: Sourced by open-issue tests to create GitHub CLI mocks - -# Source gh mock helpers (use TESTS_DIR from common.sh for shell-neutral sourcing) -source "$TESTS_DIR/helpers-gh-mock.sh"