From 53e718380d679a97ca58a6f0bba1232a0e94e987 Mon Sep 17 00:00:00 2001 From: Jacob-Jan Sloots <47000395+slootsjj@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:20:28 +0200 Subject: [PATCH] Execute keyboard tests only in desktop mode --- test/+wt/+test/FileSelector.m | 4 ++++ test/+wt/+test/PasswordField.m | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/test/+wt/+test/FileSelector.m b/test/+wt/+test/FileSelector.m index 64aa207..e6b0225 100644 --- a/test/+wt/+test/FileSelector.m +++ b/test/+wt/+test/FileSelector.m @@ -189,6 +189,10 @@ function testButtonLabel(testCase) % line. function testButton(testCase) + % Running in desktop mode? + testCase.assumeEqual(exist('desktop', 'file'), 6, 'Cannot find function ''desktop.m''.') + testCase.assumeTrue(desktop('-inuse'), 'MATLAB must run in desktop mode in order to complete current test.') + % Get the button control buttonControl = testCase.Widget.ButtonControl; diff --git a/test/+wt/+test/PasswordField.m b/test/+wt/+test/PasswordField.m index a252852..f60345e 100644 --- a/test/+wt/+test/PasswordField.m +++ b/test/+wt/+test/PasswordField.m @@ -42,6 +42,10 @@ function testValue(testCase) function testTyping(testCase) + % Running in desktop mode? + testCase.assumeEqual(exist('desktop', 'file'), 6, 'Cannot find function ''desktop.m''.') + testCase.assumeTrue(desktop('-inuse'), 'MATLAB must run in desktop mode in order to complete current test.') + % Get the password field passField = testCase.Widget.PasswordControl; newValue = "AbC435!";