Migrate remaining legacy operator workflows

This commit is contained in:
2026-07-12 05:39:27 +09:00
parent ffb8f43c19
commit a01836a2d7
132 changed files with 20566 additions and 720 deletions

View File

@@ -45,10 +45,12 @@ $node = Resolve-NodePath -ExplicitPath $NodePath
$repositoryRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
$scripts = @(
(Join-Path $repositoryRoot 'Web\playout-safety.js'),
(Join-Path $repositoryRoot 'Web\market-nav-reorder.js'),
(Join-Path $repositoryRoot 'Web\operator-workflow.js'),
(Join-Path $repositoryRoot 'Web\legacy-fixed-workflow.js'),
(Join-Path $repositoryRoot 'Web\industry-workflow.js'),
(Join-Path $repositoryRoot 'Web\comparison-workflow.js'),
(Join-Path $repositoryRoot 'Web\comparison-import-workflow.js'),
(Join-Path $repositoryRoot 'Web\theme-workflow.js'),
(Join-Path $repositoryRoot 'Web\overseas-workflow.js'),
(Join-Path $repositoryRoot 'Web\expert-workflow.js'),
@@ -57,6 +59,10 @@ $scripts = @(
(Join-Path $repositoryRoot 'Web\manual-lists-workflow.js'),
(Join-Path $repositoryRoot 'Web\manual-financial-workflow.js'),
(Join-Path $repositoryRoot 'Web\named-manual-restore-workflow.js'),
(Join-Path $repositoryRoot 'Web\named-comparison-restore-workflow.js'),
(Join-Path $repositoryRoot 'Web\legacy-foreign-index-candle-workflow.js'),
(Join-Path $repositoryRoot 'Web\named-nxt-theme-restore-workflow.js'),
(Join-Path $repositoryRoot 'Web\legacy-named-row-workflow.js'),
(Join-Path $repositoryRoot 'Web\operator-catalog-workflow.js'),
(Join-Path $repositoryRoot 'Web\manual-lists-ui.js'),
(Join-Path $repositoryRoot 'Web\manual-financial-ui.js'),
@@ -157,12 +163,17 @@ if ($indexMarkup -notmatch 'id="globalMa5"' -or
throw 'The original global 5-day/20-day candle options are not synchronized across every candle workflow.'
}
foreach ($asset in @(
'manual-lists-workflow.js', 'manual-financial-workflow.js', 'named-manual-restore-workflow.js', 'operator-catalog-workflow.js',
'market-nav-reorder.js', 'manual-lists-workflow.js', 'manual-financial-workflow.js', 'named-manual-restore-workflow.js', 'legacy-foreign-index-candle-workflow.js', 'named-nxt-theme-restore-workflow.js', 'legacy-named-row-workflow.js', 'operator-catalog-workflow.js',
'manual-lists-ui.js', 'manual-financial-ui.js', 'operator-catalog-ui.js')) {
if ($indexMarkup -notmatch [regex]::Escape("<script src=`"$asset`"></script>")) {
throw "Operator UI script is not loaded: $asset"
}
}
if ($appScript -notmatch 'MbnMarketNavReorder' -or
$appScript -notmatch [regex]::Escape('marketNavReorder.createController') -or
$appScript -notmatch [regex]::Escape('hasOpenOperatorModal() || isPlaylistSnapshotLocked()')) {
throw 'The original business-tab drag and keyboard reorder contract is not connected.'
}
foreach ($asset in @('manual-lists-ui.css', 'manual-financial-ui.css', 'operator-catalog-ui.css')) {
if ($indexMarkup -notmatch [regex]::Escape("<link rel=`"stylesheet`" href=`"$asset`">") ) {
throw "Operator UI stylesheet is not loaded: $asset"
@@ -186,7 +197,9 @@ if ($appScript -notmatch 'requestBackgroundSelection' -or
$mainWindowScript -notmatch 'case "choose-background"' -or
$mainWindowScript -notmatch 'case "toggle-background"' -or
$playoutMainScript -notmatch 'MutableLegacySceneCueCompositionOptionsSource' -or
$backgroundScript -notmatch 'OperatorBackgroundExtensions') {
$backgroundScript -notmatch 'CreateOperatorSelection' -or
$backgroundScript -notmatch 'CreateLegacyDefault' -or
$backgroundScript -notmatch 'TryGetTrustedBackgroundDirectory') {
throw 'Legacy F2/F3 native background selection integration is incomplete.'
}
if ($appScript -notmatch 'restoreFixedPlaylistEntry' -or
@@ -263,7 +276,7 @@ if ($appScript -notmatch 'MbnNamedPlaylistWorkflow' -or
$appScript -notmatch 'requestNamedPlaylistReplace' -or
$appScript -notmatch 'requestNamedPlaylistDelete' -or
$appScript -notmatch 'namedPlaylistPrepareBlockers' -or
$appScript -notmatch 'restoreRawRows\(load, resolveNamedPlaylistRawRow\)' -or
$appScript -notmatch 'restoreRawRows\([\s\S]*load,[\s\S]*resolveNamedPlaylistRawRow,[\s\S]*legacyNamedRowWorkflow\.matchesCanonicalEntry' -or
$appScript -notmatch 'requestNamedPlaylistPagePlans' -or
$appScript -notmatch 'normalizePagePlanResponse\(payload, pending\.request\)' -or
$appScript -notmatch 'page-result-empty' -or
@@ -310,6 +323,12 @@ if ($mainWindowScript -notmatch 'OnNavigationStarting' -or
throw 'Reload, navigation, and WebView process failure must quarantine in-flight playout correlation.'
}
$cutCoverageFixturePath = Join-Path $PSScriptRoot '..\tests\Scripts\Test-LegacyCutCoverage.Fixture.ps1'
$cutCoverageFixture = & $cutCoverageFixturePath
if ($cutCoverageFixture.Status -ne 'Passed') {
throw 'Legacy cut and builder asset coverage fixtures failed.'
}
& $node --test @testFiles
if ($LASTEXITCODE -ne 0) {
throw "Web playout tests failed with exit code $LASTEXITCODE."
@@ -321,4 +340,5 @@ if ($LASTEXITCODE -ne 0) {
SceneCatalogEntries = $sceneCatalogMatches.Count
ReachableSelectionPresets = $selectionPresetMatches.Count
TestFiles = $testFiles.Count
CutCoverageFixture = $cutCoverageFixture.Status
}