mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): incomplete cash register hints (#59313)
This commit is contained in:
+4
-4
@@ -95,7 +95,7 @@ const el = document.getElementById('purchase-btn');
|
||||
assert.strictEqual(el?.nodeName?.toLowerCase(), 'button');
|
||||
```
|
||||
|
||||
When `price` is `20` and the value in the `#cash` element is `10`, an alert should appear with the text `"Customer does not have enough money to purchase the item"`.
|
||||
When `price` is `20`, the value in the `#cash` element is `10`, and the `#purchase-btn` element is clicked, an alert should appear with the text `"Customer does not have enough money to purchase the item"`.
|
||||
|
||||
```js
|
||||
const cashInput = document.getElementById('cash');
|
||||
@@ -118,7 +118,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
When the value in the `#cash` element is less than `price`, an alert should appear with the text `"Customer does not have enough money to purchase the item"`.
|
||||
When the value in the `#cash` element is less than `price`, and the `#purchase-btn` element is clicked, an alert should appear with the text `"Customer does not have enough money to purchase the item"`.
|
||||
|
||||
```js
|
||||
const cashInput = document.getElementById('cash');
|
||||
@@ -155,7 +155,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
When `price` is `11.95` and the value in the `#cash` element is `11.95`, the value in the `#change-due` element should be `"No change due - customer paid with exact cash"`.
|
||||
When `price` is `11.95`, the value in the `#cash` element is `11.95`, and the `#purchase-btn` element is clicked, the value in the `#change-due` element should be `"No change due - customer paid with exact cash"`.
|
||||
|
||||
```js
|
||||
const cashInput = document.getElementById('cash');
|
||||
@@ -177,7 +177,7 @@ assert.strictEqual(
|
||||
);
|
||||
```
|
||||
|
||||
When the value in the `#cash` element is equal to `price`, the value in the `#change-due` element should be `"No change due - customer paid with exact cash"`.
|
||||
When the value in the `#cash` element is equal to `price`, and the `#purchase-btn` element is clicked, the value in the `#change-due` element should be `"No change due - customer paid with exact cash"`.
|
||||
|
||||
```js
|
||||
const cashInput = document.getElementById('cash');
|
||||
|
||||
Reference in New Issue
Block a user