forked from seanpdoyle/select-your-own-seat
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unselect a Seat to remove it from visitor's Cart
For comparison [see this commit][commit] Nothing exciting here. The ergonomics is similar to the Stimulus version. We continue to make use of `ButtonTo` and `form_props` to bring over the conveniences of Rails to React. [form_props]: https://github.com/thoughtbot/form_props [commit]: seanpdoyle@3cd6b13
- Loading branch information
Showing
6 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "application_system_test_case" | ||
|
||
class VisitorUnselectsSeatTest < ApplicationSystemTestCase | ||
test "visiting the seat page" do | ||
venue = create(:benedum_center) | ||
floor = create(:orchestra, venue: venue) | ||
section = create(:section, floor: floor, price: 10_00) | ||
seat = create(:seat, row: "AA", number: "101", section: section) | ||
|
||
visit "/venues/benedum_center/floors/orchestra/seats/AA-101" | ||
click_on "Select" | ||
click_on "Remove" | ||
|
||
within "#cart-summary" do | ||
assert_no_text "$10.00" | ||
end | ||
end | ||
end |