Fix e2e test assertions: uppercase state enums, non-default slug

The version state field returns uppercase enum values (DRAFT, PUBLISHED)
and "analytics" is a default category slug created with every banner.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-01 13:07:38 +04:00
parent 6532f16efc
commit c43f61d109
2 changed files with 5 additions and 5 deletions

View File

@@ -106,7 +106,7 @@ func TestCookieCategory_Create(t *testing.T) {
owner := testutil.NewClient(t, testutil.RoleOwner)
bannerID := factory.CreateCookieBanner(owner)
factory.CreateCookieCategory(owner, bannerID, factory.Attrs{"slug": "analytics"})
factory.CreateCookieCategory(owner, bannerID, factory.Attrs{"slug": "custom-slug-dup"})
_, err := owner.Do(`
mutation CreateCookieCategory($input: CreateCookieCategoryInput!) {
@@ -118,8 +118,8 @@ func TestCookieCategory_Create(t *testing.T) {
`, map[string]any{
"input": map[string]any{
"cookieBannerId": bannerID,
"name": "Another Analytics",
"slug": "analytics",
"name": "Duplicate Category",
"slug": "custom-slug-dup",
"description": "Duplicate slug",
"rank": 10,
},