@quintype/seo 1.49.3-article-image-array-schema.0 → 1.49.3-article-image-array-schema.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,1237 +0,0 @@
|
|
|
1
|
-
const { StructuredDataTags } = require("..");
|
|
2
|
-
const { getSeoMetadata, assertContains, assertDoesNotContains } = require("./utils");
|
|
3
|
-
|
|
4
|
-
const assert = require("assert");
|
|
5
|
-
const url = require("url");
|
|
6
|
-
|
|
7
|
-
const organization = {
|
|
8
|
-
name: "Quintype",
|
|
9
|
-
url: "http://www.quintype.com/",
|
|
10
|
-
logo: "https://quintype.com/logo.png",
|
|
11
|
-
sameAs: [
|
|
12
|
-
"https://www.facebook.com/quintype",
|
|
13
|
-
"https://twitter.com/quintype_inc",
|
|
14
|
-
"https://plus.google.com/+quintype",
|
|
15
|
-
"https://www.youtube.com/user/Quintype",
|
|
16
|
-
],
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const website = {
|
|
20
|
-
url: "https://madrid.quintype.io",
|
|
21
|
-
searchpath: "search?q={query}",
|
|
22
|
-
queryinput: "required name=query",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const header = {
|
|
26
|
-
cssSelector: "#header",
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const footer = {
|
|
30
|
-
cssSelector: "#footer",
|
|
31
|
-
};
|
|
32
|
-
function getSeoConfig({
|
|
33
|
-
newsArticle = false,
|
|
34
|
-
liveBlog = false,
|
|
35
|
-
video = false,
|
|
36
|
-
storyUrlAsMainEntityUrl = false,
|
|
37
|
-
stripHtmlFromArticleBody = false,
|
|
38
|
-
headerConfig,
|
|
39
|
-
footerConfig,
|
|
40
|
-
authorSchema = [],
|
|
41
|
-
} = {}) {
|
|
42
|
-
return {
|
|
43
|
-
generators: [StructuredDataTags],
|
|
44
|
-
structuredData: {
|
|
45
|
-
organization,
|
|
46
|
-
website,
|
|
47
|
-
header: headerConfig,
|
|
48
|
-
footer: footerConfig,
|
|
49
|
-
enableNewsArticle: newsArticle,
|
|
50
|
-
enableLiveBlog: liveBlog,
|
|
51
|
-
enableVideo: video,
|
|
52
|
-
authorSchema: () => authorSchema,
|
|
53
|
-
stripHtmlFromArticleBody: stripHtmlFromArticleBody,
|
|
54
|
-
storyUrlAsMainEntityUrl: storyUrlAsMainEntityUrl,
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function sampleAuthorsData() {
|
|
60
|
-
return [
|
|
61
|
-
{
|
|
62
|
-
id: 482995,
|
|
63
|
-
name: "Greeshma",
|
|
64
|
-
slug: "greeshma",
|
|
65
|
-
"avatar-url":
|
|
66
|
-
"https://images.assettype.com/quintype-demo/2018-03/9a16b150-6281-45e6-bdb9-6eb1146e1a54/50b1da06-b478-4bc8-8067-fada337c55d0.jpeg",
|
|
67
|
-
"avatar-s3-key":
|
|
68
|
-
"quintype-demo/2018-03/9a16b150-6281-45e6-bdb9-6eb1146e1a54/50b1da06-b478-4bc8-8067-fada337c55d0.jpeg",
|
|
69
|
-
"twitter-handle": null,
|
|
70
|
-
bio: null,
|
|
71
|
-
},
|
|
72
|
-
];
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function sampleStoryData(template, cards, authors, access, opts) {
|
|
76
|
-
return {
|
|
77
|
-
data: {
|
|
78
|
-
story: {
|
|
79
|
-
"story-template": template,
|
|
80
|
-
access: access,
|
|
81
|
-
seo: {
|
|
82
|
-
"meta-description": "",
|
|
83
|
-
"meta-title": " Why publishers need to use personalised content",
|
|
84
|
-
"meta-keywords": [],
|
|
85
|
-
"meta-google-news-standout": false,
|
|
86
|
-
"claim-reviews": {
|
|
87
|
-
story: null,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
"author-name": "Greeshma",
|
|
91
|
-
tags: [],
|
|
92
|
-
sections: [
|
|
93
|
-
{
|
|
94
|
-
slug: "section-name",
|
|
95
|
-
name: "Section Name",
|
|
96
|
-
id: 3920,
|
|
97
|
-
"parent-id": 2584,
|
|
98
|
-
"display-name": "Section Name",
|
|
99
|
-
collection: {
|
|
100
|
-
slug: "section-name",
|
|
101
|
-
name: "Section Name",
|
|
102
|
-
id: 9000,
|
|
103
|
-
},
|
|
104
|
-
data: null,
|
|
105
|
-
},
|
|
106
|
-
],
|
|
107
|
-
headline: "Personalise or perish - Why publishers need to use personalised content",
|
|
108
|
-
slug: "politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content",
|
|
109
|
-
"last-published-at": 1524204205102,
|
|
110
|
-
alternative: {
|
|
111
|
-
home: {
|
|
112
|
-
default: {
|
|
113
|
-
headline: "Personalise or perish",
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
"content-created-at": 1519814417485,
|
|
118
|
-
"owner-name": "Greeshma",
|
|
119
|
-
"hero-image-metadata": {
|
|
120
|
-
width: 1920,
|
|
121
|
-
height: 1280,
|
|
122
|
-
"mime-type": "image/jpeg",
|
|
123
|
-
"focus-point": [931, 901],
|
|
124
|
-
},
|
|
125
|
-
"published-at": 1524204205102,
|
|
126
|
-
summary: "Personalised content marketing is the slayer weapon in this war for attention and engagement.",
|
|
127
|
-
"hero-image-s3-key":
|
|
128
|
-
"quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg",
|
|
129
|
-
cards: cards,
|
|
130
|
-
"content-updated-at": 1524204468980,
|
|
131
|
-
"first-published-at": 1519816264773,
|
|
132
|
-
"created-at": 1524204200588,
|
|
133
|
-
"updated-at": 1524204200588,
|
|
134
|
-
authors: authors,
|
|
135
|
-
metadata: {
|
|
136
|
-
"card-share": {
|
|
137
|
-
shareable: true,
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
"publish-at": null,
|
|
141
|
-
...opts,
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
config: {
|
|
145
|
-
"cdn-image": "images.assettype.com",
|
|
146
|
-
"sketches-host": "https://madrid.quintype.io",
|
|
147
|
-
"publisher-name": "quintype-demo",
|
|
148
|
-
"publisher-settings": {
|
|
149
|
-
title: "Quintype Demo",
|
|
150
|
-
copyright: "© quintype-demo 2018",
|
|
151
|
-
},
|
|
152
|
-
"social-links": {
|
|
153
|
-
"facebook-url": "https://www.facebook.com/quintypeinc",
|
|
154
|
-
"twitter-url": "https://twitter.com/quintype_inc",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const sampleOrganisationTag =
|
|
161
|
-
'<script type="application/ld+json">{"name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"@type":"Organization","@context":"http://schema.org"}</script>';
|
|
162
|
-
const sampleWebsiteTag =
|
|
163
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"Website","url":"https://madrid.quintype.io","interactivityType":"mixed","copyrightHolder":{"@type":"Organization"},"potentialAction":{"@type":"SearchAction","target":"https://madrid.quintype.io/search?q={query}","query-input":"required name=query"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io"}}</script>';
|
|
164
|
-
const sampleHeaderTag =
|
|
165
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"WPHeader","cssSelector":"#header"}</script>';
|
|
166
|
-
const sampleFooterTag =
|
|
167
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"WPFooter","cssSelector":"#footer"}</script>';
|
|
168
|
-
const sampleBreadcrumbListTag =
|
|
169
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Film","item":"https://madrid.quintype.io/film"}]}</script>';
|
|
170
|
-
|
|
171
|
-
describe("StructuredDataTags", function () {
|
|
172
|
-
it("puts the organization & website tag", function () {
|
|
173
|
-
const string = getSeoMetadata(getSeoConfig({}), {}, "home-page", {}, { url: url.parse("/") });
|
|
174
|
-
assertContains(sampleOrganisationTag + sampleWebsiteTag, string);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it("puts the organization tag for home page not for other pages", function () {
|
|
178
|
-
const string = getSeoMetadata(getSeoConfig({}), {}, "home-page", {}, { url: url.parse("/") });
|
|
179
|
-
assertContains(sampleOrganisationTag + sampleWebsiteTag, string);
|
|
180
|
-
const storyString = getSeoMetadata(
|
|
181
|
-
getSeoConfig({ newsArticle: false }),
|
|
182
|
-
{},
|
|
183
|
-
"story-page",
|
|
184
|
-
sampleStoryData(null, [], sampleAuthorsData()),
|
|
185
|
-
{ url: url.parse("/") }
|
|
186
|
-
);
|
|
187
|
-
const storyStringAmp = getSeoMetadata(
|
|
188
|
-
getSeoConfig({ newsArticle: false }),
|
|
189
|
-
{},
|
|
190
|
-
"story-page-amp",
|
|
191
|
-
sampleStoryData(null, [], sampleAuthorsData()),
|
|
192
|
-
{ url: url.parse("/") }
|
|
193
|
-
);
|
|
194
|
-
assertContains(
|
|
195
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
196
|
-
storyString
|
|
197
|
-
);
|
|
198
|
-
assertContains(
|
|
199
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
200
|
-
storyStringAmp
|
|
201
|
-
);
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
it("should not break and don't show structured data if header & footer config is not present", function () {
|
|
205
|
-
const string = getSeoMetadata(getSeoConfig(), {}, "home-page", {}, { url: url.parse("/") });
|
|
206
|
-
assertDoesNotContains(sampleHeaderTag + sampleFooterTag, string);
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
it("shoult put the header & footer tag", function () {
|
|
210
|
-
const string = getSeoMetadata(
|
|
211
|
-
getSeoConfig({ headerConfig: header, footerConfig: footer }),
|
|
212
|
-
{},
|
|
213
|
-
"home-page",
|
|
214
|
-
{},
|
|
215
|
-
{ url: url.parse("/") }
|
|
216
|
-
);
|
|
217
|
-
assertContains(sampleHeaderTag + sampleFooterTag, string);
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
describe("with news article data ", function () {
|
|
221
|
-
it("puts the news article when enableNewsArticle truthy in theme-attributes config", function () {
|
|
222
|
-
const cards = [
|
|
223
|
-
{
|
|
224
|
-
"card-added-at": 1519816264773,
|
|
225
|
-
"card-updated-at": 1524204205102,
|
|
226
|
-
"story-elements": [
|
|
227
|
-
{
|
|
228
|
-
type: "title",
|
|
229
|
-
text: "BQ Live: Hot Money",
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
type: "jsembed",
|
|
233
|
-
metadata: {
|
|
234
|
-
"vidible-video-id": "59bb646192fdde488f02624e",
|
|
235
|
-
},
|
|
236
|
-
subtype: "vidible-video",
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"image-s3-key": "bloombergquint/2018-07/99423a77-d39a-4803-94c9-1bdc33f95cc6/OI_July_4.PNG",
|
|
240
|
-
type: "image",
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
type: "text",
|
|
244
|
-
text: "BQ Live: Hot Money and stocks",
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
type: "text",
|
|
248
|
-
text: "BQ Live: Hot Money and stocks body",
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"card-added-at": 1519816264773,
|
|
254
|
-
"card-updated-at": 1524204205102,
|
|
255
|
-
"story-elements": [
|
|
256
|
-
{
|
|
257
|
-
type: "title",
|
|
258
|
-
text: "BQ Live: Hot Money",
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
type: "text",
|
|
262
|
-
text: "BQ Live: Hot Money and stocks body-2",
|
|
263
|
-
},
|
|
264
|
-
],
|
|
265
|
-
},
|
|
266
|
-
];
|
|
267
|
-
const string = getSeoMetadata(
|
|
268
|
-
getSeoConfig({ newsArticle: true, storyUrlAsMainEntityUrl: true }),
|
|
269
|
-
{},
|
|
270
|
-
"story-page",
|
|
271
|
-
sampleStoryData(null, cards, sampleAuthorsData(), null),
|
|
272
|
-
{ url: url.parse("/") },
|
|
273
|
-
null
|
|
274
|
-
);
|
|
275
|
-
const ampPageString = getSeoMetadata(
|
|
276
|
-
getSeoConfig({ newsArticle: true, storyUrlAsMainEntityUrl: true }),
|
|
277
|
-
{},
|
|
278
|
-
"story-page-amp",
|
|
279
|
-
sampleStoryData(null, cards, sampleAuthorsData(), null),
|
|
280
|
-
{ url: url.parse("/") },
|
|
281
|
-
null
|
|
282
|
-
);
|
|
283
|
-
assertContains(
|
|
284
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"BQ Live: Hot Money and stocks.BQ Live: Hot Money and stocks body.BQ Live: Hot Money and stocks body-2","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"BQ Live: Hot Money and stocks.BQ Live: Hot Money and stocks body.BQ Live: Hot Money and stocks body-2","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
285
|
-
string
|
|
286
|
-
);
|
|
287
|
-
assertContains(
|
|
288
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"BQ Live: Hot Money and stocks.BQ Live: Hot Money and stocks body.BQ Live: Hot Money and stocks body-2","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"BQ Live: Hot Money and stocks.BQ Live: Hot Money and stocks body.BQ Live: Hot Money and stocks body-2","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
289
|
-
ampPageString
|
|
290
|
-
);
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
it("puts the`NewsArticle` and removes `Article` when enableNewsArticle value is `withoutArticleSchema` in theme-attributes config", function () {
|
|
294
|
-
const cards = [
|
|
295
|
-
{
|
|
296
|
-
"card-added-at": 1519816264773,
|
|
297
|
-
"card-updated-at": 1524204205102,
|
|
298
|
-
"story-elements": [
|
|
299
|
-
{
|
|
300
|
-
type: "title",
|
|
301
|
-
text: "BQ Live: Hot Money",
|
|
302
|
-
},
|
|
303
|
-
],
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"card-added-at": 1519816264773,
|
|
307
|
-
"card-updated-at": 1524204205102,
|
|
308
|
-
"story-elements": [
|
|
309
|
-
{
|
|
310
|
-
type: "text",
|
|
311
|
-
text: "Content of the story",
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
type: "text",
|
|
315
|
-
text: "Hot Money and stocks body-2",
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
},
|
|
319
|
-
];
|
|
320
|
-
const string = getSeoMetadata(
|
|
321
|
-
getSeoConfig({
|
|
322
|
-
newsArticle: "withoutArticleSchema",
|
|
323
|
-
storyUrlAsMainEntityUrl: true,
|
|
324
|
-
}),
|
|
325
|
-
{},
|
|
326
|
-
"story-page",
|
|
327
|
-
sampleStoryData(null, cards, sampleAuthorsData(), null),
|
|
328
|
-
{ url: url.parse("/") },
|
|
329
|
-
null
|
|
330
|
-
);
|
|
331
|
-
const expectedString = '"@type":"Article","@context":"http://schema.org"}';
|
|
332
|
-
assertDoesNotContains(expectedString, string);
|
|
333
|
-
});
|
|
334
|
-
describe("with isAccessibleForFree", function () {
|
|
335
|
-
it("has no value when access is 'null' or 'public' or 'login'", function () {
|
|
336
|
-
const string1 = getSeoMetadata(
|
|
337
|
-
getSeoConfig({ newsArticle: true }),
|
|
338
|
-
{},
|
|
339
|
-
"story-page",
|
|
340
|
-
sampleStoryData(null, [], sampleAuthorsData(), null),
|
|
341
|
-
{ url: url.parse("/") },
|
|
342
|
-
null
|
|
343
|
-
);
|
|
344
|
-
assertContains(
|
|
345
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
346
|
-
string1
|
|
347
|
-
);
|
|
348
|
-
const string2 = getSeoMetadata(
|
|
349
|
-
getSeoConfig({ newsArticle: true }),
|
|
350
|
-
{},
|
|
351
|
-
"story-page",
|
|
352
|
-
sampleStoryData(null, [], sampleAuthorsData(), "public"),
|
|
353
|
-
{ url: url.parse("/") },
|
|
354
|
-
null
|
|
355
|
-
);
|
|
356
|
-
assertContains(
|
|
357
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
358
|
-
string2
|
|
359
|
-
);
|
|
360
|
-
const string3 = getSeoMetadata(
|
|
361
|
-
getSeoConfig({ newsArticle: true }),
|
|
362
|
-
{},
|
|
363
|
-
"story-page",
|
|
364
|
-
sampleStoryData(null, [], sampleAuthorsData(), "login"),
|
|
365
|
-
{ url: url.parse("/") },
|
|
366
|
-
null
|
|
367
|
-
);
|
|
368
|
-
assertContains(
|
|
369
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
370
|
-
string3
|
|
371
|
-
);
|
|
372
|
-
});
|
|
373
|
-
it("has false when access is 'subscription'", function () {
|
|
374
|
-
const string = getSeoMetadata(
|
|
375
|
-
getSeoConfig({ newsArticle: true }),
|
|
376
|
-
{},
|
|
377
|
-
"story-page",
|
|
378
|
-
sampleStoryData(null, [], sampleAuthorsData(), "subscription"),
|
|
379
|
-
{ url: url.parse("/") },
|
|
380
|
-
null
|
|
381
|
-
);
|
|
382
|
-
assertContains(
|
|
383
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isAccessibleForFree":false,"isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isAccessibleForFree":false,"isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","isAccessibleForFree":false,"cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
384
|
-
string
|
|
385
|
-
);
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
it("has muli domain support", function () {
|
|
390
|
-
const string = getSeoMetadata(
|
|
391
|
-
getSeoConfig({ newsArticle: true, storyUrlAsMainEntityUrl: true }),
|
|
392
|
-
{},
|
|
393
|
-
"story-page",
|
|
394
|
-
sampleStoryData(null, [], sampleAuthorsData(), null, {
|
|
395
|
-
url: "https://foo.com/",
|
|
396
|
-
}),
|
|
397
|
-
{ url: url.parse("/") },
|
|
398
|
-
null
|
|
399
|
-
);
|
|
400
|
-
const ampPageString = getSeoMetadata(
|
|
401
|
-
getSeoConfig({ newsArticle: true, storyUrlAsMainEntityUrl: true }),
|
|
402
|
-
{},
|
|
403
|
-
"story-page-amp",
|
|
404
|
-
sampleStoryData(null, [], sampleAuthorsData(), null, {
|
|
405
|
-
url: "https://foo.com/",
|
|
406
|
-
}),
|
|
407
|
-
{ url: url.parse("/") },
|
|
408
|
-
null
|
|
409
|
-
);
|
|
410
|
-
assertContains("https://foo.com", string);
|
|
411
|
-
assertContains("https://foo.com", ampPageString);
|
|
412
|
-
});
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
describe("without news article data ", function () {
|
|
416
|
-
it("puts only the article tag when enableNewsArticle false in theme-attributes config", function () {
|
|
417
|
-
const string = getSeoMetadata(
|
|
418
|
-
getSeoConfig({ newsArticle: false }),
|
|
419
|
-
{},
|
|
420
|
-
"story-page",
|
|
421
|
-
sampleStoryData(null, [], sampleAuthorsData()),
|
|
422
|
-
{ url: url.parse("/") }
|
|
423
|
-
);
|
|
424
|
-
const ampPageString = getSeoMetadata(
|
|
425
|
-
getSeoConfig({ newsArticle: false }),
|
|
426
|
-
{},
|
|
427
|
-
"story-page-amp",
|
|
428
|
-
sampleStoryData(null, [], sampleAuthorsData()),
|
|
429
|
-
{ url: url.parse("/") }
|
|
430
|
-
);
|
|
431
|
-
assertContains(
|
|
432
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
433
|
-
string
|
|
434
|
-
);
|
|
435
|
-
assertContains(
|
|
436
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
437
|
-
ampPageString
|
|
438
|
-
);
|
|
439
|
-
});
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
describe("with authors value null in article data", function () {
|
|
443
|
-
it("should fallback to the given author-name", function () {
|
|
444
|
-
const string = getSeoMetadata(getSeoConfig({}), {}, "story-page", sampleStoryData(null, [], null));
|
|
445
|
-
const ampPageString = getSeoMetadata(getSeoConfig({}), {}, "story-page-amp", sampleStoryData(null, [], null));
|
|
446
|
-
assertContains(
|
|
447
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
448
|
-
string
|
|
449
|
-
);
|
|
450
|
-
assertContains(
|
|
451
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
452
|
-
ampPageString
|
|
453
|
-
);
|
|
454
|
-
});
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
describe("with authors value an empty array in article data", function () {
|
|
458
|
-
it("should fallback to the given author-name", function () {
|
|
459
|
-
const string = getSeoMetadata(getSeoConfig({}), {}, "story-page", sampleStoryData(null, [], []));
|
|
460
|
-
const ampPageString = getSeoMetadata(getSeoConfig({}), {}, "story-page", sampleStoryData(null, [], []));
|
|
461
|
-
assertContains(
|
|
462
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
463
|
-
string
|
|
464
|
-
);
|
|
465
|
-
assertContains(
|
|
466
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
467
|
-
ampPageString
|
|
468
|
-
);
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
describe("articleBody content", function () {
|
|
473
|
-
const cards = [
|
|
474
|
-
{
|
|
475
|
-
"card-added-at": 1519816264773,
|
|
476
|
-
"card-updated-at": 1524204205102,
|
|
477
|
-
"story-elements": [
|
|
478
|
-
{
|
|
479
|
-
type: "title",
|
|
480
|
-
text: "BQ Live: Hot Money",
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
type: "jsembed",
|
|
484
|
-
metadata: {
|
|
485
|
-
"vidible-video-id": "59bb646192fdde488f02624e",
|
|
486
|
-
},
|
|
487
|
-
subtype: "vidible-video",
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
"image-s3-key": "bloombergquint/2018-07/99423a77-d39a-4803-94c9-1bdc33f95cc6/OI_July_4.PNG",
|
|
491
|
-
type: "image",
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
type: "text",
|
|
495
|
-
text: "<p>BQ Live: Hot Money and stocks</p>",
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
type: "text",
|
|
499
|
-
text: "<p>BQ Live: Hot Money and stocks body</p>",
|
|
500
|
-
},
|
|
501
|
-
],
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"card-added-at": 1519816264773,
|
|
505
|
-
"card-updated-at": 1524204205102,
|
|
506
|
-
"story-elements": [
|
|
507
|
-
{
|
|
508
|
-
type: "title",
|
|
509
|
-
text: "BQ Live: Hot Money",
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
type: "text",
|
|
513
|
-
text: "<p>BQ Live: Hot Money and stocks body-2</p>",
|
|
514
|
-
},
|
|
515
|
-
],
|
|
516
|
-
},
|
|
517
|
-
];
|
|
518
|
-
it("should strip down html tags from articleBody if the stripHtmlFromArticleBody is true", function () {
|
|
519
|
-
const string = getSeoMetadata(
|
|
520
|
-
getSeoConfig({
|
|
521
|
-
newsArticle: true,
|
|
522
|
-
storyUrlAsMainEntityUrl: true,
|
|
523
|
-
stripHtmlFromArticleBody: true,
|
|
524
|
-
}),
|
|
525
|
-
{},
|
|
526
|
-
"story-page",
|
|
527
|
-
sampleStoryData(null, cards, sampleAuthorsData(), null)
|
|
528
|
-
);
|
|
529
|
-
assertContains(
|
|
530
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"BQ Live: Hot Money and stocks.BQ Live: Hot Money and stocks body.BQ Live: Hot Money and stocks body-2","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"BQ Live: Hot Money and stocks.BQ Live: Hot Money and stocks body.BQ Live: Hot Money and stocks body-2","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
531
|
-
string
|
|
532
|
-
);
|
|
533
|
-
});
|
|
534
|
-
it("should not strip down html tags from articleBody if the stripHtmlFromArticleBody is false", function () {
|
|
535
|
-
const string = getSeoMetadata(
|
|
536
|
-
getSeoConfig({
|
|
537
|
-
newsArticle: true,
|
|
538
|
-
storyUrlAsMainEntityUrl: true,
|
|
539
|
-
stripHtmlFromArticleBody: false,
|
|
540
|
-
}),
|
|
541
|
-
{},
|
|
542
|
-
"story-page",
|
|
543
|
-
sampleStoryData(null, cards, sampleAuthorsData(), null)
|
|
544
|
-
);
|
|
545
|
-
assertContains(
|
|
546
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"<p>BQ Live: Hot Money and stocks</p>.<p>BQ Live: Hot Money and stocks body</p>.<p>BQ Live: Hot Money and stocks body-2</p>","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0,200,1920,1080&w=1200&h=675&auto=format,compress&fit=crop","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78,0,1707,1280&w=1200&h=900&auto=format,compress&fit=crop","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291,0,1280,1280&w=1200&h=1200&auto=format,compress&fit=crop","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"<p>BQ Live: Hot Money and stocks</p>.<p>BQ Live: Hot Money and stocks body</p>.<p>BQ Live: Hot Money and stocks body-2</p>","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
547
|
-
string
|
|
548
|
-
);
|
|
549
|
-
});
|
|
550
|
-
});
|
|
551
|
-
/*
|
|
552
|
-
describe("with given authors array in article data", function () {
|
|
553
|
-
it("should read from the authors array", function () {
|
|
554
|
-
const string = getSeoMetadata(getSeoConfig({}), {}, "story-page", sampleStoryData(null, [], sampleAuthorsData()));
|
|
555
|
-
const ampPageString = getSeoMetadata(
|
|
556
|
-
getSeoConfig({}),
|
|
557
|
-
{},
|
|
558
|
-
"story-page-amp",
|
|
559
|
-
sampleStoryData(null, [], sampleAuthorsData())
|
|
560
|
-
);
|
|
561
|
-
assertContains(
|
|
562
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
563
|
-
string
|
|
564
|
-
);
|
|
565
|
-
assertContains(
|
|
566
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>',
|
|
567
|
-
ampPageString
|
|
568
|
-
);
|
|
569
|
-
});
|
|
570
|
-
});
|
|
571
|
-
|
|
572
|
-
describe("with video object", function () {
|
|
573
|
-
it("should give the type of video object", function () {
|
|
574
|
-
const string = getSeoMetadata(
|
|
575
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
576
|
-
{},
|
|
577
|
-
"story-page",
|
|
578
|
-
sampleStoryData("video", [], sampleAuthorsData())
|
|
579
|
-
);
|
|
580
|
-
const ampPageString = getSeoMetadata(
|
|
581
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
582
|
-
{},
|
|
583
|
-
"story-page-amp",
|
|
584
|
-
sampleStoryData("video", [], sampleAuthorsData())
|
|
585
|
-
);
|
|
586
|
-
assertContains(
|
|
587
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
588
|
-
string
|
|
589
|
-
);
|
|
590
|
-
assertContains(
|
|
591
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
592
|
-
ampPageString
|
|
593
|
-
);
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
it("should return dailymotion-url from metadata for dailymotion-embed-script subtype", () => {
|
|
597
|
-
const cards = [
|
|
598
|
-
{
|
|
599
|
-
"story-elements": [
|
|
600
|
-
{
|
|
601
|
-
type: "jsembed",
|
|
602
|
-
metadata: {
|
|
603
|
-
"dailymotion-url": "https://www.dailymotion.com/video/x7y5c1x",
|
|
604
|
-
},
|
|
605
|
-
subtype: "dailymotion-embed-script",
|
|
606
|
-
},
|
|
607
|
-
],
|
|
608
|
-
},
|
|
609
|
-
];
|
|
610
|
-
const string = getSeoMetadata(
|
|
611
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
612
|
-
{},
|
|
613
|
-
"story-page",
|
|
614
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
615
|
-
);
|
|
616
|
-
const ampPageString = getSeoMetadata(
|
|
617
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
618
|
-
{},
|
|
619
|
-
"story-page-amp",
|
|
620
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
621
|
-
);
|
|
622
|
-
assertContains(
|
|
623
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://www.dailymotion.com/video/x7y5c1x","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
624
|
-
string
|
|
625
|
-
);
|
|
626
|
-
assertContains(
|
|
627
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://www.dailymotion.com/video/x7y5c1x","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
628
|
-
ampPageString
|
|
629
|
-
);
|
|
630
|
-
});
|
|
631
|
-
|
|
632
|
-
it("should return instagram-url from metadata for instagram subtype", () => {
|
|
633
|
-
const cards = [
|
|
634
|
-
{
|
|
635
|
-
"story-elements": [
|
|
636
|
-
{
|
|
637
|
-
type: "jsembed",
|
|
638
|
-
metadata: {
|
|
639
|
-
"instagram-url": "https://www.instagram.com/p/COcFj1Fj5tH/",
|
|
640
|
-
},
|
|
641
|
-
subtype: "instagram",
|
|
642
|
-
},
|
|
643
|
-
],
|
|
644
|
-
},
|
|
645
|
-
];
|
|
646
|
-
const string = getSeoMetadata(
|
|
647
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
648
|
-
{},
|
|
649
|
-
"story-page",
|
|
650
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
651
|
-
);
|
|
652
|
-
const ampPageString = getSeoMetadata(
|
|
653
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
654
|
-
{},
|
|
655
|
-
"story-page-amp",
|
|
656
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
657
|
-
);
|
|
658
|
-
assertContains(
|
|
659
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://www.instagram.com/p/COcFj1Fj5tH/","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
660
|
-
string
|
|
661
|
-
);
|
|
662
|
-
assertContains(
|
|
663
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://www.instagram.com/p/COcFj1Fj5tH/","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
664
|
-
ampPageString
|
|
665
|
-
);
|
|
666
|
-
});
|
|
667
|
-
|
|
668
|
-
it("should return tweet-url from metadata for tweet subtype", () => {
|
|
669
|
-
const cards = [
|
|
670
|
-
{
|
|
671
|
-
"story-elements": [
|
|
672
|
-
{
|
|
673
|
-
type: "jsembed",
|
|
674
|
-
metadata: {
|
|
675
|
-
"tweet-url": "https://twitter.com/jack/status/20",
|
|
676
|
-
},
|
|
677
|
-
subtype: "tweet",
|
|
678
|
-
},
|
|
679
|
-
],
|
|
680
|
-
},
|
|
681
|
-
];
|
|
682
|
-
const string = getSeoMetadata(
|
|
683
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
684
|
-
{},
|
|
685
|
-
"story-page",
|
|
686
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
687
|
-
);
|
|
688
|
-
const ampPageString = getSeoMetadata(
|
|
689
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
690
|
-
{},
|
|
691
|
-
"story-page-amp",
|
|
692
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
693
|
-
);
|
|
694
|
-
assertContains(
|
|
695
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://twitter.com/jack/status/20","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
696
|
-
string
|
|
697
|
-
);
|
|
698
|
-
assertContains(
|
|
699
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://twitter.com/jack/status/20","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
700
|
-
ampPageString
|
|
701
|
-
);
|
|
702
|
-
});
|
|
703
|
-
|
|
704
|
-
it("should return vimeo-url from metadata for vimeo-video subtype", () => {
|
|
705
|
-
const cards = [
|
|
706
|
-
{
|
|
707
|
-
"story-elements": [
|
|
708
|
-
{
|
|
709
|
-
type: "jsembed",
|
|
710
|
-
metadata: {
|
|
711
|
-
"vimeo-url": "https://vimeo.com/123456789",
|
|
712
|
-
},
|
|
713
|
-
subtype: "vimeo-video",
|
|
714
|
-
},
|
|
715
|
-
],
|
|
716
|
-
},
|
|
717
|
-
];
|
|
718
|
-
const string = getSeoMetadata(
|
|
719
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
720
|
-
{},
|
|
721
|
-
"story-page",
|
|
722
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
723
|
-
);
|
|
724
|
-
const ampPageString = getSeoMetadata(
|
|
725
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
726
|
-
{},
|
|
727
|
-
"story-page-amp",
|
|
728
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
729
|
-
);
|
|
730
|
-
assertContains(
|
|
731
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://vimeo.com/123456789","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
732
|
-
string
|
|
733
|
-
);
|
|
734
|
-
assertContains(
|
|
735
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://vimeo.com/123456789","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
736
|
-
ampPageString
|
|
737
|
-
);
|
|
738
|
-
});
|
|
739
|
-
|
|
740
|
-
it("should return url for youtube-video type with null subtype", () => {
|
|
741
|
-
const cards = [
|
|
742
|
-
{
|
|
743
|
-
"story-elements": [
|
|
744
|
-
{
|
|
745
|
-
type: "youtube-video",
|
|
746
|
-
url: "https://youtu.be/lz48OzO8k0I?si=CQRUJ3Cs1fHK2W1-",
|
|
747
|
-
metadata: {},
|
|
748
|
-
subtype: null,
|
|
749
|
-
},
|
|
750
|
-
],
|
|
751
|
-
},
|
|
752
|
-
];
|
|
753
|
-
const string = getSeoMetadata(
|
|
754
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
755
|
-
{},
|
|
756
|
-
"story-page",
|
|
757
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
758
|
-
);
|
|
759
|
-
const ampPageString = getSeoMetadata(
|
|
760
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
761
|
-
{},
|
|
762
|
-
"story-page-amp",
|
|
763
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
764
|
-
);
|
|
765
|
-
assertContains(
|
|
766
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://youtu.be/lz48OzO8k0I?si=CQRUJ3Cs1fHK2W1-","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
767
|
-
string
|
|
768
|
-
);
|
|
769
|
-
assertContains(
|
|
770
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://youtu.be/lz48OzO8k0I?si=CQRUJ3Cs1fHK2W1-","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
771
|
-
ampPageString
|
|
772
|
-
);
|
|
773
|
-
});
|
|
774
|
-
|
|
775
|
-
it("should return facebook-url from metadata for facebook-video subtype", () => {
|
|
776
|
-
const cards = [
|
|
777
|
-
{
|
|
778
|
-
"story-elements": [
|
|
779
|
-
{
|
|
780
|
-
type: "jsembed",
|
|
781
|
-
metadata: {
|
|
782
|
-
"facebook-url": "https://www.facebook.com/facebook/videos/123456789/",
|
|
783
|
-
},
|
|
784
|
-
subtype: "facebook-video",
|
|
785
|
-
},
|
|
786
|
-
],
|
|
787
|
-
},
|
|
788
|
-
];
|
|
789
|
-
const string = getSeoMetadata(
|
|
790
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
791
|
-
{},
|
|
792
|
-
"story-page",
|
|
793
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
794
|
-
);
|
|
795
|
-
const ampPageString = getSeoMetadata(
|
|
796
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
797
|
-
{},
|
|
798
|
-
"story-page-amp",
|
|
799
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
800
|
-
);
|
|
801
|
-
assertContains(
|
|
802
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://www.facebook.com/facebook/videos/123456789/","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
803
|
-
string
|
|
804
|
-
);
|
|
805
|
-
assertContains(
|
|
806
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"https://www.facebook.com/facebook/videos/123456789/","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
807
|
-
ampPageString
|
|
808
|
-
);
|
|
809
|
-
});
|
|
810
|
-
|
|
811
|
-
it("should return player-url from metadata for brightcove-video subtype", () => {
|
|
812
|
-
const cards = [
|
|
813
|
-
{
|
|
814
|
-
"story-elements": [
|
|
815
|
-
{
|
|
816
|
-
type: "external-file",
|
|
817
|
-
metadata: {
|
|
818
|
-
"player-url":
|
|
819
|
-
"//players.brightcove.net/1752604059001/H1xW7NWcz_default/index.html?videoId=4825279519001",
|
|
820
|
-
},
|
|
821
|
-
subtype: "brightcove-video",
|
|
822
|
-
},
|
|
823
|
-
],
|
|
824
|
-
},
|
|
825
|
-
];
|
|
826
|
-
const string = getSeoMetadata(
|
|
827
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
828
|
-
{},
|
|
829
|
-
"story-page",
|
|
830
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
831
|
-
);
|
|
832
|
-
const ampPageString = getSeoMetadata(
|
|
833
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
834
|
-
{},
|
|
835
|
-
"story-page-amp",
|
|
836
|
-
sampleStoryData("video", cards, sampleAuthorsData())
|
|
837
|
-
);
|
|
838
|
-
assertContains(
|
|
839
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"//players.brightcove.net/1752604059001/H1xW7NWcz_default/index.html?videoId=4825279519001","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
840
|
-
string
|
|
841
|
-
);
|
|
842
|
-
assertContains(
|
|
843
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"//players.brightcove.net/1752604059001/H1xW7NWcz_default/index.html?videoId=4825279519001","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
844
|
-
ampPageString
|
|
845
|
-
);
|
|
846
|
-
});
|
|
847
|
-
|
|
848
|
-
it("uses meta description as description if the card has no summary", function () {
|
|
849
|
-
const options = {
|
|
850
|
-
seo: {
|
|
851
|
-
"meta-description": "Meta description",
|
|
852
|
-
},
|
|
853
|
-
headline: "Personalise or perish - Why publishers need to use personalised content",
|
|
854
|
-
summary: "",
|
|
855
|
-
subheadline: "subheadline",
|
|
856
|
-
};
|
|
857
|
-
const string = getSeoMetadata(
|
|
858
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
859
|
-
{},
|
|
860
|
-
"story-page",
|
|
861
|
-
sampleStoryData("video", [], sampleAuthorsData(), "", options)
|
|
862
|
-
);
|
|
863
|
-
const ampPageString = getSeoMetadata(
|
|
864
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
865
|
-
{},
|
|
866
|
-
"story-page-amp",
|
|
867
|
-
sampleStoryData("video", [], sampleAuthorsData(), "", options)
|
|
868
|
-
);
|
|
869
|
-
assertContains(
|
|
870
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Meta description","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
871
|
-
string
|
|
872
|
-
);
|
|
873
|
-
assertContains(
|
|
874
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Meta description","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
875
|
-
ampPageString
|
|
876
|
-
);
|
|
877
|
-
});
|
|
878
|
-
|
|
879
|
-
it("uses headline as description if the card has no summary, meta description and subheadline", function () {
|
|
880
|
-
const options = {
|
|
881
|
-
seo: {
|
|
882
|
-
"meta-description": "",
|
|
883
|
-
},
|
|
884
|
-
headline: "Personalise or perish - Why publishers need to use personalised content",
|
|
885
|
-
summary: "",
|
|
886
|
-
subheadline: "",
|
|
887
|
-
};
|
|
888
|
-
const string = getSeoMetadata(
|
|
889
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
890
|
-
{},
|
|
891
|
-
"story-page",
|
|
892
|
-
sampleStoryData("video", [], sampleAuthorsData(), "", options)
|
|
893
|
-
);
|
|
894
|
-
const ampPageString = getSeoMetadata(
|
|
895
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
896
|
-
{},
|
|
897
|
-
"story-page-amp",
|
|
898
|
-
sampleStoryData("video", [], sampleAuthorsData(), "", options)
|
|
899
|
-
);
|
|
900
|
-
assertContains(
|
|
901
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalise or perish - Why publishers need to use personalised content","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
902
|
-
string
|
|
903
|
-
);
|
|
904
|
-
assertContains(
|
|
905
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalise or perish - Why publishers need to use personalised content","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
906
|
-
ampPageString
|
|
907
|
-
);
|
|
908
|
-
});
|
|
909
|
-
|
|
910
|
-
it("uses subheadline as description if the card has no summary and meta description", function () {
|
|
911
|
-
const options = {
|
|
912
|
-
seo: {
|
|
913
|
-
"meta-description": "",
|
|
914
|
-
},
|
|
915
|
-
headline: "Personalise or perish - Why publishers need to use personalised content",
|
|
916
|
-
summary: "",
|
|
917
|
-
subheadline: "Personalised content marketing is the slayer weapon in this war",
|
|
918
|
-
};
|
|
919
|
-
const string = getSeoMetadata(
|
|
920
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
921
|
-
{},
|
|
922
|
-
"story-page",
|
|
923
|
-
sampleStoryData("video", [], sampleAuthorsData(), "", options)
|
|
924
|
-
);
|
|
925
|
-
const ampPageString = getSeoMetadata(
|
|
926
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
927
|
-
{},
|
|
928
|
-
"story-page-amp",
|
|
929
|
-
sampleStoryData("video", [], sampleAuthorsData(), "", options)
|
|
930
|
-
);
|
|
931
|
-
assertContains(
|
|
932
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
933
|
-
string
|
|
934
|
-
);
|
|
935
|
-
assertContains(
|
|
936
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","description":"Personalised content marketing is the slayer weapon in this war","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T06:03:25Z","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
937
|
-
ampPageString
|
|
938
|
-
);
|
|
939
|
-
});
|
|
940
|
-
});
|
|
941
|
-
|
|
942
|
-
describe("with live blog data", function () {
|
|
943
|
-
it("puts the news article when enableNewsArticle truthy in theme-attributes config", function () {
|
|
944
|
-
const cards = [
|
|
945
|
-
{
|
|
946
|
-
"card-added-at": 1519816264773,
|
|
947
|
-
"card-updated-at": 1524204205102,
|
|
948
|
-
"story-elements": [
|
|
949
|
-
{
|
|
950
|
-
type: "title",
|
|
951
|
-
text: "BQ Live: Hot Money",
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
type: "jsembed",
|
|
955
|
-
metadata: {
|
|
956
|
-
"vidible-video-id": "59bb646192fdde488f02624e",
|
|
957
|
-
},
|
|
958
|
-
subtype: "vidible-video",
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
"image-s3-key": "bloombergquint/2018-07/99423a77-d39a-4803-94c9-1bdc33f95cc6/OI_July_4.PNG",
|
|
962
|
-
type: "image",
|
|
963
|
-
},
|
|
964
|
-
],
|
|
965
|
-
},
|
|
966
|
-
];
|
|
967
|
-
const string = getSeoMetadata(
|
|
968
|
-
getSeoConfig({ newsArticle: true, liveBlog: true }),
|
|
969
|
-
{},
|
|
970
|
-
"story-page",
|
|
971
|
-
sampleStoryData("live-blog", cards, sampleAuthorsData()),
|
|
972
|
-
{ url: url.parse("/") }
|
|
973
|
-
);
|
|
974
|
-
const ampPageString = getSeoMetadata(
|
|
975
|
-
getSeoConfig({ newsArticle: true, liveBlog: true }),
|
|
976
|
-
{},
|
|
977
|
-
"story-page-amp",
|
|
978
|
-
sampleStoryData("live-blog", cards, sampleAuthorsData()),
|
|
979
|
-
{ url: url.parse("/") }
|
|
980
|
-
);
|
|
981
|
-
assertContains(
|
|
982
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"coverageEndTime":"2018-04-20T06:03:25Z","coverageStartTime":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"liveBlogUpdate":[{"@type":"BlogPosting","articleBody":"","dateModified":"2018-04-20T06:03:25Z","dateCreated":"2018-02-28T11:11:04Z","datePublished":"2018-02-28T11:11:04Z","headline":"BQ Live: Hot Money","image":"https://images.assettype.com/bloombergquint/2018-07/99423a77-d39a-4803-94c9-1bdc33f95cc6/OI_July_4.PNG?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"}],"@type":"LiveBlogPosting","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
983
|
-
string
|
|
984
|
-
);
|
|
985
|
-
assertContains(
|
|
986
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"coverageEndTime":"2018-04-20T06:03:25Z","coverageStartTime":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"liveBlogUpdate":[{"@type":"BlogPosting","articleBody":"","dateModified":"2018-04-20T06:03:25Z","dateCreated":"2018-02-28T11:11:04Z","datePublished":"2018-02-28T11:11:04Z","headline":"BQ Live: Hot Money","image":"https://images.assettype.com/bloombergquint/2018-07/99423a77-d39a-4803-94c9-1bdc33f95cc6/OI_July_4.PNG?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"}],"@type":"LiveBlogPosting","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
987
|
-
ampPageString
|
|
988
|
-
);
|
|
989
|
-
});
|
|
990
|
-
it("uses default story headline if the card has no title", function () {
|
|
991
|
-
const cards = [
|
|
992
|
-
{
|
|
993
|
-
"card-added-at": 1519816264773,
|
|
994
|
-
"card-updated-at": 1524204205102,
|
|
995
|
-
"story-elements": [],
|
|
996
|
-
},
|
|
997
|
-
];
|
|
998
|
-
const string = getSeoMetadata(
|
|
999
|
-
getSeoConfig({ newsArticle: true, liveBlog: true }),
|
|
1000
|
-
{},
|
|
1001
|
-
"story-page",
|
|
1002
|
-
sampleStoryData("live-blog", cards, sampleAuthorsData()),
|
|
1003
|
-
{ url: url.parse("/") }
|
|
1004
|
-
);
|
|
1005
|
-
const ampPageString = getSeoMetadata(
|
|
1006
|
-
getSeoConfig({ newsArticle: true, liveBlog: true }),
|
|
1007
|
-
{},
|
|
1008
|
-
"story-page-amp",
|
|
1009
|
-
sampleStoryData("live-blog", cards, sampleAuthorsData()),
|
|
1010
|
-
{ url: url.parse("/") }
|
|
1011
|
-
);
|
|
1012
|
-
assertContains(
|
|
1013
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"coverageEndTime":"2018-04-20T06:03:25Z","coverageStartTime":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"liveBlogUpdate":[{"@type":"BlogPosting","articleBody":"","dateModified":"2018-04-20T06:03:25Z","dateCreated":"2018-02-28T11:11:04Z","datePublished":"2018-02-28T11:11:04Z","headline":"Personalise or perish - Why publishers need to use personalised content","image":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"}],"@type":"LiveBlogPosting","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
1014
|
-
string
|
|
1015
|
-
);
|
|
1016
|
-
assertContains(
|
|
1017
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"coverageEndTime":"2018-04-20T06:03:25Z","coverageStartTime":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"liveBlogUpdate":[{"@type":"BlogPosting","articleBody":"","dateModified":"2018-04-20T06:03:25Z","dateCreated":"2018-02-28T11:11:04Z","datePublished":"2018-02-28T11:11:04Z","headline":"Personalise or perish - Why publishers need to use personalised content","image":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"}],"@type":"LiveBlogPosting","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
1018
|
-
ampPageString
|
|
1019
|
-
);
|
|
1020
|
-
});
|
|
1021
|
-
it("uses default story headline if the story has no summary", function () {
|
|
1022
|
-
const options = {
|
|
1023
|
-
seo: {
|
|
1024
|
-
"meta-description": "Meta description",
|
|
1025
|
-
},
|
|
1026
|
-
headline: "Personalise or perish - Why publishers need to use personalised content",
|
|
1027
|
-
summary: "",
|
|
1028
|
-
subheadline: "subheadline",
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
|
-
const cards = [
|
|
1032
|
-
{
|
|
1033
|
-
"card-added-at": 1519816264773,
|
|
1034
|
-
"card-updated-at": 1524204205102,
|
|
1035
|
-
"story-elements": [],
|
|
1036
|
-
},
|
|
1037
|
-
];
|
|
1038
|
-
|
|
1039
|
-
const string = getSeoMetadata(
|
|
1040
|
-
getSeoConfig({ newsArticle: true, liveBlog: true }),
|
|
1041
|
-
{},
|
|
1042
|
-
"story-page",
|
|
1043
|
-
sampleStoryData("live-blog", cards, sampleAuthorsData(), options),
|
|
1044
|
-
{ url: url.parse("/") }
|
|
1045
|
-
);
|
|
1046
|
-
const ampPageString = getSeoMetadata(
|
|
1047
|
-
getSeoConfig({ newsArticle: true, liveBlog: true }),
|
|
1048
|
-
{},
|
|
1049
|
-
"story-page-amp",
|
|
1050
|
-
sampleStoryData("live-blog", cards, sampleAuthorsData(), options),
|
|
1051
|
-
{ url: url.parse("/") }
|
|
1052
|
-
);
|
|
1053
|
-
assertContains(
|
|
1054
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"coverageEndTime":"2018-04-20T06:03:25Z","coverageStartTime":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"liveBlogUpdate":[{"@type":"BlogPosting","articleBody":"","dateModified":"2018-04-20T06:03:25Z","dateCreated":"2018-02-28T11:11:04Z","datePublished":"2018-02-28T11:11:04Z","headline":"Personalise or perish - Why publishers need to use personalised content","image":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"}],"@type":"LiveBlogPosting","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
1055
|
-
string
|
|
1056
|
-
);
|
|
1057
|
-
assertContains(
|
|
1058
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"coverageEndTime":"2018-04-20T06:03:25Z","coverageStartTime":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","mainEntityOfPage":{"@type":"WebPage","@id":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"liveBlogUpdate":[{"@type":"BlogPosting","articleBody":"","dateModified":"2018-04-20T06:03:25Z","dateCreated":"2018-02-28T11:11:04Z","datePublished":"2018-02-28T11:11:04Z","headline":"Personalise or perish - Why publishers need to use personalised content","image":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"}],"@type":"LiveBlogPosting","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
1059
|
-
ampPageString
|
|
1060
|
-
);
|
|
1061
|
-
});
|
|
1062
|
-
});
|
|
1063
|
-
|
|
1064
|
-
describe("with BreadcrumbList schema", function () {
|
|
1065
|
-
it("adds BreadcrumbList schema by default", function () {
|
|
1066
|
-
const string = getSeoMetadata(
|
|
1067
|
-
getSeoConfig(),
|
|
1068
|
-
{},
|
|
1069
|
-
"section-page",
|
|
1070
|
-
{
|
|
1071
|
-
data: {
|
|
1072
|
-
section: {
|
|
1073
|
-
"section-url": "https://madrid.quintype.io/film",
|
|
1074
|
-
slug: "film",
|
|
1075
|
-
name: "Film",
|
|
1076
|
-
},
|
|
1077
|
-
},
|
|
1078
|
-
config: {
|
|
1079
|
-
"sketches-host": "https://madrid.quintype.io",
|
|
1080
|
-
sections: [
|
|
1081
|
-
{
|
|
1082
|
-
"section-url": "https://madrid.quintype.io/film",
|
|
1083
|
-
slug: "film",
|
|
1084
|
-
name: "Film",
|
|
1085
|
-
"parent-id": null,
|
|
1086
|
-
},
|
|
1087
|
-
],
|
|
1088
|
-
},
|
|
1089
|
-
},
|
|
1090
|
-
{ url: url.parse("/") }
|
|
1091
|
-
);
|
|
1092
|
-
assertContains(sampleBreadcrumbListTag, string);
|
|
1093
|
-
});
|
|
1094
|
-
it("adds BreadcrumbList schema for custom page", function () {
|
|
1095
|
-
const string = getSeoMetadata(
|
|
1096
|
-
getSeoConfig(),
|
|
1097
|
-
{},
|
|
1098
|
-
"custom-page",
|
|
1099
|
-
{
|
|
1100
|
-
data: {
|
|
1101
|
-
collection: { slug: "film", name: "Film" },
|
|
1102
|
-
breadcrumbs: { name: "Film", url: "https://madrid.quintype.io/film" },
|
|
1103
|
-
},
|
|
1104
|
-
config: {
|
|
1105
|
-
"sketches-host": "https://madrid.quintype.io",
|
|
1106
|
-
sections: [
|
|
1107
|
-
{
|
|
1108
|
-
"section-url": "https://madrid.quintype.io/film",
|
|
1109
|
-
slug: "film",
|
|
1110
|
-
name: "Film",
|
|
1111
|
-
"parent-id": null,
|
|
1112
|
-
},
|
|
1113
|
-
],
|
|
1114
|
-
},
|
|
1115
|
-
},
|
|
1116
|
-
{ url: url.parse("/") }
|
|
1117
|
-
);
|
|
1118
|
-
assertContains(sampleBreadcrumbListTag, string);
|
|
1119
|
-
});
|
|
1120
|
-
});
|
|
1121
|
-
|
|
1122
|
-
describe("custom timezone passed to the payload to return the date property in that timezone", function () {
|
|
1123
|
-
it("returns custom date wrt the timezone and the offset", function () {
|
|
1124
|
-
const sampleStoryDataObj = sampleStoryData("video", [], sampleAuthorsData(), "");
|
|
1125
|
-
sampleStoryDataObj.data.timezone = "Asia/Baku";
|
|
1126
|
-
const string = getSeoMetadata(
|
|
1127
|
-
getSeoConfig({ video: true, newsArticle: true }),
|
|
1128
|
-
{},
|
|
1129
|
-
"story-page",
|
|
1130
|
-
sampleStoryDataObj
|
|
1131
|
-
);
|
|
1132
|
-
assertContains(
|
|
1133
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T15:11:04+04:00","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","dateCreated":"2018-02-28T15:11:04+04:00","dateModified":"2018-04-20T10:03:25+04:00","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","name":"Personalise or perish - Why publishers need to use personalised content","thumbnailUrl":["https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true"],"uploadDate":"2018-04-20T10:03:25+04:00","embedUrl":"","@type":"VideoObject","@context":"http://schema.org"}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T15:11:04+04:00","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma","url":"https://madrid.quintype.io/author/greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T15:11:04+04:00","dateModified":"2018-04-20T10:03:25+04:00","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"alternativeHeadline":"","description":"Personalised content marketing is the slayer weapon in this war for attention and engagement.","hasPart":[{"@type":"WebPageElement","cssSelector":".paywall"}],"@type":"NewsArticle","@context":"http://schema.org"}</script>',
|
|
1134
|
-
string
|
|
1135
|
-
);
|
|
1136
|
-
});
|
|
1137
|
-
});
|
|
1138
|
-
|
|
1139
|
-
context("Structured DataTags for Entity", function () {
|
|
1140
|
-
it("generate Structured DataTags for Movie Entities", function () {
|
|
1141
|
-
const movieEntity = {
|
|
1142
|
-
description: "ABCD",
|
|
1143
|
-
"updated-at": 1553600304437,
|
|
1144
|
-
slug: "sarkar-movie-2",
|
|
1145
|
-
content: "ABCD",
|
|
1146
|
-
"publisher-id": 928,
|
|
1147
|
-
name: "sarkar",
|
|
1148
|
-
type: "movie",
|
|
1149
|
-
"meta-description": "ABCD",
|
|
1150
|
-
"entity-type-id": 85,
|
|
1151
|
-
"deleted-at": null,
|
|
1152
|
-
"meta-title": "ABCD",
|
|
1153
|
-
actors: [
|
|
1154
|
-
{
|
|
1155
|
-
id: 128875,
|
|
1156
|
-
name: "Aishwarya Dutta",
|
|
1157
|
-
},
|
|
1158
|
-
{
|
|
1159
|
-
id: 128874,
|
|
1160
|
-
name: "Shariq Hassan",
|
|
1161
|
-
},
|
|
1162
|
-
{
|
|
1163
|
-
id: 128880,
|
|
1164
|
-
name: "Nithya",
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
id: 128872,
|
|
1168
|
-
name: "Ramya (NSK)",
|
|
1169
|
-
},
|
|
1170
|
-
],
|
|
1171
|
-
"created-by": 307186,
|
|
1172
|
-
photo: [
|
|
1173
|
-
{
|
|
1174
|
-
key: "vikatandry2/2019-03/97ff1197-f723-4745-8394-442c0f1b1dfa/0.jpg",
|
|
1175
|
-
url: "http://thumbor-stg.assettype.com/vikatandry2/2019-03/97ff1197-f723-4745-8394-442c0f1b1dfa/0.jpg",
|
|
1176
|
-
caption: "ABCD",
|
|
1177
|
-
metadata: {
|
|
1178
|
-
"mime-type": "image/jpeg",
|
|
1179
|
-
},
|
|
1180
|
-
attribution: "ABCD",
|
|
1181
|
-
},
|
|
1182
|
-
],
|
|
1183
|
-
id: 128930,
|
|
1184
|
-
directors: [
|
|
1185
|
-
{
|
|
1186
|
-
id: 128873,
|
|
1187
|
-
name: "Ritvika",
|
|
1188
|
-
},
|
|
1189
|
-
{
|
|
1190
|
-
id: 128880,
|
|
1191
|
-
name: "Nithya",
|
|
1192
|
-
},
|
|
1193
|
-
],
|
|
1194
|
-
producers: [
|
|
1195
|
-
{
|
|
1196
|
-
id: 128883,
|
|
1197
|
-
name: "Vajpayee",
|
|
1198
|
-
},
|
|
1199
|
-
{
|
|
1200
|
-
id: 128873,
|
|
1201
|
-
name: "Ritvika",
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
id: 128879,
|
|
1205
|
-
name: "Mumtaj",
|
|
1206
|
-
},
|
|
1207
|
-
],
|
|
1208
|
-
"tamil-name": "சர்கார்",
|
|
1209
|
-
"last-updated-by": 307186,
|
|
1210
|
-
"created-at": 1553600077425,
|
|
1211
|
-
};
|
|
1212
|
-
|
|
1213
|
-
const storyData = sampleStoryData();
|
|
1214
|
-
storyData.data.story.cards = [];
|
|
1215
|
-
storyData.data["linkedEntities"] = [movieEntity];
|
|
1216
|
-
const tags = getSeoMetadata(getSeoConfig(), {}, "story-page", storyData, {
|
|
1217
|
-
url: url.parse("/"),
|
|
1218
|
-
});
|
|
1219
|
-
const tagsAmpPage = getSeoMetadata(getSeoConfig(), {}, "story-page-amp", storyData, { url: url.parse("/") });
|
|
1220
|
-
const articleTag =
|
|
1221
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":[{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=0%2C200%2C1920%2C1080&w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=78%2C0%2C1707%2C1280&w=1200&w=1200&h=900&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"900"},{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?rect=291%2C0%2C1280%2C1280&w=1200&h=1200&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"1200"}],"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>';
|
|
1222
|
-
const ampArticleTag =
|
|
1223
|
-
'<script type="application/ld+json">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://madrid.quintype.io"},{"@type":"ListItem","position":2,"name":"Section Name","item":""},{"@type":"ListItem","position":3,"name":"Personalise or perish - Why publishers need to use personalised content","item":""}]}</script><script type="application/ld+json">{"headline":"Personalise or perish - Why publishers need to use personalised content","image":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"},"url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","datePublished":"2018-02-28T11:11:04Z","mainEntityOfPage":{"@type":"WebPage","@id":"http://www.quintype.com/"},"publisher":{"@type":"Organization","@context":"http://schema.org","name":"Quintype","url":"http://www.quintype.com/","logo":"https://quintype.com/logo.png","sameAs":["https://www.facebook.com/quintype","https://twitter.com/quintype_inc","https://plus.google.com/+quintype","https://www.youtube.com/user/Quintype"],"id":"http://www.quintype.com/"},"author":[{"@type":"Person","givenName":"Greeshma","name":"Greeshma"}],"keywords":"","thumbnailUrl":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","articleBody":"","dateCreated":"2018-02-28T11:11:04Z","dateModified":"2018-04-20T06:03:25Z","name":"Personalise or perish - Why publishers need to use personalised content","isPartOf":{"@type":"WebPage","url":"https://madrid.quintype.io/politics/2018/02/28/personalise-or-perish---why-publishers-need-to-use-personalised-content","primaryImageOfPage":{"@type":"ImageObject","url":"https://images.assettype.com/quintype-demo/2018-03/a27aafbf-8a27-4f42-b78f-769eb04655d6/efa66751-e534-4a18-8ebe-e02189c356d9.jpg?w=1200&h=675&auto=format%2Ccompress&fit=max&enlarge=true","width":"1200","height":"675"}},"articleSection":"Section Name","@type":"Article","@context":"http://schema.org"}</script>';
|
|
1224
|
-
assertContains(
|
|
1225
|
-
articleTag +
|
|
1226
|
-
'<script type="application/ld+json">{"actors":[{"@type":"Person","givenName":"Aishwarya Dutta","name":"Aishwarya Dutta"},{"@type":"Person","givenName":"Shariq Hassan","name":"Shariq Hassan"},{"@type":"Person","givenName":"Nithya","name":"Nithya"},{"@type":"Person","givenName":"Ramya (NSK)","name":"Ramya (NSK)"}],"directors":[{"@type":"Person","givenName":"Ritvika","name":"Ritvika"},{"@type":"Person","givenName":"Nithya","name":"Nithya"}],"name":"sarkar","sameAs":"","description":"ABCD","producer":[{"@type":"Person","givenName":"Vajpayee","name":"Vajpayee"},{"@type":"Person","givenName":"Ritvika","name":"Ritvika"},{"@type":"Person","givenName":"Mumtaj","name":"Mumtaj"}],"image":"http://thumbor-stg.assettype.com/vikatandry2/2019-03/97ff1197-f723-4745-8394-442c0f1b1dfa/0.jpg","dateCreated":"2019-03-26T11:34:37.425Z","@type":"Movie","@context":"http://schema.org"}</script>',
|
|
1227
|
-
tags
|
|
1228
|
-
);
|
|
1229
|
-
assertContains(
|
|
1230
|
-
ampArticleTag +
|
|
1231
|
-
'<script type="application/ld+json">{"actors":[{"@type":"Person","givenName":"Aishwarya Dutta","name":"Aishwarya Dutta"},{"@type":"Person","givenName":"Shariq Hassan","name":"Shariq Hassan"},{"@type":"Person","givenName":"Nithya","name":"Nithya"},{"@type":"Person","givenName":"Ramya (NSK)","name":"Ramya (NSK)"}],"directors":[{"@type":"Person","givenName":"Ritvika","name":"Ritvika"},{"@type":"Person","givenName":"Nithya","name":"Nithya"}],"name":"sarkar","sameAs":"","description":"ABCD","producer":[{"@type":"Person","givenName":"Vajpayee","name":"Vajpayee"},{"@type":"Person","givenName":"Ritvika","name":"Ritvika"},{"@type":"Person","givenName":"Mumtaj","name":"Mumtaj"}],"image":"http://thumbor-stg.assettype.com/vikatandry2/2019-03/97ff1197-f723-4745-8394-442c0f1b1dfa/0.jpg","dateCreated":"2019-03-26T11:34:37.425Z","@type":"Movie","@context":"http://schema.org"}</script>',
|
|
1232
|
-
tagsAmpPage
|
|
1233
|
-
);
|
|
1234
|
-
});
|
|
1235
|
-
});
|
|
1236
|
-
*/
|
|
1237
|
-
});
|