Skip to content

Commit

Permalink
fix: Workaround MPE tests with MTC not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Dec 6, 2023
1 parent 2191547 commit ff3b546
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public async Task When_MediaPlayerElement_Added_In_Opening()
var sut = new MediaPlayerElement()
{
AutoPlay = true,

// Workaround to get the control loaded https://github.com/unoplatform/uno/issues/14735
AreTransportControlsEnabled = true,
Source = MediaSource.CreateFromUri(TestVideoUrl),
};

Expand Down Expand Up @@ -122,6 +125,9 @@ public async Task When_MediaPlayerElement_SetIsFullWindow_Check_Fullscreen()
var sut = new MediaPlayerElement()
{
AutoPlay = true,

// Workaround to get the control loaded https://github.com/unoplatform/uno/issues/14735
AreTransportControlsEnabled = true,
Source = MediaSource.CreateFromUri(TestVideoUrl),
};

Expand Down Expand Up @@ -156,6 +162,9 @@ public async Task When_MediaPlayerElement_SetSource_Check_Play()
var sut = new MediaPlayerElement()
{
AutoPlay = true,

// Workaround to get the control loaded https://github.com/unoplatform/uno/issues/14735
AreTransportControlsEnabled = true,
Source = MediaSource.CreateFromUri(TestVideoUrl),
};

Expand Down Expand Up @@ -258,13 +267,18 @@ public async Task When_MediaPlayerElement_Check_TransportControlVisibility()
var sut = new MediaPlayerElement()
{
AutoPlay = true,

// Workaround to get the control loaded https://github.com/unoplatform/uno/issues/14735
AreTransportControlsEnabled = true,
Source = MediaSource.CreateFromUri(TestVideoUrl),
};

//Load Player
WindowHelper.WindowContent = sut;
await WindowHelper.WaitForLoaded(sut, timeoutMS: 6000);

sut.AreTransportControlsEnabled = false;

var root = (WindowHelper.XamlRoot?.Content as FrameworkElement)!;
var tcp = (FrameworkElement)root.FindName("TransportControlsPresenter");

Expand Down

0 comments on commit ff3b546

Please sign in to comment.