feat: align product suite prompts with reference images
This commit is contained in:
@@ -422,7 +422,7 @@ class ProductSuiteGuiTests(TempDirMixin, unittest.TestCase):
|
||||
def test_prompt_preview_matches_frozen_generation_job_prompt(self):
|
||||
with self.make_temp_dir() as temp_dir:
|
||||
config = self._config(temp_dir)
|
||||
project, _ = self._create_project_with_assets(temp_dir, config, 1)
|
||||
project, assets = self._create_project_with_assets(temp_dir, config, 3)
|
||||
tab = ProductSuiteTab(config=config, db_path=config["db_path"])
|
||||
self.addCleanup(tab.close)
|
||||
state = tab._displayed_state
|
||||
@@ -437,6 +437,7 @@ class ProductSuiteGuiTests(TempDirMixin, unittest.TestCase):
|
||||
base_prompt=state.prompt,
|
||||
settings=state.settings,
|
||||
item_id=state.item_id,
|
||||
source_image_count=len(assets),
|
||||
)
|
||||
self.addCleanup(dialog.close)
|
||||
expected = dialog.preview_edit.toPlainText()
|
||||
@@ -448,6 +449,7 @@ class ProductSuiteGuiTests(TempDirMixin, unittest.TestCase):
|
||||
), mock.patch.object(tab, "_start_thread", return_value=object()):
|
||||
self.assertTrue(tab.start_generation(state))
|
||||
self.assertEqual(expected, state.worker.job_specs[0]["prompt"])
|
||||
self.assertIn("第2至3张仅作为风格、构图、场景或排版参考", expected)
|
||||
state.worker = None
|
||||
state.thread = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user