mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FEATURE: allow wizard checkbox field to be disabled (#17916)
* FEATURE: allow wizard checkbox field to be disabled * Changes per review feedback
This commit is contained in:
@ -16,9 +16,12 @@ RSpec.describe Wizard::Step do
|
||||
dropdown.add_choice('candy')
|
||||
dropdown.add_choice('nachos', data: { color: 'yellow' })
|
||||
dropdown.add_choice('pizza', label: 'Pizza!')
|
||||
|
||||
expect(step.fields).to eq([text, dropdown])
|
||||
expect(dropdown.choices.size).to eq(3)
|
||||
|
||||
checkbox = step.add_field(id: 'foobar', type: 'checkbox', disabled: true)
|
||||
expect(step.fields).to eq([text, dropdown, checkbox])
|
||||
expect(checkbox.disabled).to eq(true)
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user