Skip to content

Commit 4d8a465

Browse files
authored
Merge pull request #151 from mathworks/fileselector-password-tests
Fileselector password tests
2 parents 7929fe2 + 8922043 commit 4d8a465

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

test/+wt/+test/FileSelector.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ function testButtonLabel(testCase)
189189
% line.
190190
function testButton(testCase)
191191

192+
% Running in desktop mode?
193+
testCase.assumeEqual(exist('desktop', 'file'), 6, 'Cannot find function ''desktop.m''.')
194+
testCase.assumeTrue(desktop('-inuse'), 'MATLAB must run in desktop mode in order to complete current test.')
195+
192196
% Get the button control
193197
buttonControl = testCase.Widget.ButtonControl;
194198

test/+wt/+test/PasswordField.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ function testValue(testCase)
4242

4343
function testTyping(testCase)
4444

45+
% Running in desktop mode?
46+
testCase.assumeEqual(exist('desktop', 'file'), 6, 'Cannot find function ''desktop.m''.')
47+
testCase.assumeTrue(desktop('-inuse'), 'MATLAB must run in desktop mode in order to complete current test.')
48+
4549
% Get the password field
4650
passField = testCase.Widget.PasswordControl;
4751
newValue = "AbC435!";

0 commit comments

Comments
 (0)