Skip to content

Commit

Permalink
test(forms): update form config tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mirekys committed Feb 27, 2024
1 parent 2f2770d commit 846f5b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oarepo_ui/resources/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,6 @@ def form_config(self, identity=None, **kwargs):

return dict(
custom_fields=self.custom_fields,
overridableIdPrefix = f"{self.form_app_id}.Form",
overridableIdPrefix = f"{self.form_app_id or 'Default'}.Form",
**kwargs,
)
2 changes: 1 addition & 1 deletion oarepo_ui/resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def search(self):
g.identity, pagination, resource_requestctx.args
)

overridable_id_prefix = f"{self.config.search_app_id}.Search"
overridable_id_prefix = f"{self.config.search_app_id or 'Default'}.Search"

defaultComponents = {}
if hasattr(self.config, 'search_app_result_item') and self.config.search_app_result_item:
Expand Down
1 change: 1 addition & 0 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_create(
"current_locale": "en",
"custom_fields": {"ui": {}},
"default_locale": "en",
'overridableIdPrefix': 'Default.Form',
"locales": [
{"text": "English", "value": "en"},
{"text": "\u010de\u0161tina", "value": "cs"},
Expand Down
1 change: 1 addition & 0 deletions tests/test_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def test_edit(
"current_locale": "en",
"custom_fields": {"ui": {}},
"default_locale": "en",
'overridableIdPrefix': 'Default.Form',
"locales": [
{"text": "English", "value": "en"},
{"text": "čeština", "value": "cs"},
Expand Down

0 comments on commit 846f5b6

Please sign in to comment.