Skip to content

Commit

Permalink
Fixed website loading test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapanila committed Jul 20, 2024
1 parent 70b4df8 commit 8fec151
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions Sharpcaster.Test/ChromecastApplicationTester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,23 @@ public async Task ConnectToChromecastAndLaunchApplicationOnceAndJoinIt(Chromecas
Assert.Equal(firstLaunchTransportId, status.Application.TransportId);
}

//Seems like this isn't really working anymore and just loading a white screen
[Fact(Skip = "Seems like this isn't really working anymore and just loading a white screen")]
public async Task ConnectToChromecastAndLaunchWebPage()
[Theory]
[MemberData(nameof(ChromecastReceiversFilter.GetChromecastUltra), MemberType = typeof(ChromecastReceiversFilter))]
public async Task ConnectToChromecastAndLaunchWebPage(ChromecastReceiver receiver)
{
var TestHelper = new TestHelper();
var client = await TestHelper.CreateConnectAndLoadAppClient(output, "5CB45E5A");
var client = await TestHelper.CreateConnectAndLoadAppClient(output, receiver, "F7FD2183");

var req = new WebMessage
{
Type = "loc",
Url = "https://www.google.com/"
Url = "https://mallow.fi/",
Type = "load",
SessionId = client.GetChromecastStatus().Application.SessionId
};


await client.SendAsync(null, "urn:x-cast:com.url.cast", req, "receiver-0");
await client.SendAsync(null, "urn:x-cast:com.boombatower.chromecast-dashboard", req, client.GetChromecastStatus().Application.SessionId);
await Task.Delay(5000);
}
}
}
2 changes: 1 addition & 1 deletion Sharpcaster.Test/customMessage/webMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Sharpcaster.Test.customChannel
{
[DataContract]
public class WebMessage : MessageWithId
internal class WebMessage : MessageWithSession
{
[DataMember(Name = "url")]
public string Url { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Sharpcaster/ChromeCastClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public async Task<ChromecastStatus> LaunchApplicationAsync(string applicationId,
}
}
var newApplication = await GetChannel<IReceiverChannel>().LaunchApplicationAsync(applicationId);
await GetChannel<IConnectionChannel>().ConnectAsync(newApplication.Applications.First().TransportId);
await GetChannel<IConnectionChannel>().ConnectAsync(newApplication.Application.TransportId);
return await GetChannel<IReceiverChannel>().GetChromecastStatusAsync();
}

Expand Down

0 comments on commit 8fec151

Please sign in to comment.