Skip to content

Commit e800056

Browse files
committed
adds col
1 parent 6ad4ed9 commit e800056

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

packages/postgres-database/src/simcore_postgres_database/models/products.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ class ProductLoginSettingsDict(TypedDict, total=False):
146146
nullable=False,
147147
doc="Regular expression that matches product hostname from an url string",
148148
),
149+
# EMAILS --------------------
149150
sa.Column(
150151
"support_email",
151152
sa.String,
@@ -200,6 +201,13 @@ class ProductLoginSettingsDict(TypedDict, total=False):
200201
doc="Overrides simcore_service_webserver.login.settings.LoginSettings."
201202
"SEE LoginSettingsForProduct",
202203
),
204+
sa.Column(
205+
"ui",
206+
JSONB,
207+
nullable=False,
208+
server_default=sa.text("'{}'::jsonb"),
209+
doc="Front-end owned UI configuration",
210+
),
203211
sa.Column(
204212
"registration_email_template",
205213
sa.String,
@@ -212,6 +220,7 @@ class ProductLoginSettingsDict(TypedDict, total=False):
212220
nullable=True,
213221
doc="Custom jinja2 template for registration email",
214222
),
223+
# lifecycle
215224
sa.Column(
216225
"created",
217226
sa.DateTime(),

packages/pytest-simcore/src/pytest_simcore/helpers/faker_factories.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,24 @@ def random_product(
265265
"group_id": group_id,
266266
}
267267

268+
if ui := fake.random_element(
269+
[
270+
None,
271+
# Examples from https://github.com/itisfoundation/osparc-simcore/blob/1dcd369717959348099cc6241822a1f0aff0382c/services/static-webserver/client/source/resource/osparc/new_studies.json
272+
{
273+
"categories": [
274+
{"id": "precomputed", "title": "Precomputed"},
275+
{
276+
"id": "personalized",
277+
"title": "Personalized",
278+
"description": fake.sentence(),
279+
},
280+
]
281+
},
282+
]
283+
):
284+
data.update(ui=ui)
285+
268286
assert set(data.keys()).issubset({c.name for c in products.columns})
269287
data.update(overrides)
270288
return data

0 commit comments

Comments
 (0)