Fix e2e test asserting source instead of trackerType
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -41,10 +41,10 @@ func TestTrackerPattern_Create(t *testing.T) {
|
|||||||
id
|
id
|
||||||
pattern
|
pattern
|
||||||
matchType
|
matchType
|
||||||
|
trackerType
|
||||||
displayName
|
displayName
|
||||||
maxAgeSeconds
|
maxAgeSeconds
|
||||||
description
|
description
|
||||||
source
|
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
}
|
}
|
||||||
@@ -63,10 +63,10 @@ func TestTrackerPattern_Create(t *testing.T) {
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Pattern string `json:"pattern"`
|
Pattern string `json:"pattern"`
|
||||||
MatchType string `json:"matchType"`
|
MatchType string `json:"matchType"`
|
||||||
|
TrackerType string `json:"trackerType"`
|
||||||
DisplayName string `json:"displayName"`
|
DisplayName string `json:"displayName"`
|
||||||
MaxAgeSeconds *int `json:"maxAgeSeconds"`
|
MaxAgeSeconds *int `json:"maxAgeSeconds"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Source string `json:"source"`
|
|
||||||
CreatedAt string `json:"createdAt"`
|
CreatedAt string `json:"createdAt"`
|
||||||
UpdatedAt string `json:"updatedAt"`
|
UpdatedAt string `json:"updatedAt"`
|
||||||
} `json:"node"`
|
} `json:"node"`
|
||||||
@@ -83,6 +83,7 @@ func TestTrackerPattern_Create(t *testing.T) {
|
|||||||
"cookieCategoryId": categoryID,
|
"cookieCategoryId": categoryID,
|
||||||
"pattern": "_ga",
|
"pattern": "_ga",
|
||||||
"matchType": "EXACT",
|
"matchType": "EXACT",
|
||||||
|
"trackerType": "SCRIPT",
|
||||||
"displayName": "Google Analytics",
|
"displayName": "Google Analytics",
|
||||||
"maxAgeSeconds": maxAge,
|
"maxAgeSeconds": maxAge,
|
||||||
"description": "Google Analytics tracking cookie",
|
"description": "Google Analytics tracking cookie",
|
||||||
@@ -94,11 +95,11 @@ func TestTrackerPattern_Create(t *testing.T) {
|
|||||||
assert.NotEmpty(t, node.ID)
|
assert.NotEmpty(t, node.ID)
|
||||||
assert.Equal(t, "_ga", node.Pattern)
|
assert.Equal(t, "_ga", node.Pattern)
|
||||||
assert.Equal(t, "EXACT", node.MatchType)
|
assert.Equal(t, "EXACT", node.MatchType)
|
||||||
|
assert.Equal(t, "SCRIPT", node.TrackerType)
|
||||||
assert.Equal(t, "Google Analytics", node.DisplayName)
|
assert.Equal(t, "Google Analytics", node.DisplayName)
|
||||||
require.NotNil(t, node.MaxAgeSeconds)
|
require.NotNil(t, node.MaxAgeSeconds)
|
||||||
assert.Equal(t, maxAge, *node.MaxAgeSeconds)
|
assert.Equal(t, maxAge, *node.MaxAgeSeconds)
|
||||||
assert.Equal(t, "Google Analytics tracking cookie", node.Description)
|
assert.Equal(t, "Google Analytics tracking cookie", node.Description)
|
||||||
assert.Equal(t, "SCRIPT", node.Source)
|
|
||||||
assert.Equal(t, bannerID, result.CreateTrackerPattern.CookieBanner.ID)
|
assert.Equal(t, bannerID, result.CreateTrackerPattern.CookieBanner.ID)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user