Skip to content

Commit 34b8f56

Browse files
committed
Fix TAGS target to not include sqlite files
seat-charts.js:387-388 now allows hyphens in seat's hover-label (but no spaces, since must be limited to characters legal for HTML ID attribute -waah) seatmap.js now extracts seat number from composite label before proceeding Scenarios modified to use seat full names ("Reserved-B1") for choosing seats
1 parent 6729a74 commit 34b8f56

6 files changed

+10
-9
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FILES = $(shell find app public lib features spec config db -type f -a '!' -name '\#*' -a '!' -name '.\#' -a '!' -name '*.min.js' -a '!' -name rails.js)
1+
FILES = $(shell find app public lib features spec config db -type f -a '!' -name '\#*' -a '!' -name '.\#' -a '!' -name '*.min.js' -a '!' -name rails.js -a '!' -name '*.sqlite3')
22

33
all: TAGS
44

app/assets/javascripts/jquery.seat-charts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@
384384
*
385385
*/
386386

387-
$.each(characters.match(/[a-z_]{1}(\[[0-9a-z_]{0,}(,[0-9a-z_ ]+)?\])?/gi), function (column, characterParams) {
388-
var matches = characterParams.match(/([a-z_]{1})(\[([0-9a-z_ ,]+)\])?/i),
387+
$.each(characters.match(/[a-z_]{1}(\[[0-9a-z_-]{0,}(,[0-9a-z_ ]+)?\])?/gi), function (column, characterParams) {
388+
var matches = characterParams.match(/([a-z_]{1})(\[([0-9a-z_ ,-]+)\])?/i),
389389
//no matter if user specifies [] params, the character should be in the second element
390390
character = matches[1],
391391
//check if user has passed some additional params to override id or label

app/assets/javascripts/seatmap.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ A1.seatmap = {
1818
]
1919
}
2020
,click: function(evt) {
21-
var seatNum = this.settings.id;
21+
var clickedSeat = this.settings.id; // format: ZoneName-A111 (hyphen is separator)
22+
var seatNum = clickedSeat.substr(clickedSeat.lastIndexOf("-") + 1);
2223
switch(this.status()) {
2324
case 'available': // clicking on available seat selects it...
2425
if (A1.seatmap.selectedSeats.length < A1.seatmap.max) { // ...if still seats to select

features/reserved_seating/add_comps_with_reserved_seating.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Scenario: add comps and reserve specific seats
2121
And I select "Comp (2010)" from "What type:"
2222
And I select the "March 2, 2:00pm" performance of "Chicago" from "Reserve for:"
2323
Then I should see the seatmap
24-
When I choose seats B1,B2
24+
When I choose seats Reserved-B1,Reserved-B2
2525
Then I should see "B1" in the list of selected seats
2626
When I press "Add Vouchers"
2727
Then customer "Joe Mallon" should have seat B1 for the March 2, 2010, 2pm performance of "Chicago"

features/reserved_seating/purchase_reserved_seats.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Scenario: purchase tickets with reserved seating
2020
And I select "1" from "General - $11.00"
2121
And I select "1" from "Discount - $9.00"
2222
And I press "Choose Seats..."
23-
And I choose seats B1,B2
23+
And I choose seats Reserved-B1,Reserved-B2
2424
And I press "Continue to Billing Information"
2525
Then the cart should show the following items:
2626
| description | seats | price |
@@ -35,7 +35,7 @@ Scenario: when admin purchases tickets, nonticket items shouldn't require seats
3535
And I fill in "General - $11.00" with "2"
3636
And I fill in "Wine - $7.00" with "1"
3737
And I press "Choose Seats..."
38-
And I choose seats B1,B2
38+
And I choose seats Reserved-B1,Reserved-B2
3939
When I press "Continue to Billing Information"
4040
Then the cart should show the following items:
4141
| description | seats | price |

features/reserved_seating/walkup_sale_with_reserved_seating.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Scenario: sell tickets with reserved seats
2424
And I fill in "Discount" with "1"
2525
And I press "Choose Seats..."
2626
Then I should see the seatmap
27-
When I choose seats B1,B2,A1
27+
When I choose seats Reserved-B1,Reserved-B2,Reserved-A1
2828
Then I should see "A1,B1,B2" in the list of selected seats
2929
When I complete the walkup sale with credit card
3030
Then I should see "3 tickets (total $31.00) paid by Credit card. Seats: A1, B1, B2"
@@ -34,7 +34,7 @@ Scenario: sell tickets as well as nonticket items at a reserved seating show
3434

3535
When I fill in "General" with "1"
3636
And I fill in "Wine" with "2"
37-
And I successfully choose seat B1
37+
And I successfully choose seat Reserved-B1
3838
And I complete the walkup sale with credit card
3939
Then I should see "1 ticket and 2 retail items (total $25.00) paid by Credit card. Seats: B1"
4040

0 commit comments

Comments
 (0)