@testid/antd-testid-runtime 1.0.19 → 1.0.21
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 +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -452,7 +452,8 @@ var TestIdObserver = class {
|
|
|
452
452
|
*/
|
|
453
453
|
processSingleNode(node) {
|
|
454
454
|
const config = getConfig();
|
|
455
|
-
|
|
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
|
-
|
|
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) {
|