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
82
tests/Paca.Tests/App/QuickCaptureHudWindowGateTests.cs
Normal file
82
tests/Paca.Tests/App/QuickCaptureHudWindowGateTests.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Paca.App.Browser;
|
||||
using Paca.App.ViewModels;
|
||||
using Paca.Tests.Infrastructure;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.App;
|
||||
|
||||
public class QuickCaptureHudWindowGateTests
|
||||
{
|
||||
[Fact]
|
||||
public void Gate227_QuickCaptureHudWindow_HasCorrectWindowStyles()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var vm = new QuickCaptureHudViewModel("https://youtube.com/watch?v=abc");
|
||||
var window = new QuickCaptureHudWindow(vm);
|
||||
|
||||
Assert.True(window.AllowsTransparency);
|
||||
Assert.Equal(WindowStyle.None, window.WindowStyle);
|
||||
Assert.False(window.ShowInTaskbar);
|
||||
Assert.True(window.Topmost);
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate228_QuickCaptureHudWindow_BindsViewModel_AndExposesControls()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var vm = new QuickCaptureHudViewModel("https://twitter.com/test/video");
|
||||
var window = new QuickCaptureHudWindow(vm);
|
||||
|
||||
Assert.Equal(vm, window.ViewModel);
|
||||
Assert.NotNull(window.DownloadButton);
|
||||
Assert.NotNull(window.SendToPhoneButton);
|
||||
Assert.NotNull(window.DismissButton);
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate229_QuickCaptureHudWindow_StrictDesignTokens_Audit()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var vm = new QuickCaptureHudViewModel("https://instagram.com/reel/xyz");
|
||||
var window = new QuickCaptureHudWindow(vm);
|
||||
|
||||
// 1. Min button height >= 32px
|
||||
Assert.True(window.DownloadButton.MinHeight >= 32, "Download button height >= 32");
|
||||
Assert.True(window.SendToPhoneButton.MinHeight >= 32, "SendToPhone button height >= 32");
|
||||
|
||||
// 2. Strict no emoji regex audit
|
||||
var emojiRegex = new Regex(@"[\uD83C-\uDBFF\uDC00-\uDFFF]");
|
||||
Assert.DoesNotMatch(emojiRegex, window.DownloadButton.Content?.ToString() ?? "");
|
||||
Assert.DoesNotMatch(emojiRegex, window.SendToPhoneButton.Content?.ToString() ?? "");
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate230_QuickCaptureHudWindow_Positioning_CalculatesBottomRightCoordinates()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var vm = new QuickCaptureHudViewModel("https://example.com");
|
||||
var window = new QuickCaptureHudWindow(vm);
|
||||
|
||||
var (left, top) = window.CalculateDefaultPosition(1920, 1080, 420, 100);
|
||||
|
||||
// Bottom right with margin: left ~ 1920 - 420 - 24 = 1476, top ~ 1080 - 100 - 64 = 916
|
||||
Assert.True(left > 1400);
|
||||
Assert.True(top > 900);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue