Phase 0 (T1-3/4/7/9/11): find bar w/ native Find API + search engine + site zoom + force reload + F11, wired into MainWindow, E2E smoke (39 tests)
This commit is contained in:
parent
470c9267f2
commit
00a822eaeb
11 changed files with 584 additions and 18 deletions
58
VideoDownloader.Tests/E2E/MainWindowSmokeE2ETests.cs
Normal file
58
VideoDownloader.Tests/E2E/MainWindowSmokeE2ETests.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System.Windows;
|
||||
using VideoDownloader.App;
|
||||
using VideoDownloader.Tests.Infrastructure;
|
||||
|
||||
namespace VideoDownloader.Tests.E2E;
|
||||
|
||||
/// <summary>
|
||||
/// E2E 스모크: 실제 MainWindow 를 기동해 WebView2 초기화·탐색·검색 바·전체화면 전환이
|
||||
/// 크래시 없이 동작하는지 검증한다(Phase 0 통합 확인). 네트워크 의존 제거를 위해 about:blank 사용.
|
||||
/// </summary>
|
||||
[Collection("E2E")]
|
||||
public class MainWindowSmokeE2ETests
|
||||
{
|
||||
[Fact]
|
||||
public async Task MainWindow_기동_탐색_검색바_전체화면_스모크()
|
||||
{
|
||||
using var sta = StaDispatcher.Start();
|
||||
WpfTestApp.Ensure(sta.Dispatcher);
|
||||
var ok = await sta.InvokeAsync(async () =>
|
||||
{
|
||||
var window = new MainWindow();
|
||||
window.Show();
|
||||
|
||||
// WebView2 초기화 대기 (Loaded → InitializeBrowserAsync)
|
||||
var cv = await Wait.Until(
|
||||
() => Task.FromResult(window.Browser.CoreWebView2),
|
||||
c => c != null, 30000);
|
||||
|
||||
// about:blank 탐색 (네트워크 불필요)
|
||||
window.NavigateTo("about:blank");
|
||||
await Wait.Until(
|
||||
() => Task.FromResult(cv.Source ?? ""),
|
||||
s => s.Contains("about:blank"), 15000);
|
||||
|
||||
// T1-3 검색 바 열기/닫기
|
||||
window.OpenFind();
|
||||
var findVisible = window.FindBar.Visibility == Visibility.Visible;
|
||||
window.CloseFind();
|
||||
var findCollapsed = window.FindBar.Visibility == Visibility.Collapsed;
|
||||
|
||||
// T1-11 전체화면 토글
|
||||
window.ToggleFullscreen();
|
||||
var toolbarHidden = window.ToolbarRow.Visibility == Visibility.Collapsed;
|
||||
window.ToggleFullscreen();
|
||||
var toolbarBack = window.ToolbarRow.Visibility == Visibility.Visible;
|
||||
|
||||
window.Close();
|
||||
return (init: cv != null, nav: true, findVisible, findCollapsed, toolbarHidden, toolbarBack);
|
||||
});
|
||||
|
||||
Assert.True(ok.init, "WebView2 초기화 실패");
|
||||
Assert.True(ok.nav);
|
||||
Assert.True(ok.findVisible, "검색 바 미표시");
|
||||
Assert.True(ok.findCollapsed, "검색 바 미닫힘");
|
||||
Assert.True(ok.toolbarHidden, "전체화면에서 툴바 미숨김");
|
||||
Assert.True(ok.toolbarBack, "전체화면 복원 실패");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue