mirror of
https://github.com/larksuite/cli.git
synced 2026-09-14 18:42:53 +08:00
68a77eee5c
Form questions can now carry a visible_rule (display condition) so a question shows only when earlier questions match the rule. The rule shares the exact same structure as the view filter, so extract that structure into a single shared reference (lark-base-filter-condition.md) that both view-set-filter and visible_rule point to. - create/update shortcuts: document visible_rule in --questions help and transcribe the questions body (including visible_rule) into dry-run output - document that form question updates use full overwrite semantics and must preserve existing fields via read-modify-write - skill refs: add visible_rule sections to form-questions create/update, note it is only needed when the user asks for a display condition, and clarify that the shared tuple filter protocol does not apply to data-query filters - tests: pin flag help, verbatim visible_rule passthrough on create/update/list, and add dry-run E2E coverage Co-authored-by: yballul-bytedance <273011618+yballul-bytedance@users.noreply.github.com> Co-authored-by: TRAE CLI <noreply@bytedance.com>
10 KiB
10 KiB
Base CLI E2E Coverage
Metrics
- Denominator: 78 leaf commands
- Covered: 22
- Coverage: 28.2%
Summary
- TestBase_BasicWorkflow: proves
+base-create,+base-get,+table-create,+table-get, and+table-list; keyt.Run(...)proof points areget base as bot,get table as bot, andlist tables and find created table as bot. - TestBaseBlockDryRun: proves the five
+base-block-*shortcuts request shapes without touching live data. - TestBaseFieldCreateDryRunArrayCompat: proves
+field-createdry-run request shape for the internal JSON-array compatibility path. - TestBaseRecordBatchUpdatePerRecordDryRun: proves
+record-batch-updatepreserves the per-recordupdate_recordsrequest shape. - TestBaseRecordBatchUpdatePerRecordWorkflow: creates two records, updates different field types in one request, asserts the minimal response contract, reads both records back, verifies a missing record ID is not prevalidated, and cleans up the temporary Base.
- TestBase_RoleWorkflow: proves
+advperm-enable,+role-create,+role-list,+role-get, and+role-update; keyt.Run(...)proof points arelist as bot,get as bot, andupdate as bot. - TestBaseFormQuestionsCreateVisibleRuleDryRun / TestBaseFormQuestionsUpdateVisibleRuleDryRun: prove
+form-questions-create/+form-questions-updatedry-run request shape and that the optionalvisible_ruledisplay condition is transcribed verbatim into the request body. - Cleanup note:
+table-deleteand+role-deleteonly run in cleanup and are intentionally left uncovered. - Blocked area: dashboard, field, most record operations, form, view, and workflow operations still lack deterministic create/read/update workflows in this suite.
Command Table
| Status | Cmd | Type | Testcase | Key parameter shapes | Notes / uncovered reason |
|---|---|---|---|---|---|
| ✕ | base +advperm-disable | shortcut | none | no disable workflow yet | |
| ✓ | base +advperm-enable | shortcut | base_role_workflow_test.go::TestBase_RoleWorkflow | --base-token |
|
| ✕ | base +base-copy | shortcut | none | no copy workflow yet | |
| ✓ | base +base-create | shortcut | base/helpers_test.go::createBaseWithRetry | --name; --time-zone |
helper asserts created base token |
| ✓ | base +base-get | shortcut | base_basic_workflow_test.go::TestBase_BasicWorkflow/get base as bot | --base-token |
|
| ✓ | base +base-block-create | shortcut | base_block_dryrun_test.go::TestBaseBlockDryRun/create | --base-token; --type; --name; --parent-id; dry-run only |
request shape only |
| ✓ | base +base-block-delete | shortcut | base_block_dryrun_test.go::TestBaseBlockDryRun/delete | --base-token; --block-id; dry-run only |
request shape only |
| ✓ | base +base-block-list | shortcut | base_block_dryrun_test.go::TestBaseBlockDryRun/list all,list folder | --base-token; optional --parent-id; optional --type; dry-run only |
request shape only |
| ✓ | base +base-block-move | shortcut | base_block_dryrun_test.go::TestBaseBlockDryRun/move root,move after | --base-token; --block-id; optional --parent-id; --after-id; dry-run only |
request shape only |
| ✓ | base +base-block-rename | shortcut | base_block_dryrun_test.go::TestBaseBlockDryRun/rename | --base-token; --block-id; --name; dry-run only |
request shape only |
| ✕ | base +dashboard-arrange | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-block-create | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-block-delete | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-block-get | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-block-list | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-block-update | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-create | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-delete | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-get | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-list | shortcut | none | dashboard workflows not covered | |
| ✕ | base +dashboard-update | shortcut | none | dashboard workflows not covered | |
| ✕ | base +data-query | shortcut | none | no data-query assertions yet | |
| ✓ | base +field-create | shortcut | base_field_dryrun_test.go::TestBaseFieldCreateDryRunArrayCompat | --base-token; --table-id; --json; dry-run only |
request shape only |
| ✕ | base +field-delete | shortcut | none | field workflows not covered | |
| ✕ | base +field-get | shortcut | none | field workflows not covered | |
| ✕ | base +field-list | shortcut | none | field workflows not covered | |
| ✕ | base +field-search-options | shortcut | none | field workflows not covered | |
| ✕ | base +field-update | shortcut | none | field workflows not covered | |
| ✕ | base +form-create | shortcut | none | form workflows not covered | |
| ✕ | base +form-delete | shortcut | none | form workflows not covered | |
| ✕ | base +form-get | shortcut | none | form workflows not covered | |
| ✕ | base +form-list | shortcut | none | form workflows not covered | |
| ✓ | base +form-questions-create | shortcut | TestBaseFormQuestionsCreateVisibleRuleDryRun | questions[].visible_rule | dry-run: request shape + visible_rule body passthrough |
| ✕ | base +form-questions-delete | shortcut | none | form workflows not covered | |
| ✕ | base +form-questions-list | shortcut | none | form workflows not covered | |
| ✓ | base +form-questions-update | shortcut | TestBaseFormQuestionsUpdateVisibleRuleDryRun | questions[].visible_rule | dry-run: request shape + visible_rule body passthrough |
| ✕ | base +form-update | shortcut | none | form workflows not covered | |
| ✓ | base +record-batch-create | shortcut | base_record_batch_update_workflow_test.go::TestBaseRecordBatchUpdatePerRecordWorkflow | --base-token; --table-id; --json.create_records |
seeds heterogeneous live workflow records |
| ✓ | base +record-batch-update | shortcut | base_record_batch_update_dryrun_test.go::TestBaseRecordBatchUpdatePerRecordDryRun; base_record_batch_update_workflow_test.go::TestBaseRecordBatchUpdatePerRecordWorkflow | --base-token; --table-id; --json.update_records; dry-run + live |
heterogeneous select/number update with write-back verification |
| ✕ | base +record-delete | shortcut | none | record workflows not covered | |
| ✓ | base +record-get | shortcut | base_record_batch_update_workflow_test.go::TestBaseRecordBatchUpdatePerRecordWorkflow | --record-id; repeated --field-id; --format json |
reads back select and number values after batch update |
| ✕ | base +record-history-list | shortcut | none | record workflows not covered | |
| ✕ | base +record-list | shortcut | none | record workflows not covered | |
| ✕ | base +record-search | shortcut | none | record workflows not covered | |
| ✓ | base +record-upload-attachment | shortcut | base_attachment_dryrun_test.go::TestBase_AttachmentDryRun/upload | dry-run only | request shape only |
| ✓ | base +record-download-attachment | shortcut | base_attachment_dryrun_test.go::TestBase_AttachmentDryRun/download | dry-run only | request shape only |
| ✓ | base +record-remove-attachment | shortcut | base_attachment_dryrun_test.go::TestBase_AttachmentDryRun/remove | dry-run only | request shape only |
| ✕ | base +record-upsert | shortcut | none | record workflows not covered | |
| ✓ | base +role-create | shortcut | base/helpers_test.go::createRole | --base-token; --json |
helper asserts created role id |
| ✕ | base +role-delete | shortcut | none | cleanup only | |
| ✓ | base +role-get | shortcut | base_role_workflow_test.go::TestBase_RoleWorkflow/get as bot | --base-token; --role-id |
|
| ✓ | base +role-list | shortcut | base_role_workflow_test.go::TestBase_RoleWorkflow/list as bot | --base-token |
|
| ✓ | base +role-update | shortcut | base_role_workflow_test.go::TestBase_RoleWorkflow/update as bot | --base-token; --role-id; --json |
|
| ✓ | base +table-create | shortcut | base/helpers_test.go::createTableWithRetry | --base-token; --name; optional --fields; optional --view |
helper asserts table id |
| ✕ | base +table-delete | shortcut | none | cleanup only | |
| ✓ | base +table-get | shortcut | base_basic_workflow_test.go::TestBase_BasicWorkflow/get table as bot | --base-token; --table-id |
|
| ✓ | base +table-list | shortcut | base_basic_workflow_test.go::TestBase_BasicWorkflow/list tables and find created table as bot | --base-token |
|
| ✕ | base +table-update | shortcut | none | no rename workflow yet | |
| ✕ | base +view-create | shortcut | none | view workflows not covered | |
| ✕ | base +view-delete | shortcut | none | view workflows not covered | |
| ✕ | base +view-get | shortcut | none | view workflows not covered | |
| ✕ | base +view-get-card | shortcut | none | view workflows not covered | |
| ✕ | base +view-get-filter | shortcut | none | view workflows not covered | |
| ✕ | base +view-get-group | shortcut | none | view workflows not covered | |
| ✕ | base +view-get-sort | shortcut | none | view workflows not covered | |
| ✕ | base +view-get-timebar | shortcut | none | view workflows not covered | |
| ✕ | base +view-get-visible-fields | shortcut | none | view workflows not covered | |
| ✕ | base +view-list | shortcut | none | view workflows not covered | |
| ✕ | base +view-rename | shortcut | none | view workflows not covered | |
| ✕ | base +view-set-card | shortcut | none | view workflows not covered | |
| ✕ | base +view-set-filter | shortcut | none | view workflows not covered | |
| ✕ | base +view-set-group | shortcut | none | view workflows not covered | |
| ✕ | base +view-set-sort | shortcut | none | view workflows not covered | |
| ✕ | base +view-set-timebar | shortcut | none | view workflows not covered | |
| ✕ | base +view-set-visible-fields | shortcut | none | view workflows not covered | |
| ✕ | base +workflow-create | shortcut | none | workflow CRUD not covered | |
| ✕ | base +workflow-disable | shortcut | none | workflow CRUD not covered | |
| ✕ | base +workflow-enable | shortcut | none | workflow CRUD not covered | |
| ✕ | base +workflow-get | shortcut | none | workflow CRUD not covered | |
| ✕ | base +workflow-list | shortcut | none | workflow CRUD not covered | |
| ✕ | base +workflow-update | shortcut | none | workflow CRUD not covered |