Add one-time Bambu Lab catalog and refresh the UI

This commit is contained in:
Mikei386 committed 2026-11-14 14:30:32 +01:00
1 parent c41f4295a4
commit 7b56a0e3ef
11 files changed
+777 -242

No files matched your search

+3 -1
View File
@@ -171,7 +171,9 @@ class BootstrapTests(unittest.TestCase):
self.assertTrue((ROOT / "start.sh").is_file())
marker = secrets.token_hex(16)
env = clean_environment() | {
"GIT_REPO_URL": f"https://user:{marker}@example.invalid/repo.git"
"GIT_REPO_URL": f"https://user:{marker}@example.invalid/repo.git",
"PUID": str(os.getuid() or 99),
"PGID": str(os.getgid() or 100),
}
result = subprocess.run(
["sh", str(ROOT / "start.sh")], env=env, capture_output=True, text=True, timeout=20
+13 -1
View File
@@ -19,7 +19,7 @@ class RealHTTPTests(unittest.TestCase):
self.alice.login("synthetic-one", self.password)
self.bob.login("synthetic-two", self.password)
def selection(self, quantity=1, spool="spool"):
def selection(self, quantity=1):
# IDs are discovered from actual rendered forms, not guessed from seed ordering.
html = self.alice.get("/bestand/hinzufuegen/")[1]
manufacturer = re.search(r'<option value="(\d+)"', html).group(1)
@@ -34,6 +34,18 @@ class RealHTTPTests(unittest.TestCase):
{"manufacturer": manufacturer, "product_type": product, "action": "filter"},
)[1]
color = re.search(r'<select name="color".*?<option value="(\d+)"', html, re.S).group(1)
html = self.alice.post(
"/bestand/hinzufuegen/",
{
"manufacturer": manufacturer,
"product_type": product,
"color": color,
"action": "filter",
},
)[1]
spool = re.search(r'<select name="spool_type".*?<option value="([^"]+)"', html, re.S).group(
1
)
return {
"manufacturer": manufacturer,
"product_type": product,