diff --git a/client/blocks/stats-navigation/constants.ts b/client/blocks/stats-navigation/constants.ts index e4b4ddc4bc9a78..ca43641ac9a76b 100644 --- a/client/blocks/stats-navigation/constants.ts +++ b/client/blocks/stats-navigation/constants.ts @@ -67,11 +67,9 @@ const insights = { paywall: true, } as NavItem; -// TODO: Consider adding subscriber counts into this nav item in the future. -// See client/blocks/subscribers-count/index.jsx. const subscribers = { get label() { - return translate( 'Subscribers' ); + return translate( 'Newsletter' ); }, path: '/stats/subscribers', showIntervals: false, diff --git a/client/my-sites/stats/pages/shared/helpers.tsx b/client/my-sites/stats/pages/shared/helpers.tsx index 64ed57f5395b68..c6214d00054f7e 100644 --- a/client/my-sites/stats/pages/shared/helpers.tsx +++ b/client/my-sites/stats/pages/shared/helpers.tsx @@ -44,7 +44,7 @@ function getSiteFilters( siteId: number ): SiteFilterType[] { id: 'stats-insights', }, { - title: i18n.translate( 'Subscribers' ), + title: i18n.translate( 'Newsletter' ), path: '/stats/subscribers/' + siteId, id: 'stats-subscribers', period: 'day', // default period for Subscribers diff --git a/client/my-sites/stats/stats-subscribers-chart-section/index.tsx b/client/my-sites/stats/stats-subscribers-chart-section/index.tsx index e32bef2c6c578a..2600494c3f5d39 100644 --- a/client/my-sites/stats/stats-subscribers-chart-section/index.tsx +++ b/client/my-sites/stats/stats-subscribers-chart-section/index.tsx @@ -125,15 +125,10 @@ export default function SubscribersChartSection( { const hasAddedPaidSubscriptionProduct = products && products.length > 0; const chartData = transformData( data?.data || [], hasAddedPaidSubscriptionProduct ); - const subscribers = { - label: 'Subscribers', - path: `/stats/subscribers/`, - }; - const slugPath = slug ? `/${ slug }` : ''; - const pathTemplate = `${ subscribers.path }{{ interval }}${ slugPath }`; + const pathTemplate = `/stats/subscribers/{{ interval }}${ slugPath }`; - const subscribersUrl = isOdysseyStats + const manageSubscribersUrl = isOdysseyStats ? `https://cloud.jetpack.com/subscribers/${ slug }` : `/subscribers/${ slug }`; @@ -144,7 +139,7 @@ export default function SubscribersChartSection( {

{ translate( 'Subscribers' ) }{ ' ' } - + { translate( 'View all subscribers' ) } diff --git a/packages/calypso-e2e/src/lib/pages/stats-page.ts b/packages/calypso-e2e/src/lib/pages/stats-page.ts index c9970e1bc19aa0..324df2c834a2e7 100644 --- a/packages/calypso-e2e/src/lib/pages/stats-page.ts +++ b/packages/calypso-e2e/src/lib/pages/stats-page.ts @@ -3,7 +3,7 @@ import { envVariables } from '../..'; import { getCalypsoURL } from '../../data-helper'; import { clickNavTab } from '../../element-helper'; -export type StatsTabs = 'Traffic' | 'Insights' | 'Subscribers' | 'Store'; +export type StatsTabs = 'Traffic' | 'Insights' | 'Newsletter' | 'Store'; type TrafficActivityType = 'Views' | 'Visitors' | 'Likes' | 'Comments'; type StoreActivityType = 'Gross Sales' | 'Net sales' | 'Orders' | 'Avg. Order Value'; // Discriminated Union type. @@ -82,7 +82,7 @@ export class StatsPage { if ( name === 'Insights' ) { await this.page.waitForURL( /stats\/insights/ ); } - if ( name === 'Subscribers' ) { + if ( name === 'Newsletter' ) { await this.page.waitForURL( /stats\/subscribers/ ); } if ( name === 'Store' ) { diff --git a/test/e2e/specs/stats/stats.ts b/test/e2e/specs/stats/stats.ts index f30951ae97fc14..2f712f92b7ff78 100644 --- a/test/e2e/specs/stats/stats.ts +++ b/test/e2e/specs/stats/stats.ts @@ -90,9 +90,9 @@ describe( DataHelper.createSuiteTitle( 'Stats' ), function () { } ); } ); - describe( 'Subscribers', function () { - it( 'Click on Subscribers tab', async function () { - await statsPage.clickTab( 'Subscribers' ); + describe( 'Newsletter', function () { + it( 'Click on Newsletter tab', async function () { + await statsPage.clickTab( 'Newsletter' ); } ); } );