mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: Convert admin user fields to FormKit (#29070)
This change replaces the admin form for adding and editing custom user fields with a new FormKit implementation.
This commit is contained in:
@ -67,6 +67,16 @@ module PageObjects
|
||||
expect(self.value).to eq(expected_value)
|
||||
end
|
||||
|
||||
def has_errors?(*messages)
|
||||
within component do
|
||||
messages.all? { |m| find(".form-kit__errors", text: m) }
|
||||
end
|
||||
end
|
||||
|
||||
def has_no_errors?
|
||||
!has_css?(".form-kit__errors")
|
||||
end
|
||||
|
||||
def control_type
|
||||
component["data-control-type"]
|
||||
end
|
||||
|
@ -8,6 +8,10 @@ module PageObjects
|
||||
self
|
||||
end
|
||||
|
||||
def form
|
||||
PageObjects::Components::FormKit.new(".user-field .form-kit")
|
||||
end
|
||||
|
||||
def choose_requirement(requirement)
|
||||
form = page.find(".user-field")
|
||||
|
||||
|
Reference in New Issue
Block a user