Commit d32806b8 authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[test][editor] Crop description if over maximum length

Fixes #255
parent 32ac9578
Pipeline #38248 passed with stage
in 15 minutes and 42 seconds
......@@ -98,6 +98,25 @@ class TestMockEditor:
assert widget.dump_json() == json_reference
def test_json_load_and_dump_long_description_field_widget(
self, qtbot, dataformat_model
):
json_reference = {
"field": {"value32": "float32", "value64": "float64"},
"description": "This is a very long description to test if the limitation works properly as expected by the editor or not.",
}
json_expected_output = {
"field": {"value32": "float32", "value64": "float64"},
"description": "This is a very long description to test if the limitation works properly as expected by the editor o",
}
widget = MockAssetEditor()
widget.set_dataformat_model(dataformat_model)
widget.load_json(json_reference)
assert widget.dump_json() == json_expected_output
def test_dataformat_creation_field_widget(self, qtbot, dataformat_model):
widget = MockAssetEditor()
widget.set_dataformat_model(dataformat_model)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment