diff --git a/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-membership.tsx b/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-membership.tsx index ae602236fc..4e402ef42f 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-membership.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-membership.tsx @@ -3,17 +3,14 @@ import { Trans, useTranslation } from 'react-i18next' import { MemberGroupSubscription } from '../../../../../../types/subscription/dashboard/subscription' import { useSubscriptionDashboardContext } from '../../context/subscription-dashboard-context' import { LEAVE_GROUP_MODAL_ID } from './leave-group-modal' -import PremiumFeaturesLink from './premium-features-link' import getMeta from '../../../../utils/meta.js' type GroupSubscriptionMembershipProps = { subscription: MemberGroupSubscription - isLast: boolean } export default function GroupSubscriptionMembership({ subscription, - isLast, }: GroupSubscriptionMembershipProps) { const { t } = useTranslation() const { handleOpenModal, setLeavingGroupId } = @@ -48,7 +45,6 @@ export default function GroupSubscriptionMembership({ {subscription.teamNotice}

)} - {isLast && } {hideLeaveButton ? ( {' '} diff --git a/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-memberships.tsx b/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-memberships.tsx index 8b42636ddc..b3a464728f 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-memberships.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/group-subscription-memberships.tsx @@ -17,10 +17,9 @@ export default function GroupSubscriptionMemberships() { return ( <> {memberOnlyGroupSubscriptions.map( - (subscription: MemberGroupSubscription, index: number) => ( + (subscription: MemberGroupSubscription) => ( ) diff --git a/services/web/frontend/js/features/subscription/components/dashboard/institution-memberships.tsx b/services/web/frontend/js/features/subscription/components/dashboard/institution-memberships.tsx index 5894ffaff2..97a72b772e 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/institution-memberships.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/institution-memberships.tsx @@ -1,7 +1,6 @@ import { Trans } from 'react-i18next' import { Institution } from '../../../../../../types/institution' import { useSubscriptionDashboardContext } from '../../context/subscription-dashboard-context' -import PremiumFeaturesLink from './premium-features-link' function InstitutionMemberships() { const { institutionMemberships } = useSubscriptionDashboardContext() @@ -44,7 +43,6 @@ function InstitutionMemberships() {
))} - ) } diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx index 7dcc52599c..89b0ea14cd 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/active.tsx @@ -1,5 +1,4 @@ import { useTranslation, Trans } from 'react-i18next' -import PremiumFeaturesLink from '../../premium-features-link' import { PriceExceptions } from '../../../shared/price-exceptions' import { useSubscriptionDashboardContext } from '../../../../context/subscription-dashboard-context' import { RecurlySubscription } from '../../../../../../../../types/subscription/dashboard/subscription' @@ -98,7 +97,6 @@ export function ActiveSubscription({ ]} />

-

-

+ {hasDisplayedSubscription && } {!hasDisplayedSubscription && (hasSubscription ? : )} diff --git a/services/web/test/frontend/features/subscription/components/dashboard/institution-memberships.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/institution-memberships.test.tsx index 39b532ccde..7471c36d09 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/institution-memberships.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/institution-memberships.test.tsx @@ -59,15 +59,4 @@ describe('', function () { 'Sorry, something went wrong. Subscription information related to institutional affiliations may not be displayed. Please try again later.' ) }) - - it('renders the "Get the most out of your" subscription text when a user has a subscription', function () { - renderWithSubscriptionDashContext(, { - metaTags: [ - { name: 'ol-currentInstitutionsWithLicence', value: memberships }, - ], - }) - screen.getByText('Get the most out of your', { - exact: false, - }) - }) }) diff --git a/services/web/test/frontend/features/subscription/components/dashboard/personal-subscription.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/personal-subscription.test.tsx index e747f36424..00a0ca4b1e 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/personal-subscription.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/personal-subscription.test.tsx @@ -86,11 +86,6 @@ describe('', function () { screen.getByText('No further payments will be taken.', { exact: false }) - screen.getByText( - 'Get the most out of your Overleaf subscription by checking out the list of', - { exact: false } - ) - screen.getByRole('link', { name: 'View Your Invoices' }) screen.getByRole('button', { name: 'Reactivate your subscription' }) }) diff --git a/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx index 88dfcfc81c..16fcd78e53 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/states/active/active.test.tsx @@ -53,12 +53,6 @@ describe('', function () { }) expect(dates.length).to.equal(2) - // sentence broken up by link - screen.getByText( - 'Get the most out of your Overleaf subscription by checking out the list of', - { exact: false } - ) - screen.getByText( '* Prices may be subject to additional VAT, depending on your country.' ) diff --git a/services/web/test/frontend/features/subscription/components/dashboard/subscription-dashboard.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/subscription-dashboard.test.tsx index 3b53f93eca..b2b8668f20 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/subscription-dashboard.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/subscription-dashboard.test.tsx @@ -5,12 +5,40 @@ import { cleanUpContext, renderWithSubscriptionDashContext, } from '../../helpers/render-with-subscription-dash-context' +import { groupPlans, plans } from '../../fixtures/plans' +import { annualActiveSubscription } from '../../fixtures/subscriptions' describe('', function () { afterEach(function () { cleanUpContext() }) + describe('With an active subscription', function () { + beforeEach(function () { + renderWithSubscriptionDashContext(, { + metaTags: [ + { name: 'ol-plans', value: plans }, + { + name: 'ol-groupPlans', + value: groupPlans, + }, + { name: 'ol-subscription', value: annualActiveSubscription }, + { + name: 'ol-recommendedCurrency', + value: 'USD', + }, + ], + }) + }) + + it('renders the "Get the most out of your" subscription text', function () { + screen.getByText( + 'Get the most out of your Overleaf subscription by checking out the list of', + { exact: false } + ) + }) + }) + describe('Free Plan', function () { beforeEach(function () { renderWithSubscriptionDashContext()