mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 14:50:32 +02:00
fpcunit: after a test run only nodes with errors become expanded, all nodes in the tree (test units) are collapsed by default, patch #26985
git-svn-id: trunk@46754 -
This commit is contained in:
parent
548adfecfd
commit
349fd28c87
@ -263,8 +263,10 @@ begin
|
|||||||
MenuItem3.Caption:= smiCopyClipbrd;
|
MenuItem3.Caption:= smiCopyClipbrd;
|
||||||
// Select the first entry in the tree in order to immediately activate the
|
// Select the first entry in the tree in order to immediately activate the
|
||||||
// Run All tests button:
|
// Run All tests button:
|
||||||
if TestTree.Items.Count>0 then
|
if TestTree.Items.Count>0 then begin
|
||||||
TestTree.Items.SelectOnlyThis(TestTree.Items[0]);
|
TestTree.Items.SelectOnlyThis(TestTree.Items[0]);
|
||||||
|
TestTree.Items[0].Expand(False);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGUITestRunner.RunExecute(Sender: TObject);
|
procedure TGUITestRunner.RunExecute(Sender: TObject);
|
||||||
@ -304,7 +306,6 @@ begin
|
|||||||
if (TestTree.Selected <> nil) and (TestTree.Selected.Data <> nil) then
|
if (TestTree.Selected <> nil) and (TestTree.Selected.Data <> nil) then
|
||||||
begin
|
begin
|
||||||
testSuite := TTest(TestTree.Selected.Data);
|
testSuite := TTest(TestTree.Selected.Data);
|
||||||
TestTree.Selected.Expand(false);
|
|
||||||
end;
|
end;
|
||||||
RunTest(testSuite);
|
RunTest(testSuite);
|
||||||
end;
|
end;
|
||||||
@ -478,7 +479,6 @@ begin
|
|||||||
node.SelectedIndex := imgGrayBall;
|
node.SelectedIndex := imgGrayBall;
|
||||||
node.StateIndex := ord(tsChecked);
|
node.StateIndex := ord(tsChecked);
|
||||||
end;
|
end;
|
||||||
rootNode.Expand(False);
|
|
||||||
ResetNodeColors;
|
ResetNodeColors;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -515,7 +515,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
aNode.ImageIndex := imgRedBall;
|
aNode.ImageIndex := imgRedBall;
|
||||||
aNode.SelectedIndex := imgRedBall;
|
aNode.SelectedIndex := imgRedBall;
|
||||||
aNode.Expand(True);
|
if aNode.AbsoluteIndex<>0 then begin
|
||||||
|
aNode.Expand(True);
|
||||||
|
end;
|
||||||
aNode := aNode.Parent;
|
aNode := aNode.Parent;
|
||||||
if Assigned(aNode) and
|
if Assigned(aNode) and
|
||||||
((aNode.ImageIndex in [imgGreenBall, imgPurpleBall, imgGrayBall, imgBlueBall]) or
|
((aNode.ImageIndex in [imgGreenBall, imgPurpleBall, imgGrayBall, imgBlueBall]) or
|
||||||
@ -534,7 +536,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
aNode.ImageIndex := imgPurpleBall;
|
aNode.ImageIndex := imgPurpleBall;
|
||||||
aNode.SelectedIndex := imgPurpleBall;
|
aNode.SelectedIndex := imgPurpleBall;
|
||||||
aNode.Expand(true);
|
if aNode.AbsoluteIndex<>0 then begin
|
||||||
|
aNode.Expand(true);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
aNode := aNode.Parent;
|
aNode := aNode.Parent;
|
||||||
if Assigned(aNode) and ((aNode.ImageIndex in [imgGreenBall, imgGrayBall, imgBlueBall]) or
|
if Assigned(aNode) and ((aNode.ImageIndex in [imgGreenBall, imgGrayBall, imgBlueBall]) or
|
||||||
@ -744,7 +748,12 @@ begin
|
|||||||
Node := FindNode(ATest);
|
Node := FindNode(ATest);
|
||||||
Node.DeleteChildren;
|
Node.DeleteChildren;
|
||||||
PaintNodeBusy(Node);
|
PaintNodeBusy(Node);
|
||||||
Node.MakeVisible;
|
if Node.Level=1 then begin
|
||||||
|
Node.MakeVisible;
|
||||||
|
end;
|
||||||
|
if assigned(Node.Parent) and (Node.Parent.Level=1) then begin
|
||||||
|
Node.Parent.MakeVisible;
|
||||||
|
end;
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
TestTree.EndUpdate;
|
TestTree.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user