docs(plan): 記錄 AddOn 測試基建與全家族測試現況
Anti-EAV Lint + Quality Gate / anti-eav-lint (push) Successful in 19s
Tests / Unit Tests (push) Successful in 12s
Tests / Integration Tests (push) Failing after 10s
Tests / PHP Lint (push) Successful in 11s
Tests / PHPCS (push) Successful in 23s
Tests / PHPStan (push) Failing after 11s
Anti-EAV Lint + Quality Gate / anti-eav-lint (push) Successful in 19s
Tests / Unit Tests (push) Successful in 12s
Tests / Integration Tests (push) Failing after 10s
Tests / PHP Lint (push) Successful in 11s
Tests / PHPCS (push) Successful in 23s
Tests / PHPStan (push) Failing after 11s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -238,7 +238,19 @@
|
|||||||
1. **Settings 分區 AJAX 儲存**(A v3.0.2):`ajax_save_settings_section()` + 7 個 `save_section_*()` + `admin/assets/wpdo-settings.js`。B 目前是一次存全部的 inline `update_option` 巨塊,功能可用,屬 UX 改善。其中 `save_section_hp_transient` / `save_section_wc_term_count` 對應 AddOn 已移除的設定,移植時要拆掉或加 `class_exists` 守衛。
|
1. **Settings 分區 AJAX 儲存**(A v3.0.2):`ajax_save_settings_section()` + 7 個 `save_section_*()` + `admin/assets/wpdo-settings.js`。B 目前是一次存全部的 inline `update_option` 巨塊,功能可用,屬 UX 改善。其中 `save_section_hp_transient` / `save_section_wc_term_count` 對應 AddOn 已移除的設定,移植時要拆掉或加 `class_exists` 守衛。
|
||||||
2. ~~CI workflow~~ ✅ 三個檔已建,但 **B 沒有 git remote**,要推上 gitea 才會實際執行;推上去後還需設 repo secret `TMDO_TEST_DB_PASS`、var `RELEASE_GITEA_URL`、secret `RELEASE_TOKEN`,並開 main branch protection。11 個 AddOn 的 CI 仍未建。
|
2. ~~CI workflow~~ ✅ 三個檔已建,但 **B 沒有 git remote**,要推上 gitea 才會實際執行;推上去後還需設 repo secret `TMDO_TEST_DB_PASS`、var `RELEASE_GITEA_URL`、secret `RELEASE_TOKEN`,並開 main branch protection。11 個 AddOn 的 CI 仍未建。
|
||||||
3. ~~`scripts/ci-package.sh`~~ ✅(委派共用 `package-plugin.sh`,實測 10 項終檢全 PASS)
|
3. ~~`scripts/ci-package.sh`~~ ✅(委派共用 `package-plugin.sh`,實測 10 項終檢全 PASS)
|
||||||
4. **補剩餘 36 個測試檔**:已補 `HookBusIntegrationTest`(14)+ 新寫 `AuditLoggerIntegrationTest`(4)。`TermCommentBackfillTest` 實際 require HP AddOn 檔案,屬 HP AddOn 測試套件;其餘 32 個 HivePress/WC 測試需先為兩個 AddOn 建 `phpunit.xml` + bootstrap。
|
4. ~~補測試檔~~ ✅ 核心補 `HookBusIntegrationTest`(14)+ 新寫 `AuditLoggerIntegrationTest`(4);HP AddOn 建 phpunit 基建並移植 25 檔(145 tests);WC AddOn 建基建並移植 1 檔(10 tests)。11 個 AddOn 皆有 CI workflow(HP/WC 跑 lint+unit,其餘 9 個薄註冊層只跑 lint)。
|
||||||
|
- 仍缺:`TermCommentBackfillTest`(require HP AddOn 的 term-comment-fields,可移入 HP AddOn 套件)、`ListingStatsTest`(同上)、HP/WC 的 integration 測試(`HivepressIntegrationTest` ×3、`WCTermCountFilterTest`、`ListingMetaInterceptorTest`)——這些需要 AddOn 端的 integration bootstrap。
|
||||||
|
|
||||||
|
### 全家族測試現況(2026-07-31)
|
||||||
|
|
||||||
|
| 套件 | 結果 |
|
||||||
|
|---|---|
|
||||||
|
| 核心 unit | 451 tests / 889 assertions |
|
||||||
|
| 核心 integration | 416 tests / 1165 assertions |
|
||||||
|
| hivepress-addon unit | 145 tests / 357 assertions |
|
||||||
|
| woocommerce-addon unit | 10 tests / 33 assertions |
|
||||||
|
|
||||||
|
AddOn 測試 bootstrap 直接 `require` 核心 plugin 的 `tests/bootstrap.php`(避免複製 ~700 行 WP stub),因此 **AddOn 的 CI job 必須同時 checkout 核心 plugin**,workflow 已如此設定。
|
||||||
5. **文件移植**:`readme.txt`、`CONTEXT.md`、`docs/`(ENTITY_ADAPTER_COOKBOOK、INTEGRATION_PATTERN_DECISION、2 篇 ADR)。
|
5. **文件移植**:`readme.txt`、`CONTEXT.md`、`docs/`(ENTITY_ADAPTER_COOKBOOK、INTEGRATION_PATTERN_DECISION、2 篇 ADR)。
|
||||||
6. **實機驗證與退休切換**:兩站台目前仍跑 A(dev = v3.4.6、dev30 = v3.0.0),B 家族 12 個外掛全 inactive,尚未做過 `wp tmdo doctor` 實機驗證。
|
6. **實機驗證與退休切換**:兩站台目前仍跑 A(dev = v3.4.6、dev30 = v3.0.0),B 家族 12 個外掛全 inactive,尚未做過 `wp tmdo doctor` 實機驗證。
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user