Skip to content

Commit

Permalink
Fix "last post in category" test
Browse files Browse the repository at this point in the history
  • Loading branch information
henriksommerfeld committed Feb 11, 2024
1 parent e77e366 commit 3c46c86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/navigation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ test.describe('Navigation', () => {
})

test('Should go to last post in category', async ({ page }) => {
page.locator('.all-categories').getByRole('link', { name: 'coding', exact: true }).click()
await expect(page).toHaveURL(/categories\/coding/)
page.locator('main article').last().getByRole('link').filter({ hasText: 'Read' }).click()
const link = page.locator('footer .categories-tags').getByRole('link', { name: 'Coding' })
await expect(link).toHaveAttribute('href', '/categories/coding')
Expand Down

0 comments on commit 3c46c86

Please sign in to comment.