Skip to content

Commit

Permalink
chore: Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rijuma committed Jan 16, 2025
1 parent 0535bea commit 2ab0d68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Sidebar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Sidebar = ({
);

const getDaysRemainingMessage = () => {
if (!upgradeable || auditTrialDaysRemaining < 0) { return null; }
if (!upgradeable || auditTrialDaysRemaining < 1) { return null; }

return (
<div className="trial-header" data-testid="get-days-remaining-message">
Expand Down
6 changes: 3 additions & 3 deletions src/components/Sidebar/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('<Sidebar />', () => {
render(undefined, { disclosureAcknowledged: true });
expect(screen.queryByTestId('sidebar-xpert')).toBeInTheDocument();
expect(screen.queryByTestId('get-days-remaining-message')).toBeInTheDocument();
expect(screen.queryByTestId('trial-ends-today')).not.toBeInTheDocument();
expect(screen.queryByTestId('trial-ends-today-message')).toBeInTheDocument();
});

it('should call track event on click', () => {
Expand All @@ -141,9 +141,9 @@ describe('<Sidebar />', () => {
});
render(undefined, { disclosureAcknowledged: true });
expect(screen.queryByTestId('sidebar-xpert')).toBeInTheDocument();
expect(screen.queryByTestId('get-days-remaining-message')).toBeInTheDocument();
expect(screen.queryByTestId('get-days-remaining-message')).not.toBeInTheDocument();
expect(screen.queryByTestId('days-remaining-message')).not.toBeInTheDocument();
expect(screen.queryByTestId('trial-ends-today')).not.toBeInTheDocument();
expect(screen.queryByTestId('trial-ends-today-message')).not.toBeInTheDocument();
});
});

Expand Down

0 comments on commit 2ab0d68

Please sign in to comment.