@times-components/ts-components 1.31.0 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,50 +1,50 @@
1
1
  import React from 'react';
2
2
  import { storiesOf } from '@storybook/react';
3
- import { date, select, text } from '@storybook/addon-knobs';
3
+ import { select, text } from '@storybook/addon-knobs';
4
+ import { format, addMinutes } from 'date-fns';
5
+ import { utcToZonedTime } from 'date-fns-tz';
4
6
 
5
7
  import { ArticleHarness } from '../../fixtures/article-harness/ArticleHarness';
6
8
  import ArticleHeader from './ArticleHeader';
7
9
 
10
+ const getAttributes = () => {
11
+ const id = 'Options';
12
+
13
+ const now = utcToZonedTime(new Date(), 'Europe/London');
14
+
15
+ const date = text('Date', format(now, 'dd/MM/yyyy'), id);
16
+ const time = text('Time', format(addMinutes(now, -10), 'HH:mm'), id);
17
+
18
+ const options = { True: 'true', False: undefined };
19
+ const breaking = select('Breaking', options, 'true', id);
20
+
21
+ const headline = text('Headline', 'This is the headline', id);
22
+
23
+ return { date, time, breaking, headline };
24
+ };
25
+
8
26
  storiesOf('Typescript Component/Article Header', module)
9
27
  .addDecorator((storyFn: () => React.ReactNode) => (
10
28
  <ArticleHarness>{storyFn()}</ArticleHarness>
11
29
  ))
12
30
  .add('Article Header with headline', () => {
13
- const label = 'Updated Date/Time';
14
- const defaultValue = new Date();
15
- const groupId = 'Options';
16
- const value = date(label, defaultValue, groupId);
17
- const breakingOptions = {
18
- True: 'true',
19
- False: undefined
20
- };
21
- const updated = new Date(value).toISOString();
22
-
23
- const headline = text('Headline', 'This is the headline', groupId);
24
-
31
+ const props = getAttributes();
25
32
  return (
26
33
  <ArticleHeader
27
- updated={updated}
28
- breaking={select('Breaking', breakingOptions, undefined, groupId)}
29
- headline={encodeURIComponent(headline)}
34
+ date={props.date}
35
+ time={props.time}
36
+ breaking={props.breaking}
37
+ headline={encodeURIComponent(props.headline)}
30
38
  />
31
39
  );
32
40
  })
33
41
  .add('Article Header without headline', () => {
34
- const label = 'Updated Date/Time';
35
- const defaultValue = new Date();
36
- const groupId = 'Options';
37
- const value = date(label, defaultValue, groupId);
38
- const breakingOptions = {
39
- True: 'true',
40
- False: undefined
41
- };
42
- const updated = new Date(value).toISOString();
43
-
42
+ const props = getAttributes();
44
43
  return (
45
44
  <ArticleHeader
46
- updated={updated}
47
- breaking={select('Breaking', breakingOptions, undefined, groupId)}
45
+ date={props.date}
46
+ time={props.time}
47
+ breaking={props.breaking}
48
48
  />
49
49
  );
50
50
  });
@@ -1,10 +1,15 @@
1
1
  import React from 'react';
2
2
  import {
3
+ parse,
3
4
  format,
4
5
  differenceInSeconds,
5
6
  differenceInCalendarDays,
6
7
  formatDistanceStrict
7
8
  } from 'date-fns';
9
+ import { zonedTimeToUtc } from 'date-fns-tz';
10
+
11
+ import { BreakingArticleFlag } from '../article-flag/LiveArticleFlag';
12
+ import safeDecodeURIComponent from '../../utils/safeDecodeURIComponent';
8
13
 
