Skip to content

Commit 8f2a262

Browse files
committed
#224 - attribute: conditional propagation
1 parent 5979b05 commit 8f2a262

File tree

1 file changed

+8
-6
lines changed
  • src/main/java/com/aventstack/extentreports/model

1 file changed

+8
-6
lines changed

src/main/java/com/aventstack/extentreports/model/Test.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ public final void addChild(Test child) {
6868
child.setParent(this);
6969
child.setLeaf(true);
7070
isLeaf = false;
71-
child.authorSet.addAll(authorSet);
72-
child.categorySet.addAll(categorySet);
73-
child.deviceSet.addAll(deviceSet);
71+
if (!child.isBDD() || child.isBDD() && child.bddType == Scenario.class) {
72+
child.authorSet.addAll(authorSet);
73+
child.categorySet.addAll(categorySet);
74+
child.deviceSet.addAll(deviceSet);
75+
}
7476
end(child.getStatus());
7577
children.add(child);
7678
}
@@ -152,8 +154,8 @@ public final String getFullName() {
152154
}
153155

154156
public final void addMedia(Media m) {
155-
if (m != null && (m.getPath() != null || m.getResolvedPath() != null
156-
|| ((ScreenCapture) m).getBase64() != null))
157+
if (m != null
158+
&& (m.getPath() != null || m.getResolvedPath() != null || ((ScreenCapture) m).getBase64() != null))
157159
media.add(m);
158160
end(status);
159161
}
@@ -213,4 +215,4 @@ private void computeStatus(Test t) {
213215
}
214216
}
215217
}
216-
}
218+
}

0 commit comments

Comments
 (0)