Skip to content

Commit 4b8592d

Browse files
committed
Added some drawnow statements to ensure graphics update occur before verifying positioning. All tests pass on Bappdes. Fixes #30
1 parent c426b06 commit 4b8592d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/+wt/+test/Toolbar.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function onButtonPushed(testCase, ~)
8080

8181
fcn = @()addButton(section, icon, name);
8282
button = testCase.verifyWarningFree(fcn);
83+
drawnow
8384

8485
% Verify the buttons changed
8586
newButton = section.Component(end);
@@ -103,6 +104,7 @@ function onButtonPushed(testCase, ~)
103104

104105
fcn = @()addStateButton(section, icon, name);
105106
button = testCase.verifyWarningFree(fcn);
107+
drawnow
106108

107109
% Verify the buttons changed
108110
newButton = section.Component(end);
@@ -124,6 +126,7 @@ function onButtonPushed(testCase, ~)
124126

125127
fcn = @()addVerticalSection(section);
126128
section = testCase.verifyWarningFree(fcn);
129+
drawnow
127130

128131
end %function
129132

@@ -141,6 +144,7 @@ function onButtonPushed(testCase, ~)
141144
section(sIdx).addButton("", string(bIdx));
142145
end
143146
end
147+
drawnow
144148

145149
% Attach the sections to the toolbar
146150
testCase.verifySetProperty("Section", section)

0 commit comments

Comments
 (0)