Skip to content

Commit edc1af3

Browse files
cleared getTestId (#1185)
1 parent 85dd9e9 commit edc1af3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

frontend/__tests__/e2e/pages/Home.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ test.describe('Home Page', () => {
4040

4141
test('should have recent posts', async ({ page }) => {
4242
await expect(page.getByRole('heading', { name: 'Recent News & Opinions' })).toBeVisible()
43-
const postContainer = page.getByTestId('post-container').first()
44-
await expect(postContainer.getByRole('link', { name: 'Post 1' })).toBeVisible()
45-
await expect(postContainer.getByText('Author 1')).toBeVisible()
46-
await expect(postContainer.getByText('Feb 23').first()).toBeVisible()
47-
await postContainer.getByRole('link', { name: 'Post 1' }).click()
43+
await expect(page.getByRole('link', { name: 'Post 1' })).toBeVisible()
44+
await expect(page.getByText('Author 1')).toBeVisible()
45+
await expect(page.getByText('Feb 23').first()).toBeVisible()
46+
await page.getByRole('link', { name: 'Post 1' }).click()
4847
})
4948

5049
test('should have top contributors', async ({ page }) => {

frontend/src/pages/Home.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ export default function Home() {
287287
<div
288288
key={post.title}
289289
className="overflow-hidden rounded-lg bg-gray-200 p-4 dark:bg-gray-700"
290-
data-testid="post-container"
291290
>
292291
<h3 className="mb-1 text-lg font-semibold">
293292
<a

0 commit comments

Comments
 (0)