feat: rename bundled cover prompt template

This commit is contained in:
chengma
2026-07-17 18:24:58 +08:00
parent d1cd50f5c5
commit d853db1c8a
8 changed files with 93 additions and 46 deletions
+3 -3
View File
@@ -3290,7 +3290,7 @@ class GuiTests(TempDirMixin, unittest.TestCase):
["另存为", "重命名", "删除"],
[action.text() for action in tab.title_template_actions_menu.actions()],
)
self.assertEqual("papa1", tab.cover_template_combo.currentText())
self.assertEqual("cover_prompt", tab.cover_template_combo.currentText())
self.assertIn("商品标题:{新标题}", tab.cover_prompt_edit.toPlainText())
self.assertEqual("保存模板", tab.save_cover_template_button.text())
self.assertEqual("模板操作", tab.cover_template_actions_button.text())
@@ -3934,11 +3934,11 @@ class GuiTests(TempDirMixin, unittest.TestCase):
self.addCleanup(tab.close)
self.assertIn("蝦皮台灣站", tab.title_prompt_edit.toPlainText())
self.assertEqual("papa1", tab.cover_template_combo.currentText())
self.assertEqual("cover_prompt", tab.cover_template_combo.currentText())
self.assertIn("商品标题:{新标题}", tab.cover_prompt_edit.toPlainText())
self.assertTrue(os.path.exists(title_prompt_path))
self.assertTrue(os.path.exists(os.path.join(title_templates_dir, "默认.txt")))
self.assertTrue(os.path.exists(os.path.join(cover_prompts_dir, "papa1.txt")))
self.assertTrue(os.path.exists(os.path.join(cover_prompts_dir, "cover_prompt.txt")))
self.assert_removed(temp_dir)