Skip to content

Commit 16900ed

Browse files
authored
[Main CP] Add Feature_CallingPreviewSupport terminal velocity checks to AppNotification tests (#6190)
* protect experimental tests * update skip message to reference AddCameraPreview API * Fix WEX logging namespace in AppNotificationBuilderTests
1 parent 20ade45 commit 16900ed

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

test/AppNotificationBuilderTests/APITests.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "pch.h"
55
#include "MddWin11.h"
66

7+
using namespace WEX::Logging;
8+
79
namespace 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);

test/AppNotificationBuilderTests/pch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include <AppNotificationBuilderUtility.h>
5050
#include <WindowsAppRuntime.SelfContained.h>
5151
#include <WindowsAppRuntime.VersionInfo.h>
52+
#include <TerminalVelocityFeatures-CallingPreviewSupport.h>
5253

5354
#define VERIFY_THROWS_HR(expression, hr) \
5455
VERIFY_THROWS_SPECIFIC(expression, \

0 commit comments

Comments
 (0)