Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Danielle/550 remove past weeks picks link #583

Merged
merged 8 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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