44#include " pch.h"
55#include " MddWin11.h"
66
7+ using namespace WEX ::Logging;
8+
79namespace winrt
810{
911 using namespace winrt ::Microsoft::Windows::AppNotifications::Builder;
@@ -681,6 +683,12 @@ namespace Test::AppNotification::Builder
681683
682684 TEST_METHOD (AppNotificationBuilderWithCameraPreview)
683685 {
686+ if (!::Microsoft::Windows::CallingPreviewSupport::Feature_CallingPreviewSupport::IsEnabled ())
687+ {
688+ Log::Result (TestResults::Skipped, L" AddCameraPreview API is experimental." );
689+ return ;
690+ }
691+
684692 if (!winrt::AppNotificationConferencingConfig::IsCallingPreviewSupported ())
685693 {
686694 return ;
@@ -702,6 +710,12 @@ namespace Test::AppNotification::Builder
702710
703711 TEST_METHOD (AppNotificationBuilderWithCameraPreviewAndVideoCallSettingsButton)
704712 {
713+ if (!::Microsoft::Windows::CallingPreviewSupport::Feature_CallingPreviewSupport::IsEnabled ())
714+ {
715+ Log::Result (TestResults::Skipped, L" AddCameraPreview API is experimental." );
716+ return ;
717+ }
718+
705719 if (!winrt::AppNotificationConferencingConfig::IsCallingPreviewSupported ())
706720 {
707721 return ;
@@ -724,6 +738,12 @@ namespace Test::AppNotification::Builder
724738
725739 TEST_METHOD (AppNotificationBuilderWithCameraPreviewAndAudioCallSettingsButton)
726740 {
741+ if (!::Microsoft::Windows::CallingPreviewSupport::Feature_CallingPreviewSupport::IsEnabled ())
742+ {
743+ Log::Result (TestResults::Skipped, L" AddCameraPreview API is experimental." );
744+ return ;
745+ }
746+
727747 if (!winrt::AppNotificationConferencingConfig::IsCallingPreviewSupported ())
728748 {
729749 return ;
@@ -746,6 +766,12 @@ namespace Test::AppNotification::Builder
746766
747767 TEST_METHOD (AppNotificationBuilderWithIsCallingPreviewSupportedIsFalse)
748768 {
769+ if (!::Microsoft::Windows::CallingPreviewSupport::Feature_CallingPreviewSupport::IsEnabled ())
770+ {
771+ Log::Result (TestResults::Skipped, L" AddCameraPreview API is experimental." );
772+ return ;
773+ }
774+
749775 if (!winrt::AppNotificationConferencingConfig::IsCallingPreviewSupported ())
750776 {
751777 VERIFY_THROWS_HR (winrt::AppNotificationBuilder ().AddCameraPreview (), E_NOTIMPL);
0 commit comments