diff --git a/smoketest/main.js b/smoketest/main.js index 919c8a156d5102cce203590c7d9e24f46d72fce4..d315f5af581bf0eaccfe63544ffbf5010c80b767 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, + }) + }, + ) }