Skip to content

Commit

Permalink
Fix end-to-end test
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarah committed Sep 14, 2023
1 parent d6474fc commit 9535349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/researcher/cypress/e2e/community.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Community details page', () => {
.first()
.then($name => {
// Navigate to the first community details page.
cy.getBySel('community-item-name').first().find('a').click();
cy.getBySel('community-item-name').first().parentsUntil('a').click();
// Wait for the page to load.
cy.location('pathname', {timeout: 60000}).should(
'include',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default function CommunityCard({community, locale}: CommunityCardProps) {
return (
<Link
href={`/communities/${community.slug}`}
data-testid="community-item-name"
className="rounded-lg mb-20 bg-[#f3eee2] hover:bg-[#f1e9d7] text-stone-800 transition"
>
<div className="-mt-20 w-full flex justify-center">
Expand All @@ -46,7 +45,12 @@ export default function CommunityCard({community, locale}: CommunityCardProps) {
<h1 className="text-xl font-normal w-full flex justify-center mt-4 px-4">
{t.rich('communityName', {
name: () => (
<strong className="font-semibold ml-1">{community.name}</strong>
<strong
className="font-semibold ml-1"
data-testid="community-item-name"
>
{community.name}
</strong>
),
})}
</h1>
Expand Down

0 comments on commit 9535349

Please sign in to comment.