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
116
tests/Paca.Tests/Browser/ChromeParityAdvancedFeaturesTests.cs
Normal file
116
tests/Paca.Tests/Browser/ChromeParityAdvancedFeaturesTests.cs
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Paca.App;
|
||||
using Paca.Browser;
|
||||
using Paca.Browser.Tabs;
|
||||
using Paca.Tests.Infrastructure;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Browser;
|
||||
|
||||
public class ChromeParityAdvancedFeaturesTests
|
||||
{
|
||||
[Fact]
|
||||
public void BookmarkAllTabs_모든_유효한_탭을_즐겨찾기에_일괄_추가한다()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
WpfTestApp.Ensure(sta.Dispatcher);
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var dataDir = Path.Combine(Path.GetTempPath(), $"vd_bmall_{System.Guid.NewGuid():N}");
|
||||
System.Environment.SetEnvironmentVariable("VD_DATA_DIR", dataDir);
|
||||
try
|
||||
{
|
||||
var win = new MainWindow();
|
||||
win.TabsManager.Tabs.Clear();
|
||||
|
||||
var t1 = win.TabsManager.NewTab("https://site1.com");
|
||||
t1.Title = "사이트 1";
|
||||
var t2 = win.TabsManager.NewTab("https://site2.com");
|
||||
t2.Title = "사이트 2";
|
||||
var t3 = win.TabsManager.NewTab("about:blank"); // 무시되어야 함
|
||||
|
||||
int added = win.BookmarkAllTabs();
|
||||
Assert.Equal(2, added);
|
||||
|
||||
var bookmarks = win.Bookmarks;
|
||||
Assert.Contains(bookmarks, b => b.Url == "https://site1.com" && b.Title == "사이트 1");
|
||||
Assert.Contains(bookmarks, b => b.Url == "https://site2.com" && b.Title == "사이트 2");
|
||||
}
|
||||
finally
|
||||
{
|
||||
try { if (Directory.Exists(dataDir)) Directory.Delete(dataDir, true); } catch { }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AddressZoomBadge_배율이_100퍼센트가_아닐때_노출되고_클릭시_100퍼센트로_복원된다()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
WpfTestApp.Ensure(sta.Dispatcher);
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var dataDir = Path.Combine(Path.GetTempPath(), $"vd_zoombadge_{System.Guid.NewGuid():N}");
|
||||
System.Environment.SetEnvironmentVariable("VD_DATA_DIR", dataDir);
|
||||
try
|
||||
{
|
||||
var win = new MainWindow();
|
||||
Assert.NotNull(win.AddressZoomBtn);
|
||||
Assert.NotNull(win.AddressZoomText);
|
||||
|
||||
// 100%일 때는 숨김
|
||||
win.UpdateAddressZoomBadge(1.0);
|
||||
Assert.Equal(Visibility.Collapsed, win.AddressZoomBtn.Visibility);
|
||||
|
||||
// 125%로 확대 시 노출 및 텍스트 125%
|
||||
win.UpdateAddressZoomBadge(1.25);
|
||||
Assert.Equal(Visibility.Visible, win.AddressZoomBtn.Visibility);
|
||||
Assert.Equal("125%", win.AddressZoomText.Text);
|
||||
|
||||
// 80%로 축소 시 노출 및 텍스트 80%
|
||||
win.UpdateAddressZoomBadge(0.8);
|
||||
Assert.Equal(Visibility.Visible, win.AddressZoomBtn.Visibility);
|
||||
Assert.Equal("80%", win.AddressZoomText.Text);
|
||||
|
||||
// 100% 복원
|
||||
win.UpdateAddressZoomBadge(1.0);
|
||||
Assert.Equal(Visibility.Collapsed, win.AddressZoomBtn.Visibility);
|
||||
}
|
||||
finally
|
||||
{
|
||||
try { if (Directory.Exists(dataDir)) Directory.Delete(dataDir, true); } catch { }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildTabStripContextMenu_크롬_표준_새탭_닫은탭복원_모든탭북마크_옵션_포함()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
WpfTestApp.Ensure(sta.Dispatcher);
|
||||
sta.Invoke(() =>
|
||||
{
|
||||
var dataDir = Path.Combine(Path.GetTempPath(), $"vd_tabstripmenu_{System.Guid.NewGuid():N}");
|
||||
System.Environment.SetEnvironmentVariable("VD_DATA_DIR", dataDir);
|
||||
try
|
||||
{
|
||||
var win = new MainWindow();
|
||||
var menu = win.BuildTabStripContextMenu();
|
||||
Assert.NotNull(menu);
|
||||
|
||||
var headers = menu.Items.OfType<MenuItem>().Select(m => m.Header?.ToString()).ToList();
|
||||
Assert.Contains("새 탭", headers);
|
||||
Assert.Contains("닫은 탭 다시 열기", headers);
|
||||
Assert.Contains("모든 탭 즐겨찾기에 추가", headers);
|
||||
Assert.Contains("작업 관리자", headers);
|
||||
}
|
||||
finally
|
||||
{
|
||||
try { if (Directory.Exists(dataDir)) Directory.Delete(dataDir, true); } catch { }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue