diff options
Diffstat (limited to 'packages/e2e_tests')
| -rw-r--r-- | packages/e2e_tests/tests/api/tags.test.ts | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/packages/e2e_tests/tests/api/tags.test.ts b/packages/e2e_tests/tests/api/tags.test.ts index 3e3cacc0..6c387628 100644 --- a/packages/e2e_tests/tests/api/tags.test.ts +++ b/packages/e2e_tests/tests/api/tags.test.ts @@ -26,31 +26,16 @@ describe("Tags API", () => { }); it("should get, update and delete a tag", async () => { - // Create a bookmark first - const { data: createdBookmark } = await client.POST("/bookmarks", { + // Create a tag by attaching it to the bookmark + const { data: tag } = await client.POST("/tags", { body: { - type: "text", - title: "Test Bookmark", - text: "This is a test bookmark", + name: "Test Tag", }, }); + expect(tag).toBeDefined(); + expect(tag!.name).toBe("Test Tag"); - // Create a tag by attaching it to the bookmark - const { data: addTagResponse } = await client.POST( - "/bookmarks/{bookmarkId}/tags", - { - params: { - path: { - bookmarkId: createdBookmark!.id, - }, - }, - body: { - tags: [{ tagName: "Test Tag" }], - }, - }, - ); - - const tagId = addTagResponse!.attached[0]; + const tagId = tag!.id; // Get the tag const { data: retrievedTag, response: getResponse } = await client.GET( |
