test(caps): golden roundtrip case for content.published_block_configs
The cms host parity gate replays these goldens; the capability landed in v0.2.3 without them, so hosts on v0.2.3 fail TestGoldenParity — pin v0.2.4 instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b5a288c3de
commit
99e791b6e9
@ -160,6 +160,19 @@ func TestCapabilityRoundTrip(t *testing.T) {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "content_published_block_configs", wantMethod: "content.published_block_configs",
|
||||
resp: &abiv1.ContentPublishedBlockConfigsResponse{Configs: [][]byte{[]byte(`{"captchaEnabled":true,"eventTypeSlug":"30min","username":"alice"}`)}},
|
||||
run: func(t *testing.T, cs plugin.CoreServices) {
|
||||
got, err := cs.Content.PublishedBlockConfigs(ctx, "calcom:booking")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(got) != 1 || got[0]["username"] != "alice" || got[0]["captchaEnabled"] != true {
|
||||
t.Errorf("configs = %+v", got)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "content_get_page", wantMethod: "content.get_page",
|
||||
resp: &abiv1.ContentGetPageResponse{Page: &abiv1.PageInfo{Id: idAuthor.String(), Slug: "about", Title: "About Us"}},
|
||||
|
||||
2
plugin/wasmguest/caps/testdata/golden/content_published_block_configs_req.pb
vendored
Normal file
2
plugin/wasmguest/caps/testdata/golden/content_published_block_configs_req.pb
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
calcom:booking
|
||||
2
plugin/wasmguest/caps/testdata/golden/content_published_block_configs_resp.pb
vendored
Normal file
2
plugin/wasmguest/caps/testdata/golden/content_published_block_configs_resp.pb
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
B{"captchaEnabled":true,"eventTypeSlug":"30min","username":"alice"}
|
||||
Loading…
x
Reference in New Issue
Block a user