Skip to content

Commit 0378515

Browse files
authored
Merge pull request #3684 from michal-p/patch-3
Update part5d.md
2 parents 7e208ac + 48a3061 commit 0378515

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/5/en/part5d.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ We could refine the test to ensure that the error message is printed exactly in
720720
test('login fails with wrong password', async ({ page }) => {
721721
// ...
722722

723-
const errorDiv = await page.locator('.error') // highlight-line
723+
const errorDiv = page.locator('.error') // highlight-line
724724
await expect(errorDiv).toContainText('wrong credentials')
725725
})
726726
```
@@ -733,7 +733,7 @@ It is possible to test the application's CSS styles with matcher [toHaveCSS](htt
733733
test('login fails with wrong password', async ({ page }) => {
734734
// ...
735735

736-
const errorDiv = await page.locator('.error')
736+
const errorDiv = page.locator('.error')
737737
await expect(errorDiv).toContainText('wrong credentials')
738738
await expect(errorDiv).toHaveCSS('border-style', 'solid') // highlight-line
739739
await expect(errorDiv).toHaveCSS('color', 'rgb(255, 0, 0)') // highlight-line
@@ -751,7 +751,7 @@ test('login fails with wrong password', async ({ page }) =>{
751751
await page.getByTestId('password').fill('wrong')
752752
await page.getByRole('button', { name: 'login' }).click()
753753

754-
const errorDiv = await page.locator('.error')
754+
const errorDiv = page.locator('.error')
755755
await expect(errorDiv).toContainText('wrong credentials')
756756
await expect(errorDiv).toHaveCSS('border-style', 'solid')
757757
await expect(errorDiv).toHaveCSS('color', 'rgb(255, 0, 0)')

0 commit comments

Comments
 (0)