Skip to content

Commit 04b7906

Browse files
committed
s/halfed/halved
1 parent e299c91 commit 04b7906

File tree

13 files changed

+13
-13
lines changed

13 files changed

+13
-13
lines changed

exercises/03.best-practices/03.problem.network-mocking/src/discount-code-form.browser.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test('displays a warning for legacy discount codes', async ({
5555
// to appear, notifying the user about the legacy discount code.
5656
// 💰 await expect.element(locator).toHaveTextContent(content)
5757
// 💰 page.getByRole('alert')
58-
// 💰 '"LEGA2000" is a legacy code. Discount amount halfed.'
58+
// 💰 '"LEGA2000" is a legacy code. Discount amount halved.'
5959
})
6060

6161
test('displays an error when fetching the discount fails', async ({

exercises/03.best-practices/03.problem.network-mocking/src/discount-code-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export function DiscountCodeForm() {
9393
dispatch({ type: 'success', discount })
9494

9595
if (discount.isLegacy) {
96-
notify(`"${code}" is a legacy code. Discount amount halfed.`)
96+
notify(`"${code}" is a legacy code. Discount amount halved.`)
9797
}
9898
})
9999
.catch((error) => {

exercises/03.best-practices/03.solution.network-mocking/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ And, finally, one remaining assertion for the warning message regarding the use
5858
```tsx filename=discount-code-form.browser.test.tsx
5959
await expect
6060
.element(page.getByRole('alert'))
61-
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halfed.')
61+
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halved.')
6262
```
6363
6464
> :owl: Since the legacy code warning is a `<p>` text element that doesn't have an accessible name, I am relying on the `.toHaveTextContent()` matcher to both narrow down the locator and assert on the message displayed to the user.

exercises/03.best-practices/03.solution.network-mocking/src/discount-code-form.browser.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test('displays a warning for legacy discount codes', async ({ worker }) => {
5151
.toBeVisible()
5252
await expect
5353
.element(page.getByRole('alert'))
54-
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halfed.')
54+
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halved.')
5555
})
5656

5757
test('displays an error when fetching the discount fails', async ({

exercises/03.best-practices/03.solution.network-mocking/src/discount-code-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export function DiscountCodeForm() {
9393
dispatch({ type: 'success', discount })
9494

9595
if (discount.isLegacy) {
96-
notify(`"${code}" is a legacy code. Discount amount halfed.`)
96+
notify(`"${code}" is a legacy code. Discount amount halved.`)
9797
}
9898
})
9999
.catch((error) => {

exercises/03.best-practices/04.problem.element-presence/src/discount-code-form.browser.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test('displays a warning for legacy discount codes', async ({ worker }) => {
5151
.toBeVisible()
5252
await expect
5353
.element(page.getByRole('alert'))
54-
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halfed.')
54+
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halved.')
5555
})
5656

5757
test('displays an error when fetching the discount fails', async ({

exercises/03.best-practices/04.problem.element-presence/src/discount-code-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function DiscountCodeForm() {
104104
dispatch({ type: 'success', discount })
105105

106106
if (discount.isLegacy) {
107-
notify(`"${code}" is a legacy code. Discount amount halfed.`)
107+
notify(`"${code}" is a legacy code. Discount amount halved.`)
108108
}
109109
})
110110
.catch(() => {

exercises/03.best-practices/04.solution.element-presence/src/discount-code-form.browser.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test('displays a warning for legacy discount codes', async ({ worker }) => {
5151
.toBeVisible()
5252
await expect
5353
.element(page.getByRole('alert'))
54-
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halfed.')
54+
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halved.')
5555
})
5656

5757
test('displays an error when fetching the discount fails', async ({

exercises/03.best-practices/04.solution.element-presence/src/discount-code-form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export function DiscountCodeForm() {
104104
dispatch({ type: 'success', discount })
105105

106106
if (discount.isLegacy) {
107-
notify(`"${code}" is a legacy code. Discount amount halfed.`)
107+
notify(`"${code}" is a legacy code. Discount amount halved.`)
108108
}
109109
})
110110
.catch(() => {

exercises/03.best-practices/05.problem.page-navigation/src/discount-code-form.browser.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ test('displays a warning for legacy discount codes', async ({ worker }) => {
6161
.toBeVisible()
6262
await expect
6363
.element(page.getByRole('alert'))
64-
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halfed.')
64+
.toHaveTextContent('"LEGA2000" is a legacy code. Discount amount halved.')
6565
})
6666

6767
test('displays an error when fetching the discount fails', async ({

0 commit comments

Comments
 (0)