Skip to content

Commit

Permalink
Some tests were failing
Browse files Browse the repository at this point in the history
  • Loading branch information
la-ruby committed Jun 15, 2024
1 parent a49b831 commit 76f8608
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/test/system/bookings_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class BookingsTest < ApplicationSystemTestCase
find("#calendar-cell-1716793200").click
sleep 1
#find("#calendar-cell-1716793200").click
#sleep 1
fill_in('bookingname', with: 'Test123')
click_button 'Save'
assert_selector "#partial-flash", text: "Saved"
Expand All @@ -35,6 +34,7 @@ class BookingsTest < ApplicationSystemTestCase
test "cannot create booking" do
visit bookings_url
find("#calendar-cell-1716793200").click
sleep 1
fill_in('bookingname', with: 'x')
click_button 'Save'
assert_selector "#partial-flash", text: "Name is too short (minimum is 2 characters)"
Expand All @@ -43,15 +43,19 @@ class BookingsTest < ApplicationSystemTestCase

test "should edit a booking" do
visit bookings_url
sleep 1
first(".booking-strip").click
sleep 1
fill_in('bookingname', with: 'Lorem Ipsum Dolor')
click_button 'Save'
assert_selector "#partial-flash", text: "Saved"
end

test "cannot edit booking" do
visit bookings_url
sleep 1
first(".booking-strip").click
sleep 1
fill_in('bookingname', with: 'y')
click_button 'Save'
assert_selector "#partial-flash", text: "Name is too short (minimum is 2 characters)"
Expand All @@ -60,7 +64,11 @@ class BookingsTest < ApplicationSystemTestCase

test "should delete booking, and scroll is preserved with morph" do
visit bookings_url
# save_screenshot
#debugger
evaluate_script "$(\"div:contains('__________')\").scrollLeft(100)"
#save_screenshot
#debugger
first(".booking-strip").click
assert_text "Acme Corp 0"
click_button 'DELETE'
Expand Down

0 comments on commit 76f8608

Please sign in to comment.