@testid/antd-testid-runtime 1.0.11 → 1.0.12
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -6
- package/dist/index.mjs +5 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -400,8 +400,8 @@ declare class TestIdObserver {
|
|
|
400
400
|
/**
|
|
401
401
|
* 处理浮层内部子节点 (Modal/Drawer/Dropdown 内的按钮、输入框等)
|
|
402
402
|
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
403
|
+
* 同类型浮层的子节点共享全局计数器 (key: popupType_tag),
|
|
404
|
+
* 确保页面上多个同类下拉选择框的下拉选项 testid 全局唯一。
|
|
405
405
|
*
|
|
406
406
|
* ID 格式: ${runtimePagePrefix}${popupPrefix}${tag}_${counter}
|
|
407
407
|
* 例: hall_dynamic_modal_button_0, hall_dynamic_select_div_2
|
package/dist/index.d.ts
CHANGED
|
@@ -400,8 +400,8 @@ declare class TestIdObserver {
|
|
|
400
400
|
/**
|
|
401
401
|
* 处理浮层内部子节点 (Modal/Drawer/Dropdown 内的按钮、输入框等)
|
|
402
402
|
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
403
|
+
* 同类型浮层的子节点共享全局计数器 (key: popupType_tag),
|
|
404
|
+
* 确保页面上多个同类下拉选择框的下拉选项 testid 全局唯一。
|
|
405
405
|
*
|
|
406
406
|
* ID 格式: ${runtimePagePrefix}${popupPrefix}${tag}_${counter}
|
|
407
407
|
* 例: hall_dynamic_modal_button_0, hall_dynamic_select_div_2
|
package/dist/index.js
CHANGED
|
@@ -428,7 +428,7 @@ var TestIdObserver = class {
|
|
|
428
428
|
}
|
|
429
429
|
const popupAncestor = this.detectPopupAncestor(node);
|
|
430
430
|
if (popupAncestor) {
|
|
431
|
-
this.handlePopupChildNode(node, popupAncestor.type,
|
|
431
|
+
this.handlePopupChildNode(node, popupAncestor.type, config);
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
434
434
|
const popupType = this.detectPopupType(node);
|
|
@@ -595,19 +595,18 @@ var TestIdObserver = class {
|
|
|
595
595
|
/**
|
|
596
596
|
* 处理浮层内部子节点 (Modal/Drawer/Dropdown 内的按钮、输入框等)
|
|
597
597
|
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
598
|
+
* 同类型浮层的子节点共享全局计数器 (key: popupType_tag),
|
|
599
|
+
* 确保页面上多个同类下拉选择框的下拉选项 testid 全局唯一。
|
|
600
600
|
*
|
|
601
601
|
* ID 格式: ${runtimePagePrefix}${popupPrefix}${tag}_${counter}
|
|
602
602
|
* 例: hall_dynamic_modal_button_0, hall_dynamic_select_div_2
|
|
603
603
|
*
|
|
604
604
|
* 浮层子元素均为运行时注入,统一使用 runtimePagePrefix 前缀。
|
|
605
605
|
*/
|
|
606
|
-
handlePopupChildNode(node, popupType,
|
|
606
|
+
handlePopupChildNode(node, popupType, config) {
|
|
607
607
|
if (config.onlyInteractive && !this.isInteractive(node)) return;
|
|
608
608
|
const tag = this.getSimpleTag(node);
|
|
609
|
-
const
|
|
610
|
-
const key = `${popupRootTestId}_${tag}`;
|
|
609
|
+
const key = `${popupType}_${tag}`;
|
|
611
610
|
const current = this.state.popupChildCounter.get(key) ?? 0;
|
|
612
611
|
this.state.popupChildCounter.set(key, current + 1);
|
|
613
612
|
const popupPrefix = config.popupPrefixMap[popupType] || `${popupType}_`;
|
package/dist/index.mjs
CHANGED
|
@@ -385,7 +385,7 @@ var TestIdObserver = class {
|
|
|
385
385
|
}
|
|
386
386
|
const popupAncestor = this.detectPopupAncestor(node);
|
|
387
387
|
if (popupAncestor) {
|
|
388
|
-
this.handlePopupChildNode(node, popupAncestor.type,
|
|
388
|
+
this.handlePopupChildNode(node, popupAncestor.type, config);
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
391
|
const popupType = this.detectPopupType(node);
|
|
@@ -552,19 +552,18 @@ var TestIdObserver = class {
|
|
|
552
552
|
/**
|
|
553
553
|
* 处理浮层内部子节点 (Modal/Drawer/Dropdown 内的按钮、输入框等)
|
|
554
554
|
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
555
|
+
* 同类型浮层的子节点共享全局计数器 (key: popupType_tag),
|
|
556
|
+
* 确保页面上多个同类下拉选择框的下拉选项 testid 全局唯一。
|
|
557
557
|
*
|
|
558
558
|
* ID 格式: ${runtimePagePrefix}${popupPrefix}${tag}_${counter}
|
|
559
559
|
* 例: hall_dynamic_modal_button_0, hall_dynamic_select_div_2
|
|
560
560
|
*
|
|
561
561
|
* 浮层子元素均为运行时注入,统一使用 runtimePagePrefix 前缀。
|
|
562
562
|
*/
|
|
563
|
-
handlePopupChildNode(node, popupType,
|
|
563
|
+
handlePopupChildNode(node, popupType, config) {
|
|
564
564
|
if (config.onlyInteractive && !this.isInteractive(node)) return;
|
|
565
565
|
const tag = this.getSimpleTag(node);
|
|
566
|
-
const
|
|
567
|
-
const key = `${popupRootTestId}_${tag}`;
|
|
566
|
+
const key = `${popupType}_${tag}`;
|
|
568
567
|
const current = this.state.popupChildCounter.get(key) ?? 0;
|
|
569
568
|
this.state.popupChildCounter.set(key, current + 1);
|
|
570
569
|
const popupPrefix = config.popupPrefixMap[popupType] || `${popupType}_`;
|