feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
|
|
@ -0,0 +1,76 @@
|
|||
using System.Windows;
|
||||
using Paca.App;
|
||||
using Paca.Browser.Media;
|
||||
using Paca.Browser.Profiles;
|
||||
using Paca.Tests.Infrastructure;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Browser;
|
||||
|
||||
public sealed class ProfileAndMediaUiIntegrationTests
|
||||
{
|
||||
|
||||
[Fact]
|
||||
public void GlobalMediaController_VisibilityChangesOnMediaPlayback()
|
||||
{
|
||||
var controller = new GlobalMediaController();
|
||||
Assert.False(controller.HasMedia);
|
||||
|
||||
var tabId = Guid.NewGuid();
|
||||
controller.UpdateMediaState(tabId, new MediaPlaybackState
|
||||
{
|
||||
HasMedia = true,
|
||||
IsPlaying = true,
|
||||
Title = "레딧에 올라온 사흘 만에 길어...",
|
||||
Artist = "새벽 세시쯤",
|
||||
SourceDomain = "youtube.com",
|
||||
CurrentTime = 15.0,
|
||||
Duration = 240.0
|
||||
});
|
||||
|
||||
Assert.True(controller.HasMedia);
|
||||
Assert.True(controller.IsPlaying);
|
||||
Assert.Equal("레딧에 올라온 사흘 만에 길어...", controller.Title);
|
||||
Assert.Equal("새벽 세시쯤", controller.Artist);
|
||||
Assert.Equal("youtube.com", controller.SourceDomain);
|
||||
|
||||
// 미디어 정지 시
|
||||
controller.UpdateMediaState(tabId, new MediaPlaybackState
|
||||
{
|
||||
HasMedia = false,
|
||||
IsPlaying = false
|
||||
});
|
||||
|
||||
Assert.False(controller.HasMedia);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MultiProfile_AddAndListProfiles()
|
||||
{
|
||||
var tempDir = Path.Combine(Path.GetTempPath(), "paca_multiprofile_test_" + Guid.NewGuid());
|
||||
Directory.CreateDirectory(tempDir);
|
||||
try
|
||||
{
|
||||
var manager = new ProfileManager(tempDir);
|
||||
Assert.Single(manager.GetProfiles());
|
||||
|
||||
var p1 = manager.AddProfile("업무", "#059669", "💼");
|
||||
var p2 = manager.AddProfile("개인", "#EC4899", "🎮");
|
||||
|
||||
var all = manager.GetProfiles();
|
||||
Assert.Equal(3, all.Count);
|
||||
Assert.Contains(all, p => p.Name == "업무" && p.Icon == "💼");
|
||||
Assert.Contains(all, p => p.Name == "개인" && p.Icon == "🎮");
|
||||
|
||||
manager.UpdateProfile(p1.Id, "재택근무", "#2563EB", "💻");
|
||||
var updated = manager.GetProfile(p1.Id);
|
||||
Assert.Equal("재택근무", updated!.Name);
|
||||
Assert.Equal("#2563EB", updated.Color);
|
||||
Assert.Equal("💻", updated.Icon);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (Directory.Exists(tempDir)) Directory.Delete(tempDir, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue