Skip to content

Commit 16c280e

Browse files
committed
Update PreviewImagesTests for excluded model changes
1 parent 54f9375 commit 16c280e

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ target/
183183
/Curricular Models/Urban Suite/Urban Suite - Structure from Randomness 1.png
184184
/Curricular Models/Urban Suite/Urban Suite - Structure from Randomness 2.png
185185
/Curricular Models/Urban Suite/Urban Suite - Tijuana Bordertowns.png
186+
/HubNet Activities/Gridlock HubNet.png
187+
/HubNet Activities/Unverified/Public Good HubNet.png
186188
/IABM Textbook/chapter 0/Turtles Circling Simple.png
187189
/IABM Textbook/chapter 1/Ants Simple.png
188190
/IABM Textbook/chapter 2/Heroes and Cowards.png
-6.94 KB
Binary file not shown.
-10.4 KB
Binary file not shown.

src/test/scala/org/nlogo/models/PreviewImagesTests.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class PreviewImagesTests extends TestModels {
2727
val manualPreviewNeeded = Set(
2828
"HubNet", "/sound/", "/ls/", "GoGo", "Arduino"
2929
)
30+
val manualPreviewExceptions = Set(
31+
"Gridlock HubNet",
32+
"Public Good HubNet"
33+
)
3034
val manualPreviewPermitted = Set(
3135
"Table Example",
3236
"Info Tab Example",
@@ -77,7 +81,9 @@ class PreviewImagesTests extends TestModels {
7781
"Wolf Sheep Predation - Micro-Sims",
7882
)
7983
testModels("Models should have manual previews only if needed or permitted") { m =>
80-
if (manualPreviewNeeded.exists(PathUtils.standardize(m.file.getPath).contains))
84+
val path = PathUtils.standardize(m.file.getPath)
85+
86+
if (manualPreviewNeeded.exists(path.contains) && !manualPreviewExceptions.exists(path.contains))
8187
if (m.previewCommands != Manual)
8288
Some("should need manual preview")
8389
else

0 commit comments

Comments
 (0)