feat(naming): add Suggest Names button for ideas and tee compositor
This commit is contained in:
1 parent
25d24a53a6
commit
6c6867b49c
6 files changed
+276
-7
No files matched your search
@@ -233,4 +233,18 @@ test("Personalized Random Idea Generator creates a tailored idea from background
|
||||
assert.ok(data.idea.whack_history.length >= 1);
|
||||
});
|
||||
|
||||
test("Suggest Names endpoint returns 6 creative name and tagline suggestions for an idea", async () => {
|
||||
const res = await fetch(`${baseUrl}/api/ideas/1/suggest-names`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" }
|
||||
});
|
||||
assert.equal(res.status, 200);
|
||||
const data = await res.json();
|
||||
assert.ok(Array.isArray(data.suggestions));
|
||||
assert.equal(data.suggestions.length, 6);
|
||||
assert.ok(data.suggestions[0].name);
|
||||
assert.ok(data.suggestions[0].tagline);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user