@testid/antd-testid-runtime 1.0.13 → 1.0.14

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/dist/index.js CHANGED
@@ -90,7 +90,14 @@ var antdAdapter = {
90
90
  "a-textarea",
91
91
  "a-checkbox",
92
92
  "a-radio",
93
- "a-switch"
93
+ "a-switch",
94
+ "a-menu-item",
95
+ "a-dropdown-button",
96
+ "a-tabs-tab-pane",
97
+ "a-table",
98
+ "a-tag",
99
+ "a-card",
100
+ "a-collapse-panel"
94
101
  ],
95
102
  tagPrefixPattern: /^a-/
96
103
  };
@@ -225,9 +232,16 @@ function getAnchorCounterMap() {
225
232
  }
226
233
  function parseBaseKey(baseKey) {
227
234
  const match = baseKey.match(
228
- /^common_comp_(.+?)_tag_(.+?)_(\d+)$/
235
+ /^common_comp_(.+?)_tag_(.+)_(\d+)$/
229
236
  );
230
- if (!match) return null;
237
+ if (!match) {
238
+ console.warn(
239
+ "[antd-testid-runtime] parseBaseKey \u5931\u8D25\uFF0CbaseKey \u683C\u5F0F\u4E0D\u5339\u914D:",
240
+ baseKey,
241
+ "\u671F\u671B\u683C\u5F0F: common_comp_{componentName}_tag_{tagName}_{index}"
242
+ );
243
+ return null;
244
+ }
231
245
  return {
232
246
  componentName: match[1],
233
247
  tagName: match[2],
package/dist/index.mjs CHANGED
@@ -50,7 +50,14 @@ var antdAdapter = {
50
50
  "a-textarea",
51
51
  "a-checkbox",
52
52
  "a-radio",
53
- "a-switch"
53
+ "a-switch",
54
+ "a-menu-item",
55
+ "a-dropdown-button",
56
+ "a-tabs-tab-pane",
57
+ "a-table",
58
+ "a-tag",
59
+ "a-card",
60
+ "a-collapse-panel"
54
61
  ],
55
62
  tagPrefixPattern: /^a-/
56
63
  };
@@ -185,9 +192,16 @@ function getAnchorCounterMap() {
185
192
  }
186
193
  function parseBaseKey(baseKey) {
187
194
  const match = baseKey.match(
188
- /^common_comp_(.+?)_tag_(.+?)_(\d+)$/
195
+ /^common_comp_(.+?)_tag_(.+)_(\d+)$/
189
196
  );
190
- if (!match) return null;
197
+ if (!match) {
198
+ console.warn(
199
+ "[antd-testid-runtime] parseBaseKey \u5931\u8D25\uFF0CbaseKey \u683C\u5F0F\u4E0D\u5339\u914D:",
200
+ baseKey,
201
+ "\u671F\u671B\u683C\u5F0F: common_comp_{componentName}_tag_{tagName}_{index}"
202
+ );
203
+ return null;
204
+ }
191
205
  return {
192
206
  componentName: match[1],
193
207
  tagName: match[2],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testid/antd-testid-runtime",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "运行时兜底打标模块 — MutationObserver + 锚点计数器 + 浮层计数器 + ID 重复检测",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",