src/app/pages/MediaArticlePage/fixtureData.ts

Summary

Maintainability
C
1 day
Test Coverage
A
100%
const pidginPageData = {
  content: {
    model: {
      blocks: [
        {
          id: '2484b596',
          type: 'visuallyHiddenHeadline',
          model: {
            blocks: [
              {
                id: '5ecf3620',
                type: 'text',
                model: {
                  blocks: [
                    {
                      id: '3b9abb26',
                      type: 'paragraph',
                      model: {
                        text: 'WS Media (1) -Media above title',
                        blocks: [
                          {
                            id: 'ebf8d803',
                            type: 'fragment',
                            model: {
                              text: 'WS Media (1) -Media above title',
                              attributes: [],
                            },
                            position: [1, 1, 1, 1],
                          },
                        ],
                      },
                      position: [1, 1, 1],
                    },
                  ],
                },
                position: [1, 1],
              },
            ],
          },
          position: [1],
        },
        {
          id: 'd3d6bfd8',
          type: 'video',
          model: {
            locator: 'urn:bbc:pips:pid:p01thw20',
            blocks: [
              {
                id: '58e40776',
                type: 'caption',
                model: {
                  blocks: [
                    {
                      id: '114d678b',
                      type: 'text',
                      model: {
                        blocks: [
                          {
                            id: '9a21a54a',
                            type: 'paragraph',
                            model: {
                              text: 'BBC launch trailer for We Know Our Place women\'s sport campaign"',
                              blocks: [
                                {
                                  id: 'dee173c5',
                                  type: 'fragment',
                                  model: {
                                    text: 'BBC launch trailer for We Know Our Place women\'s sport campaign"',
                                    attributes: [],
                                  },
                                  position: [2, 1, 1, 1, 1],
                                },
                              ],
                            },
                            position: [2, 1, 1, 1],
                          },
                        ],
                      },
                      position: [2, 1, 1],
                    },
                  ],
                },
                position: [2, 1],
              },
              {
                id: 'e1ede8f7',
                type: 'aresMedia',
                model: {
                  blocks: [
                    {
                      id: 'ac79d69f',
                      blockId: 'urn:bbc:ares::clip:p01thw20',
                      type: 'aresMediaMetadata',
                      model: {
                        id: 'p01thw20',
                        subType: 'clip',
                        format: 'audio_video',
                        title:
                          "BBC launch trailer for We Know Our Place women's sport campaign",
                        synopses: {
                          short:
                            'BBC launch trailer for We Know Our Place women\'s sport campaign"',
                        },
                        imageUrl:
                          'ichef.test.bbci.co.uk/images/ic/$recipe/p01thw3g.jpg',
                        embedding: true,
                        advertising: true,
                        versions: [
                          {
                            versionId: 'p01thw22',
                            types: ['Original'],
                            duration: 54,
                            durationISO8601: 'PT54S',
                            warnings: {},
                            availableTerritories: {
                              uk: true,
                              nonUk: true,
                            },
                            availableFrom: 1656665816000,
                          },
                        ],
                        syndication: {
                          destinations: [],
                        },
                        smpKind: 'programme',
                      },
                      position: [2, 2, 1],
                    },
                    {
                      id: '9aed1eb7',
                      type: 'image',
                      model: {
                        blocks: [
                          {
                            id: '4a56948a',
                            type: 'rawImage',
                            model: {
                              width: 1428,
                              height: 803,
                              locator:
                                'ichef.test.bbci.co.uk/images/ic/$widthxn/p01thw3g.jpg',
                              originCode: 'mpv',
                            },
                            position: [2, 2, 2, 1],
                          },
                          {
                            id: 'c51e6bae',
                            type: 'altText',
                            model: {
                              blocks: [
                                {
                                  id: '22b766bb',
                                  type: 'text',
                                  model: {
                                    blocks: [
                                      {
                                        id: '4d434bcb',
                                        type: 'paragraph',
                                        model: {
                                          text: 'BBC launch trailer for We Know Our Place women\'s sport campaign"',
                                          blocks: [
                                            {
                                              id: '5d45d744',
                                              type: 'fragment',
                                              model: {
                                                text: 'BBC launch trailer for We Know Our Place women\'s sport campaign"',
                                                attributes: [],
                                              },
                                              position: [2, 2, 2, 2, 1, 1, 1],
                                            },
                                          ],
                                        },
                                        position: [2, 2, 2, 2, 1, 1],
                                      },
                                    ],
                                  },
                                  position: [2, 2, 2, 2, 1],
                                },
                              ],
                            },
                            position: [2, 2, 2, 2],
                          },
                        ],
                      },
                      position: [2, 2, 2],
                    },
                  ],
                },
                position: [2, 2],
              },
            ],
          },
          position: [2],
        },
        {
          id: 'c66579d3',
          type: 'fauxHeadline',
          model: {
            blocks: [
              {
                id: '4fe12ad6',
                type: 'text',
                model: {
                  blocks: [
                    {
                      id: '89a8aca0',
                      type: 'paragraph',
                      model: {
                        text: 'WS Media (1) -Media above title',
                        blocks: [
                          {
                            id: 'ce185601',
                            type: 'fragment',
                            model: {
                              text: 'WS Media (1) -Media above title',
                              attributes: [],
                            },
                            position: [3, 1, 1, 1],
                          },
                        ],
                      },
                      position: [3, 1, 1],
                    },
                  ],
                },
                position: [3, 1],
              },
            ],
          },
          position: [3],
        },
        {
          id: '0f40aced',
          type: 'timestamp',
          model: {
            firstPublished: 1673964186410,
            lastPublished: 1673964957894,
          },
          position: [4],
        },
        {
          id: 'c1d129a8',
          type: 'subheadline',
          model: {
            blocks: [
              {
                id: '6b4b39da',
                type: 'text',
                model: {
                  blocks: [
                    {
                      id: '4c816797',
                      type: 'paragraph',
                      model: {
                        text: 'Headline',
                        blocks: [
                          {
                            id: '95335515',
                            type: 'fragment',
                            model: {
                              text: 'Headline',
                              attributes: [],
                            },
                            position: [5, 1, 1, 1],
                          },
                        ],
                      },
                      position: [5, 1, 1],
                    },
                  ],
                },
                position: [5, 1],
              },
            ],
          },
          position: [5],
        },
        {
          id: 'c57b7f9f',
          type: 'text',
          model: {
            blocks: [
              {
                id: '2200c25c',
                type: 'paragraph',
                model: {
                  text: 'Page Text',
                  blocks: [
                    {
                      id: 'cfa9b294',
                      type: 'fragment',
                      model: {
                        text: 'Page Text',
                        attributes: [],
                      },
                      position: [6, 1, 1],
                    },
                  ],
                },
                position: [6, 1],
              },
            ],
          },
          position: [6],
        },
        {
          id: '21bc192b',
          type: 'image',
          model: {
            blocks: [
              {
                id: '78a0870a',
                type: 'altText',
                model: {
                  blocks: [
                    {
                      id: 'c6fbe914',
                      type: 'text',
                      model: {
                        blocks: [
                          {
                            id: 'b4f87fca',
                            type: 'paragraph',
                            model: {
                              text: '...',
                              blocks: [
                                {
                                  id: '487e481b',
                                  type: 'fragment',
                                  model: {
                                    text: '...',
                                    attributes: [],
                                  },
                                  position: [6, 1, 1, 1, 1],
                                },
                              ],
                            },
                            position: [6, 1, 1, 1],
                          },
                        ],
                      },
                      position: [6, 1, 1],
                    },
                  ],
                },
                position: [6, 1],
              },
              {
                id: '03897da1',
                type: 'rawImage',
                model: {
                  width: 819,
                  height: 461,
                  locator: '1328/live/28cc1e70-2012-11ee-bb42-b9839596b375.jpg',
                  originCode: 'cpsprodpb',
                  copyrightHolder: 'Getty Images',
                  suitableForSyndication: true,
                },
                position: [6, 2],
              },
            ],
          },
          position: [6],
        },
        {
          id: 'e094dc5b',
          type: 'wsoj',
          model: {
            type: 'recommendations',
          },
          position: [7],
        },
      ],
    },
  },
  metadata: {
    atiAnalytics: {
      categoryName: null,
      contentId: 'urn:bbc:optimo:asset:cvpde7nqj92o',
      contentType: 'article-sfv',
      language: 'pcm',
      ldpThingIds: null,
      ldpThingLabels: null,
      nationsProducer: null,
      pageIdentifier: 'pidgin.articles.cvpde7nqj92o.page',
      pageTitle: 'WS Media First page (1)',
      timePublished: '2023-01-17T14:03:06.410Z',
      timeUpdated: '2023-01-17T14:15:57.894Z',
    },
    id: 'urn:bbc:ares::article:cvpde7nqj92o',
    locators: {
      optimoUrn: 'urn:bbc:optimo:asset:cvpde7nqj92o',
      canonicalUrl: 'https://www.bbc.com/pidgin/articles/cvpde7nqj92o',
    },
    type: 'article',
    createdBy: 'Pidgin',
    language: 'pcm',
    firstPublished: 1673964186410,
    lastPublished: 1673964957894,
    analyticsLabels: {
      contentId: 'urn:bbc:optimo:asset:cvpde7nqj92o',
      producer: 'Pidgin',
      page: 'pidgin.articles.cvpde7nqj92o.page',
    },
    passport: {
      language: 'pcm',
      home: 'http://www.bbc.co.uk/ontologies/passport/home/Pidgin',
      taggings: [
        {
          predicate: 'http://www.bbc.co.uk/ontologies/bbc/infoClass',
          value:
            'http://www.bbc.co.uk/things/0db2b959-cbf8-4661-965f-050974a69bb5#id',
        },
        {
          predicate: 'http://www.bbc.co.uk/ontologies/bbc/primaryMediaType',
          value:
            'http://www.bbc.co.uk/things/ffc98bca-8cff-4ee6-9beb-a6ff6ef3ef9f#id',
        },
      ],
      predicates: {
        infoClass: [
          {
            value:
              'http://www.bbc.co.uk/things/0db2b959-cbf8-4661-965f-050974a69bb5#id',
            type: 'infoClass',
          },
        ],
        primaryMediaType: [
          {
            value:
              'http://www.bbc.co.uk/things/ffc98bca-8cff-4ee6-9beb-a6ff6ef3ef9f#id',
            type: 'primaryMediaType',
          },
        ],
      },
    },
    blockTypes: [
      'headline',
      'text',
      'paragraph',
      'fragment',
      'video',
      'caption',
      'subheadline',
      'aresMedia',
    ],
    consumableAsSFV: true,
    allowAdvertising: true,
    consumableOnRedButton: false,
    consumableOnlyOnRedButton: false,
  },
  promo: {
    headlines: {
      seoHeadline: 'WS Media First page (1)',
      promoHeadline: {
        blocks: [
          {
            type: 'text',
            model: {
              blocks: [
                {
                  type: 'paragraph',
                  model: {
                    text: 'WS Media (1) -Media above title',
                    blocks: [
                      {
                        type: 'fragment',
                        model: {
                          text: 'WS Media (1) -Media above title',
                          attributes: [],
                        },
                      },
                    ],
                  },
                },
              ],
            },
          },
        ],
      },
    },
    summary: {
      blocks: [
        {
          type: 'text',
          model: {
            blocks: [
              {
                type: 'paragraph',
                model: {
                  text: '',
                  blocks: [
                    {
                      type: 'fragment',
                      model: {
                        text: '',
                        attributes: [],
                      },
                    },
                  ],
                },
              },
            ],
          },
        },
      ],
    },
  },
};

const arabicLiveTvPageData = {
  content: {
    model: {
      blocks: [
        {
          id: 'e9a81000',
          type: 'headline',
          model: {
            blocks: [
              {
                id: '88bb971a',
                type: 'text',
                model: {
                  blocks: [
                    {
                      id: '7859c2a8',
                      type: 'paragraph',
                      model: {
                        text: 'مباشر: تلفزيون بي بي سي عربي',
                        blocks: [
                          {
                            id: '21b0d7bd',
                            type: 'fragment',
                            model: {
                              text: 'مباشر: تلفزيون بي بي سي عربي',
                              attributes: [],
                            },
                            position: [1, 1, 1, 1],
                          },
                        ],
                      },
                      position: [1, 1, 1],
                    },
                  ],
                },
                position: [1, 1],
              },
            ],
          },
          position: [1],
        },
        {
          id: 'd139c6c2',
          type: 'timestamp',
          model: {
            firstPublished: 1567154178000,
            lastPublished: 1567154178000,
          },
          position: [2],
        },
        {
          id: '5990c4b3',
          type: 'video',
          model: {
            blocks: [
              {
                id: '7cd2cee7',
                type: 'aresMedia',
                model: {
                  blocks: [
                    {
                      id: 'b3f281a4',
                      type: 'aresMediaMetadata',
                      blockId: 'urn:bbc:ares::primary:108540166',
                      model: {
                        live: true,
                        embedding: false,
                        subType: 'primary',
                        id: '108540166',
                        available: true,
                        format: 'audio_video',
                        title: 'مباشر: تلفزيون بي بي سي عربي',
                        imageCopyright: 'BBC',
                        imageUrl:
                          'http://c.files.bbci.co.uk/CF4E/production/_111607035_arabic_16_9_updated.png',
                        synopses: {
                          short: 'مباشر: تلفزيون بي بي سي عربي',
                          medium: 'مباشر: تلفزيون بي بي سي عربي',
                          long: 'مباشر: تلفزيون بي بي سي عربي',
                        },
                        versions: [
                          {
                            kind: 'programme',
                            live: true,
                            versionId: 'bbc_arabic_tv',
                          },
                        ],
                      },
                      position: [3, 1, 1],
                    },
                  ],
                },
                position: [3, 1],
              },
            ],
          },
          position: [3],
        },
        {
          id: '26755ba1',
          type: 'text',
          model: {
            blocks: [
              {
                id: '48f09eb5',
                type: 'paragraph',
                model: {
                  text: 'يقدم لكم تلفزيون بي بي سي العربي الأخبار والأخبار العاجلة والتحليلات والحوارات والبرامج الوثائقية، على مدى 24 ساعة كل يوم. ويمكنكم التقاط القناة عبر الأطباق اللاقطة. بإمكانكم إرسال تعليقاتكم واقتراحاتكم عبر هذا الرابط',
                  blocks: [
                    {
                      id: 'c0f89bee',
                      type: 'fragment',
                      model: {
                        text: 'يقدم لكم تلفزيون بي بي سي العربي الأخبار والأخبار العاجلة والتحليلات والحوارات والبرامج الوثائقية، على مدى 24 ساعة كل يوم. ويمكنكم التقاط القناة عبر الأطباق اللاقطة. بإمكانكم إرسال تعليقاتكم واقتراحاتكم ',
                        attributes: ['bold'],
                      },
                      position: [4, 1, 1],
                    },
                    {
                      id: '80ec51a1',
                      type: 'urlLink',
                      model: {
                        text: 'عبر هذا الرابط',
                        locator: 'https://www.bbc.co.uk/arabic/send/u50853203',
                        isExternal: false,
                        blocks: [
                          {
                            id: 'f78daa8e',
                            type: 'fragment',
                            model: {
                              text: 'عبر هذا الرابط',
                              attributes: [],
                            },
                            position: [4, 1, 2, 1],
                          },
                        ],
                      },
                      position: [4, 1, 2],
                    },
                  ],
                },
                position: [4, 1],
              },
            ],
          },
          position: [4],
        },
        {
          id: '81eb6130',
          type: 'mpu',
          model: {},
          position: [5],
        },
      ],
    },
  },
};

export { arabicLiveTvPageData, pidginPageData };