From 8a3f4beffc3c5ac86378b0612d5749472d78b9f8 Mon Sep 17 00:00:00 2001 From: Max Kadel Date: Thu, 29 Feb 2024 13:22:10 -0500 Subject: [PATCH] Get a little farther in the test before failing (#1044) The date range is not currently actually being filled in. You can verify this by turning off "headless" mode and running the test with a byebug after line 64. There are two main errors in the console: `TypeError: m.includes is not a function`, raised from the updateRangeInput function in lux-styleguidist `TypeError: Cannot read properties of undefined`, raised from the toLocaleDateString function in lux-styleguidist See https://github.com/pulibrary/lux-styleguidist/issues/107 --- spec/features/report_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/features/report_spec.rb b/spec/features/report_spec.rb index b6324b52..57236e28 100644 --- a/spec/features/report_spec.rb +++ b/spec/features/report_spec.rb @@ -50,15 +50,17 @@ expect(page).to have_content "Vacation (15.5 hours) October 13, 2019 October 14, 2019 Approved Sally Smith ITIMS October 20, 2019" expect(page).to have_content "Vacation (10.3 hours) October 12, 2019 October 13, 2019 Pending Pat Doe ITIMS" - select_drop_down(menu: "#status-menu", item: "Approved") + click_on "Status" + click_on "Approved" assert_selector ".my-request tr", count: 5 # header row included in count - - select_drop_down(menu: "#request-type-menu", item: "Travel") + click_on "Request type" + click_on "Travel" assert_selector ".my-request tr", count: 3 # header row included in count click_link("Status: Approved") assert_selector ".my-request tr", count: 4 - + # The date range is not currently actually being filled in + # You can verify this by turning off "headless" mode and running the test with a byebug after the next line fill_in "dateRange", with: "10/10/2019 - 10/25/2019" click_on "Filter by Date" assert_selector ".my-request tr", count: 2