speccore 8.3.290 → 8.3.296
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/README.en.md +16 -3
- package/README.md +9 -7
- package/dist/cli.js +11 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/about.d.ts.map +1 -1
- package/dist/commands/about.js +5 -0
- package/dist/commands/about.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +77 -5
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/ask.js +2 -2
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/execute.js +1 -0
- package/dist/commands/execute.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +25 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/iteration/taskify.d.ts.map +1 -1
- package/dist/commands/iteration/taskify.js +132 -7
- package/dist/commands/iteration/taskify.js.map +1 -1
- package/dist/commands/status-panel.d.ts +1 -0
- package/dist/commands/status-panel.d.ts.map +1 -1
- package/dist/commands/status-panel.js +65 -17
- package/dist/commands/status-panel.js.map +1 -1
- package/dist/commands/update-env-configs.d.ts.map +1 -1
- package/dist/commands/update-env-configs.js +6 -0
- package/dist/commands/update-env-configs.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +78 -1
- package/dist/commands/verify.js.map +1 -1
- package/dist/core/deploy/engine.d.ts +11 -0
- package/dist/core/deploy/engine.d.ts.map +1 -1
- package/dist/core/deploy/engine.js +35 -7
- package/dist/core/deploy/engine.js.map +1 -1
- package/dist/core/git-integration.d.ts +2 -1
- package/dist/core/git-integration.d.ts.map +1 -1
- package/dist/core/git-integration.js +38 -14
- package/dist/core/git-integration.js.map +1 -1
- package/dist/core/global-counters.d.ts +3 -0
- package/dist/core/global-counters.d.ts.map +1 -1
- package/dist/core/global-counters.js +3 -1
- package/dist/core/global-counters.js.map +1 -1
- package/dist/core/prompt-builder.d.ts.map +1 -1
- package/dist/core/prompt-builder.js +7 -6
- package/dist/core/prompt-builder.js.map +1 -1
- package/dist/core/spec-paths.d.ts.map +1 -1
- package/dist/core/spec-paths.js +3 -0
- package/dist/core/spec-paths.js.map +1 -1
- package/dist/core/spec-skeleton.d.ts.map +1 -1
- package/dist/core/spec-skeleton.js +6 -2
- package/dist/core/spec-skeleton.js.map +1 -1
- package/dist/core/state.d.ts +11 -0
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +33 -2
- package/dist/core/state.js.map +1 -1
- package/dist/core/ui-verify/index.d.ts +2 -2
- package/dist/core/ui-verify/index.d.ts.map +1 -1
- package/dist/core/ui-verify/index.js +3 -1
- package/dist/core/ui-verify/index.js.map +1 -1
- package/dist/core/ui-verify/smoke-engine.d.ts.map +1 -1
- package/dist/core/ui-verify/smoke-engine.js +36 -0
- package/dist/core/ui-verify/smoke-engine.js.map +1 -1
- package/dist/core/ui-verify/spec-generator.d.ts +32 -1
- package/dist/core/ui-verify/spec-generator.d.ts.map +1 -1
- package/dist/core/ui-verify/spec-generator.js +205 -21
- package/dist/core/ui-verify/spec-generator.js.map +1 -1
- package/dist/core/ui-verify/types.d.ts +2 -0
- package/dist/core/ui-verify/types.d.ts.map +1 -1
- package/package.json +3 -2
- package/templates/api-design-example.md +338 -0
- package/templates/ci/github-actions.yml +44 -0
- package/templates/database-example.md +223 -0
- package/templates/deploy-docker/README.md +296 -0
- package/templates/deploy-docker/backend-node.Dockerfile +52 -0
- package/templates/deploy-docker/deploy-remote.sh +79 -0
- package/templates/deploy-docker/docker-compose.yml +113 -0
- package/templates/deploy-docker/frontend.Dockerfile +43 -0
- package/templates/deploy-docker/nginx.conf +30 -0
- package/templates/deploy-examples.yaml +511 -0
- package/templates/deploy-java/Dockerfile +50 -0
- package/templates/deploy-java/README.md +212 -0
- package/templates/deploy-java/deploy.sh +120 -0
- package/templates/deploy-java/spring-boot.service +35 -0
- package/templates/deploy-nginx/README.md +59 -0
- package/templates/deploy-nginx/nginx-site.conf +103 -0
- package/templates/deploy-scripts/README.md +61 -0
- package/templates/deploy-scripts/deploy-compose.sh +19 -0
- package/templates/deploy-scripts/deploy-ftp.sh +28 -0
- package/templates/deploy-scripts/deploy-password-ssh.sh +26 -0
- package/templates/deploy-scripts/deploy-python.sh +30 -0
- package/templates/deploy-scripts/trigger-jenkins.sh +30 -0
- package/templates/html/speccore-ask-explain.html +10 -0
- package/templates/html/speccore-ask-guide.html +10 -0
- package/templates/html/speccore-ask-match.html +10 -0
- package/templates/html/speccore-ask-pipeline.html +1 -0
- package/templates/html/speccore-ask-result.html +10 -0
- package/templates/html/speccore-help.html +241 -0
- package/templates/html/speccore-setup-guide.html +289 -0
- package/templates/security-example.md +226 -0
- package/templates/speccore-yml-example.yml +222 -0
- package/templates/verify-spec-example.yaml +142 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# ═══════════════════════════════════════════════════════════
|
|
2
|
+
# SpecCore 主配置完整示例(.speccore.yml)
|
|
3
|
+
# ═══════════════════════════════════════════════════════════
|
|
4
|
+
# 位置:项目根 .speccore.yml(与 .speccore/PROJECT.yaml 分工:
|
|
5
|
+
# PROJECT.yaml 管「端/源码/Git/部署」,本文件管「行为/门禁/测试/AI」)
|
|
6
|
+
# 升级:speccore config --upgrade(不要手动编辑 schema_version)
|
|
7
|
+
# 参考:docs/config-reference.md(字段详解)
|
|
8
|
+
#
|
|
9
|
+
# 特性版本标记:
|
|
10
|
+
# v8.3.24+ arbitration 契约裁决 v8.3.94+ settings.vision
|
|
11
|
+
# v8.3.95+ quality_gates.verify_ui v8.3.193+ settings.ai provider 池
|
|
12
|
+
# v8.3.197+ quality_gates.block_level v8.3.215+ tests.auth 登录装配
|
|
13
|
+
# v8.3.217+ settings.smoke 三时机 v8.3.217+ stages / pipeline.test
|
|
14
|
+
# ═══════════════════════════════════════════════════════════
|
|
15
|
+
|
|
16
|
+
schema_version: 1
|
|
17
|
+
|
|
18
|
+
# ── 项目信息 ──
|
|
19
|
+
project:
|
|
20
|
+
name: my-project
|
|
21
|
+
description: 示例项目
|
|
22
|
+
version: 1.0.0
|
|
23
|
+
|
|
24
|
+
# ── 技术栈(供 AI 生成针对性内容)──
|
|
25
|
+
tech_stack:
|
|
26
|
+
backend: TypeScript / NestJS
|
|
27
|
+
frontend: Vue 3 / Element Plus
|
|
28
|
+
database: PostgreSQL
|
|
29
|
+
cache: Redis
|
|
30
|
+
mq: RabbitMQ
|
|
31
|
+
|
|
32
|
+
# ── 团队 ──
|
|
33
|
+
team:
|
|
34
|
+
members:
|
|
35
|
+
- name: alice
|
|
36
|
+
role: lead
|
|
37
|
+
assignee: true
|
|
38
|
+
- name: bob
|
|
39
|
+
role: developer
|
|
40
|
+
assignee: true
|
|
41
|
+
|
|
42
|
+
# ── 质量门禁 ──
|
|
43
|
+
quality_gates:
|
|
44
|
+
enforce_testing: true
|
|
45
|
+
enforce_review: true
|
|
46
|
+
require_pr: true
|
|
47
|
+
# 阻塞级别:standard(编译+单测+契约都阻断,默认)/ compile(仅编译阻断)
|
|
48
|
+
block_level: standard
|
|
49
|
+
# v8.3.95+: UI 验证默认行为(speccore verify --ui)
|
|
50
|
+
verify_ui:
|
|
51
|
+
enabled: true
|
|
52
|
+
smoke_test: true
|
|
53
|
+
visual_check: true
|
|
54
|
+
threshold: normal # strict / normal / loose
|
|
55
|
+
devices: [desktop, mobile]
|
|
56
|
+
browsers: [chromium]
|
|
57
|
+
timeout: 30000
|
|
58
|
+
headed: false
|
|
59
|
+
visual_model:
|
|
60
|
+
provider: qwen-vl
|
|
61
|
+
model: qwen-vl-max
|
|
62
|
+
|
|
63
|
+
# ── 契约裁决(v8.3.24+):full 全流程 / l1-only / report-only ──
|
|
64
|
+
arbitration:
|
|
65
|
+
enabled: true
|
|
66
|
+
mode: full
|
|
67
|
+
|
|
68
|
+
# ── 运行时行为 ──
|
|
69
|
+
settings:
|
|
70
|
+
# 指派策略:strict 阻断不一致 / loose 自动填+警告(推荐)/ off 关闭
|
|
71
|
+
assignee:
|
|
72
|
+
enabled: true
|
|
73
|
+
mode: loose
|
|
74
|
+
# 双向追溯 + @spec 注释
|
|
75
|
+
trace:
|
|
76
|
+
enabled: true
|
|
77
|
+
auto_annotate: true
|
|
78
|
+
# 归档时自动清理
|
|
79
|
+
archive:
|
|
80
|
+
auto_cleanup: false
|
|
81
|
+
# 并行执行建议
|
|
82
|
+
plan:
|
|
83
|
+
parallel_suggest: true
|
|
84
|
+
# 严格校验模式
|
|
85
|
+
validation:
|
|
86
|
+
strict_mode: false
|
|
87
|
+
# 自动检查规范库最新
|
|
88
|
+
sync:
|
|
89
|
+
auto_check: true
|
|
90
|
+
# 模式沉淀:off / smart(推荐)/ aggressive
|
|
91
|
+
patterns:
|
|
92
|
+
auto_save: smart
|
|
93
|
+
# 审查时检查执行人签名
|
|
94
|
+
review:
|
|
95
|
+
check_assignee: false
|
|
96
|
+
# v8.3.94+: 视觉模型(specs 文档图片理解,默认关闭)
|
|
97
|
+
vision:
|
|
98
|
+
enabled: false
|
|
99
|
+
provider: qwen-vl
|
|
100
|
+
model: qwen-vl-plus
|
|
101
|
+
apiKey: ${DASHSCOPE_API_KEY}
|
|
102
|
+
maxImagesPerPrompt: 10
|
|
103
|
+
imageMaxSizeKb: 2048
|
|
104
|
+
# 非必要流水线步骤三态开关:auto(智能,默认)/ on 强制 / off 跳过
|
|
105
|
+
optional_steps:
|
|
106
|
+
clarify: auto # 文档专业就跳过澄清
|
|
107
|
+
verify: auto
|
|
108
|
+
pipeline: auto
|
|
109
|
+
pr: off # 本地开发不自动提 PR
|
|
110
|
+
done: auto
|
|
111
|
+
spec2doc: off # 不需要导出文档
|
|
112
|
+
# 命名流水线(run --preset <name>)
|
|
113
|
+
pipelines:
|
|
114
|
+
default: develop # full/import/spec/analyze/develop/deliver/deploy/docs
|
|
115
|
+
custom:
|
|
116
|
+
my-flow: analyze,validate,taskify,plan,execute
|
|
117
|
+
hotfix: execute,verify,pipeline,pr
|
|
118
|
+
# v8.3.193+: 统一 LLM provider 池(host=宿主AI / llm=自配 / auto=宿主优先)
|
|
119
|
+
ai:
|
|
120
|
+
provider: auto
|
|
121
|
+
providers:
|
|
122
|
+
- name: local
|
|
123
|
+
type: ollama
|
|
124
|
+
endpoint: "http://localhost:11434"
|
|
125
|
+
model: qwen2.5:7b
|
|
126
|
+
priority: 1
|
|
127
|
+
- name: gpt4o
|
|
128
|
+
type: openai
|
|
129
|
+
model: gpt-4o
|
|
130
|
+
apiKey: "${OPENAI_API_KEY}"
|
|
131
|
+
priority: 2
|
|
132
|
+
defaults:
|
|
133
|
+
analyze: gpt4o
|
|
134
|
+
split: local
|
|
135
|
+
fallback: local
|
|
136
|
+
# v8.3.217+: 冒烟三时机开关 + 范围(run --smoke / --skip-smoke / --scope 单次覆盖)
|
|
137
|
+
smoke:
|
|
138
|
+
points:
|
|
139
|
+
local: auto # 开发完本地冒烟
|
|
140
|
+
pre-deploy: auto # 部署前门禁
|
|
141
|
+
post-deploy: auto # 部署后确认环境活着
|
|
142
|
+
scope: module # full 全量 / module 当前功能模块
|
|
143
|
+
scope_by_env:
|
|
144
|
+
dev: module
|
|
145
|
+
staging: module
|
|
146
|
+
production: full # 生产发布才全量
|
|
147
|
+
|
|
148
|
+
# ── Ask 引擎 ──
|
|
149
|
+
ask:
|
|
150
|
+
routing:
|
|
151
|
+
mode: hybrid # hybrid / cli-only / host-ai-only
|
|
152
|
+
high_threshold: 70
|
|
153
|
+
low_threshold: 45
|
|
154
|
+
auto_host_ai: true
|
|
155
|
+
cache_enabled: true
|
|
156
|
+
cache_min_hits: 3
|
|
157
|
+
rules:
|
|
158
|
+
force_host_ai: false
|
|
159
|
+
llm_providers:
|
|
160
|
+
- name: ollama-local
|
|
161
|
+
enabled: false
|
|
162
|
+
type: ollama
|
|
163
|
+
endpoint: http://localhost:11434
|
|
164
|
+
model: qwen2.5:7b
|
|
165
|
+
priority: 1
|
|
166
|
+
- name: openai-compatible
|
|
167
|
+
enabled: false
|
|
168
|
+
type: openai
|
|
169
|
+
endpoint: https://api.openai.com/v1/chat/completions
|
|
170
|
+
model: gpt-4o-mini
|
|
171
|
+
priority: 2
|
|
172
|
+
|
|
173
|
+
# ── 测试基础设施(与 verify / pipeline 联动)──
|
|
174
|
+
tests:
|
|
175
|
+
base_urls:
|
|
176
|
+
h5: https://staging.example.com/h5
|
|
177
|
+
admin: https://admin-staging.example.com
|
|
178
|
+
api: https://api-staging.example.com
|
|
179
|
+
local_urls:
|
|
180
|
+
h5: http://localhost:5173
|
|
181
|
+
# v8.3.215+: 测试登录(冒烟/视觉访问受保护页面前自动登录)
|
|
182
|
+
# data-testid 遵循 UI_SPEC 元素标识约定:{模块}-{页面}-{元素}
|
|
183
|
+
auth:
|
|
184
|
+
login_url: /login
|
|
185
|
+
username_selector: "[data-testid='login-username-input']"
|
|
186
|
+
password_selector: "[data-testid='login-password-input']"
|
|
187
|
+
submit_selector: "[data-testid='login-submit-btn']"
|
|
188
|
+
success_url_contains: /dashboard
|
|
189
|
+
credentials:
|
|
190
|
+
username: admin
|
|
191
|
+
password_env: SMOKE_PASSWORD # 密码从环境变量读取(推荐,不落库不进 git)
|
|
192
|
+
visual_model:
|
|
193
|
+
provider: qwen-vl
|
|
194
|
+
model: qwen-vl-max
|
|
195
|
+
timeout: 60000
|
|
196
|
+
|
|
197
|
+
# ── 分层测试阶段(verify --stage <stage> 联动)──
|
|
198
|
+
stages:
|
|
199
|
+
dev:
|
|
200
|
+
config: null # 使用内置代码质量验证
|
|
201
|
+
pr:
|
|
202
|
+
config: .speccore/tests/pr.yaml
|
|
203
|
+
deploy:
|
|
204
|
+
config: .speccore/tests/smoke.yaml
|
|
205
|
+
release:
|
|
206
|
+
config: .speccore/tests/release.yaml
|
|
207
|
+
|
|
208
|
+
# ── Pipeline 内置测试节点(build 后 deploy 前/后执行)──
|
|
209
|
+
pipeline:
|
|
210
|
+
test:
|
|
211
|
+
enabled: true
|
|
212
|
+
type: smoke # build-check / smoke / visual / api / all
|
|
213
|
+
stage: pre-deploy # pre-deploy / post-deploy / both
|
|
214
|
+
fail_on_error: true # 失败是否阻断部署(仅 critical)
|
|
215
|
+
auto_fix: true
|
|
216
|
+
max_retries: 3
|
|
217
|
+
|
|
218
|
+
# ── 配置变更历史(speccore config --upgrade 自动维护,勿手动编辑)──
|
|
219
|
+
config_history:
|
|
220
|
+
- date: 2026-09-01
|
|
221
|
+
change: 初始配置
|
|
222
|
+
changed_by: alice
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# VERIFY_SPEC.yaml — UI 冒烟测试规格
|
|
2
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
3
|
+
# 格式类型: VERIFY_SPEC 格式(scenarios + actions + assertions 结构)
|
|
4
|
+
# 适用场景: 精细 UI 交互测试(填写表单、点击按钮、断言元素状态)
|
|
5
|
+
# 对应命令:
|
|
6
|
+
# • speccore verify --ui --spec ./tests/smoke.yaml ← 推荐,原生支持完整交互逻辑
|
|
7
|
+
# • speccore verify --ui --config ./tests/smoke.yaml ← 兼容,自动转换为批量页面测试
|
|
8
|
+
# 按模块过滤: speccore verify --ui --spec ./tests/smoke.yaml --module=login
|
|
9
|
+
#
|
|
10
|
+
# ⚠️ 格式说明:
|
|
11
|
+
# VERIFY_SPEC 格式 = scenarios + actions + assertions(本文件,支持完整交互)
|
|
12
|
+
# TestConfig 格式 = tests + routes + type(用于批量页面/API测试,见 pr.yaml/release.yaml)
|
|
13
|
+
# 两种格式 speccore verify --config 均可自动识别。
|
|
14
|
+
#
|
|
15
|
+
# v8.3.95+ 支持: cookie / localStorage / script / scroll / upload / iframe / waitForRequest / waitForResponse
|
|
16
|
+
# v8.3.294+ 推荐: 选择器优先用 data-testid(UI_SPEC 元素标识约定 {模块}-{页面}-{元素}),
|
|
17
|
+
# 冒烟装配四阶段会自动从 UI_SPEC 提取元素清单生成场景,失败时输出自愈提示。
|
|
18
|
+
|
|
19
|
+
name: 示例项目冒烟测试
|
|
20
|
+
platform: h5-mobile
|
|
21
|
+
url: /
|
|
22
|
+
|
|
23
|
+
scenarios:
|
|
24
|
+
# ── 场景1: 登录流程(data-testid 选择器,推荐)──
|
|
25
|
+
# 登录态也可由 environments 配置的 tests.auth 自动装配(v8.3.215+),
|
|
26
|
+
# 本场景演示手工登录写法;受保护页面免登录可用 cookie/localStorage 注入(见场景2/3)。
|
|
27
|
+
- name: 登录-账号密码登录
|
|
28
|
+
description: 模块:auth 页面:/login
|
|
29
|
+
actions:
|
|
30
|
+
- type: navigate
|
|
31
|
+
value: /login
|
|
32
|
+
- type: fill
|
|
33
|
+
selector: "[data-testid='login-username-input']"
|
|
34
|
+
value: test_user
|
|
35
|
+
- type: fill
|
|
36
|
+
selector: "[data-testid='login-password-input']"
|
|
37
|
+
value: test_password
|
|
38
|
+
- type: click
|
|
39
|
+
selector: "[data-testid='login-submit-btn']"
|
|
40
|
+
waitFor: "[data-testid='dashboard-page']"
|
|
41
|
+
assertions:
|
|
42
|
+
- type: url
|
|
43
|
+
contains: /dashboard
|
|
44
|
+
- type: visible
|
|
45
|
+
selector: "[data-testid='dashboard-page']"
|
|
46
|
+
|
|
47
|
+
# ── 场景2: Cookie 注入免登录 ──
|
|
48
|
+
# 适用于: 已有登录态 Cookie,跳过登录页直接测试业务模块
|
|
49
|
+
- name: 预订列表-免登录(cookie注入)
|
|
50
|
+
description: 模块:booking 页面:/booking/list
|
|
51
|
+
actions:
|
|
52
|
+
# 注入登录 Cookie(跳过登录页)
|
|
53
|
+
- type: cookie
|
|
54
|
+
selector: session_token
|
|
55
|
+
value: eyJhbGciOiJIUzI1NiIs...
|
|
56
|
+
domain: example.com
|
|
57
|
+
path: /
|
|
58
|
+
secure: true
|
|
59
|
+
httpOnly: true
|
|
60
|
+
- type: navigate
|
|
61
|
+
value: /booking/list
|
|
62
|
+
- type: wait
|
|
63
|
+
delay: 1000
|
|
64
|
+
assertions:
|
|
65
|
+
- type: visible
|
|
66
|
+
selector: '.booking-list'
|
|
67
|
+
- type: count
|
|
68
|
+
selector: '.booking-item'
|
|
69
|
+
count: 5
|
|
70
|
+
|
|
71
|
+
# ── 场景3: localStorage 注入 Token ──
|
|
72
|
+
# 适用于: JWT Token 存储在 localStorage 的前端项目
|
|
73
|
+
- name: 个人中心-Token注入
|
|
74
|
+
description: 模块:user 页面:/profile
|
|
75
|
+
actions:
|
|
76
|
+
- type: localStorage
|
|
77
|
+
selector: accessToken
|
|
78
|
+
value: Bearer eyJhbGciOiJIUzI1NiIs...
|
|
79
|
+
- type: navigate
|
|
80
|
+
value: /profile
|
|
81
|
+
- type: wait
|
|
82
|
+
delay: 500
|
|
83
|
+
assertions:
|
|
84
|
+
- type: visible
|
|
85
|
+
selector: '.profile-header'
|
|
86
|
+
- type: text
|
|
87
|
+
selector: '.username'
|
|
88
|
+
contains: test_user
|
|
89
|
+
|
|
90
|
+
# ── 场景4: 按模块测试示例 (booking 模块) ──
|
|
91
|
+
# 运行: speccore verify --ui --config ./tests/smoke.yaml --module=booking
|
|
92
|
+
- name: 预订表单-提交预订
|
|
93
|
+
description: 模块:booking 页面:/booking/create
|
|
94
|
+
actions:
|
|
95
|
+
- type: navigate
|
|
96
|
+
value: /booking/create
|
|
97
|
+
- type: fill
|
|
98
|
+
selector: 'input[name="checkIn"]'
|
|
99
|
+
value: '2026-10-01'
|
|
100
|
+
- type: fill
|
|
101
|
+
selector: 'input[name="checkOut"]'
|
|
102
|
+
value: '2026-10-05'
|
|
103
|
+
- type: click
|
|
104
|
+
selector: '.search-btn'
|
|
105
|
+
waitFor: '.room-list'
|
|
106
|
+
- type: click
|
|
107
|
+
selector: '.room-item:first-child .select-btn'
|
|
108
|
+
- type: click
|
|
109
|
+
selector: '.submit-booking-btn'
|
|
110
|
+
waitFor: '.booking-success'
|
|
111
|
+
assertions:
|
|
112
|
+
- type: visible
|
|
113
|
+
selector: '.booking-success'
|
|
114
|
+
- type: text
|
|
115
|
+
selector: '.booking-success'
|
|
116
|
+
contains: 预订成功
|
|
117
|
+
|
|
118
|
+
# ── 场景5: 滚动 + 元素存在性检查 ──
|
|
119
|
+
- name: 首页-滚动加载
|
|
120
|
+
description: 模块:home 页面:/
|
|
121
|
+
actions:
|
|
122
|
+
- type: navigate
|
|
123
|
+
value: /
|
|
124
|
+
- type: scroll
|
|
125
|
+
selector: bottom
|
|
126
|
+
- type: wait
|
|
127
|
+
delay: 1000
|
|
128
|
+
assertions:
|
|
129
|
+
- type: visible
|
|
130
|
+
selector: '.footer'
|
|
131
|
+
|
|
132
|
+
# ── 场景6: 样式断言 ──
|
|
133
|
+
- name: 按钮-样式检查
|
|
134
|
+
description: 模块:ui 页面:/
|
|
135
|
+
actions:
|
|
136
|
+
- type: navigate
|
|
137
|
+
value: /
|
|
138
|
+
assertions:
|
|
139
|
+
- type: style
|
|
140
|
+
selector: '.primary-btn'
|
|
141
|
+
style: background-color
|
|
142
|
+
value: rgb(24, 144, 255)
|