Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
fix(#27): Fix flaky test again
Browse files Browse the repository at this point in the history
  • Loading branch information
keegan authored and Alex committed Apr 5, 2021
1 parent 893cf92 commit c736118
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/Browser/BookingsPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,20 @@ public function testUserCanEditABooking()
->hasReservations(1)
->create(["status" => BookingRequest::PENDING])->first();
$this->browse(function (Browser $browser) use ($bookings) {
$TimeFormat = 'H:i';
$amPM = strtolower(Reservation::first()->end_time->format('A'));
$startTime = trim(Reservation::first()->start_time->format($TimeFormat), ":");
$endTime = trim(Reservation::first()->end_time->format($TimeFormat), ":");
$browser->loginAs(User::first());
$browser->visit('/bookings')
->clickLink("Edit", 'button')
->pause(5000);
$browser->assertSee('Submit A Booking Request')
->type('@start', $startTime . $amPM)
->type('@end', $endTime . $amPM)
->type('@title', $endTime . $amPM)
->type('@title', 'title')
->type('@type', 'type')
->type('#event_description', 'description')
->type('#guest_speakers', 'speakers')
->type('@numberAttending', '2');
$browser->check('div > main > form > div:nth-child(4) > div > div > input');
$browser->press('SUBMIT')
->pause(5000)
->assertPathIs('/bookings');
->assertSee('This booking cannot be submitted');
});
}

Expand Down

0 comments on commit c736118

Please sign in to comment.