From 5f1685627199d57caf92ec693d5784c9695e4780 Mon Sep 17 00:00:00 2001 From: sinejespersen Date: Fri, 26 Sep 2025 13:45:02 +0200 Subject: [PATCH 1/4] 5453: make id on content form work and add id for tests --- assets/admin/components/slide/slide-form.jsx | 2 +- assets/admin/components/util/content-body/content-body.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/admin/components/slide/slide-form.jsx b/assets/admin/components/slide/slide-form.jsx index a6baa7a7..902d86c5 100644 --- a/assets/admin/components/slide/slide-form.jsx +++ b/assets/admin/components/slide/slide-form.jsx @@ -298,7 +298,7 @@ function SlideForm({ )} - +

{t("add-slide-to-playlists")}

Date: Fri, 26 Sep 2025 13:45:49 +0200 Subject: [PATCH 2/4] 5453: add tests of data fetch and fixtures, inject slides into loginTest --- .../tests/admin/admin-fetch-data-hook.spec.js | 103 ++ assets/tests/admin/data-fixtures.js | 1125 ++++++++++++++++- assets/tests/admin/test-helper.js | 4 +- 3 files changed, 1229 insertions(+), 3 deletions(-) create mode 100644 assets/tests/admin/admin-fetch-data-hook.spec.js diff --git a/assets/tests/admin/admin-fetch-data-hook.spec.js b/assets/tests/admin/admin-fetch-data-hook.spec.js new file mode 100644 index 00000000..29100974 --- /dev/null +++ b/assets/tests/admin/admin-fetch-data-hook.spec.js @@ -0,0 +1,103 @@ +import { test, expect } from "@playwright/test"; +import { + fulfillDataRoute, + fulfillEmptyRoutes, + beforeEachTest, + loginTest, +} from "./test-helper.js"; +import { + imageTextTemplate, + onlyImageTextListJson, + slidesJson1, + slideJson, + slidesPlaylist, +} from "./data-fixtures.js"; + +test.describe("Test of admin fetch data hook", () => { + test.beforeEach(async ({ page }) => { + await beforeEachTest(page); + }); + + test.beforeEach(async ({ page }) => { + page.setViewportSize({ width: 600, height: 2600 }); + await fulfillDataRoute( + page, + "**/templates?itemsPerPage*", + onlyImageTextListJson, + ); + + await page.route( + "**/templates/000YR9PMQC0GMC1TP90V9N07WX", + async (route) => { + await route.fulfill(imageTextTemplate); + }, + ); + + await fulfillDataRoute( + page, + "**/templates/01FGC8EXSE1KCC1PTR0NHB0H3R", + imageTextTemplate, + ); + + await fulfillDataRoute( + page, + "**/templates/002BAP34VD1EHG0E4J0D2Y00JW", + imageTextTemplate, + ); + + await fulfillDataRoute( + page, + "**/templates/017BG9P0E0103F0TFS17FM016M", + imageTextTemplate, + ); + + await fulfillDataRoute( + page, + "**/templates/016MHSNKCH1PQW1VY615JC19Y3", + imageTextTemplate, + ); + await fulfillDataRoute( + page, + "**/templates/000BGWFMBS15N807E60HP91JCX", + imageTextTemplate, + ); + + await loginTest(page, slidesJson1); + + await fulfillDataRoute( + page, + "**/templates/01FP2SNGFN0BZQH03KCBXHKYHG", + imageTextTemplate, + ); + + await fulfillDataRoute( + page, + "**/v2/slides/00015Y0ZVC18N407JD07SM0YCF", + slideJson, + ); + + await fulfillEmptyRoutes(page, ["**/playlists*", "**/themes*"]); + await fulfillDataRoute( + page, + "**/slides/00015Y0ZVC18N407JD07SM0YCF/playlists?*", + slidesPlaylist, + ); + + await Promise.all([ + page.waitForURL("**/slide/edit/*"), + await page.locator("#edit_button").first().click({ force: true }), + ]); + + const title = page.getByText("Rediger slide:"); + await title.waitFor(); + + await expect(title).toBeVisible(); + }); + + test("Test of admin fetch data hook", async ({ page }) => { + const title = page.locator("#add-slide-to-playlist-section tr"); + // The max items per page is 30: https://github.com/os2display/display-api-service/blob/develop/config/packages/api_platform.yaml#L11 + // And the header is also a { }); }; -const loginTest = async (page) => { +const loginTest = async (page, slides = null) => { await page.goto("/admin/slides/list"); await page.route("**/token", async (route) => { @@ -41,7 +41,7 @@ const loginTest = async (page) => { }); await page.route("**/slides*", async (route) => { - await route.fulfill({ json: emptyJson }); + await route.fulfill({ json: slides ?? emptyJson }); }); await expect(page).toHaveTitle(/OS2Display Admin/); From de75aaafca9bf340376f24307481e1fa8004a564 Mon Sep 17 00:00:00 2001 From: sinejespersen Date: Fri, 26 Sep 2025 13:55:10 +0200 Subject: [PATCH 3/4] 5453: added to changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0dfc492..00cbbd21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ All notable changes to this project will be documented in this file. - Aligned with v. 2.5.2. - Removed themes. - Added command to migrate config.json files. -- Fix data fetching bug +- Fix data fetching bug + tests - Refactored screen layout commands. ### NB! Prior to 3.x the project was split into separate repositories From e1bff231a071030cdee7b738f251df212b9308d3 Mon Sep 17 00:00:00 2001 From: sinejespersen Date: Thu, 30 Oct 2025 11:09:43 +0100 Subject: [PATCH 4/4] 5453: fixtures creation with foreact loop --- assets/tests/admin/data-fixtures.js | 1093 +-------------------------- 1 file changed, 38 insertions(+), 1055 deletions(-) diff --git a/assets/tests/admin/data-fixtures.js b/assets/tests/admin/data-fixtures.js index 8d6949da..d1978eaf 100644 --- a/assets/tests/admin/data-fixtures.js +++ b/assets/tests/admin/data-fixtures.js @@ -410,1066 +410,49 @@ const clientConfigJson = { logging: false, }; -const slidesPlaylist = { - "@context": "/contexts/PlaylistSlide", - "@id": "/v2/slides/01JVA5509R1V8S16PR15BB1Q4D/playlists", - "hydra:totalItems": 31, - "hydra:member": [ - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "1", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 1, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "2", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 2, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "3", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 3, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "4", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 4, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "5", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 5, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "6", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 6, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "7", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 7, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "8", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 8, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "9", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 9, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "10", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 10, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "11", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 11, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "12", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 12, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "13", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 13, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "14", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 14, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "15", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 15, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "16", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 16, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "17", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 17, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "18", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 18, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "19", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 19, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "20", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 20, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "21", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 21, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "22", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 22, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "23", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 23, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "24", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 24, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "25", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 25, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "26", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 26, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "27", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 27, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "28", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 28, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "29", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, - }, - weight: 29, +const members = []; +Array.from(Array(31).keys()).forEach((i) => { + members.push({ + "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", + "@type": "PlaylistSlide", + slide: { + "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", + "@type": "Slide", }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "30", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", + playlist: { + "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", + "@type": "Playlist", + title: "1", + description: + "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", + schedules: [], + slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", + campaignScreens: [], + campaignScreenGroups: [], + tenants: [ + { + "@type": "Tenant", + "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", }, + ], + isCampaign: false, + published: { + from: "2024-09-27T13:08:20.000Z", + to: "2025-05-26T09:48:41.000Z", }, - weight: 30, - }, - { - "@id": "/v2/playlist-slides/01JX8KAN3R1D201EJC06AF099N", - "@type": "PlaylistSlide", - slide: { - "@id": "/v2/slides/00015Y0ZVC18N407JD07SM0YCF", - "@type": "Slide", - }, - playlist: { - "@id": "/v2/playlists/01JQHJV7101JG70V6G0E9313PV", - "@type": "Playlist", - title: "31", - description: - "Similique voluptas aut temporibus soluta et cupiditate dolore. Ut ut totam fuga. Ullam quis ut nulla et totam neque quia.", - schedules: [], - slides: "/v2/playlists/01JQHJV7101JG70V6G0E9313PV/slides", - campaignScreens: [], - campaignScreenGroups: [], - tenants: [ - { - "@type": "Tenant", - "@id": "/v2/tenants/01JDHRTN7R0JWK1KYN12WC16QX", - }, - ], - isCampaign: false, - published: { - from: "2024-09-27T13:08:20.000Z", - to: "2025-05-26T09:48:41.000Z", - }, - relationsChecksum: { - slides: "a392e0ee600c545e5604713161f14bac7460471f", - }, + relationsChecksum: { + slides: "a392e0ee600c545e5604713161f14bac7460471f", }, - weight: 31, }, - ], + weight: { i }, + }); +}); + +const slidesPlaylist = { + "@context": "/contexts/PlaylistSlide", + "@id": "/v2/slides/01JVA5509R1V8S16PR15BB1Q4D/playlists", + "hydra:totalItems": 31, + "hydra:member": members, }; const slideJson = {