9
14
  import {
10
15
  Container,
@@ -18,39 +23,46 @@ import {
18
23
  UpdatesContainer,
19
24
  FlagContainer
20
25
  } from './styles';
21
- import { BreakingArticleFlag } from '../article-flag/LiveArticleFlag';
22
- import safeDecodeURIComponent from '../../utils/safeDecodeURIComponent';
26
+
27
+ const anchorString = (updateTxt = '', headlineTxt = '') => {
28
+ const onlyNumbersReg = /\D+/g;
29
+ const onlyNumbers = updateTxt.replace(onlyNumbersReg, '');
30
+ const acronymReg = /\b(\w)/g;
31
+ const acronymMatch = headlineTxt.match(acronymReg);
32
+ const acronym = acronymMatch === null ? '' : acronymMatch.join('');
33
+ return `u_${onlyNumbers}${acronym}`;
34
+ };
23
35
 
24
36
  const ArticleHeader: React.FC<{
25
- updated: string;
37
+ date: string;
38
+ time: string;
26
39
  breaking?: string;
27
40
  headline?: string;
28
- }> = ({ updated, breaking, headline }) => {
41
+ }> = ({ date, time, breaking, headline }) => {
29
42
  const currentDateTime = new Date();
30
- const updatedDate = new Date(updated);
43
+
44
+ const updated = `${date} ${time}`;
45
+ const parsedDate = parse(updated, 'dd/MM/yyyy HH:mm', new Date());
46
+ const updatedDate = zonedTimeToUtc(parsedDate, 'Europe/London');
47
+
31
48
  const timeSincePublishing =
32
49
  formatDistanceStrict(updatedDate, currentDateTime, {
33
50
  roundingMethod: 'floor'
34
51
  }) + ' ago';
35
- const diffInSeconds = differenceInSeconds(currentDateTime, updatedDate);
36
- const anchorString = (updateTxt = '', headlineTxt = '') => {
37
- const onlyNumbersReg = /\D+/g;
38
- const onlyNumbers = updateTxt.replace(onlyNumbersReg, '');
39
- const acronymReg = /\b(\w)/g;
40
- const acronymMatch = headlineTxt.match(acronymReg);
41
- const acronym = acronymMatch === null ? '' : acronymMatch.join('');
42
- return `u_${onlyNumbers}${acronym}`;
43
- };
44
52
 
53
+ const diffInSeconds = differenceInSeconds(currentDateTime, updatedDate);
45
54
  const isLessThan1Minute = diffInSeconds < 60;
46
55
  const isLessThan1Hour = diffInSeconds < 60 * 60;
47
56
  const isLessThan13Hours = diffInSeconds < 60 * 60 * 13;
48
- const isDaysAgo = differenceInCalendarDays(currentDateTime, updatedDate) >= 1;
49
- const anchorPoint = anchorString(updated, headline);
57
+
58
+ const isDaysAgo = differenceInCalendarDays(currentDateTime, parsedDate) >= 1;
59
+
50
60
  const isBreaking = breaking
51
61
  ? Boolean(breaking.toLowerCase() === 'true')
52
62
  : false;
53
63
 
64
+ const anchorPoint = anchorString(updated, headline);
65
+
54
66
  return (
55
67
  <Container isBreaking={isBreaking && isLessThan1Hour} id={anchorPoint}>
56
68
  <UpdatesContainer>
@@ -60,30 +72,28 @@ const ArticleHeader: React.FC<{
60
72
  <BreakingArticleFlag />
61
73
  </FlagContainer>
62
74
  ) : null}
75
+
63
76
  {!isLessThan1Minute && isLessThan13Hours ? (
64
77
  <TimeSincePublishingContainer>
65
- <TimeSincePublishing
66
- isBreaking={isBreaking}
67
- data-testId="TimeSincePublishing"
68
- >
78
+ <TimeSincePublishing data-testId="TimeSincePublishing">
69
79
  {timeSincePublishing}
70
80
  </TimeSincePublishing>
71
81
  <Divider />
72
82
  </TimeSincePublishingContainer>
73
83
  ) : null}
84
+
74
85
  <UpdatedTime
75
86
  isLessThan13Hours={!isLessThan1Minute && isLessThan13Hours}
76
- data-testId="UpdatedTime"
77
87
  >
78
- {format(updatedDate, 'h.mmaaa')}
88
+ {format(parsedDate, 'h.mmaaa')}
79
89
  </UpdatedTime>
80
90
  </UpdatedTimeItems>
91
+
81
92
  {isDaysAgo ? (
82
- <UpdatedDate data-testid="UpdatedDate">
83
- {format(updatedDate, 'MMMM d yyyy')}
84
- </UpdatedDate>
93
+ <UpdatedDate>{format(parsedDate, 'MMMM d yyyy')}</UpdatedDate>
85
94
  ) : null}
86
95
  </UpdatesContainer>
96
+
87
97
  {headline && <Headline>{safeDecodeURIComponent(headline)}</Headline>}
88
98
  </Container>
89
99
  );
@@ -1,183 +1,151 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import '@testing-library/jest-dom';
4
+ import MockDate from 'mockdate';
4
5
 
5
6
  import ArticleHeader from '../ArticleHeader';
6
- import MockDate from 'mockdate';
7
7
 
8
8
  describe('ArticleHeader', () => {
9
- describe('In one calendar day', () => {
10
- const updated = '2021-12-31T06:30:00Z';
9
+ describe('Same calendar day during GMT', () => {
11
10
  afterEach(() => MockDate.reset());
12
- it('Within the first minute of update - Breaking', () => {
13
- MockDate.set('2021-12-31T06:30:00Z');
14
- const { baseElement, getByText, queryByTestId } = render(
15
- <ArticleHeader
16
- updated={updated}
17
- breaking="true"
18
- headline="This%20is%20the%20headline"
19
- />
11
+
12
+ const date = '31/12/2021';
13
+ const time = '06:30';
14
+
15
+ it('Within a minute of updating', () => {
16
+ MockDate.set('2021-12-31T06:30:10Z');
17
+
18
+ const { getByText, queryByTestId } = render(
19
+ <ArticleHeader date={date} time={time} />
20
20
  );
21
- expect(baseElement).toMatchSnapshot();
22
- expect(getByText('BREAKING')).toBeVisible();
23
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
21
+
24
22
  expect(getByText('6.30am')).toBeVisible();
25
23
  expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
26
- expect(queryByTestId('UpdatedDate')).toBeFalsy();
27
- expect(getByText('This is the headline')).toBeVisible();
28
24
  });
29
- it('Within the first minute of update - Not Breaking', () => {
30
- MockDate.set('2021-12-31T06:30:00Z');
31
- const { baseElement, getByText, queryByTestId, queryByText } = render(
32
- <ArticleHeader
33
- updated={updated}
34
- breaking="false"
35
- headline="This%20is%20the%20headline"
36
- />
37
- );
38
- expect(baseElement).toMatchSnapshot();
39
- expect(queryByText('BREAKING')).toBeFalsy();
40
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
25
+
26
+ it('Within an hour of updating', () => {
27
+ MockDate.set('2021-12-31T07:00:00Z');
28
+
29
+ const { getByText } = render(<ArticleHeader date={date} time={time} />);
30
+
41
31
  expect(getByText('6.30am')).toBeVisible();
42
- expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
43
- expect(queryByTestId('UpdatedDate')).toBeFalsy();
44
- expect(getByText('This is the headline')).toBeVisible();
32
+ expect(getByText('30 minutes ago')).toBeVisible();
45
33
  });
46
- it('Within the first minute of update - No headline not breaking', () => {
47
- MockDate.set('2021-12-31T06:30:00Z');
48
- const { baseElement, getByText, queryByTestId, queryByText } = render(
49
- <ArticleHeader updated={updated} />
34
+
35
+ it('Between 1 and 12 hours after updating', () => {
36
+ MockDate.set('2021-12-31T08:30:00Z');
37
+
38
+ const { getByText } = render(<ArticleHeader date={date} time={time} />);
39
+
40
+ expect(getByText('6.30am')).toBeVisible();
41
+ expect(getByText('2 hours ago')).toBeVisible();
42
+ });
43
+
44
+ it('After 12 hours but same calendar day', () => {
45
+ MockDate.set('2021-12-20T20:30:00Z');
46
+
47
+ const { getByText, queryByTestId } = render(
48
+ <ArticleHeader date={date} time={time} />
50
49
  );
51
- expect(baseElement).toMatchSnapshot();
52
- expect(queryByText('This is the headline')).toBeFalsy();
53
- expect(queryByText('BREAKING')).toBeFalsy();
54
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
50
+
55
51
  expect(getByText('6.30am')).toBeVisible();
56
52
  expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
57
- expect(queryByTestId('UpdatedDate')).toBeFalsy();
58
53
  });
59
- it('within an hour of updating', () => {
54
+
55
+ it('With breaking flag and headline', () => {
60
56
  MockDate.set('2021-12-31T07:00:00Z');
61
- const { getByText, queryByTestId } = render(
57
+
58
+ const { baseElement, getByText } = render(
62
59
  <ArticleHeader
63
- updated={updated}
60
+ date={date}
61
+ time={time}
64
62
  breaking="true"
65
63
  headline="This%20is%20the%20headline"
66
64
  />
67
65
  );
68
- expect(getByText('BREAKING')).toBeVisible();
69
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
66
+
70
67
  expect(getByText('6.30am')).toBeVisible();
71
- expect(queryByTestId('TimeSincePublishing')).toBeTruthy();
72
68
  expect(getByText('30 minutes ago')).toBeVisible();
73
- expect(queryByTestId('UpdatedDate')).toBeFalsy();
69
+ expect(getByText('BREAKING')).toBeVisible();
74
70
  expect(getByText('This is the headline')).toBeVisible();
71
+
72
+ expect(baseElement).toMatchSnapshot();
75
73
  });
76
- it('between 1 and 12 hours after update time', () => {
74
+
75
+ it('With breaking flag expired', () => {
77
76
  MockDate.set('2021-12-31T08:30:00Z');
78
- const { getByText, queryByTestId, queryByText } = render(
79
- <ArticleHeader
80
- updated={updated}
81
- breaking="true"
82
- headline="This%20is%20the%20headline"
83
- />
77
+
78
+ const { getByText, queryByText } = render(
79
+ <ArticleHeader date={date} time={time} breaking="true" />
84
80
  );
85
- expect(queryByText('BREAKING')).toBeFalsy();
86
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
81
+
87
82
  expect(getByText('6.30am')).toBeVisible();
88
- expect(queryByTestId('TimeSincePublishing')).toBeTruthy();
89
83
  expect(getByText('2 hours ago')).toBeVisible();
90
- expect(queryByTestId('UpdatedDate')).toBeFalsy();
91
- expect(getByText('This is the headline')).toBeVisible();
92
- });
93
- it('after 12 hours but on the same calendar day', () => {
94
- MockDate.set('2021-12-31T19:30:00Z');
95
- const { getByText, queryByTestId, queryByText } = render(
96
- <ArticleHeader
97
- updated={updated}
98
- breaking="true"
99
- headline="This%20is%20the%20headline"
100
- />
101
- );
102
84
  expect(queryByText('BREAKING')).toBeFalsy();
103
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
104
- expect(getByText('6.30am')).toBeVisible();
105
- expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
106
- expect(queryByTestId('UpdatedDate')).toBeFalsy();
107
- expect(getByText('This is the headline')).toBeVisible();
108
85
  });
109
86
  });
110
- describe('Across calendar days', () => {
111
- const updated = '2021-12-31T23:30:00Z';
87
+
88
+ describe('Same calendar day during BST', () => {
112
89
  afterEach(() => MockDate.reset());
113
- it('within an hour of updating but on a different calendar day', () => {
114
- MockDate.set('2022-01-01T00:29:00Z');
115
- const { getByTestId, queryByTestId, getByText } = render(
116
- <ArticleHeader
117
- updated={updated}
118
- breaking="true"
119
- headline="This%20is%20the%20headline"
120
- />
90
+
91
+ const date = '20/04/2022';
92
+ const time = '06:30';
93
+
94
+ it('Within a minute of updating', () => {
95
+ MockDate.set('2022-04-20T06:30:10+01:00');
96
+
97
+ const { getByText, queryByTestId } = render(
98
+ <ArticleHeader date={date} time={time} />
121
99
  );
122
- expect(getByText('BREAKING')).toBeVisible();
123
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
124
- expect(getByText('11.30pm')).toBeVisible();
125
- expect(getByTestId('TimeSincePublishing')).toBeTruthy();
126
- expect(getByTestId('UpdatedDate')).toBeVisible();
127
- expect(getByText('December 31 2021')).toBeVisible();
128
- expect(getByText('This is the headline')).toBeVisible();
100
+
101
+ expect(getByText('6.30am')).toBeVisible();
102
+ expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
129
103
  });
130
- it('between 1-12 hours of updating but on a different calendar day', () => {
131
- MockDate.set('2022-01-01T02:00:00Z');
132
- const { getByTestId, queryByText, queryByTestId, getByText } = render(
133
- <ArticleHeader
134
- updated={updated}
135
- breaking="true"
136
- headline="This%20is%20the%20headline"
137
- />
138
- );
139
- expect(queryByText('BREAKING')).toBeFalsy();
140
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
141
- expect(getByText('11.30pm')).toBeVisible();
142
- expect(getByTestId('TimeSincePublishing')).toBeTruthy();
104
+
105
+ it('Within an hour of updating', () => {
106
+ MockDate.set('2022-04-20T07:00:00+01:00');
107
+
108
+ const { getByText } = render(<ArticleHeader date={date} time={time} />);
109
+
110
+ expect(getByText('6.30am')).toBeVisible();
111
+ expect(getByText('30 minutes ago')).toBeVisible();
112
+ });
113
+
114
+ it('Between 1 and 12 hours after updating', () => {
115
+ MockDate.set('2022-04-20T08:30:00+01:00');
116
+
117
+ const { getByText } = render(<ArticleHeader date={date} time={time} />);
118
+
119
+ expect(getByText('6.30am')).toBeVisible();
143
120
  expect(getByText('2 hours ago')).toBeVisible();
144
- expect(getByTestId('UpdatedDate')).toBeVisible();
145
- expect(getByText('December 31 2021')).toBeVisible();
146
- expect(getByText('This is the headline')).toBeVisible();
147
121
  });
148
- it('after 12 hours but on a different calendar day', () => {
149
- MockDate.set('2022-01-01T14:30:00Z');
150
- const { getByTestId, queryByText, queryByTestId, getByText } = render(
151
- <ArticleHeader
152
- updated={updated}
153
- breaking="true"
154
- headline="This%20is%20the%20headline"
155
- />
122
+
123
+ it('After 12 hours but same calendar day', () => {
124
+ MockDate.set('2022-04-20T20:30:00+01:00');
125
+
126
+ const { getByText, queryByTestId } = render(
127
+ <ArticleHeader date={date} time={time} />
156
128
  );
157
- expect(queryByText('BREAKING')).toBeFalsy();
158
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
159
- expect(getByText('11.30pm')).toBeVisible();
129
+
130
+ expect(getByText('6.30am')).toBeVisible();
160
131
  expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
161
- expect(getByTestId('UpdatedDate')).toBeVisible();
162
- expect(getByText('December 31 2021')).toBeVisible();
163
- expect(getByText('This is the headline')).toBeVisible();
164
132
  });
165
- it('after multiple calendar days', () => {
166
- MockDate.set('2022-01-03T14:30:00Z');
167
- const { getByTestId, queryByText, queryByTestId, getByText } = render(
168
- <ArticleHeader
169
- updated={updated}
170
- breaking="true"
171
- headline="This%20is%20the%20headline"
172
- />
173
- );
174
- expect(queryByText('BREAKING')).toBeFalsy();
175
- expect(queryByTestId('UpdatedTime')).toBeTruthy();
176
- expect(getByText('11.30pm')).toBeVisible();
177
- expect(queryByTestId('TimeSincePublishing')).toBeFalsy();
178
- expect(getByTestId('UpdatedDate')).toBeVisible();
133
+ });
134
+
135
+ describe('Different calendar days', () => {
136
+ afterEach(() => MockDate.reset());
137
+
138
+ const date = '31/12/2021';
139
+ const time = '22:30';
140
+
141
+ it('Between 1 and 12 hours after updating', () => {
142
+ MockDate.set('2022-01-01T02:30:00Z');
143
+
144
+ const { getByText } = render(<ArticleHeader date={date} time={time} />);
145
+
146
+ expect(getByText('10.30pm')).toBeVisible();
147
+ expect(getByText('4 hours ago')).toBeVisible();
179
148
  expect(getByText('December 31 2021')).toBeVisible();
180
- expect(getByText('This is the headline')).toBeVisible();
181
149
  });
182
150
  });
183
151
  });
@@ -1,36 +1,36 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`ArticleHeader In one calendar day Within the first minute of update - Breaking 1`] = `
3
+ exports[`ArticleHeader Same calendar day during GMT With breaking flag and headline 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <div
7
- class="sc-bdVaJa cQBRMp"
8
- id="u_20211231063000T222"
7
+ class="sc-VigVT esKZlx"
8
+ id="u_311220210630T222"
9
9
  >
10
10
  <div
11
- class="sc-bwzfXH htoLMg"
11
+ class="sc-jTzLTM hsNKrf"
12
12
  >
13
13
  <div
14
- class="sc-ifAKCX iDsMnF"
14
+ class="sc-cSHVUG jdArUK"
15
15
  >
16
16
  <div
17
- class="sc-dnqmqq bGasAc"
17
+ class="sc-kpOJdX pPyiu"
18
18
  >
19
19
  <div
20
- class="sc-fjdhpX Vdnui"
20
+ class="sc-EHOje cfBXHC"
21
21
  >
22
22
  <div
23
- class="sc-iwsKbI fqYeBv"
23
+ class="sc-bdVaJa bkSKmo"
24
24
  >
25
25
  <div
26
- class="sc-gqjmRU cTMoEm"
26
+ class="sc-htpNat jcRSar"
27
27
  >
28
28
  <div
29
- class="sc-VigVT rGeCL"
29
+ class="sc-bxivhb hTEbzV"
30
30
  />
31
31
  </div>
32
32
  <span
33
- class="sc-gZMcBi iBeFrd"
33
+ class="sc-bwzfXH hBgZUv"
34
34
  >
35
35
  BREAKING
36
36
  </span>
@@ -38,72 +38,27 @@ exports[`ArticleHeader In one calendar day Within the first minute of update - B
38
38
  </div>
39
39
  </div>
40
40
  <div
41
- class="sc-EHOje cDoFHw"
42
- data-testid="UpdatedTime"
41
+ class="sc-fjdhpX eXIoUS"
43
42
  >
44
- 6.30am
45
- </div>
46
- </div>
47
- </div>
48
- <h2
49
- class="sc-htoDjs ccbbfo"
50
- >
51
- This is the headline
52
- </h2>
53
- </div>
54
- </div>
55
- </body>
56
- `;
57
-
58
- exports[`ArticleHeader In one calendar day Within the first minute of update - No headline not breaking 1`] = `
59
- <body>
60
- <div>
61
- <div
62
- class="sc-bdVaJa fLcQHz"
63
- id="u_20211231063000"
64
- >
65
- <div
66
- class="sc-bwzfXH htoLMg"
67
- >
68
- <div
69
- class="sc-ifAKCX iDsMnF"
70
- >
71
- <div
72
- class="sc-EHOje cDoFHw"
73
- data-testid="UpdatedTime"
74
- >
75
- 6.30am
43
+ <div
44
+ class="sc-jzJRlG ektXhQ"
45
+ data-testid="TimeSincePublishing"
46
+ >
47
+ 30 minutes ago
48
+ </div>
49
+ <div
50
+ class="sc-kgoBCf gsnOug"
51
+ />
76
52
  </div>
77
- </div>
78
- </div>
79
- </div>
80
- </div>
81
- </body>
82
- `;
83
-
84
- exports[`ArticleHeader In one calendar day Within the first minute of update - Not Breaking 1`] = `
85
- <body>
86
- <div>
87
- <div
88
- class="sc-bdVaJa fLcQHz"
89
- id="u_20211231063000T222"
90
- >
91
- <div
92
- class="sc-bwzfXH htoLMg"
93
- >
94
- <div
95
- class="sc-ifAKCX iDsMnF"
96
- >
97
53
  <div
98
- class="sc-EHOje cDoFHw"
99
- data-testid="UpdatedTime"
54
+ class="sc-kAzzGY cABvZX"
100
55
  >
101
56
  6.30am
102
57
  </div>
103
58
  </div>
104
59
  </div>
105
60
  <h2
106
- class="sc-htoDjs ccbbfo"
61
+ class="sc-kGXeez crUIWF"
107
62
  >
108
63
  This is the headline
109
64
  </h2>
@@ -31,7 +31,7 @@ export const TimeSincePublishingContainer = styled.div`
31
31
  flex-direction: row;
32
32
  `;
33
33
 
34
- export const TimeSincePublishing = styled.div<{ isBreaking?: boolean }>`
34
+ export const TimeSincePublishing = styled.div`
35
35
  color: ${colours.functional.brandColour};
36
36
  font-family: ${fonts.supporting};
37
37
  font-size: 14px;
@@ -63,7 +63,7 @@ export const UpdatedDate = styled.div`
63
63
  export const Divider = styled.div`
64
64
  background-color: ${colours.functional.greyLabel};
65
65
  width: 1px;
66
- margin: 2px 8px 6px 12px;
66
+ margin: 2px 8px 6px 8px;
67
67
  `;
68
68
 
69
69
  export const Headline = styled.h2`