From 67e2cd20d6790766fbb60315e13a954b44406fcd Mon Sep 17 00:00:00 2001 From: Daniel Bimschas <daniel@bimschas.com> Date: Thu, 27 Feb 2025 13:36:50 +0100 Subject: [PATCH] HOLI-9793 HOLI-10970: update smoke test --- smoketest/main.js | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/smoketest/main.js b/smoketest/main.js index 919c8a1..d315f5a 100644 --- a/smoketest/main.js +++ b/smoketest/main.js @@ -27,14 +27,30 @@ function forQuery(query, checkFunction) { // Define your smoketest(s) here. export default () => { - forQuery(`{categories{data{name}}}`, (response) => { - check(response, { - 'is status 200': (r) => r.status === 200, - }) - check(JSON.parse(response.body), { - // there can be multiple tests here, e.g. - //"contains topics object": (r) => typeof r.data.topics != null, - 'contains categories': (r) => Array.isArray(r.data.categories.data) && r.data.categories.data.length > 0, - }) - }) + forQuery( + `engagementRecosV2(offset:0, limit:10, topics:["animal-welfare"]) { + data { + engagement { + id + title + description + topicsV2 + skillsV2 + } + matchedTopics + matchedSkills + } + }`, + (response) => { + check(response, { + 'is status 200': (r) => r.status === 200, + }) + check(JSON.parse(response.body), { + // there can be multiple tests here, e.g. + //"contains topics object": (r) => typeof r.data.topics != null, + 'contains recos': (r) => + Array.isArray(r.data.engagementRecosV2.data) && r.data.engagementRecosV2.data.length > 0, + }) + }, + ) } -- GitLab