Skip to content

Commit 773f288

Browse files
509456_adskcursoragent
andcommitted
OOTB smoke: restore Warning checks and align TestModel with sample Info notes.
Address Mikhinja D4R #3388 review — fail on Error+Warning (revert dbcc30b), point Snowdon-dependent tests at Samples/Snowdon Towers Sample Architectural.rvt, Points at AdaptiveComponents.rfa; add Snowdon LFS test asset from Merrimack. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent bd1d8b2 commit 773f288

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# Auto detect text files and perform LF normalization
22
* text=auto
3-
43
# Custom for Visual Studio
54
*.cs diff=csharp
65
*.sln merge=union
76
*.csproj merge=union
87
*.vbproj merge=union
98
*.fsproj merge=union
109
*.dbproj merge=union
11-
1210
# Standard to msysgit
1311
*.doc diff=astextplain
1412
*.DOC diff=astextplain
@@ -20,3 +18,4 @@
2018
*.PDF diff=astextplain
2119
*.rtf diff=astextplain
2220
*.RTF diff=astextplain
21+
test/System/Samples/Snowdon[[:space:]]Towers[[:space:]]Sample[[:space:]]Architectural.rvt filter=lfs diff=lfs merge=lfs -text

test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,27 @@ private void OpenAndRunSample(string scriptFileName)
4444
RunCurrentModel();
4545

4646
var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes
47-
.Where(n => n.State == ElementState.Error).ToList();
47+
.Where(n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList();
4848
if (errorNodes.Any())
4949
{
5050
var first = errorNodes[0];
51+
var msg = first.NodeInfos
52+
.FirstOrDefault(i => i.State == ElementState.Error || i.State == ElementState.Warning)?.Message;
5153
Assert.Fail(
52-
$"After RunCurrentModel(), {errorNodes.Count} node(s) in error in '{scriptFileName}'. " +
53-
$"First: [{first.State}] {first.Name}");
54+
$"After RunCurrentModel(), {errorNodes.Count} node(s) in error/warning in '{scriptFileName}'. " +
55+
$"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty));
5456
}
5557
}
5658

5759
[Test, Category("SmokeTests")]
58-
[TestModel(@".\empty.rfa")]
60+
[TestModel(@".\AdaptiveComponents.rfa")]
5961
public void Revit_Geometry_Creation_Points()
6062
{
6163
OpenAndRunSample("Revit Geometry Creation Points.dyn");
6264
}
6365

6466
[Test, Category("SmokeTests")]
65-
[TestModel(@".\empty.rfa")]
67+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
6668
public void Revit_Geometry_Creation_Curves()
6769
{
6870
OpenAndRunSample("Revit Geometry Creation Curves.dyn");
@@ -83,42 +85,42 @@ public void Revit_Geometry_Creation_Surfaces()
8385
}
8486

8587
[Test, Category("SmokeTests")]
86-
[TestModel(@".\AdaptiveComponents.rfa")]
88+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
8789
public void OOTB_Revit_Adaptive_Component_Placement()
8890
{
8991
OpenAndRunSample("Revit Adaptive Component Placement.dyn");
9092
}
9193

9294
[Test, Category("SmokeTests")]
93-
[TestModel(@".\DynamoSample_2020.rvt")]
95+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
9496
public void OOTB_Revit_Color()
9597
{
9698
OpenAndRunSample("Revit Color.dyn");
9799
}
98100

99101
[Test, Category("SmokeTests")]
100-
[TestModel(@".\DynamoSample_2020.rvt")]
102+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
101103
public void OOTB_Revit_Floors_and_Framing()
102104
{
103105
OpenAndRunSample("Revit Floors and Framing.dyn");
104106
}
105107

106108
[Test, Category("SmokeTests")]
107-
[TestModel(@".\DynamoSample_2020.rvt")]
109+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
108110
public void Revit_Import_Solid()
109111
{
110112
OpenAndRunSample("Revit Import Solid.dyn");
111113
}
112114

113115
[Test, Category("SmokeTests")]
114-
[TestModel(@".\DynamoSample_2020.rvt")]
116+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
115117
public void Revit_Place_Families_By_Level_Set_Parameters()
116118
{
117119
OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn");
118120
}
119121

120122
[Test, Category("SmokeTests")]
121-
[TestModel(@".\StructuralFraming.rvt")]
123+
[TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")]
122124
public void Revit_Structural_Framing()
123125
{
124126
OpenAndRunSample("Revit Structural Framing.dyn");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:931eeef58311d87ad5b15eb2622a4a7cd2737091d295c24e625c67e445ad65d1
3+
size 97615872

0 commit comments

Comments
 (0)