migration: preserve frontend shell pages and styles

This commit is contained in:
leefer
2026-07-31 15:08:57 +08:00
parent 38de3de0a3
commit dec3cd1236
92 changed files with 10758 additions and 9449 deletions
+12 -11
View File
@@ -11,6 +11,12 @@ import screener
import strategy_tracking
from backend.features.screener import compiler, engine, strategies, tracking
from backend.features.screener import service as screener_service
from tests.preservation_helpers import (
ORIGINAL_STATIC,
assert_moved_asset_matches,
assert_page_prefix_matches,
reassembled_frontend_runtime,
)
APP_ROOT = Path(__file__).resolve().parents[1]
@@ -182,17 +188,12 @@ class ScreenerSliceSourceEquivalenceTests(unittest.TestCase):
)
def test_screener_frontend_assets_are_unchanged(self) -> None:
for relative in (
"static/index.html",
"static/app.js",
"static/styles.css",
"static/pages/screener/page.js",
):
self.assertEqual(
sha256(APP_ROOT / relative),
sha256(ORIGINAL_ROOT / relative),
relative,
)
self.assertEqual(
reassembled_frontend_runtime(),
(ORIGINAL_STATIC / "app.js").read_text(encoding="utf-8"),
)
assert_moved_asset_matches(self, "styles.css", "styles/styles.css")
assert_page_prefix_matches(self, "pages/screener/page.js")
if __name__ == "__main__":