From 16677f847a9f81790939952244623407ba3ef540 Mon Sep 17 00:00:00 2001 From: Ryan McCombe Date: Tue, 8 Jun 2021 15:16:19 +0100 Subject: [PATCH 01/14] Sport table plumbing --- data/sport/legacyAssets/cricket/54646061.json | 3308 +++++++++++++++++ src/app/containers/CPSTable/index.jsx | 39 + src/app/pages/StoryPage/StoryPage.jsx | 2 + .../blocks/minimalist/index.js | 1 + .../convertToOptimoBlocks/index.js | 2 + 5 files changed, 3352 insertions(+) create mode 100644 data/sport/legacyAssets/cricket/54646061.json create mode 100644 src/app/containers/CPSTable/index.jsx create mode 100644 src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js diff --git a/data/sport/legacyAssets/cricket/54646061.json b/data/sport/legacyAssets/cricket/54646061.json new file mode 100644 index 00000000000..e92831d7d41 --- /dev/null +++ b/data/sport/legacyAssets/cricket/54646061.json @@ -0,0 +1,3308 @@ +{ + "metadata": { + "id": "urn:bbc:ares::asset:sport/cricket/54646061", + "locators": { + "assetUri": "/sport/cricket/54646061", + "cpsUrn": "urn:bbc:content:assetUri:sport/cricket/54646061", + "curie": "http://www.bbc.co.uk/asset/50996380-c227-4d53-88cc-30270428090b", + "assetId": "54646061" + }, + "type": "STY", + "createdBy": "sport-v6", + "language": "en-gb", + "lastUpdated": 1622216882912, + "firstPublished": 1603366543000, + "lastPublished": 1622216874000, + "timestamp": 1622216874000, + "options": { + "isIgorSeoTagsEnabled": false, + "includeComments": false, + "allowRightHandSide": true, + "isFactCheck": false, + "allowDateStamp": false, + "suitableForSyndication": true, + "hasNewsTracker": false, + "allowRelatedStoriesBox": true, + "isKeyContent": false, + "allowHeadline": true, + "allowAdvertising": true, + "hasContentWarning": false, + "isBreakingNews": false, + "allowPrintingSharingLinks": true + }, + "analyticsLabels": { + "cps_asset_type": "sty", + "counterName": "sport.cricket.story.54646061.page", + "cps_asset_id": "54646061" + }, + "passport": { + "category": { + "categoryId": "http://www.bbc.co.uk/ontologies/applicationlogic-sport/Feature", + "categoryName": "Feature" + }, + "language": "en-gb", + "home": "http://www.bbc.co.uk/ontologies/passport/home/Sport", + "locator": "urn:bbc:cps:curie:asset:50996380-c227-4d53-88cc-30270428090b", + "availability": "AVAILABLE", + "taggings": [ + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/about", + "value": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/format", + "value": "http://www.bbc.co.uk/things/8d1509ef-08ef-42bd-b831-82504eed9b8e#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/about", + "value": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/about", + "value": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/bbc/primaryMediaType", + "value": "http://www.bbc.co.uk/things/5566b81b-8509-44c1-8503-018a0eab317d#id" + } + ], + "schemaVersion": "1.2.0", + "publishedState": "PUBLISHED", + "predicates": { + "about": [ + { + "value": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id", + "thingLabel": "Sport", + "thingUri": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id", + "thingId": "4063f80f-cccc-44c8-9449-5ca44e4c8592", + "thingType": [ + "core:Theme", + "core:Thing", + "tagging:TagConcept", + "tagging:Genre", + "tagging:AmbiguousTerm" + ], + "thingSameAs": ["http://dbpedia.org/resource/Sport"], + "thingEnglishLabel": "Sport", + "type": "about" + }, + { + "value": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id", + "thingLabel": "Cricket", + "thingUri": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id", + "thingId": "bb2d8784-45cb-4358-b506-7832b01831fd", + "thingType": [ + "tagging:TagConcept", + "core:Thing", + "tagging:AmbiguousTerm", + "core:Theme", + "tagging:Genre" + ], + "thingSameAs": ["http://dbpedia.org/resource/Cricket"], + "thingEnglishLabel": "Cricket", + "type": "about" + }, + { + "value": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id", + "thingLabel": "The Hundred", + "thingUri": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id", + "thingId": "cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7", + "thingType": ["core:Thing", "tagging:TagConcept"], + "thingSameAs": [], + "thingEnglishLabel": "The Hundred", + "type": "about" + } + ], + "formats": [ + { + "value": "http://www.bbc.co.uk/things/8d1509ef-08ef-42bd-b831-82504eed9b8e#id", + "thingLabel": "Feature", + "thingUri": "http://www.bbc.co.uk/things/8d1509ef-08ef-42bd-b831-82504eed9b8e#id", + "thingId": "8d1509ef-08ef-42bd-b831-82504eed9b8e", + "thingType": ["tagging:TagConcept", "tagging:Format"], + "thingSameAs": [ + "http://www.bbc.co.uk/ontologies/applicationlogic-news/Feature" + ], + "thingEnglishLabel": "Feature", + "thingPreferredLabel": "Feature", + "thingLabelLanguage": "en-gb", + "type": "formats" + } + ] + } + }, + "tags": { + "about": [ + { + "thingLabel": "Sport", + "thingUri": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id", + "thingId": "4063f80f-cccc-44c8-9449-5ca44e4c8592", + "thingType": [ + "core:Theme", + "core:Thing", + "tagging:TagConcept", + "tagging:Genre", + "tagging:AmbiguousTerm" + ], + "thingSameAs": ["http://dbpedia.org/resource/Sport"], + "thingEnglishLabel": "Sport", + "thingLabelLanguage": "en-gb", + "thingPreferredLabel": "Sport" + }, + { + "thingLabel": "Cricket", + "thingUri": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id", + "thingId": "bb2d8784-45cb-4358-b506-7832b01831fd", + "thingType": [ + "tagging:TagConcept", + "core:Thing", + "tagging:AmbiguousTerm", + "core:Theme", + "tagging:Genre" + ], + "thingSameAs": ["http://dbpedia.org/resource/Cricket"], + "topicName": "Cricket", + "topicId": "czp1xkm2jyyt", + "curationList": [ + { + "curationId": "urn:bbc:cps:curie:asset:ee183894-788d-4b3d-8165-ec6e86373e84", + "curationType": "cps-hyperpuff" + }, + { + "curationId": "2074510d-5e54-4611-a268-b2c7f72dadab", + "curationType": "vivo-stream" + } + ], + "thingEnglishLabel": "Cricket", + "thingLabelLanguage": "en-gb", + "thingPreferredLabel": "Cricket" + }, + { + "thingLabel": "The Hundred", + "thingUri": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id", + "thingId": "cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7", + "thingType": ["core:Thing", "tagging:TagConcept"], + "thingSameAs": [], + "topicName": "The Hundred", + "topicId": "cx2kv4nw3v8t", + "curationList": [ + { + "curationId": "urn:bbc:cps:curie:asset:9b6dd29c-00e3-4bc1-93ae-c22fdda195ee", + "curationType": "cps-hyperpuff" + }, + { + "curationId": "urn:bbc:cps:curie:asset:c8ddb1c8-fb3c-451e-a9d0-724115a082e3", + "curationType": "cps-hyperpuff" + }, + { + "curationId": "urn:bbc:cps:curie:asset:b1ded6ba-abc3-4b93-98be-13d5969d32f1", + "curationType": "cps-hyperpuff" + }, + { + "curationId": "urn:bbc:cps:curie:asset:88b3a2cc-55cf-4401-8dff-5899119afbd5", + "curationType": "cps-hyperpuff" + }, + { + "curationId": "urn:bbc:cps:curie:asset:84df180d-8dfd-457b-a0e0-712bb4502e4c", + "curationType": "cps-hyperpuff" + }, + { + "curationId": "urn:bbc:cps:curie:asset:8732cc5a-798f-4f01-b911-3a8eea41c52c", + "curationType": "cps-hyperpuff" + } + ], + "thingEnglishLabel": "The Hundred", + "thingLabelLanguage": "en-gb", + "thingPreferredLabel": "The Hundred" + } + ] + }, + "version": "v1.3.13", + "blockTypes": ["image", "paragraph", "crosshead", "table"], + "includeComments": false, + "atiAnalytics": { + "producerName": "SPORT", + "producerId": "85" + }, + "readTime": 1, + "siteUri": "/sport", + "topics": [ + { + "topicName": "Cricket", + "topicId": "czp1xkm2jyyt", + "subjectList": [ + { + "subjectId": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id", + "subjectType": "tag" + } + ], + "curationList": [ + { + "curationId": "urn:bbc:cps:curie:asset:ee183894-788d-4b3d-8165-ec6e86373e84", + "curationType": "cps-hyperpuff", + "position": 0, + "visualProminence": "NORMAL" + }, + { + "curationId": "2074510d-5e54-4611-a268-b2c7f72dadab", + "curationType": "vivo-stream", + "position": 1, + "visualProminence": "NORMAL" + } + ], + "types": [ + "tagging:TagConcept", + "core:Thing", + "tagging:AmbiguousTerm", + "core:Theme", + "tagging:Genre" + ], + "home": "http://www.bbc.co.uk/ontologies/passport/home/Sport" + } + ] + }, + "content": { + "blocks": [ + { + "id": "109304857", + "subType": "body", + "href": "http://c.files.bbci.co.uk/12840/production/_109304857_hundredlogos.jpg", + "path": "/cpsprodpb/12840/production/_109304857_hundredlogos.jpg", + "height": 1080, + "width": 1920, + "altText": "Hundred logos", + "copyrightHolder": "ECB", + "positionHint": "full-width", + "originCode": "cpsprodpb", + "type": "image" + }, + { + "text": "The eight men's squads for the inaugural season of The Hundred were revealed on 23 February when the outcome of the previous day's behind-closed-doors player draft was revealed.", + "role": "introduction", + "markupType": "plain_text", + "type": "paragraph" + }, + { + "text": "Here are how the squads are shaping up so far. The women's squads will be finalised in June.", + "markupType": "plain_text", + "type": "paragraph" + }, + { + "text": "If this page is not displaying correctly, please go here", + "markupType": "candy_xml", + "aresUrl": "https://ares-api.api.bbci.co.uk/api/asset/sport/cricket/54646061", + "type": "paragraph" + }, + { + "text": "Trent Rockets", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Joe Root (England contracted) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Nat Sciver", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Rashid Khan", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Katherine Brunt", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "D'arcy Short", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Elyse Villani", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Alex Hales", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Kathryn Bryce", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Lewis Gregory", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Abbey Freeborn", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dawid Malan", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Nancy Harman", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Nathan Coulter-Nile", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Lucy Higham", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Steven Mullaney", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sarah Glenn", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Moores", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sophie Molineux", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Matthew Carter", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Annabel Sutherland", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Luke Wood", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alicia Presland", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Luke Wright ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Teresa Graves", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ben Cox", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Timm van der Gugten", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Samit Patel", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 16, + "width": 2, + "type": "table" + }, + { + "text": "Southern Brave", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Jofra Archer (England contracted) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Anya Shrubsole", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Andre Russell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Stafanie Taylor", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Marcus Stoinis", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Danni Wyatt", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "James Vince", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Maia Bouchier", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Liam Dawson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sophia Dunkley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Chris Jordan ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Freya Kemp", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tymal Mills", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Tara Norris", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Delray Rawlins", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Carla Rudd", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Alex Davies", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Paige Scholfield", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "George Garton", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Lauren Bell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ross Whiteley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sonia Odedra", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Max Waller", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Amelia Kerr", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Craig Overton", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Fi Morris", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "David Warner", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Danny Briggs", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 16, + "width": 2, + "type": "table" + }, + { + "text": "Northern Superchargers", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Ben Stokes (England red-ball contracted player) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Lauren Winfield-Hill", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Aaron Finch ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Katie Levick", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Mujeeb Ur Rahman ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Hollie Armitage", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Chris Lynn ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Helen Fenby", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Adil Rashid ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bess Heath", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Adam Lyth ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Beth Langston", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "David Willey", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Linsey Smith", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Kohler-Cadmore", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Nicola Carey", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Brydon Carse ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alice Davidson-Richards ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "John Simpson ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alyssa Healy", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Olly Stone", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Jemimah Rodrigues", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Matthew Potts", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Phoebe Graham", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Matthew Fisher", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Ami Campbell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Harry Brook", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Callum Parkinson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 16, + "width": 2, + "type": "table" + }, + { + "text": "Welsh Fire", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Ollie Pope", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alex Griffiths", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jonny Bairstow", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Georgia Hennessy", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Banton ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Lauren Filer", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ben Duckett ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Katie George", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Qais Ahmad ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sophie Luff", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Liam Plunkett ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Natasha Wraith", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "David Payne ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Amy Gordon", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ryan Higgins ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Jess Jonassen", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Kieron Pollard", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Meg Lanning", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jhye Richardson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Beth Mooney", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jake Ball", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bryony Smith", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Iain Cockbain", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sarah Taylor", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Josh Cobb", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Matthew Critchley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "David Lloyd", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 16, + "width": 2, + "type": "table" + }, + { + "text": "Oval Invincibles", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Sam Curran (England contracted) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Fran Wilson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Rory Burns (England contracted) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Georgia Adams", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Sunil Narine ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Tash Farrant", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jason Roy", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Megan Belt", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Sam Billings", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Eva Gray", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Curran", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Marizanne Kapp", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Sandeep Lamichhane", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Rhianna Southby", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Reece Topley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sarah Bryce", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Will Jacks", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alice Capsey", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Laurie Evans", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Jo Gardner", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Nathan Sowter", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Dane Van Niekerk", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Alex Blake", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Mady Villiers", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Saqib Mahmood", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Grace Gibbs", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Colin Ingram", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Brandon Glover", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jordan Clark", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 17, + "width": 2, + "type": "table" + }, + { + "text": "Manchester Originals", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Jos Buttler (England contracted) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Kate Cross", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Phil Salt ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Danielle Collins", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Matt Parkinson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Mignon du Preez", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Joe Clarke", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alice Dyson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Wayne Madsen", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Cordelia Griffith", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Nicholas Pooran", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Hannah Jones", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Kagiso Rabada", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Lizelle Lee", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Hartley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Georgie Boyce", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jamie Overton", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Natalie Brown", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Shadab Khan", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Ellie Threlkeld", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Lammonby", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Alex Hartley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Steven Finn", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Emma Lamb", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Colin Ackermann", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sophie Ecclestone", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Richard Gleeson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 15, + "width": 2, + "type": "table" + }, + { + "text": "London Spirit", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Zak Crawley (England contracted) ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Heather Knight (captain)", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Glenn Maxwell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Deandra Dottin", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Eoin Morgan", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Naomi Dattani", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Mohammad Nabi ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Amara Carr", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Mohammad Amir", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Aylish Cranstone", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Mark Wood ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Danielle Gibson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Joe Denly ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Susie Rowe", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dan Lawrence ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Chloe Tryon", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Mason Crane", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Charlie Dean", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Adam Rossington", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Freya Davies", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Roelof Van Der Merwe ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Hannah Jones", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jade Dernbach ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sophie Munro", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Luis Reece ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Tammy Beaumont", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ravi Bopara", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Chris Wood", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 16, + "width": 2, + "type": "table" + }, + { + "text": "Birmingham Phoenix", + "markupType": "plain_text", + "type": "crosshead" + }, + { + "rows": [ + [ + { + "content": [ + { + "text": "Men", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Women", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Chris Woakes", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sophie Devine (captain)", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dom Sibley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Amy Jones", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Liam Livingstone", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Ashleigh Gardner", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Moeen Ali", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Ria Fackrell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Kane Williamson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Eve Jones", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Benny Howell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Marie Kelly ", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Helm", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Emily Arlott", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Shaheen Afridi", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Kirstie Gordon", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Pat Brown", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Phoebe Franklin", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Adam Hose", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Abtaha Maqsood", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Adam Zampa", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Thea Brookes", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Henry Brookes", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Gwen Davies", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Chris Cooke", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Isabelle Wong", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Abell", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Georgia Elwiss", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Daniel Bell-Drummond", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Miles Hammond", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [], + "cellType": "cell" + } + ] + ], + "height": 17, + "width": 2, + "type": "table" + }, + { + "text": "Men's teams will be able to add one 'wildcard' player after the T20 Blast.", + "markupType": "plain_text", + "type": "paragraph" + } + ] + }, + "promo": { + "headlines": { + "shortHeadline": "The Hundred 2021 - full squad lists", + "headline": "The Hundred 2021: Full squad list" + }, + "locators": { + "assetUri": "/sport/cricket/54646061", + "cpsUrn": "urn:bbc:content:assetUri:sport/cricket/54646061", + "curie": "http://www.bbc.co.uk/asset/50996380-c227-4d53-88cc-30270428090b", + "assetId": "54646061" + }, + "summary": "Find out who is playing for who in The Hundred's debut season in 2021.", + "timestamp": 1622216874000, + "language": "en-gb", + "passport": { + "category": { + "categoryId": "http://www.bbc.co.uk/ontologies/applicationlogic-sport/Feature", + "categoryName": "Feature" + }, + "language": "en-gb", + "home": "http://www.bbc.co.uk/ontologies/passport/home/Sport", + "locator": "urn:bbc:cps:curie:asset:50996380-c227-4d53-88cc-30270428090b", + "availability": "AVAILABLE", + "taggings": [ + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/about", + "value": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/format", + "value": "http://www.bbc.co.uk/things/8d1509ef-08ef-42bd-b831-82504eed9b8e#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/about", + "value": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/creativework/about", + "value": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id" + }, + { + "predicate": "http://www.bbc.co.uk/ontologies/bbc/primaryMediaType", + "value": "http://www.bbc.co.uk/things/5566b81b-8509-44c1-8503-018a0eab317d#id" + } + ], + "schemaVersion": "1.2.0", + "publishedState": "PUBLISHED", + "predicates": { + "about": [ + { + "value": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id", + "thingLabel": "Sport", + "thingUri": "http://www.bbc.co.uk/things/4063f80f-cccc-44c8-9449-5ca44e4c8592#id", + "thingId": "4063f80f-cccc-44c8-9449-5ca44e4c8592", + "thingType": [ + "core:Theme", + "core:Thing", + "tagging:TagConcept", + "tagging:Genre", + "tagging:AmbiguousTerm" + ], + "thingSameAs": ["http://dbpedia.org/resource/Sport"], + "thingEnglishLabel": "Sport", + "type": "about" + }, + { + "value": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id", + "thingLabel": "Cricket", + "thingUri": "http://www.bbc.co.uk/things/bb2d8784-45cb-4358-b506-7832b01831fd#id", + "thingId": "bb2d8784-45cb-4358-b506-7832b01831fd", + "thingType": [ + "tagging:TagConcept", + "core:Thing", + "tagging:AmbiguousTerm", + "core:Theme", + "tagging:Genre" + ], + "thingSameAs": ["http://dbpedia.org/resource/Cricket"], + "thingEnglishLabel": "Cricket", + "type": "about" + }, + { + "value": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id", + "thingLabel": "The Hundred", + "thingUri": "http://www.bbc.co.uk/things/cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7#id", + "thingId": "cb3ebf4f-e66a-4439-aed2-c1a9960ddcb7", + "thingType": ["core:Thing", "tagging:TagConcept"], + "thingSameAs": [], + "thingEnglishLabel": "The Hundred", + "type": "about" + } + ], + "formats": [ + { + "value": "http://www.bbc.co.uk/things/8d1509ef-08ef-42bd-b831-82504eed9b8e#id", + "thingLabel": "Feature", + "thingUri": "http://www.bbc.co.uk/things/8d1509ef-08ef-42bd-b831-82504eed9b8e#id", + "thingId": "8d1509ef-08ef-42bd-b831-82504eed9b8e", + "thingType": ["tagging:TagConcept", "tagging:Format"], + "thingSameAs": [ + "http://www.bbc.co.uk/ontologies/applicationlogic-news/Feature" + ], + "thingEnglishLabel": "Feature", + "thingPreferredLabel": "Feature", + "thingLabelLanguage": "en-gb", + "type": "formats" + } + ] + } + }, + "indexImage": { + "id": "109304857", + "subType": "index", + "href": "http://c.files.bbci.co.uk/12840/production/_109304857_hundredlogos.jpg", + "path": "/cpsprodpb/12840/production/_109304857_hundredlogos.jpg", + "height": 1080, + "width": 1920, + "altText": "Hundred logos", + "copyrightHolder": "ECB", + "originCode": "cpsprodpb", + "type": "image" + }, + "id": "urn:bbc:ares::asset:sport/cricket/54646061", + "type": "cps" + }, + "relatedContent": { + "section": { + "subType": "index", + "name": "Cricket", + "uri": "/sport/cricket", + "type": "simple" + }, + "site": { + "subType": "site", + "name": "BBC Sport", + "uri": "/sport", + "type": "simple" + }, + "groups": [ + { + "type": "related-hypers", + "promos": [ + { + "locators": { + "assetUri": "/sport/33151178", + "cpsUrn": "urn:bbc:content:assetUri:/sport/33151178" + }, + "title": "Elsewhere on the BBC", + "language": "en-gb", + "timestamp": 1622216644000, + "id": "urn:bbc:ares::asset:sport/33151178", + "type": "hyper" + }, + { + "locators": { + "assetUri": "/sport/40584813", + "cpsUrn": "urn:bbc:content:assetUri:/sport/40584813" + }, + "title": "Featured hyper: min. 10 pieces inc. 2 videos", + "language": "en-gb", + "timestamp": 1622206134000, + "id": "urn:bbc:ares::asset:sport/40584813", + "type": "hyper" + }, + { + "locators": { + "assetUri": "/sport/cricket/42794242", + "cpsUrn": "urn:bbc:content:assetUri:/sport/cricket/42794242" + }, + "title": "Information hyper for cricket stories", + "language": "en-gb", + "timestamp": 1564149365000, + "id": "urn:bbc:ares::asset:sport/cricket/42794242", + "type": "hyper" + } + ] + } + ] + } +} diff --git a/src/app/containers/CPSTable/index.jsx b/src/app/containers/CPSTable/index.jsx new file mode 100644 index 00000000000..381e2d96db7 --- /dev/null +++ b/src/app/containers/CPSTable/index.jsx @@ -0,0 +1,39 @@ +import React, { useContext } from 'react'; +import styled from '@emotion/styled'; +import { arrayOf, shape, string } from 'prop-types'; + +import { GEL_BODY_COPY } from '@bbc/gel-foundations/typography'; +import { getSansRegular } from '@bbc/psammead-styles/font-styles'; + +import { ServiceContext } from '#contexts/ServiceContext'; + +const StyledTable = styled.table` + ${({ service }) => getSansRegular(service)} + ${GEL_BODY_COPY} +`; + +const CPSTable = ({ blocks, supportedServices }) => { + const { service } = useContext(ServiceContext); + if (!supportedServices.includes(service)) return null; + + return ( + + + {JSON.stringify(blocks[0])} + + + ); +}; + +CPSTable.propTypes = { + blocks: arrayOf(shape({})).isRequired, + supportedServices: arrayOf(string), +}; + +CPSTable.defaultProps = { + supportedServices: [ + // 'sport', + ], +}; + +export default CPSTable; diff --git a/src/app/pages/StoryPage/StoryPage.jsx b/src/app/pages/StoryPage/StoryPage.jsx index 4574b6fac2c..92bb7b24d87 100644 --- a/src/app/pages/StoryPage/StoryPage.jsx +++ b/src/app/pages/StoryPage/StoryPage.jsx @@ -34,6 +34,7 @@ import ComscoreAnalytics from '#containers/ComscoreAnalytics'; import cpsAssetPagePropTypes from '../../models/propTypes/cpsAssetPage'; import fauxHeadline from '#containers/FauxHeadline'; import visuallyHiddenHeadline from '#containers/VisuallyHiddenHeadline'; +import CPSTable from '#containers/CPSTable'; import Byline from '#containers/Byline'; import CpsSocialEmbedContainer from '#containers/SocialEmbed/Cps'; import CpsRecommendations from '#containers/CpsRecommendations'; @@ -176,6 +177,7 @@ const StoryPage = ({ pageData, mostReadEndpointOverride }) => { byline: props => , include: props => , social_embed: props => , + table: CPSTable, mpu: props => isAdsEnabled ? : null, wsoj: props => ( diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js new file mode 100644 index 00000000000..b0ea66bf4d8 --- /dev/null +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js @@ -0,0 +1 @@ +export default block => ({ type: block.type, model: { blocks: [block] } }); diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js index bbd25fe0dc8..2839f44ec4a 100644 --- a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js @@ -10,6 +10,7 @@ import subheadline from './blocks/subheadline'; import version from './blocks/version'; import include from './blocks/include'; import socialEmbed from './blocks/socialEmbed'; +import minimalist from './blocks/minimalist'; import { UNSUPPORTED_BLOCK_TYPE } from '#lib/logger.const'; const nodeLogger = require('#lib/logger.node'); @@ -40,6 +41,7 @@ const typesToConvert = { legacyMedia, include, social_embed: socialEmbed, + table: minimalist, }; // Here pathname is passed as a prop specifically for CPS includes From 9f118a4a5b9ab0d349f20f2031b3a2379553e0ba Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Thu, 10 Jun 2021 16:16:55 +0100 Subject: [PATCH 02/14] Added CPS table components --- .../CpsTable/CpsTableCell/index.jsx | 36 ++++++++++++++++++ .../CpsTable/CpsTableHeader/index.jsx | 37 +++++++++++++++++++ .../containers/CpsTable/CpsTableRow/index.jsx | 32 ++++++++++++++++ .../{CPSTable => CpsTable}/index.jsx | 30 +++++++++------ src/app/pages/StoryPage/StoryPage.jsx | 4 +- .../blocks/minimalist/index.js | 1 - .../blocks/table/index.js | 32 ++++++++++++++++ .../convertToOptimoBlocks/index.js | 4 +- 8 files changed, 159 insertions(+), 17 deletions(-) create mode 100644 src/app/containers/CpsTable/CpsTableCell/index.jsx create mode 100644 src/app/containers/CpsTable/CpsTableHeader/index.jsx create mode 100644 src/app/containers/CpsTable/CpsTableRow/index.jsx rename src/app/containers/{CPSTable => CpsTable}/index.jsx (57%) delete mode 100644 src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js create mode 100644 src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js diff --git a/src/app/containers/CpsTable/CpsTableCell/index.jsx b/src/app/containers/CpsTable/CpsTableCell/index.jsx new file mode 100644 index 00000000000..aefe8d49b33 --- /dev/null +++ b/src/app/containers/CpsTable/CpsTableCell/index.jsx @@ -0,0 +1,36 @@ +import React from 'react'; +import styled from '@emotion/styled'; +import { arrayOf, shape } from 'prop-types'; + +import Blocks from '../../Blocks'; +import CpsText from '../../CpsText'; + +const StyledTd = styled.td` + border-bottom: 1px solid #dbdbdb; + padding-top: 8px; + padding-bottom: 8px; + padding-left: 8px; + vertical-align: middle; + + & p { + padding-bottom: 0; + } +`; + +const componentsToRender = { + text: CpsText, +}; + +const CpsTableCell = ({ blocks }) => { + return ( + + + + ); +}; + +CpsTableCell.propTypes = { + blocks: arrayOf(shape({})).isRequired, +}; + +export default CpsTableCell; diff --git a/src/app/containers/CpsTable/CpsTableHeader/index.jsx b/src/app/containers/CpsTable/CpsTableHeader/index.jsx new file mode 100644 index 00000000000..2da116647bf --- /dev/null +++ b/src/app/containers/CpsTable/CpsTableHeader/index.jsx @@ -0,0 +1,37 @@ +import React from 'react'; +import styled from '@emotion/styled'; +import { arrayOf, shape } from 'prop-types'; + +import Blocks from '../../Blocks'; +import CpsText from '../../CpsText'; + +const StyledTh = styled.th` + background: #f7f7f5; + border-bottom: 1px solid #dbdbdb; + padding-top: 8px; + padding-bottom: 8px; + padding-left: 8px; + vertical-align: middle; + + & p { + padding-bottom: 0; + } +`; + +const componentsToRender = { + text: CpsText, +}; + +const CpsTableHeader = ({ blocks }) => { + return ( + + + + ); +}; + +CpsTableHeader.propTypes = { + blocks: arrayOf(shape({})).isRequired, +}; + +export default CpsTableHeader; diff --git a/src/app/containers/CpsTable/CpsTableRow/index.jsx b/src/app/containers/CpsTable/CpsTableRow/index.jsx new file mode 100644 index 00000000000..5d240c6412e --- /dev/null +++ b/src/app/containers/CpsTable/CpsTableRow/index.jsx @@ -0,0 +1,32 @@ +import React from 'react'; +import styled from '@emotion/styled'; +import { arrayOf, shape } from 'prop-types'; + +import Blocks from '../../Blocks'; +import CpsTableCell from '../CpsTableCell'; +import CpsTableHeader from '../CpsTableHeader'; + +const StyledTr = styled.tr` + &:hover { + background-color: #f7f7f5; + } +`; + +const componentsToRender = { + tableCell: CpsTableCell, + tableHeader: CpsTableHeader, +}; + +const CpsTableRow = ({ blocks }) => { + return ( + + + + ); +}; + +CpsTableRow.propTypes = { + blocks: arrayOf(shape({})).isRequired, +}; + +export default CpsTableRow; diff --git a/src/app/containers/CPSTable/index.jsx b/src/app/containers/CpsTable/index.jsx similarity index 57% rename from src/app/containers/CPSTable/index.jsx rename to src/app/containers/CpsTable/index.jsx index 381e2d96db7..6280362c176 100644 --- a/src/app/containers/CPSTable/index.jsx +++ b/src/app/containers/CpsTable/index.jsx @@ -6,34 +6,40 @@ import { GEL_BODY_COPY } from '@bbc/gel-foundations/typography'; import { getSansRegular } from '@bbc/psammead-styles/font-styles'; import { ServiceContext } from '#contexts/ServiceContext'; +import Blocks from '../Blocks'; +import CpsTableRow from './CpsTableRow'; const StyledTable = styled.table` ${({ service }) => getSansRegular(service)} ${GEL_BODY_COPY} + border-spacing: 0; + width: 100%; `; -const CPSTable = ({ blocks, supportedServices }) => { +const componentsToRender = { + tableRow: CpsTableRow, +}; + +const CpsTable = ({ blocks, supportedServices }) => { const { service } = useContext(ServiceContext); if (!supportedServices.includes(service)) return null; return ( - - - {JSON.stringify(blocks[0])} - - + <> + + + + ); }; -CPSTable.propTypes = { +CpsTable.propTypes = { blocks: arrayOf(shape({})).isRequired, supportedServices: arrayOf(string), }; -CPSTable.defaultProps = { - supportedServices: [ - // 'sport', - ], +CpsTable.defaultProps = { + supportedServices: ['sport'], }; -export default CPSTable; +export default CpsTable; diff --git a/src/app/pages/StoryPage/StoryPage.jsx b/src/app/pages/StoryPage/StoryPage.jsx index 92bb7b24d87..e062b50b60b 100644 --- a/src/app/pages/StoryPage/StoryPage.jsx +++ b/src/app/pages/StoryPage/StoryPage.jsx @@ -34,7 +34,7 @@ import ComscoreAnalytics from '#containers/ComscoreAnalytics'; import cpsAssetPagePropTypes from '../../models/propTypes/cpsAssetPage'; import fauxHeadline from '#containers/FauxHeadline'; import visuallyHiddenHeadline from '#containers/VisuallyHiddenHeadline'; -import CPSTable from '#containers/CPSTable'; +import CpsTable from '#containers/CpsTable'; import Byline from '#containers/Byline'; import CpsSocialEmbedContainer from '#containers/SocialEmbed/Cps'; import CpsRecommendations from '#containers/CpsRecommendations'; @@ -177,7 +177,7 @@ const StoryPage = ({ pageData, mostReadEndpointOverride }) => { byline: props => , include: props => , social_embed: props => , - table: CPSTable, + table: props => , mpu: props => isAdsEnabled ? : null, wsoj: props => ( diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js deleted file mode 100644 index b0ea66bf4d8..00000000000 --- a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/minimalist/index.js +++ /dev/null @@ -1 +0,0 @@ -export default block => ({ type: block.type, model: { blocks: [block] } }); diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js new file mode 100644 index 00000000000..c7d538de846 --- /dev/null +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js @@ -0,0 +1,32 @@ +import convertParagraph from '../paragraph'; + +const convertCells = async block => ({ + type: block.cellType === 'header' ? 'tableHeader' : 'tableCell', + model: { + blocks: [await convertParagraph(block.content[0])], + }, +}); + +const convertRows = async block => { + const cellBlocks = await Promise.all(block.map(convertCells)); + + return { + type: 'tableRow', + model: { + blocks: cellBlocks, + }, + }; +}; + +const convertTable = async block => { + const rowBlocks = await Promise.all(block.rows.map(convertRows)); + + return { + type: 'table', + model: { + blocks: rowBlocks, + }, + }; +}; + +export default convertTable; diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js index 2839f44ec4a..ac2bb461e32 100644 --- a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/index.js @@ -10,7 +10,7 @@ import subheadline from './blocks/subheadline'; import version from './blocks/version'; import include from './blocks/include'; import socialEmbed from './blocks/socialEmbed'; -import minimalist from './blocks/minimalist'; +import table from './blocks/table'; import { UNSUPPORTED_BLOCK_TYPE } from '#lib/logger.const'; const nodeLogger = require('#lib/logger.node'); @@ -41,7 +41,7 @@ const typesToConvert = { legacyMedia, include, social_embed: socialEmbed, - table: minimalist, + table, }; // Here pathname is passed as a prop specifically for CPS includes From 434bc96cd26dfb0e0ca18df5643d31b3c0f60c3f Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Mon, 14 Jun 2021 15:45:31 +0100 Subject: [PATCH 03/14] Simplified CpsTable. Added checks for paragraph blocks in getInitialData --- .../CpsTable/CpsTableCell/index.jsx | 21 ++++++++--- .../CpsTable/CpsTableHeader/index.jsx | 37 ------------------- .../containers/CpsTable/CpsTableRow/index.jsx | 15 +++----- src/app/containers/CpsTable/index.jsx | 8 ++-- .../blocks/table/index.js | 22 ++++++++--- 5 files changed, 40 insertions(+), 63 deletions(-) delete mode 100644 src/app/containers/CpsTable/CpsTableHeader/index.jsx diff --git a/src/app/containers/CpsTable/CpsTableCell/index.jsx b/src/app/containers/CpsTable/CpsTableCell/index.jsx index aefe8d49b33..74a7a9bcf4d 100644 --- a/src/app/containers/CpsTable/CpsTableCell/index.jsx +++ b/src/app/containers/CpsTable/CpsTableCell/index.jsx @@ -1,17 +1,20 @@ import React from 'react'; import styled from '@emotion/styled'; -import { arrayOf, shape } from 'prop-types'; +import { arrayOf, shape, string } from 'prop-types'; +import { GEL_SPACING } from '@bbc/gel-foundations/spacings'; import Blocks from '../../Blocks'; import CpsText from '../../CpsText'; const StyledTd = styled.td` border-bottom: 1px solid #dbdbdb; - padding-top: 8px; - padding-bottom: 8px; - padding-left: 8px; + padding-top: ${GEL_SPACING}; + padding-bottom: ${GEL_SPACING}; + padding-left: ${GEL_SPACING}; vertical-align: middle; + ${({ isHeaderCell }) => isHeaderCell && 'background: #f7f7f5;'} + & p { padding-bottom: 0; } @@ -21,9 +24,10 @@ const componentsToRender = { text: CpsText, }; -const CpsTableCell = ({ blocks }) => { +const CpsTableCell = ({ blocks, type }) => { + const isHeaderCell = type === 'tableHeader'; return ( - + ); @@ -31,6 +35,11 @@ const CpsTableCell = ({ blocks }) => { CpsTableCell.propTypes = { blocks: arrayOf(shape({})).isRequired, + type: string, +}; + +CpsTableCell.defaultProps = { + type: 'tableCell', }; export default CpsTableCell; diff --git a/src/app/containers/CpsTable/CpsTableHeader/index.jsx b/src/app/containers/CpsTable/CpsTableHeader/index.jsx deleted file mode 100644 index 2da116647bf..00000000000 --- a/src/app/containers/CpsTable/CpsTableHeader/index.jsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react'; -import styled from '@emotion/styled'; -import { arrayOf, shape } from 'prop-types'; - -import Blocks from '../../Blocks'; -import CpsText from '../../CpsText'; - -const StyledTh = styled.th` - background: #f7f7f5; - border-bottom: 1px solid #dbdbdb; - padding-top: 8px; - padding-bottom: 8px; - padding-left: 8px; - vertical-align: middle; - - & p { - padding-bottom: 0; - } -`; - -const componentsToRender = { - text: CpsText, -}; - -const CpsTableHeader = ({ blocks }) => { - return ( - - - - ); -}; - -CpsTableHeader.propTypes = { - blocks: arrayOf(shape({})).isRequired, -}; - -export default CpsTableHeader; diff --git a/src/app/containers/CpsTable/CpsTableRow/index.jsx b/src/app/containers/CpsTable/CpsTableRow/index.jsx index 5d240c6412e..95cd71d5403 100644 --- a/src/app/containers/CpsTable/CpsTableRow/index.jsx +++ b/src/app/containers/CpsTable/CpsTableRow/index.jsx @@ -4,7 +4,6 @@ import { arrayOf, shape } from 'prop-types'; import Blocks from '../../Blocks'; import CpsTableCell from '../CpsTableCell'; -import CpsTableHeader from '../CpsTableHeader'; const StyledTr = styled.tr` &:hover { @@ -14,16 +13,14 @@ const StyledTr = styled.tr` const componentsToRender = { tableCell: CpsTableCell, - tableHeader: CpsTableHeader, + tableHeader: CpsTableCell, }; -const CpsTableRow = ({ blocks }) => { - return ( - - - - ); -}; +const CpsTableRow = ({ blocks }) => ( + + + +); CpsTableRow.propTypes = { blocks: arrayOf(shape({})).isRequired, diff --git a/src/app/containers/CpsTable/index.jsx b/src/app/containers/CpsTable/index.jsx index 6280362c176..ccd30ece2fa 100644 --- a/src/app/containers/CpsTable/index.jsx +++ b/src/app/containers/CpsTable/index.jsx @@ -25,11 +25,9 @@ const CpsTable = ({ blocks, supportedServices }) => { if (!supportedServices.includes(service)) return null; return ( - <> - - - - + + + ); }; diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js index c7d538de846..6ad4f28a94a 100644 --- a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js @@ -1,11 +1,21 @@ import convertParagraph from '../paragraph'; -const convertCells = async block => ({ - type: block.cellType === 'header' ? 'tableHeader' : 'tableCell', - model: { - blocks: [await convertParagraph(block.content[0])], - }, -}); +const convertCells = async block => { + const paragraphContentOnly = block.content.filter( + content => content.type === 'paragraph', + ); + + const paragraphBlocks = await Promise.all( + paragraphContentOnly.map(convertParagraph), + ); + + return { + type: block.cellType === 'header' ? 'tableHeader' : 'tableCell', + model: { + blocks: paragraphBlocks, + }, + }; +}; const convertRows = async block => { const cellBlocks = await Promise.all(block.map(convertCells)); From d9f5c83cc45da8eebcf5de7396ab36c06dd7012d Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Mon, 14 Jun 2021 16:10:31 +0100 Subject: [PATCH 04/14] Added prop types --- .../containers/CpsTable/CpsTableCell/index.jsx | 6 ++++-- src/app/containers/CpsTable/CpsTableRow/index.jsx | 11 +++++++++-- src/app/containers/CpsTable/index.jsx | 15 +++++++++++++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/app/containers/CpsTable/CpsTableCell/index.jsx b/src/app/containers/CpsTable/CpsTableCell/index.jsx index 74a7a9bcf4d..174f19cefd4 100644 --- a/src/app/containers/CpsTable/CpsTableCell/index.jsx +++ b/src/app/containers/CpsTable/CpsTableCell/index.jsx @@ -1,7 +1,9 @@ import React from 'react'; import styled from '@emotion/styled'; -import { arrayOf, shape, string } from 'prop-types'; +import { arrayOf, string } from 'prop-types'; + import { GEL_SPACING } from '@bbc/gel-foundations/spacings'; +import { textBlockPropTypes } from '#models/propTypes/text'; import Blocks from '../../Blocks'; import CpsText from '../../CpsText'; @@ -34,7 +36,7 @@ const CpsTableCell = ({ blocks, type }) => { }; CpsTableCell.propTypes = { - blocks: arrayOf(shape({})).isRequired, + blocks: arrayOf(textBlockPropTypes).isRequired, type: string, }; diff --git a/src/app/containers/CpsTable/CpsTableRow/index.jsx b/src/app/containers/CpsTable/CpsTableRow/index.jsx index 95cd71d5403..ecf0a782b3c 100644 --- a/src/app/containers/CpsTable/CpsTableRow/index.jsx +++ b/src/app/containers/CpsTable/CpsTableRow/index.jsx @@ -1,6 +1,8 @@ import React from 'react'; import styled from '@emotion/styled'; -import { arrayOf, shape } from 'prop-types'; +import { arrayOf, oneOf, shape } from 'prop-types'; + +import { textBlockPropTypes } from '#models/propTypes/text'; import Blocks from '../../Blocks'; import CpsTableCell from '../CpsTableCell'; @@ -23,7 +25,12 @@ const CpsTableRow = ({ blocks }) => ( ); CpsTableRow.propTypes = { - blocks: arrayOf(shape({})).isRequired, + blocks: arrayOf( + shape({ + type: oneOf(['tableCell', 'tableHeader']), + blocks: arrayOf(textBlockPropTypes), + }), + ).isRequired, }; export default CpsTableRow; diff --git a/src/app/containers/CpsTable/index.jsx b/src/app/containers/CpsTable/index.jsx index ccd30ece2fa..e43dbaefb85 100644 --- a/src/app/containers/CpsTable/index.jsx +++ b/src/app/containers/CpsTable/index.jsx @@ -1,9 +1,10 @@ import React, { useContext } from 'react'; import styled from '@emotion/styled'; -import { arrayOf, shape, string } from 'prop-types'; +import { arrayOf, shape, string, oneOf } from 'prop-types'; import { GEL_BODY_COPY } from '@bbc/gel-foundations/typography'; import { getSansRegular } from '@bbc/psammead-styles/font-styles'; +import { textBlockPropTypes } from '#models/propTypes/text'; import { ServiceContext } from '#contexts/ServiceContext'; import Blocks from '../Blocks'; @@ -32,7 +33,17 @@ const CpsTable = ({ blocks, supportedServices }) => { }; CpsTable.propTypes = { - blocks: arrayOf(shape({})).isRequired, + blocks: arrayOf( + shape({ + type: ['tableRow'], + blocks: arrayOf( + shape({ + type: oneOf(['tableCell', 'tableHeader']), + blocks: arrayOf(textBlockPropTypes), + }), + ), + }), + ).isRequired, supportedServices: arrayOf(string), }; From 4c80d9f60b99f2e9c17e218dcfd46364591d3b53 Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Tue, 15 Jun 2021 10:25:01 +0100 Subject: [PATCH 05/14] Added tests for table converter --- .../blocks/table/fixtures.js | 216 ++++++++++++++++++ .../blocks/table/index.test.js | 26 +++ 2 files changed, 242 insertions(+) create mode 100644 src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js create mode 100644 src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.test.js diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js new file mode 100644 index 00000000000..cc500a73506 --- /dev/null +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js @@ -0,0 +1,216 @@ +import { optimoTextWithParagraph } from '../../utils/helpers'; + +export const CPSTable = { + rows: [ + [ + { + content: [ + { + text: 'Men', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'header', + }, + { + content: [ + { + text: 'Women', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'header', + }, + ], + [ + { + content: [ + { + text: 'Jofra Archer', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'cell', + }, + { + content: [ + { + text: 'Anya Shrubsole', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'cell', + }, + ], + ], + height: 2, + width: 2, + type: 'table', +}; + +export const CPSTableWithMultipleParagraphs = { + rows: [ + [ + { + content: [ + { + text: 'Men', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'header', + }, + { + content: [ + { + text: 'Women', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'header', + }, + ], + [ + { + content: [ + { + text: 'Jofra Archer', + markupType: 'plain_text', + type: 'paragraph', + }, + { + text: 'Second Paragraph', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'cell', + }, + { + content: [ + { + text: 'Anya Shrubsole', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'cell', + }, + ], + ], + height: 2, + width: 2, + type: 'table', +}; + +export const CPSTableWithNonParagraphs = { + rows: [ + [ + { + content: [ + { + text: 'Men', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'header', + }, + { + content: [ + { + text: 'Women', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'header', + }, + ], + [ + { + content: [ + { + text: 'Jofra Archer', + markupType: 'plain_text', + type: 'paragraph', + }, + ], + cellType: 'cell', + }, + { + content: [ + { + text: 'Trent Rockets', + markupType: 'plain_text', + type: 'crosshead', + }, + ], + cellType: 'cell', + }, + ], + ], + height: 2, + width: 2, + type: 'table', +}; + +const buildTableRow = (rows, isHeader = false) => ({ + type: 'tableRow', + model: { + blocks: rows.map(row => ({ + type: isHeader ? 'tableHeader' : 'tableCell', + model: { + blocks: row.map(text => + optimoTextWithParagraph([ + { + fragments: [ + { + fragment: text, + attributes: [], + }, + ], + text, + }, + ]), + ), + }, + })), + }, +}); + +export const convertedTable = { + type: 'table', + model: { + blocks: [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Jofra Archer'], ['Anya Shrubsole']]), + ], + }, +}; + +export const convertedTableWithMultipleParagraphs = { + type: 'table', + model: { + blocks: [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Jofra Archer', 'Second Paragraph'], ['Anya Shrubsole']]), + ], + }, +}; + +export const convertedTableWithNonParagraphs = { + type: 'table', + model: { + blocks: [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Jofra Archer'], []]), + ], + }, +}; diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.test.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.test.js new file mode 100644 index 00000000000..9b33b7a2daa --- /dev/null +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.test.js @@ -0,0 +1,26 @@ +import convertTable from '.'; +import { + CPSTable, + convertedTable, + CPSTableWithMultipleParagraphs, + convertedTableWithMultipleParagraphs, + CPSTableWithNonParagraphs, + convertedTableWithNonParagraphs, +} from './fixtures'; + +describe('convertTable', () => { + it('should convert a CPS table', async () => { + const table = await convertTable(CPSTable); + expect(table).toEqual(convertedTable); + }); + + it('should convert a CPS table with multiple cell paragraphs', async () => { + const table = await convertTable(CPSTableWithMultipleParagraphs); + expect(table).toEqual(convertedTableWithMultipleParagraphs); + }); + + it('should ignore non-paragraphs', async () => { + const table = await convertTable(CPSTableWithNonParagraphs); + expect(table).toEqual(convertedTableWithNonParagraphs); + }); +}); From 4ec03c70704222ebc5f763b5bfc482fab519d281 Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Tue, 15 Jun 2021 12:29:34 +0100 Subject: [PATCH 06/14] Added thead and tbody elements. Align heading to left --- src/app/containers/CpsTable/CpsTableCell/index.jsx | 1 + src/app/containers/CpsTable/index.jsx | 13 +++++++++++-- .../convertToOptimoBlocks/blocks/table/index.js | 3 ++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/app/containers/CpsTable/CpsTableCell/index.jsx b/src/app/containers/CpsTable/CpsTableCell/index.jsx index 174f19cefd4..0ae11d16804 100644 --- a/src/app/containers/CpsTable/CpsTableCell/index.jsx +++ b/src/app/containers/CpsTable/CpsTableCell/index.jsx @@ -14,6 +14,7 @@ const StyledTd = styled.td` padding-bottom: ${GEL_SPACING}; padding-left: ${GEL_SPACING}; vertical-align: middle; + text-align: left; ${({ isHeaderCell }) => isHeaderCell && 'background: #f7f7f5;'} diff --git a/src/app/containers/CpsTable/index.jsx b/src/app/containers/CpsTable/index.jsx index e43dbaefb85..64a9f00bdc3 100644 --- a/src/app/containers/CpsTable/index.jsx +++ b/src/app/containers/CpsTable/index.jsx @@ -18,6 +18,7 @@ const StyledTable = styled.table` `; const componentsToRender = { + tableHeaderRow: CpsTableRow, tableRow: CpsTableRow, }; @@ -25,9 +26,17 @@ const CpsTable = ({ blocks, supportedServices }) => { const { service } = useContext(ServiceContext); if (!supportedServices.includes(service)) return null; + const headerBlocks = blocks.filter(block => block.type === 'tableHeaderRow'); + const bodyBlocks = blocks.filter(block => block.type === 'tableRow'); + return ( - + + + + + + ); }; @@ -35,7 +44,7 @@ const CpsTable = ({ blocks, supportedServices }) => { CpsTable.propTypes = { blocks: arrayOf( shape({ - type: ['tableRow'], + type: oneOf(['tableHeaderRow', 'tableRow']), blocks: arrayOf( shape({ type: oneOf(['tableCell', 'tableHeader']), diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js index 6ad4f28a94a..aa00193c3d4 100644 --- a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/index.js @@ -19,9 +19,10 @@ const convertCells = async block => { const convertRows = async block => { const cellBlocks = await Promise.all(block.map(convertCells)); + const isHeaderRow = cellBlocks.some(cell => cell.type === 'tableHeader'); return { - type: 'tableRow', + type: isHeaderRow ? 'tableHeaderRow' : 'tableRow', model: { blocks: cellBlocks, }, From 461004e4ff56968df2914732e2443373b367561e Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Tue, 15 Jun 2021 12:31:29 +0100 Subject: [PATCH 07/14] Updated converter tests --- .../convertToOptimoBlocks/blocks/table/fixtures.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js index cc500a73506..ad603734c05 100644 --- a/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js +++ b/src/app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures.js @@ -161,8 +161,8 @@ export const CPSTableWithNonParagraphs = { type: 'table', }; -const buildTableRow = (rows, isHeader = false) => ({ - type: 'tableRow', +export const buildTableRow = (rows, isHeader = false) => ({ + type: isHeader ? 'tableHeaderRow' : 'tableRow', model: { blocks: rows.map(row => ({ type: isHeader ? 'tableHeader' : 'tableCell', From 8b6e45e1f054ff38efffd12de3c27126d6ff4e43 Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Tue, 15 Jun 2021 12:31:54 +0100 Subject: [PATCH 08/14] Added storybook tests --- src/app/containers/CpsTable/fixtures.js | 22 +++++++++++++++++++ src/app/containers/CpsTable/index.stories.jsx | 20 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/app/containers/CpsTable/fixtures.js create mode 100644 src/app/containers/CpsTable/index.stories.jsx diff --git a/src/app/containers/CpsTable/fixtures.js b/src/app/containers/CpsTable/fixtures.js new file mode 100644 index 00000000000..86caf22be80 --- /dev/null +++ b/src/app/containers/CpsTable/fixtures.js @@ -0,0 +1,22 @@ +import { buildTableRow } from '#app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures'; + +export default [ + [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Joe Root'], ['Nat Sciver']]), + buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), + buildTableRow([["D'arcy Short"], ['Elyse Villani']]), + ], + [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Joe Root'], ['Nat Sciver']]), + buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), + buildTableRow([["D'arcy Short"], []]), + ], + [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Joe Root', 'Second Line of Text'], ['Nat Sciver']]), + buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), + buildTableRow([["D'arcy Short"], ['Elyse Villani']]), + ], +]; diff --git a/src/app/containers/CpsTable/index.stories.jsx b/src/app/containers/CpsTable/index.stories.jsx new file mode 100644 index 00000000000..96b6e5052ca --- /dev/null +++ b/src/app/containers/CpsTable/index.stories.jsx @@ -0,0 +1,20 @@ +import React from 'react'; +import { storiesOf } from '@storybook/react'; +import { latin } from '@bbc/gel-foundations/scripts'; + +import { ServiceContext } from '#contexts/ServiceContext'; + +import CpsTable from '.'; +import fixtures from './fixtures'; + +fixtures.forEach((fixture, index) => { + storiesOf('Containers/CPS Table', module).add(`Example ${index + 1}`, () => { + return ( + + + + ); + }); +}); From 3e8c850ff9bcfef43cebce6d1e303881ccdb3a43 Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Tue, 15 Jun 2021 12:35:18 +0100 Subject: [PATCH 09/14] Added an extra cricket asset --- data/sport/legacyAssets/cricket/20256774.json | 1445 +++++++++++++++++ 1 file changed, 1445 insertions(+) create mode 100644 data/sport/legacyAssets/cricket/20256774.json diff --git a/data/sport/legacyAssets/cricket/20256774.json b/data/sport/legacyAssets/cricket/20256774.json new file mode 100644 index 00000000000..007202a0e7f --- /dev/null +++ b/data/sport/legacyAssets/cricket/20256774.json @@ -0,0 +1,1445 @@ +{ + "metadata": { + "id": "urn:bbc:ares::asset:sport/cricket/20256774", + "locators": { + "assetUri": "/sport/cricket/20256774", + "cpsUrn": "urn:bbc:content:assetUri:sport/cricket/20256774", + "curie": "http://www.bbc.co.uk/asset/a483aa48-ec4d-7f4f-a74e-d48926529680", + "assetId": "20256774" + }, + "type": "STY", + "createdBy": "sport-v6", + "language": "en-gb", + "lastUpdated": 1623678042452, + "firstPublished": 1355927141000, + "lastPublished": 1426679580000, + "timestamp": 1426679580000, + "options": { + "isIgorSeoTagsEnabled": false, + "includeComments": false, + "allowRightHandSide": true, + "isFactCheck": false, + "allowDateStamp": false, + "suitableForSyndication": true, + "hasNewsTracker": false, + "allowRelatedStoriesBox": true, + "isKeyContent": false, + "allowHeadline": true, + "allowAdvertising": true, + "hasContentWarning": false, + "isBreakingNews": false, + "allowPrintingSharingLinks": true + }, + "analyticsLabels": { + "cps_asset_type": "sty", + "counterName": "sport.cricket.international.england.story.20256774.page", + "cps_asset_id": "20256774" + }, + "passport": { + "language": "en-gb", + "home": "http://www.bbc.co.uk/ontologies/passport/home/Sport", + "locator": "urn:bbc:cps:curie:asset:a483aa48-ec4d-7f4f-a74e-d48926529680", + "availability": "AVAILABLE", + "taggings": [ + { + "predicate": "http://www.bbc.co.uk/ontologies/bbc/primaryMediaType", + "value": "http://www.bbc.co.uk/things/5566b81b-8509-44c1-8503-018a0eab317d#id" + } + ], + "schemaVersion": "1.2.0", + "publishedState": "PUBLISHED" + }, + "tags": {}, + "version": "v1.3.13", + "blockTypes": ["table", "paragraph"], + "includeComments": false, + "atiAnalytics": { "producerName": "SPORT", "producerId": "85" }, + "readTime": 1, + "siteUri": "/sport" + }, + "content": { + "blocks": [ + { + "rows": [ + [ + { + "content": [ + { + "text": "Player", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Born", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + }, + { + "content": [ + { + "text": "Bat/bowl", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "header" + } + ], + [ + { + "content": [ + { + "text": "Joe Root * (Test captain)", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Sheffield, 30/12/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB OB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Eoin Morgan *** ", + "markupType": "plain_text", + "type": "paragraph" + }, + { + "text": "(ODI/T20 captain)", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Dublin, Ireland, 10/09/1986", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB RM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Moeen Ali ***", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Birmingham, 18/06/1987", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB OB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "James Anderson **", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Burnley, 30/07/1982", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jofra Archer *", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bridgetown, Barbados, 01/04/1995", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jonny Bairstow ***", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bradford, 26/09/1989", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB WK", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dominic Bess ****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Exeter, 22/07/1997", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB OB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Sam Billings", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Pembury, 15/06/1991", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB WK", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "James Bracey", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bristol, 03/05/1997", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB WK", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Stuart Broad **", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Nottingham, 24/06/1986", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Rory Burns **", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Epsom, 26/08/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB WK/RM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jos Buttler *", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Taunton, 08/09/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB WK", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Zak Crawley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bromley, 03/02/1998", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Sam Curran **", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Northampton, 03/06/1998", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB LMF", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Tom Curran ***", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Cape Town, SA, 12/03/1995", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Liam Dawson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Swindon, 01/03/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB SLA", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ben Foakes", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Colchester, 15/02/1993", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB WK", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Haseeb Hameed", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bolton, 17/01/1997", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB LB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Chris Jordan ****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Lowlands, Barbados, 04/10/1988", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dan Lawrence", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Whipps Crosss, 12/07/1997", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB OB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jack Leach ****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Taunton, 22/06/1991", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB SLA", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Liam Livingstone", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Barrow-in-Furness, 04/08/1993", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB LB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Saqib Mahmood *****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Birmingham, 25/02/1997", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dawid Malan ****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Roehampton, 03/091987", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB LB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Craig Overton *****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Barnstaple, 10/04/1994", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RMF", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Matthew Parkinson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bolton, 24/10/1996", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB LB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ollie Pope", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Chelsea, 02/01/1998", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB WK", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Adil Rashid ***", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Bradford, 17/02/1988", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB LB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ollie Robinson", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Margate, 01/12/1993", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RMF", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Jason Roy ***", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Durban, SA, 21/07/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Dominic Sibley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Epsom, 05/09/1995", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB OB", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Ben Stokes *", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Christchurch, NZ, 04/06/1991", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB RM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Olly Stone *****", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Norwich, 09/10/1993", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Reece Topley", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Ipswich, 21/02/1994", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB LFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "David Willey", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Northampton, 28/02/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "LHB LFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Chris Woakes *", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Birmingham, 02/03/1989", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ], + [ + { + "content": [ + { + "text": "Mark Wood ***", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "Ashington, 11/01/1990", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + }, + { + "content": [ + { + "text": "RHB RFM", + "markupType": "plain_text", + "type": "paragraph" + } + ], + "cellType": "cell" + } + ] + ], + "height": 38, + "width": 3, + "type": "table" + }, + { + "text": "* player is centrally contracted to the England & Wales Cricket Board for 2020-21 in both Test and limited-overs cricket", + "markupType": "candy_xml", + "aresUrl": "https://ares-api.api.bbci.co.uk/api/asset/sport/cricket/54352180", + "type": "paragraph" + }, + { + "text": "** player holds a central contract for Test cricket", + "markupType": "candy_xml", + "type": "paragraph" + }, + { + "text": "*** player holds a central contract for limited-overs cricket", + "markupType": "candy_xml", + "type": "paragraph" + }, + { + "text": "**** player holds incremental ECB contract for 2020-21", + "markupType": "candy_xml", + "type": "paragraph" + }, + { + "text": "***** player holds ECB pace bowling development contract", + "markupType": "candy_xml", + "type": "paragraph" + }, + { + "text": "Other international squads", + "markupType": "candy_xml", + "type": "paragraph" + }, + { + "text": "Afghanistan - Australia - Bangladesh - India - Ireland - New Zealand - Pakistan - Scotland - South Africa - Sri Lanka - West Indies - Zimbabwe", + "markupType": "candy_xml", + "type": "paragraph" + }, + { + "text": "England women's contracted players", + "markupType": "candy_xml", + "aresUrl": "https://ares-api.api.bbci.co.uk/api/asset/sport/cricket/48504102", + "type": "paragraph" + } + ] + }, + "promo": { + "headlines": { + "shortHeadline": "England men's squad", + "headline": "England men's squad" + }, + "locators": { + "assetUri": "/sport/cricket/20256774", + "cpsUrn": "urn:bbc:content:assetUri:sport/cricket/20256774", + "curie": "http://www.bbc.co.uk/asset/a483aa48-ec4d-7f4f-a74e-d48926529680", + "assetId": "20256774" + }, + "summary": "Current and recent England men's squad players' details", + "timestamp": 1426679580000, + "language": "en-gb", + "passport": { + "language": "en-gb", + "home": "http://www.bbc.co.uk/ontologies/passport/home/Sport", + "locator": "urn:bbc:cps:curie:asset:a483aa48-ec4d-7f4f-a74e-d48926529680", + "availability": "AVAILABLE", + "taggings": [ + { + "predicate": "http://www.bbc.co.uk/ontologies/bbc/primaryMediaType", + "value": "http://www.bbc.co.uk/things/5566b81b-8509-44c1-8503-018a0eab317d#id" + } + ], + "schemaVersion": "1.2.0", + "publishedState": "PUBLISHED" + }, + "id": "urn:bbc:ares::asset:sport/cricket/20256774", + "type": "cps" + }, + "relatedContent": { + "section": { + "subType": "index", + "name": "Cricket", + "uri": "/sport/cricket/international/england", + "type": "simple" + }, + "site": { + "subType": "site", + "name": "BBC Sport", + "uri": "/sport", + "type": "simple" + }, + "groups": [ + { + "type": "see-alsos", + "promos": [ + { + "headlines": { + "shortHeadline": "Morgan & Wood get central contracts", + "headline": "Eoin Morgan & Mark Wood given central contracts by ECB" + }, + "locators": { + "assetUri": "/sport/cricket/34334649", + "cpsUrn": "urn:bbc:content:assetUri:/sport/cricket/34334649" + }, + "summary": "England limited-overs captain Eoin Morgan and Durham fast bowler Mark Wood are among 11 players to get central contracts.", + "timestamp": 1443015169000, + "language": "en-gb", + "cpsType": "STY", + "indexImage": { + "id": "85702534", + "subType": "index", + "href": "http://c.files.bbci.co.uk/AA00/production/_85702534_morganandwood.jpg", + "path": "/cpsprodpb/AA00/production/_85702534_morganandwood.jpg", + "height": 351, + "width": 624, + "altText": "Eoin Morgan and Mark Wood", + "copyrightHolder": "Getty Images", + "type": "image" + }, + "id": "urn:bbc:ares::asset:sport/cricket/34334649", + "type": "cps" + } + ] + }, + { + "type": "related-urls", + "promos": [ + { + "name": "Live cricket on the BBC", + "uri": "http://www.bbc.co.uk/sport/0/cricket/15665499", + "aresUrl": "https://ares-api.api.bbci.co.uk/api/asset/sport/0/cricket/15665499", + "type": "link" + }, + { + "name": "England and Wales Cricket Board", + "uri": "http://www.ecb.co.uk/", + "type": "link" + } + ] + }, + { + "type": "related-hypers", + "promos": [ + { + "locators": { + "assetUri": "/sport/cricket/20801006", + "cpsUrn": "urn:bbc:content:assetUri:/sport/cricket/20801006" + }, + "title": "International squad details", + "language": "en-gb", + "timestamp": 1517496850000, + "id": "urn:bbc:ares::asset:sport/cricket/20801006", + "type": "hyper" + } + ] + } + ] + } +} From c02f1e2be992f987756b72e16dabc02120777c1d Mon Sep 17 00:00:00 2001 From: Paul Crane Date: Tue, 15 Jun 2021 15:30:32 +0100 Subject: [PATCH 10/14] Add tests for CpsTable --- .../__snapshots__/index.test.jsx.snap | 985 ++++++++++++++++++ src/app/containers/CpsTable/fixtures.js | 70 +- src/app/containers/CpsTable/index.test.jsx | 64 ++ 3 files changed, 1099 insertions(+), 20 deletions(-) create mode 100644 src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap create mode 100644 src/app/containers/CpsTable/index.test.jsx diff --git a/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap b/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap new file mode 100644 index 00000000000..98091f14818 --- /dev/null +++ b/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap @@ -0,0 +1,985 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`CpsTable should match snapshot - fixture 0 1`] = ` +.emotion-0 { + font-family: ReithSans,Helvetica,Arial,sans-serif; + font-weight: 400; + font-style: normal; + font-size: 0.9375rem; + line-height: 1.25rem; + border-spacing: 0; + width: 100%; +} + +@media (min-width: 20rem) { + .emotion-0 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +.emotion-2:hover { + background-color: #f7f7f5; +} + +.emotion-4 { + border-bottom: 1px solid #dbdbdb; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + vertical-align: middle; + text-align: left; + background: #f7f7f5; +} + +.emotion-4 p { + padding-bottom: 0; +} + +@media (max-width: 14.9375rem) { + .emotion-6 { + padding: 0 0.5rem; + margin-left: 0%; + } +} + +@media (min-width: 15rem) and (max-width: 24.9375rem) { + .emotion-6 { + padding: 0 0.5rem; + margin-left: 0%; + } +} + +@media (min-width: 25rem) and (max-width: 37.4375rem) { + .emotion-6 { + padding: 0 1rem; + margin-left: 0%; + } +} + +@media (min-width: 37.5rem) and (max-width: 62.9375rem) { + .emotion-6 { + padding: 0 1rem; + margin-left: 0%; + } +} + +@media (min-width: 63rem) and (max-width: 79.9375rem) { + .emotion-6 { + margin-left: 20%; + } +} + +@media (min-width: 80rem) { + .emotion-6 { + margin-left: 40%; + } +} + +@supports (display: grid) { + .emotion-6 { + display: block; + width: initial; + margin: 0; + } + + @media (max-width: 14.9375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 0.5rem; + grid-column-start: 1; + } + } + + @media (min-width: 15rem) and (max-width: 24.9375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 0.5rem; + grid-column-start: 1; + } + } + + @media (min-width: 25rem) and (max-width: 37.4375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 1rem; + grid-column-start: 1; + } + } + + @media (min-width: 37.5rem) and (max-width: 62.9375rem) { + .emotion-6 { + grid-template-columns: repeat(5, 1fr); + grid-column-end: span 5; + padding: 0 1rem; + grid-column-start: 1; + } + } + + @media (min-width: 63rem) and (max-width: 79.9375rem) { + .emotion-6 { + grid-template-columns: repeat(5, 1fr); + grid-column-end: span 5; + grid-column-start: 2; + } + } + + @media (min-width: 80rem) { + .emotion-6 { + grid-template-columns: repeat(10, 1fr); + grid-column-end: span 10; + grid-column-start: 5; + } + } +} + +.emotion-8 { + font-size: 0.9375rem; + line-height: 1.25rem; + font-family: ReithSans,Helvetica,Arial,sans-serif; + font-weight: 400; + font-style: normal; + color: #3F3F42; + padding-bottom: 1.5rem; + margin: 0; +} + +@media (min-width: 20rem) and (max-width: 37.4375rem) { + .emotion-8 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +@media (min-width: 37.5rem) { + .emotion-8 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +@media (min-width: 63rem) { + .emotion-8 { + padding-right: 2.5rem; + } +} + +.emotion-18 { + border-bottom: 1px solid #dbdbdb; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + vertical-align: middle; + text-align: left; +} + +.emotion-18 p { + padding-bottom: 0; +} + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+

+ Men +

+
+
+
+

+ Women +

+
+
+
+

+ Joe Root +

+
+
+
+

+ Nat Sciver +

+
+
+
+

+ Rashid Khan +

+
+
+
+

+ Katherine Brunt +

+
+
+
+

+ D'arcy Short +

+
+
+
+

+ Elyse Villani +

+
+
+
+`; + +exports[`CpsTable should match snapshot - fixture 1 1`] = ` +.emotion-0 { + font-family: ReithSans,Helvetica,Arial,sans-serif; + font-weight: 400; + font-style: normal; + font-size: 0.9375rem; + line-height: 1.25rem; + border-spacing: 0; + width: 100%; +} + +@media (min-width: 20rem) { + .emotion-0 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +.emotion-2:hover { + background-color: #f7f7f5; +} + +.emotion-4 { + border-bottom: 1px solid #dbdbdb; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + vertical-align: middle; + text-align: left; + background: #f7f7f5; +} + +.emotion-4 p { + padding-bottom: 0; +} + +@media (max-width: 14.9375rem) { + .emotion-6 { + padding: 0 0.5rem; + margin-left: 0%; + } +} + +@media (min-width: 15rem) and (max-width: 24.9375rem) { + .emotion-6 { + padding: 0 0.5rem; + margin-left: 0%; + } +} + +@media (min-width: 25rem) and (max-width: 37.4375rem) { + .emotion-6 { + padding: 0 1rem; + margin-left: 0%; + } +} + +@media (min-width: 37.5rem) and (max-width: 62.9375rem) { + .emotion-6 { + padding: 0 1rem; + margin-left: 0%; + } +} + +@media (min-width: 63rem) and (max-width: 79.9375rem) { + .emotion-6 { + margin-left: 20%; + } +} + +@media (min-width: 80rem) { + .emotion-6 { + margin-left: 40%; + } +} + +@supports (display: grid) { + .emotion-6 { + display: block; + width: initial; + margin: 0; + } + + @media (max-width: 14.9375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 0.5rem; + grid-column-start: 1; + } + } + + @media (min-width: 15rem) and (max-width: 24.9375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 0.5rem; + grid-column-start: 1; + } + } + + @media (min-width: 25rem) and (max-width: 37.4375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 1rem; + grid-column-start: 1; + } + } + + @media (min-width: 37.5rem) and (max-width: 62.9375rem) { + .emotion-6 { + grid-template-columns: repeat(5, 1fr); + grid-column-end: span 5; + padding: 0 1rem; + grid-column-start: 1; + } + } + + @media (min-width: 63rem) and (max-width: 79.9375rem) { + .emotion-6 { + grid-template-columns: repeat(5, 1fr); + grid-column-end: span 5; + grid-column-start: 2; + } + } + + @media (min-width: 80rem) { + .emotion-6 { + grid-template-columns: repeat(10, 1fr); + grid-column-end: span 10; + grid-column-start: 5; + } + } +} + +.emotion-8 { + font-size: 0.9375rem; + line-height: 1.25rem; + font-family: ReithSans,Helvetica,Arial,sans-serif; + font-weight: 400; + font-style: normal; + color: #3F3F42; + padding-bottom: 1.5rem; + margin: 0; +} + +@media (min-width: 20rem) and (max-width: 37.4375rem) { + .emotion-8 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +@media (min-width: 37.5rem) { + .emotion-8 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +@media (min-width: 63rem) { + .emotion-8 { + padding-right: 2.5rem; + } +} + +.emotion-18 { + border-bottom: 1px solid #dbdbdb; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + vertical-align: middle; + text-align: left; +} + +.emotion-18 p { + padding-bottom: 0; +} + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+

+ Men +

+
+
+
+

+ Women +

+
+
+
+

+ Joe Root +

+
+
+
+

+ Nat Sciver +

+
+
+
+

+ Rashid Khan +

+
+
+
+

+ Katherine Brunt +

+
+
+
+

+ D'arcy Short +

+
+
+
+

+ Elyse Villani +

+
+
+
+`; + +exports[`CpsTable should match snapshot - fixture 2 1`] = ` +.emotion-0 { + font-family: ReithSans,Helvetica,Arial,sans-serif; + font-weight: 400; + font-style: normal; + font-size: 0.9375rem; + line-height: 1.25rem; + border-spacing: 0; + width: 100%; +} + +@media (min-width: 20rem) { + .emotion-0 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +.emotion-2:hover { + background-color: #f7f7f5; +} + +.emotion-4 { + border-bottom: 1px solid #dbdbdb; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + vertical-align: middle; + text-align: left; + background: #f7f7f5; +} + +.emotion-4 p { + padding-bottom: 0; +} + +@media (max-width: 14.9375rem) { + .emotion-6 { + padding: 0 0.5rem; + margin-left: 0%; + } +} + +@media (min-width: 15rem) and (max-width: 24.9375rem) { + .emotion-6 { + padding: 0 0.5rem; + margin-left: 0%; + } +} + +@media (min-width: 25rem) and (max-width: 37.4375rem) { + .emotion-6 { + padding: 0 1rem; + margin-left: 0%; + } +} + +@media (min-width: 37.5rem) and (max-width: 62.9375rem) { + .emotion-6 { + padding: 0 1rem; + margin-left: 0%; + } +} + +@media (min-width: 63rem) and (max-width: 79.9375rem) { + .emotion-6 { + margin-left: 20%; + } +} + +@media (min-width: 80rem) { + .emotion-6 { + margin-left: 40%; + } +} + +@supports (display: grid) { + .emotion-6 { + display: block; + width: initial; + margin: 0; + } + + @media (max-width: 14.9375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 0.5rem; + grid-column-start: 1; + } + } + + @media (min-width: 15rem) and (max-width: 24.9375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 0.5rem; + grid-column-start: 1; + } + } + + @media (min-width: 25rem) and (max-width: 37.4375rem) { + .emotion-6 { + grid-template-columns: repeat(6, 1fr); + grid-column-end: span 6; + padding: 0 1rem; + grid-column-start: 1; + } + } + + @media (min-width: 37.5rem) and (max-width: 62.9375rem) { + .emotion-6 { + grid-template-columns: repeat(5, 1fr); + grid-column-end: span 5; + padding: 0 1rem; + grid-column-start: 1; + } + } + + @media (min-width: 63rem) and (max-width: 79.9375rem) { + .emotion-6 { + grid-template-columns: repeat(5, 1fr); + grid-column-end: span 5; + grid-column-start: 2; + } + } + + @media (min-width: 80rem) { + .emotion-6 { + grid-template-columns: repeat(10, 1fr); + grid-column-end: span 10; + grid-column-start: 5; + } + } +} + +.emotion-8 { + font-size: 0.9375rem; + line-height: 1.25rem; + font-family: ReithSans,Helvetica,Arial,sans-serif; + font-weight: 400; + font-style: normal; + color: #3F3F42; + padding-bottom: 1.5rem; + margin: 0; +} + +@media (min-width: 20rem) and (max-width: 37.4375rem) { + .emotion-8 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +@media (min-width: 37.5rem) { + .emotion-8 { + font-size: 1rem; + line-height: 1.375rem; + } +} + +@media (min-width: 63rem) { + .emotion-8 { + padding-right: 2.5rem; + } +} + +.emotion-18 { + border-bottom: 1px solid #dbdbdb; + padding-top: 0.5rem; + padding-bottom: 0.5rem; + padding-left: 0.5rem; + vertical-align: middle; + text-align: left; +} + +.emotion-18 p { + padding-bottom: 0; +} + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+

+ Men +

+
+
+
+

+ Women +

+
+
+
+

+ Joe Root +

+
+
+
+

+ Nat Sciver +

+
+
+
+

+ Rashid Khan +

+
+
+
+

+ Katherine Brunt +

+
+
+
+

+ D'arcy Short +

+
+
+
+

+ Elyse Villani +

+
+
+
+`; diff --git a/src/app/containers/CpsTable/fixtures.js b/src/app/containers/CpsTable/fixtures.js index 86caf22be80..7e5c30c5796 100644 --- a/src/app/containers/CpsTable/fixtures.js +++ b/src/app/containers/CpsTable/fixtures.js @@ -1,22 +1,52 @@ import { buildTableRow } from '#app/routes/cpsAsset/getInitialData/convertToOptimoBlocks/blocks/table/fixtures'; +import addIdsToBlocks from '#app/routes/utils/sharedDataTransformers/addIdsToBlocks'; -export default [ - [ - buildTableRow([['Men'], ['Women']], true), - buildTableRow([['Joe Root'], ['Nat Sciver']]), - buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), - buildTableRow([["D'arcy Short"], ['Elyse Villani']]), - ], - [ - buildTableRow([['Men'], ['Women']], true), - buildTableRow([['Joe Root'], ['Nat Sciver']]), - buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), - buildTableRow([["D'arcy Short"], []]), - ], - [ - buildTableRow([['Men'], ['Women']], true), - buildTableRow([['Joe Root', 'Second Line of Text'], ['Nat Sciver']]), - buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), - buildTableRow([["D'arcy Short"], ['Elyse Villani']]), - ], -]; +const table = { + type: 'table', + model: { + blocks: [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Joe Root'], ['Nat Sciver']]), + buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), + buildTableRow([["D'arcy Short"], ['Elyse Villani']]), + ], + }, +}; + +const tableWithEmptyCell = { + type: 'table', + model: { + blocks: [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Joe Root'], ['Nat Sciver']]), + buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), + buildTableRow([["D'arcy Short"], []]), + ], + }, +}; + +const tableWithMultipleLinesOfText = { + type: 'table', + model: { + blocks: [ + buildTableRow([['Men'], ['Women']], true), + buildTableRow([['Joe Root', 'Second Line of Text'], ['Nat Sciver']]), + buildTableRow([['Rashid Khan'], ['Katherine Brunt']]), + buildTableRow([["D'arcy Short"], ['Elyse Villani']]), + ], + }, +}; + +const json = addIdsToBlocks({ + content: { + model: { + blocks: [table, tableWithEmptyCell, tableWithMultipleLinesOfText], + }, + }, +}); + +const tableRowBlocks = json.content.model.blocks.map( + block => block.model.blocks, +); + +export default tableRowBlocks; diff --git a/src/app/containers/CpsTable/index.test.jsx b/src/app/containers/CpsTable/index.test.jsx new file mode 100644 index 00000000000..1d0e0ff1ddd --- /dev/null +++ b/src/app/containers/CpsTable/index.test.jsx @@ -0,0 +1,64 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import { latin } from '@bbc/gel-foundations/scripts'; + +import { ServiceContext } from '#contexts/ServiceContext'; + +import CpsTable from '.'; +import fixtures from './fixtures'; + +const renderComponent = ({ + fixture = fixtures[0], + supportedServices = ['sport'], + service = 'sport', +} = {}) => + render( + + + , + ); + +describe('CpsTable', () => { + it('should render a table', () => { + const { container } = renderComponent(); + expect(container.querySelector('table')).toBeInTheDocument(); + }); + + it('should not render a table if service is not supported', () => { + const { container } = renderComponent({ + service: 'news', + }); + expect(container.querySelector('table')).not.toBeInTheDocument(); + }); + + it('should render header rows inside a thead', () => { + const { getByText } = renderComponent(); + expect(getByText('Men').closest('thead')).toBeInTheDocument(); + }); + + it('should render body rows inside a tbody', () => { + const { getByText } = renderComponent(); + expect(getByText('Joe Root').closest('tbody')).toBeInTheDocument(); + }); + + it('should render header cells as a th with a background colour', () => { + const { getByText } = renderComponent(); + const cell = getByText('Men').closest('th'); + + expect(cell).toBeInTheDocument(); + expect(cell).toHaveStyle('background: #f7f7f5;'); + }); + + it('should render body cells as a td without a background colour', () => { + const { getByText } = renderComponent(); + const cell = getByText('Joe Root').closest('td'); + + expect(cell).toBeInTheDocument(); + expect(cell).not.toHaveStyle('background: #f7f7f5;'); + }); + + it.each(fixtures)('should match snapshot - fixture %#', fixture => { + const { container } = renderComponent(fixture); + expect(container).toMatchSnapshot(); + }); +}); From b10b87c51cbf9bd23e2ea7d9e4eb64db8c9326f0 Mon Sep 17 00:00:00 2001 From: Ryan McCombe Date: Wed, 16 Jun 2021 10:35:53 +0100 Subject: [PATCH 11/14] Are you signed? --- scripts/bundleSize/bundleSizeConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bundleSize/bundleSizeConfig.js b/scripts/bundleSize/bundleSizeConfig.js index 6990a4e12f0..e3cde97741d 100644 --- a/scripts/bundleSize/bundleSizeConfig.js +++ b/scripts/bundleSize/bundleSizeConfig.js @@ -4,6 +4,6 @@ module.exports = { // Keep the MAX_SIZE +5 above the largest value and MIN_SIZE -5 // below the smallest value in the build output; this avoids the // need for frequent changes as bundle sizes fluctuate. - MIN_SIZE: 614, - MAX_SIZE: 884, + MIN_SIZE: 616, + MAX_SIZE: 889, }; From 936528c0219de7f539f1b9fd0185b8afc2d2d3c8 Mon Sep 17 00:00:00 2001 From: Ryan McCombe Date: Tue, 22 Jun 2021 17:03:07 +0100 Subject: [PATCH 12/14] Use colour variables --- src/app/containers/CpsTable/CpsTableCell/index.jsx | 6 ++++-- src/app/containers/CpsTable/CpsTableRow/index.jsx | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/containers/CpsTable/CpsTableCell/index.jsx b/src/app/containers/CpsTable/CpsTableCell/index.jsx index 0ae11d16804..e85afe445f6 100644 --- a/src/app/containers/CpsTable/CpsTableCell/index.jsx +++ b/src/app/containers/CpsTable/CpsTableCell/index.jsx @@ -2,6 +2,8 @@ import React from 'react'; import styled from '@emotion/styled'; import { arrayOf, string } from 'prop-types'; +import { C_SPORT_SILVER, C_SPORT_MIST } from '@bbc/psammead-styles/colours'; + import { GEL_SPACING } from '@bbc/gel-foundations/spacings'; import { textBlockPropTypes } from '#models/propTypes/text'; @@ -9,14 +11,14 @@ import Blocks from '../../Blocks'; import CpsText from '../../CpsText'; const StyledTd = styled.td` - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid ${C_SPORT_SILVER}; padding-top: ${GEL_SPACING}; padding-bottom: ${GEL_SPACING}; padding-left: ${GEL_SPACING}; vertical-align: middle; text-align: left; - ${({ isHeaderCell }) => isHeaderCell && 'background: #f7f7f5;'} + ${({ isHeaderCell }) => isHeaderCell && `background: ${C_SPORT_MIST};`} & p { padding-bottom: 0; diff --git a/src/app/containers/CpsTable/CpsTableRow/index.jsx b/src/app/containers/CpsTable/CpsTableRow/index.jsx index ecf0a782b3c..f463abb5ca9 100644 --- a/src/app/containers/CpsTable/CpsTableRow/index.jsx +++ b/src/app/containers/CpsTable/CpsTableRow/index.jsx @@ -2,6 +2,8 @@ import React from 'react'; import styled from '@emotion/styled'; import { arrayOf, oneOf, shape } from 'prop-types'; +import { C_SPORT_MIST } from '@bbc/psammead-styles/colours'; + import { textBlockPropTypes } from '#models/propTypes/text'; import Blocks from '../../Blocks'; @@ -9,7 +11,7 @@ import CpsTableCell from '../CpsTableCell'; const StyledTr = styled.tr` &:hover { - background-color: #f7f7f5; + background-color: ${C_SPORT_MIST}; } `; From 78dbea7d10b54857b3f1552fd3d139eaaa700d5a Mon Sep 17 00:00:00 2001 From: Ryan McCombe Date: Tue, 22 Jun 2021 17:06:25 +0100 Subject: [PATCH 13/14] Re-bump bundle sizes --- scripts/bundleSize/bundleSizeConfig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bundleSize/bundleSizeConfig.js b/scripts/bundleSize/bundleSizeConfig.js index 060a30a11a8..dde08f05d73 100644 --- a/scripts/bundleSize/bundleSizeConfig.js +++ b/scripts/bundleSize/bundleSizeConfig.js @@ -4,6 +4,6 @@ module.exports = { // Keep the MAX_SIZE +5 above the largest value and MIN_SIZE -5 // below the smallest value in the build output; this avoids the // need for frequent changes as bundle sizes fluctuate. - MIN_SIZE: 615, - MAX_SIZE: 895, + MIN_SIZE: 617, + MAX_SIZE: 898, }; From 36702410f2e46daeb2d891572de0ccb781664fa6 Mon Sep 17 00:00:00 2001 From: Ryan McCombe Date: Wed, 23 Jun 2021 10:10:39 +0100 Subject: [PATCH 14/14] Update snapshots --- .../__snapshots__/index.test.jsx.snap | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap b/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap index 98091f14818..35259d89075 100644 --- a/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap +++ b/src/app/containers/CpsTable/__snapshots__/index.test.jsx.snap @@ -19,17 +19,17 @@ exports[`CpsTable should match snapshot - fixture 0 1`] = ` } .emotion-2:hover { - background-color: #f7f7f5; + background-color: #F7F7F5; } .emotion-4 { - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid #DBDBDB; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem; vertical-align: middle; text-align: left; - background: #f7f7f5; + background: #F7F7F5; } .emotion-4 p { @@ -168,7 +168,7 @@ exports[`CpsTable should match snapshot - fixture 0 1`] = ` } .emotion-18 { - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid #DBDBDB; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem; @@ -347,17 +347,17 @@ exports[`CpsTable should match snapshot - fixture 1 1`] = ` } .emotion-2:hover { - background-color: #f7f7f5; + background-color: #F7F7F5; } .emotion-4 { - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid #DBDBDB; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem; vertical-align: middle; text-align: left; - background: #f7f7f5; + background: #F7F7F5; } .emotion-4 p { @@ -496,7 +496,7 @@ exports[`CpsTable should match snapshot - fixture 1 1`] = ` } .emotion-18 { - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid #DBDBDB; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem; @@ -675,17 +675,17 @@ exports[`CpsTable should match snapshot - fixture 2 1`] = ` } .emotion-2:hover { - background-color: #f7f7f5; + background-color: #F7F7F5; } .emotion-4 { - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid #DBDBDB; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem; vertical-align: middle; text-align: left; - background: #f7f7f5; + background: #F7F7F5; } .emotion-4 p { @@ -824,7 +824,7 @@ exports[`CpsTable should match snapshot - fixture 2 1`] = ` } .emotion-18 { - border-bottom: 1px solid #dbdbdb; + border-bottom: 1px solid #DBDBDB; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 0.5rem;