mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
UX: Improve validation error message when saving theme objects setting (#26455)
Why this change? Before this change, the validation error message shown to the user when saving a theme objects setting is very cryptic. This commit changes the validation error messages to be displayed on top of the editor instead. Note that I don't think this way of displaying is the ideal state we want to get to but given the time we have this will do for now.
This commit is contained in:

committed by
GitHub

parent
e58110a9a0
commit
91f0c71720
@ -20,15 +20,19 @@ module PageObjects
|
||||
expect(input_field_label(field_name)).to have_text(label)
|
||||
end
|
||||
|
||||
def click_link(name)
|
||||
def click_link(name, child: false)
|
||||
find(
|
||||
".schema-theme-setting-editor__navigation .schema-theme-setting-editor__tree-node.--child",
|
||||
".schema-theme-setting-editor__navigation .schema-theme-setting-editor__tree-node#{child ? ".--child" : ".--parent"}",
|
||||
text: name,
|
||||
).click
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
def click_child_link(name)
|
||||
click_link(name, child: true)
|
||||
end
|
||||
|
||||
def fill_in_field(field_name, value)
|
||||
input_field(field_name).fill_in(with: value)
|
||||
self
|
||||
|
Reference in New Issue
Block a user