added UITesting for positioning in a scrollview
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
1ba09ee366
commit
f979ead3cf
@ -93,6 +93,18 @@ class DatePickerViewController: BaseViewController<DatePicker> {
|
|||||||
addFormRow(label: "ToolTip Title", view: tooltipTitleTextField)
|
addFormRow(label: "ToolTip Title", view: tooltipTitleTextField)
|
||||||
addFormRow(label: "ToolTip Content", view: tooltipContentTextField)
|
addFormRow(label: "ToolTip Content", view: tooltipContentTextField)
|
||||||
append(section: getCalendarSection())
|
append(section: getCalendarSection())
|
||||||
|
append(section: .init().with({
|
||||||
|
func datePicker() -> VDS.DatePicker {
|
||||||
|
VDS.DatePicker().with {
|
||||||
|
$0.calendarModel = .init(minDate: Date().startOfMonth, maxDate: Calendar.current.date(byAdding: .month, value: 2, to: Date())!)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$0.title = "UI Testing"
|
||||||
|
$0.addFormRow(label: "Below Test", view: datePicker())
|
||||||
|
$0.addFormRow(label: "", view: View().with{$0.width(20);$0.height(400)})
|
||||||
|
$0.addFormRow(label: "Above Test", view: datePicker())
|
||||||
|
}))
|
||||||
|
|
||||||
disabledSwitch.onChange = { [weak self] sender in
|
disabledSwitch.onChange = { [weak self] sender in
|
||||||
self?.component.isEnabled = !sender.isOn
|
self?.component.isEnabled = !sender.isOn
|
||||||
}
|
}
|
||||||
@ -154,7 +166,6 @@ class DatePickerViewController: BaseViewController<DatePicker> {
|
|||||||
.sink { [weak self] text in
|
.sink { [weak self] text in
|
||||||
self?.updateTooltip()
|
self?.updateTooltip()
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupModel() {
|
func setupModel() {
|
||||||
@ -227,8 +238,7 @@ extension DatePickerViewController {
|
|||||||
section.addFormRow(label: "Indicator One Date", view: indicatorOnePicker)
|
section.addFormRow(label: "Indicator One Date", view: indicatorOnePicker)
|
||||||
section.addFormRow(label: "Indicator Two Date", view: indicatorTwoPicker)
|
section.addFormRow(label: "Indicator Two Date", view: indicatorTwoPicker)
|
||||||
section.addFormRow(label: "Indicator Three Date", view: indicatorThreePicker)
|
section.addFormRow(label: "Indicator Three Date", view: indicatorThreePicker)
|
||||||
|
|
||||||
|
|
||||||
containerBorderSwitch.onChange = { [weak self] sender in
|
containerBorderSwitch.onChange = { [weak self] sender in
|
||||||
self?.updateCalendarModel()
|
self?.updateCalendarModel()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user