Skip to content

Commit 6ff64fe

Browse files
authored
Merge pull request #304 from os2display/feature/5317-poster-tests
5317: add template poster tests
2 parents 2a2753e + 6c06742 commit 6ff64fe

File tree

2 files changed

+359
-15
lines changed

2 files changed

+359
-15
lines changed

assets/template/fixtures/slide-fixtures.js

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ const slideFixtures = [
11851185
overrideSubTitle: null,
11861186
overrideTicketPrice: null,
11871187
overrideReadMoreUrl: null,
1188-
readMoreText: "Læs mere her: www.example.com",
1188+
readMoreText: null,
11891189
hideTime: false,
11901190
},
11911191
},
@@ -1221,6 +1221,68 @@ const slideFixtures = [
12211221
mediaContain: true,
12221222
},
12231223
},
1224+
{
1225+
id: "poster-0-single-override",
1226+
templateData: {
1227+
id: "01FWJZQ25A1868V63CWYYHQFKQ",
1228+
},
1229+
themeFile: null,
1230+
mediaData: {
1231+
"/v1/media/00000000000000000000000001": {
1232+
assets: {
1233+
uri: "/fixtures/template/images/mountain1.jpeg",
1234+
},
1235+
},
1236+
},
1237+
theme: {
1238+
logo: {
1239+
assets: {
1240+
uri: "/fixtures/template/images/mountain1.jpeg",
1241+
},
1242+
},
1243+
},
1244+
feed: {
1245+
configuration: {
1246+
overrideTitle: "Override title",
1247+
overrideSubTitle: "Override subtitle",
1248+
overrideTicketPrice: "Override ticket price",
1249+
overrideReadMoreUrl: "https://example.com/",
1250+
readMoreText: "Læs mere her: www.example.com",
1251+
hideTime: true,
1252+
},
1253+
},
1254+
feedData: [
1255+
{
1256+
ticketPurchaseUrl: "www.example.dk",
1257+
excerpt:
1258+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua....",
1259+
name: "Lorem ipsum",
1260+
url: "www.example.dk",
1261+
image: "/fixtures/template/images/mountain1.jpeg",
1262+
startDate: "2021-06-21T14:00:00+00:00",
1263+
endDate: "2021-06-21T15:00:00+00:00",
1264+
ticketPriceRange: "75-150 kr.",
1265+
eventStatusText: null,
1266+
place: {
1267+
name: "Lorem ipsum, Aarhus C",
1268+
streetAddress: "Vej 2",
1269+
addressLocality: "Aarhus",
1270+
postalCode: "8000",
1271+
image: null,
1272+
telephone: null,
1273+
},
1274+
},
1275+
],
1276+
content: {
1277+
// "single" or "subscription"
1278+
feedType: "single",
1279+
eventId: "",
1280+
occurrenceId: "",
1281+
entryDuration: 10,
1282+
showLogo: true,
1283+
mediaContain: true,
1284+
},
1285+
},
12241286
{
12251287
id: "poster-1-subscription",
12261288
templateData: {
@@ -1260,14 +1322,13 @@ const slideFixtures = [
12601322
},
12611323
{
12621324
ticketPurchaseUrl: "www.example2.dk",
1263-
excerpt:
1264-
"Ipsum lorem dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua....",
1325+
excerpt: "Ipsum lorem dolor...",
12651326
name: "Ipsum lorem",
1266-
url: "www.example.dk",
1327+
url: "www.example2.dk",
12671328
image: "/fixtures/template/images/mountain2.jpeg",
12681329
startDate: "2021-06-21T14:00:00+00:00",
12691330
endDate: "2021-06-21T15:00:00+00:00",
1270-
ticketPriceRange: "75-150 kr.",
1331+
ticketPriceRange: "En milliard kroner.",
12711332
eventStatusText: null,
12721333
place: {
12731334
name: "Lorem ipsum, Aarhus C",
@@ -1284,7 +1345,7 @@ const slideFixtures = [
12841345
feedType: "subscription",
12851346
eventId: "",
12861347
occurrenceId: "",
1287-
entryDuration: 10,
1348+
duration: 2000,
12881349
},
12891350
},
12901351
{

0 commit comments

Comments
 (0)