Skip to content

Commit 48a3061

Browse files
authored
Update part5d.md
redundant awaits
1 parent bf1bc11 commit 48a3061

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
@@ -688,7 +688,7 @@ We could refine the test to ensure that the error message is printed exactly in
688688
test('login fails with wrong password', async ({ page }) => {
689689
// ...
690690

691-
const errorDiv = await page.locator('.error') // highlight-line
691+
const errorDiv = page.locator('.error') // highlight-line
692692
await expect(errorDiv).toContainText('wrong credentials')
693693
})
694694
```
@@ -701,7 +701,7 @@ It is possible to test the application's CSS styles with matcher [toHaveCSS](htt
701701
test('login fails with wrong password', async ({ page }) => {
702702
// ...
703703

704-
const errorDiv = await page.locator('.error')
704+
const errorDiv = page.locator('.error')
705705
await expect(errorDiv).toContainText('wrong credentials')
706706
await expect(errorDiv).toHaveCSS('border-style', 'solid') // highlight-line
707707
await expect(errorDiv).toHaveCSS('color', 'rgb(255, 0, 0)') // highlight-line
@@ -719,7 +719,7 @@ test('login fails with wrong password', async ({ page }) =>{
719719
await page.getByTestId('password').fill('wrong')
720720
await page.getByRole('button', { name: 'login' }).click()
721721

722-
const errorDiv = await page.locator('.error')
722+
const errorDiv = page.locator('.error')
723723
await expect(errorDiv).toContainText('wrong credentials')
724724
await expect(errorDiv).toHaveCSS('border-style', 'solid')
725725
await expect(errorDiv).toHaveCSS('color', 'rgb(255, 0, 0)')

0 commit comments

Comments
 (0)