Fix e2e: consentCategories excludes UNCATEGORISED

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-05 11:33:23 +04:00
parent 23e1186f0d
commit 1a410f47fe
2 changed files with 22 additions and 22 deletions

View File

@@ -198,7 +198,7 @@ func TestCookieBanner_Create(t *testing.T) {
kinds[e.Node.Kind] = true
}
assert.True(t, kinds["NECESSARY"], "should have a NECESSARY category")
assert.True(t, kinds["UNCATEGORISED"], "should have an UNCATEGORISED category")
assert.False(t, kinds["UNCATEGORISED"], "consentCategories should not include UNCATEGORISED")
})
t.Run("duplicate origin conflict", func(t *testing.T) {

View File

@@ -328,14 +328,14 @@ func TestCookieCategory_Delete(t *testing.T) {
var listResult struct {
Node struct {
ConsentCategories struct {
Edges []struct {
Node struct {
ID string `json:"id"`
Kind string `json:"kind"`
} `json:"node"`
} `json:"edges"`
} `json:"consentCategories"`
ConsentCategories struct {
Edges []struct {
Node struct {
ID string `json:"id"`
Kind string `json:"kind"`
} `json:"node"`
} `json:"edges"`
} `json:"consentCategories"`
} `json:"node"`
}
@@ -440,19 +440,19 @@ func TestCookieCategory_List(t *testing.T) {
var result struct {
Node struct {
ConsentCategories struct {
TotalCount int `json:"totalCount"`
Edges []struct {
Node struct {
ID string `json:"id"`
Rank int `json:"rank"`
} `json:"node"`
} `json:"edges"`
PageInfo struct {
HasNextPage bool `json:"hasNextPage"`
HasPreviousPage bool `json:"hasPreviousPage"`
} `json:"pageInfo"`
} `json:"consentCategories"`
ConsentCategories struct {
TotalCount int `json:"totalCount"`
Edges []struct {
Node struct {
ID string `json:"id"`
Rank int `json:"rank"`
} `json:"node"`
} `json:"edges"`
PageInfo struct {
HasNextPage bool `json:"hasNextPage"`
HasPreviousPage bool `json:"hasPreviousPage"`
} `json:"pageInfo"`
} `json:"consentCategories"`
} `json:"node"`
}