Fix some new_work_package_specs

feature/42358-standardise-date-pickers-drop-modal-portal
Dombi Attila 2 years ago
parent 1ad534b8e9
commit df74324938
  1. 2
      spec/features/work_packages/new/new_work_package_spec.rb
  2. 4
      spec/support/edit_fields/date_edit_field.rb

@ -372,8 +372,6 @@ describe 'new work package', js: true do
due = (Time.zone.today + 1.day).iso8601
date_field.set_due_date due
date_field.expect_value "#{start} - #{due}"
# Cancel
date_field.cancel_by_click
date_field.expect_value 'no start date - no finish date'

@ -95,7 +95,7 @@ class DateEditField < EditField
if active?
modal_element.find(input_selector)
else
page.find(".#{property_name} input")
page.find(".#{property_name}.-editable")
end
end
@ -151,7 +151,7 @@ class DateEditField < EditField
end
def expect_value(value)
expect(page).to have_selector(".#{property_name} input", value:)
expect(page).to have_selector(".#{property_name}.-editable", text: value)
end
def set_active_date(value)

Loading…
Cancel
Save