File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff 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 } ) => {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments