Skip to content

Commit

Permalink
browser: hide error results unless displaying all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Dec 21, 2024
1 parent 34da7f6 commit fae36b7
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing
isError

^ self resultData isError
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"newForTest:resultData:" : "ct 12/12/2024 05:17" },
"instance" : {
"classObject" : "ct 12/19/2024 21:03",
"isError" : "ct 12/21/2024 20:53",
"message" : "ct 12/19/2024 21:03",
"printOn:" : "ct 12/12/2024 05:46",
"resultData" : "ct 12/12/2024 05:13",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing - toolbuilder
childrenForTestNode: node
<uses: #(results)>
<uses: #(displayedResults)>

(node ifNil: ["hacked!"^ #()]) isCategory ifFalse: [^ #()].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing - toolbuilder
classLabels
<uses: #(classes results)>
<uses: #(classes displayedResults)>

^ self classes collect: [:class |
self labelForClass: class]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
classes
<uses: #(results selectedTestNode)>
<uses: #(displayedResults selectedTestNode)>

^ (self resultsForTestSelection
collect: [:result | result classObject] as: Set)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
displayedResults
<uses: #(results)>

self shouldDisplayAllTests ifTrue: [^ self results].
^ self results reject: [:result | result isError]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
displayedTests
<uses: #(results shouldDisplayAllTests tests)>
<uses: #(displayedResults shouldDisplayAllTests tests)>

self shouldDisplayAllTests ifTrue: [^ self tests].
^ self results collect: #test as: Set
^ self displayedResults collect: #test as: Set
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing - toolbuilder
messages
<uses: #(results selectedClass)>
<uses: #(displayedResults selectedClass)>

^ (self resultsForTestAndClassSelection
collect: [:result | result message] as: Set)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
accessing
resultsForTestNode: node

^ self results select:
^ self displayedResults select:
(node isCategory
ifFalse: [[:result | result test == node]]
ifTrue: [[:result | result test categories anySatisfy: [:category | category includesCategory: node]]])
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
resultsForTestSelection

self hasTestNodeSelected ifFalse: [^ self results].
self hasTestNodeSelected ifFalse: [^ self displayedResults].

^ self resultsForTestNode: self selectedTestNode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
selectedMessage
<uses: #(results selectedMessageName)>
<uses: #(displayedResults selectedMessageName)>

self hasMessageSelected ifFalse: [^ ''].
self selectedMessageName isSymbol ifFalse:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing - toolbuilder
testText
<uses: #(selectedMessageName selectedTestNode results)>
<uses: #(selectedMessageName selectedTestNode displayedResults)>

| description resultsText |
description := self hasMessageSelected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@
"changed:" : "ct 2/8/2022 14:49",
"changedDependent:" : "ct 2/8/2022 14:49",
"childrenForTestCategory:" : "ct 12/19/2024 21:06",
"childrenForTestNode:" : "ct 12/18/2024 06:28",
"childrenForTestNode:" : "ct 12/21/2024 20:49",
"childrenForTestNodePath:" : "ct 12/18/2024 04:42",
"chooseTarget" : "ct 12/12/2024 01:59",
"classLabels" : "ct 12/18/2024 03:36",
"classLabels" : "ct 12/21/2024 20:49",
"classListMenu:" : "ct 12/13/2024 00:39",
"classListMenu:shifted:" : "ct 12/13/2024 00:36",
"classListMenuMore:" : "ct 12/13/2024 00:39",
"classes" : "ct 12/17/2024 23:08",
"classes" : "ct 12/21/2024 20:49",
"copySelectedTestName" : "ct 12/21/2024 20:35",
"dateFilterLabel" : "ct 12/10/2024 23:22",
"defaultShouldDisplayAllTests" : "ct 12/18/2024 03:07",
"defaultWindowColor" : "ct 12/10/2024 23:28",
"dependentAspectsOn:" : "ct 2/8/2022 14:49",
"displayedResults" : "ct 12/21/2024 20:49",
"displayedTestCategories" : "ct 12/18/2024 02:27",
"displayedTests" : "ct 12/18/2024 00:09",
"displayedTests" : "ct 12/21/2024 20:50",
"hasMessageSelected" : "ct 12/12/2024 06:48",
"hasMethodSelected" : "ct 12/17/2024 21:25",
"hasRealClassSelected" : "ct 12/18/2024 04:58",
Expand All @@ -59,7 +60,7 @@
"messageLabels" : "ct 12/18/2024 03:36",
"messageListMenu:shifted:" : "ct 12/17/2024 21:22",
"messageResultMenu:" : "ct 12/19/2024 21:29",
"messages" : "ct 12/17/2024 23:10",
"messages" : "ct 12/21/2024 20:50",
"offerMenu:" : "ct 12/7/2023 16:30",
"offerSettingsMenu" : "ct 12/19/2024 23:25",
"open" : "ct 12/12/2024 03:35",
Expand All @@ -70,8 +71,8 @@
"resultsForTestAndClassSelection" : "ct 12/17/2024 22:18",
"resultsForTestAndClassSelectionAndMessage:" : "ct 12/18/2024 04:55",
"resultsForTestAndMessageSelection" : "ct 12/18/2024 03:38",
"resultsForTestNode:" : "ct 12/18/2024 02:07",
"resultsForTestSelection" : "ct 12/17/2024 21:27",
"resultsForTestNode:" : "ct 12/21/2024 20:50",
"resultsForTestSelection" : "ct 12/21/2024 20:50",
"resultsForTestSelectionAndClass:" : "ct 12/17/2024 22:17",
"runTests" : "ct 12/12/2024 04:02",
"runnerClass" : "ct 12/12/2024 04:02",
Expand All @@ -84,7 +85,7 @@
"selectedClass" : "ct 12/17/2024 23:10",
"selectedClassIndex" : "ct 12/17/2024 23:11",
"selectedClassOrMetaClass" : "ct 12/18/2024 04:58",
"selectedMessage" : "ct 12/21/2024 19:59",
"selectedMessage" : "ct 12/21/2024 20:51",
"selectedMessageIndex" : "ct 12/18/2024 03:43",
"selectedMessageName" : "ct 12/17/2024 23:11",
"selectedTestNode" : "ct 12/18/2024 04:24",
Expand All @@ -106,7 +107,7 @@
"testNodePathFor:parent:" : "ct 12/18/2024 04:44",
"testRootPaths" : "ct 12/18/2024 04:43",
"testRoots" : "ct 12/18/2024 21:47",
"testText" : "ct 12/21/2024 20:07",
"testText" : "ct 12/21/2024 20:51",
"testTreeExpanded" : "ct 12/12/2024 06:22",
"testTreeKey:from:" : "ct 12/21/2024 20:40",
"tests" : "ct 12/12/2024 05:54",
Expand Down

0 comments on commit fae36b7

Please sign in to comment.