fix(curriculum): cash register tests need valid global state (#55245)

This commit is contained in:
Jeremy L Thompson
2024-06-20 23:38:14 -06:00
committed by GitHub
parent 27c4957479
commit 1034558974

View File

@@ -105,6 +105,7 @@ window.alert = (message) => alertMessage = message; // Override alert and store
// set price and customer cash
price = 20;
cashInput.value = '10';
cid = [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.1], ['QUARTER', 4.25], ['ONE', 90], ['FIVE', 55], ['TEN', 20], ['TWENTY', 60], ['ONE HUNDRED', 100]];
cashInput.dispatchEvent(new Event('change'));
purchaseBtn.click();
@@ -120,6 +121,7 @@ const changeDueDiv = document.getElementById('change-due');
// set price and customer cash
price = 11.95;
cashInput.value = '11.95';
cid = [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.1], ['QUARTER', 4.25], ['ONE', 90], ['FIVE', 55], ['TEN', 20], ['TWENTY', 60], ['ONE HUNDRED', 100]];
cashInput.dispatchEvent(new Event('change'));
purchaseBtn.click();