Skip to content

Commit

Permalink
Merge branch 'develop' into eddie/450-add-users-leagues-to-side-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
shashilo authored Oct 14, 2024
2 parents 649a04d + b4d6f29 commit e69320d
Show file tree
Hide file tree
Showing 6 changed files with 549 additions and 104 deletions.
6 changes: 2 additions & 4 deletions app/(main)/league/[leagueId]/entry/all/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('League entries page (Entry Component)', () => {
expect(screen.queryByTestId('global-spinner')).not.toBeInTheDocument();
});

it('should display the header with the league name, survivors, and week number, without a past weeks link', async () => {
it('should display the header with the league name, survivors, and week number', async () => {
mockGetCurrentUserEntries.mockResolvedValueOnce([
{
$id: '66311a210039f0532044',
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('League entries page (Entry Component)', () => {
expect(entryPageHeaderCurrentWeek).toHaveTextContent('Week 1');
});

it('should display the header with the league name, survivors, and week number, with a past weeks link', async () => {
it('should display the header with the league name, survivors, and week number', async () => {
mockUseDataStore.mockReturnValue({
...mockUseDataStore(),
currentWeek: 2,
Expand Down Expand Up @@ -221,7 +221,6 @@ describe('League entries page (Entry Component)', () => {
const entryPageHeaderCurrentWeek = screen.getByTestId(
'entry-page-header-current-week',
);
const viewPastWeeksLink = screen.getByTestId('past-weeks-link');

expect(entryPageHeader).toBeInTheDocument();
expect(entryPageHeaderToLeaguesLink).toBeInTheDocument();
Expand All @@ -231,7 +230,6 @@ describe('League entries page (Entry Component)', () => {
expect(entryPageHeaderLeagueSurvivors).toHaveTextContent('Survivors');
expect(entryPageHeaderCurrentWeek).toBeInTheDocument();
expect(entryPageHeaderCurrentWeek).toHaveTextContent('Week 2');
expect(viewPastWeeksLink).toBeInTheDocument();
});

xit('should not display a button to add a new entry if there are 5 entries', async () => {
Expand Down
14 changes: 0 additions & 14 deletions app/(main)/league/[leagueId]/entry/all/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { LeagueSurvivors } from '@/components/LeagueSurvivors/LeagueSurvivors';
import { useDataStore } from '@/store/dataStore';
import GlobalSpinner from '@/components/GlobalSpinner/GlobalSpinner';
import Heading from '@/components/Heading/Heading';
import Link from 'next/link';
import React, { JSX, useEffect, useState } from 'react';
import LinkCustom from '@/components/LinkCustom/LinkCustom';
import { getNFLTeamLogo } from '@/utils/utils';
Expand Down Expand Up @@ -195,19 +194,6 @@ const Entry = ({
</section>
);
})}

<div className="flex flex-col gap-8 justify-center items-center mt-2 mb-2 w-full">

{currentWeek > 1 && (
<Link
className="text-primary hover:text-primary-muted font-bold hover:underline"
data-testid="past-weeks-link"
href={`#`}
>
View Past Weeks
</Link>
)}
</div>
</section>
</div>
)}
Expand Down
Loading

0 comments on commit e69320d

Please sign in to comment.