diff --git a/src/app/contexts/RequestContext/index.test.tsx b/src/app/contexts/RequestContext/index.test.tsx index ef56e343057..a64f7536509 100644 --- a/src/app/contexts/RequestContext/index.test.tsx +++ b/src/app/contexts/RequestContext/index.test.tsx @@ -204,7 +204,7 @@ describe('RequestContext', () => { isAmp: false, isApp: false, isLite: true, - platform: 'canonical', + platform: 'lite', }); }); diff --git a/src/app/contexts/RequestContext/index.tsx b/src/app/contexts/RequestContext/index.tsx index dcacc3205eb..f7f01b8c36f 100644 --- a/src/app/contexts/RequestContext/index.tsx +++ b/src/app/contexts/RequestContext/index.tsx @@ -100,6 +100,8 @@ export const RequestContextProvider = ({ return 'app'; case isAmp: return 'amp'; + case isLite: + return 'lite'; default: return 'canonical'; } diff --git a/src/app/lib/analyticsUtils/index.js b/src/app/lib/analyticsUtils/index.js index 72c5f15d48d..5e8928a5496 100644 --- a/src/app/lib/analyticsUtils/index.js +++ b/src/app/lib/analyticsUtils/index.js @@ -78,6 +78,8 @@ export const getAppType = platform => { return 'amp'; case 'app': return 'mobile-app'; + case 'lite': + return 'lite'; case 'canonical': return 'responsive'; default: diff --git a/src/app/lib/analyticsUtils/index.test.js b/src/app/lib/analyticsUtils/index.test.js index 9452955930c..1e2112788f7 100644 --- a/src/app/lib/analyticsUtils/index.test.js +++ b/src/app/lib/analyticsUtils/index.test.js @@ -129,6 +129,11 @@ describe('getAppType', () => { expected: 'mobile-app', summary: 'should return mobile-app for app', }, + { + platform: 'lite', + expected: 'lite', + summary: 'should return lite for lite', + }, { platform: 'canonical', expected: 'responsive', diff --git a/src/app/models/types/global.ts b/src/app/models/types/global.ts index b04ae5ec1a8..765ccf5c788 100644 --- a/src/app/models/types/global.ts +++ b/src/app/models/types/global.ts @@ -2,7 +2,7 @@ import * as PAGE_TYPES from '../../routes/utils/pageTypes'; export type Environments = 'local' | 'test' | 'live'; -export type Platforms = 'amp' | 'canonical' | 'app'; +export type Platforms = 'amp' | 'canonical' | 'app' | 'lite'; export type Direction = 'rtl' | 'ltr'; diff --git a/src/integration/integrationTestEnvironment.js b/src/integration/integrationTestEnvironment.js index 9cf33fa4cde..8d7f8e7b6de 100644 --- a/src/integration/integrationTestEnvironment.js +++ b/src/integration/integrationTestEnvironment.js @@ -18,7 +18,9 @@ class IntegrationTestEnvironment extends JsdomEnvironment { } = context.docblockPragmas; const pageType = getPageTypeFromTestPath(context.testPath); - const platformForPath = platform === 'canonical' ? '' : `.${platform}`; + const platformForPath = ['amp', 'lite'].includes(platform) + ? `.${platform}` + : ''; this.pageType = camelCaseToText(pageType); this.service = service;