@testid/antd-testid-runtime 1.0.19 → 1.0.20

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
@@ -452,7 +452,8 @@ var TestIdObserver = class {
452
452
  */
453
453
  processSingleNode(node) {
454
454
  const config = getConfig();
455
- if (node.hasAttribute("data-testid")) return;
455
+ const existingTestId = node.getAttribute("data-testid");
456
+ if (existingTestId) return;
456
457
  if (this.shouldIgnore(node, config)) return;
457
458
  const baseKey = node.getAttribute("data-test-base-key");
458
459
  if (baseKey) {
package/dist/index.mjs CHANGED
@@ -410,7 +410,8 @@ var TestIdObserver = class {
410
410
  */
411
411
  processSingleNode(node) {
412
412
  const config = getConfig();
413
- if (node.hasAttribute("data-testid")) return;
413
+ const existingTestId = node.getAttribute("data-testid");
414
+ if (existingTestId) return;
414
415
  if (this.shouldIgnore(node, config)) return;
415
416
  const baseKey = node.getAttribute("data-test-base-key");
416
417
  if (baseKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testid/antd-testid-runtime",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "运行时兜底打标模块 — MutationObserver + 锚点计数器 + 浮层计数器 + ID 重复检测",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",