Skip to content

Commit dbcc30b

Browse files
author
509456_adsk
committed
OOTB smoke: fail on Error only and rename colliding test names.
Avoid RTF testName collisions with legacy SampleTests and align smoke checks with legacy behavior by ignoring Warning-state nodes after RunCurrentModel.
1 parent 6c0dab5 commit dbcc30b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ private void OpenAndRunSample(string scriptFileName)
6868
RunCurrentModel();
6969

7070
var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes
71-
.Where(n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList();
71+
.Where(n => n.State == ElementState.Error).ToList();
7272
if (errorNodes.Any())
7373
{
7474
var first = errorNodes[0];
7575
var msg = first.NodeInfos
76-
.FirstOrDefault(i => i.State == ElementState.Error || i.State == ElementState.Warning)?.Message;
76+
.FirstOrDefault(i => i.State == ElementState.Error)?.Message;
7777
Assert.Fail(
78-
$"After RunCurrentModel(), {errorNodes.Count} node(s) in error/warning in '{scriptFileName}'. " +
78+
$"After RunCurrentModel(), {errorNodes.Count} node(s) in error in '{scriptFileName}'. " +
7979
$"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty));
8080
}
8181
}
@@ -110,21 +110,21 @@ public void Revit_Geometry_Creation_Surfaces()
110110

111111
[Test, Category("SmokeTests")]
112112
[TestModel(@".\AdaptiveComponents.rfa")]
113-
public void Revit_Adaptive_Component_Placement()
113+
public void OOTB_Revit_Adaptive_Component_Placement()
114114
{
115115
OpenAndRunSample("Revit Adaptive Component Placement.dyn");
116116
}
117117

118118
[Test, Category("SmokeTests")]
119119
[TestModel(@".\DynamoSample_2020.rvt")]
120-
public void Revit_Color()
120+
public void OOTB_Revit_Color()
121121
{
122122
OpenAndRunSample("Revit Color.dyn");
123123
}
124124

125125
[Test, Category("SmokeTests")]
126126
[TestModel(@".\DynamoSample_2020.rvt")]
127-
public void Revit_Floors_and_Framing()
127+
public void OOTB_Revit_Floors_and_Framing()
128128
{
129129
OpenAndRunSample("Revit Floors and Framing.dyn");
130130
}

0 commit comments

Comments
 (0)