@yfwu2020/dsh-selection-explain 0.4.1 → 0.7.0
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.md +5 -1
- package/lib/client.js +811 -26
- package/lib/index.js +88 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/gen-star-path.mjs +71 -0
- package/scripts/smoke-panel.mjs +709 -1
- package/scripts/test-client.mjs +12 -2
- package/src/client/index.js +811 -26
- package/src/index.ts +92 -0
package/scripts/test-client.mjs
CHANGED
|
@@ -2253,13 +2253,23 @@ assert('尾部上下文变化后仍命中历史(不再重新生成一个)',
|
|
|
2253
2253
|
const pill = Array.from(walk(panel.parentNode)).find((n) => n.className === 'dsh-sel-pill')
|
|
2254
2254
|
assert('右下角有状态胶囊', !!pill, pill ? pill.className : '未找到')
|
|
2255
2255
|
assert(
|
|
2256
|
-
'
|
|
2256
|
+
'胶囊结构和费用胶囊同构:星芒 + 主体 + 次要 + 箭头',
|
|
2257
2257
|
!!pill &&
|
|
2258
|
-
['dsh-sel-
|
|
2258
|
+
['dsh-sel-pillname', 'dsh-sel-pillmeta', 'dsh-sel-pillcaret'].every((c) =>
|
|
2259
2259
|
Array.from(walk(pill)).some((n) => n.className === c),
|
|
2260
|
+
) &&
|
|
2261
|
+
// SVG 元素的 class 是 SVGAnimatedString,客户端用 setAttribute('class', …) 写 —— 桩里也照这个读
|
|
2262
|
+
['dsh-sel-pillicon', 'dsh-sel-pillstar'].every((c) =>
|
|
2263
|
+
Array.from(walk(pill)).some((n) => n.getAttribute && n.getAttribute('class') === c),
|
|
2260
2264
|
),
|
|
2261
2265
|
pill ? walk(pill).next().value.className : '',
|
|
2262
2266
|
)
|
|
2267
|
+
const pillStarEl = pill && Array.from(walk(pill)).find((n) => n.getAttribute && n.getAttribute('class') === 'dsh-sel-pillstar')
|
|
2268
|
+
assert(
|
|
2269
|
+
'球心里的图形初始是"圆点态"那条 path(展开时不许直接画成星)',
|
|
2270
|
+
!!pillStarEl && /^M4 0/.test(String(pillStarEl.getAttribute('d'))),
|
|
2271
|
+
pillStarEl ? String(pillStarEl.getAttribute('d')).slice(0, 24) : '未找到',
|
|
2272
|
+
)
|
|
2263
2273
|
assert('箭头用和费用胶囊同一个字符 ▴ / ▾(不是大三角 ▲ ▼)', textOf(pill).indexOf('▲') < 0 && textOf(pill).indexOf('▼') < 0, textOf(pill))
|
|
2264
2274
|
|
|
2265
2275
|
// 进行中:圆点在呼吸(tone=busy),文本报阶段 + 秒数
|