From 0e7525bd08e0bdd35f06481bd1d14d152a0d66ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arto=20P=C3=A4rssinen?= Date: Thu, 17 Aug 2023 14:48:13 +0300 Subject: [PATCH] feature: updating backend api to use platta version of linkedevents --- .../tests/data/linked_events_responses.py | 78 +++++++++---------- .../__tests__/utils/backend/backend-nocks.ts | 4 +- .../youth/browser-tests/search.testcafe.ts | 2 +- .../tet/youth/src/backend-api/backend-api.ts | 2 +- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/backend/tet/events/tests/data/linked_events_responses.py b/backend/tet/events/tests/data/linked_events_responses.py index fa96043fe2..edffd34da7 100644 --- a/backend/tet/events/tests/data/linked_events_responses.py +++ b/backend/tet/events/tests/data/linked_events_responses.py @@ -10,7 +10,7 @@ "fi": "Testaaja" }, "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:15417/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:15417/" }, "description": { "fi": "test description" @@ -20,16 +20,16 @@ "date_published": null, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:11/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:11/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:12/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:12/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p3971/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p3971/" } ], "custom_data": { @@ -59,20 +59,20 @@ { "id": "tet:af7w5v5m6e", "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:15417/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:15417/" }, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:11/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:11/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:12/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:12/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p3971/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p3971/" } ], "registration": null, @@ -155,7 +155,7 @@ "short_description": { "fi": "TET-paikan kuvaus" }, - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7w5v5m6e/", + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7w5v5m6e/", "@context": "http://schema.org", "@type": "Event/LinkedEvent" } @@ -167,11 +167,11 @@ { "id": "tet:test-user-email-set", "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:20780/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:20780/" }, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:2/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:2/" } ], "registration": null, @@ -203,7 +203,7 @@ "videos": [], "in_language": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/" } ], "audience": [], @@ -252,7 +252,7 @@ "short_description": { "fi": "xx" }, - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7w4jmjla/", + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7w4jmjla/", "@context": "http://schema.org", "@type": "Event/LinkedEvent" } @@ -265,35 +265,35 @@ { "id": "tet:test-user-oid-set", "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:56379/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:56379/" }, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:12/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:12/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p16557/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p16557/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p9903/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p9903/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/yso:p13310/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/yso:p13310/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:6/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:6/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:4/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:4/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:10/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:10/" }, { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:9/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:9/" } ], "registration": null, @@ -325,7 +325,7 @@ "videos": [], "in_language": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/" } ], "audience": [], @@ -374,7 +374,7 @@ "short_description": { "fi": "täällä pääset maalaamaan" }, - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7wtenvii/", + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7wtenvii/", "@context": "http://schema.org", "@type": "Event/LinkedEvent" } @@ -391,11 +391,11 @@ { "id": "tet:other-user", "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:8740/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:8740/" }, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/" } ], "registration": null, @@ -427,7 +427,7 @@ "videos": [], "in_language": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/" } ], "audience": [], @@ -476,7 +476,7 @@ "short_description": { "fi": "kuvaus" }, - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7wto6nze/", + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7wto6nze/", "@context": "http://schema.org", "@type": "Event/LinkedEvent" } @@ -489,11 +489,11 @@ { "id": "tet:companyuser", "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:352/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:352/" }, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/" } ], "registration": null, @@ -525,7 +525,7 @@ "videos": [], "in_language": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/" } ], "audience": [], @@ -571,7 +571,7 @@ "short_description": { "fi": "x" }, - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7scpy2de/", + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7scpy2de/", "@context": "http://schema.org", "@type": "Event/LinkedEvent" } @@ -589,11 +589,11 @@ { "id": "tet:no-custom-data", "location": { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/place/tprek:37497/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/place/tprek:37497/" }, "keywords": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/" } ], "registration": null, @@ -625,7 +625,7 @@ "videos": [], "in_language": [ { - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/language/fi/" + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/language/fi/" } ], "audience": [], @@ -665,7 +665,7 @@ "short_description": { "fi": "kuvaus" }, - "@id": "https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/event/tet:af7wjlxpyy/", + "@id": "https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/event/tet:af7wjlxpyy/", "@context": "http://schema.org", "@type": "Event/LinkedEvent" } diff --git a/frontend/tet/admin/src/__tests__/utils/backend/backend-nocks.ts b/frontend/tet/admin/src/__tests__/utils/backend/backend-nocks.ts index 3c9392a62a..296b21e7c1 100644 --- a/frontend/tet/admin/src/__tests__/utils/backend/backend-nocks.ts +++ b/frontend/tet/admin/src/__tests__/utils/backend/backend-nocks.ts @@ -87,7 +87,7 @@ export const expectWorkingMethodsFromLinkedEvents = (): nock.Scope => { keywords: [ { - '@id': 'https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:4/', + '@id': 'https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:4/', name: { fi: 'Tee oikeita töitä', }, @@ -107,7 +107,7 @@ export const expectAttributesFromLinkedEvents = (): nock.Scope => { keywords: [ { - '@id': 'https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:1/', + '@id': 'https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:1/', name: { fi: 'Soveltuu näkövammaisille', }, diff --git a/frontend/tet/youth/browser-tests/search.testcafe.ts b/frontend/tet/youth/browser-tests/search.testcafe.ts index daa3f82b2d..7664531367 100644 --- a/frontend/tet/youth/browser-tests/search.testcafe.ts +++ b/frontend/tet/youth/browser-tests/search.testcafe.ts @@ -44,7 +44,7 @@ test.skip('user can search and navigate', async (t) => { const end = faker.date.soon(100, start); const startDate = formatDate(start); const endDate = formatDate(end); - // Should find working method https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/keyword/tet:2/ + // Should find working method https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/keyword/tet:2/ const workMethodText = 'varjosta'; const languageText = 'suomeksi'; // Should find Finnish language const searchTerm = faker.lorem.word(); diff --git a/frontend/tet/youth/src/backend-api/backend-api.ts b/frontend/tet/youth/src/backend-api/backend-api.ts index c9d39422b1..7e22cc9ef9 100644 --- a/frontend/tet/youth/src/backend-api/backend-api.ts +++ b/frontend/tet/youth/src/backend-api/backend-api.ts @@ -1,7 +1,7 @@ import Axios, { AxiosInstance, AxiosResponse } from 'axios'; export const linkedEventsUrl = - process.env.NEXT_PUBLIC_LINKEDEVENTS_URL || 'https://linkedevents-api.dev.hel.ninja/linkedevents-dev/v1/'; + process.env.NEXT_PUBLIC_LINKEDEVENTS_URL || 'https://linkedevents-api-dev.agw.arodevtest.hel.fi/v1/'; export const BackendEndpoint = { EVENT: 'event/?include=location,keywords&sort=-name',