From fae36b72bc191c699006299c24d96671442437e1 Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Sat, 21 Dec 2024 20:59:04 +0100 Subject: [PATCH] browser: hide error results unless displaying all tests --- .../SL2Result.class/instance/isError.st | 4 ++++ .../SL2Result.class/methodProperties.json | 1 + .../instance/childrenForTestNode..st | 2 +- .../instance/classLabels.st | 2 +- .../SwaLintBrowser.class/instance/classes.st | 2 +- .../instance/displayedResults.st | 6 ++++++ .../instance/displayedTests.st | 4 ++-- .../SwaLintBrowser.class/instance/messages.st | 2 +- .../instance/resultsForTestNode..st | 2 +- .../instance/resultsForTestSelection.st | 2 +- .../instance/selectedMessage.st | 2 +- .../SwaLintBrowser.class/instance/testText.st | 2 +- .../methodProperties.json | 19 ++++++++++--------- 13 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 packages/SwaLintBrowser.package/SL2Result.class/instance/isError.st create mode 100644 packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedResults.st diff --git a/packages/SwaLintBrowser.package/SL2Result.class/instance/isError.st b/packages/SwaLintBrowser.package/SL2Result.class/instance/isError.st new file mode 100644 index 0000000..8bef198 --- /dev/null +++ b/packages/SwaLintBrowser.package/SL2Result.class/instance/isError.st @@ -0,0 +1,4 @@ +testing +isError + + ^ self resultData isError \ No newline at end of file diff --git a/packages/SwaLintBrowser.package/SL2Result.class/methodProperties.json b/packages/SwaLintBrowser.package/SL2Result.class/methodProperties.json index f4f9cf2..b348315 100644 --- a/packages/SwaLintBrowser.package/SL2Result.class/methodProperties.json +++ b/packages/SwaLintBrowser.package/SL2Result.class/methodProperties.json @@ -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", diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/childrenForTestNode..st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/childrenForTestNode..st index 368242b..03ed901 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/childrenForTestNode..st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/childrenForTestNode..st @@ -1,6 +1,6 @@ accessing - toolbuilder childrenForTestNode: node - + (node ifNil: ["hacked!"^ #()]) isCategory ifFalse: [^ #()]. diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classLabels.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classLabels.st index 6fe8ba7..63323e0 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classLabels.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classLabels.st @@ -1,6 +1,6 @@ accessing - toolbuilder classLabels - + ^ self classes collect: [:class | self labelForClass: class] \ No newline at end of file diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classes.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classes.st index 15a8606..3735fc0 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classes.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/classes.st @@ -1,6 +1,6 @@ accessing classes - + ^ (self resultsForTestSelection collect: [:result | result classObject] as: Set) diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedResults.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedResults.st new file mode 100644 index 0000000..eb31cb1 --- /dev/null +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedResults.st @@ -0,0 +1,6 @@ +accessing +displayedResults + + + self shouldDisplayAllTests ifTrue: [^ self results]. + ^ self results reject: [:result | result isError] \ No newline at end of file diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedTests.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedTests.st index 01d9318..902a0cd 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedTests.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/displayedTests.st @@ -1,6 +1,6 @@ accessing displayedTests - + self shouldDisplayAllTests ifTrue: [^ self tests]. - ^ self results collect: #test as: Set \ No newline at end of file + ^ self displayedResults collect: #test as: Set \ No newline at end of file diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/messages.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/messages.st index f5b87ef..adfbc27 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/messages.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/messages.st @@ -1,6 +1,6 @@ accessing - toolbuilder messages - + ^ (self resultsForTestAndClassSelection collect: [:result | result message] as: Set) diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestNode..st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestNode..st index b48ee16..9cc2157 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestNode..st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestNode..st @@ -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]]]) \ No newline at end of file diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestSelection.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestSelection.st index 86ef18f..82fbe76 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestSelection.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/resultsForTestSelection.st @@ -1,6 +1,6 @@ accessing resultsForTestSelection - self hasTestNodeSelected ifFalse: [^ self results]. + self hasTestNodeSelected ifFalse: [^ self displayedResults]. ^ self resultsForTestNode: self selectedTestNode \ No newline at end of file diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/selectedMessage.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/selectedMessage.st index 77f16a3..5c8c6bb 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/selectedMessage.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/selectedMessage.st @@ -1,6 +1,6 @@ accessing selectedMessage - + self hasMessageSelected ifFalse: [^ '']. self selectedMessageName isSymbol ifFalse: diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/testText.st b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/testText.st index b248655..257f71e 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/testText.st +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/instance/testText.st @@ -1,6 +1,6 @@ accessing - toolbuilder testText - + | description resultsText | description := self hasMessageSelected diff --git a/packages/SwaLintBrowser.package/SwaLintBrowser.class/methodProperties.json b/packages/SwaLintBrowser.package/SwaLintBrowser.class/methodProperties.json index 4923e68..a162c07 100644 --- a/packages/SwaLintBrowser.package/SwaLintBrowser.class/methodProperties.json +++ b/packages/SwaLintBrowser.package/SwaLintBrowser.class/methodProperties.json @@ -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", @@ -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", @@ -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", @@ -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", @@ -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",