e2e: exercise the report endpoint in tracker resource test

The previous test seeded tracker resources directly via the
GraphQL `CreateTrackerResource` mutation, which doesn't go
through the public `/report` handler. Switching the seeding to
`ReportDetectedResources` covers the end-to-end path -- payload
decoding, validation, and the new upsert -- so the listing assert
is now grounded in the same write path that real clients use.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-11 14:19:22 +04:00
parent f8fad78d0c
commit 733b793991
2 changed files with 25 additions and 3 deletions

View File

@@ -105,9 +105,7 @@ func TestTrackerResource_List(t *testing.T) {
owner := testutil.NewClient(t, testutil.RoleOwner)
bannerID := factory.CreateCookieBanner(owner)
categoryID := factory.CreateCookieCategory(owner, bannerID)
factory.CreateTrackerResource(owner, categoryID)
factory.CreateTrackerResource(owner, categoryID)
factory.ReportDetectedResources(owner, bannerID, 2)
const query = `
query($id: ID!) {