Skip to content

Commit 28b7cc9

Browse files
committed
test: update Slack container assertions
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
1 parent 8058eb1 commit 28b7cc9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/tools/__tests__/block-catalog.test.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ describe("showcase_all_slack_blocks_catalog", () => {
273273
for (const container of catalogBlocks().filter(
274274
(block) => block.type === "container",
275275
)) {
276-
const children = (container as { blocks?: { type: string }[] }).blocks;
276+
const children = (
277+
container as { child_blocks?: { type: string }[] }
278+
).child_blocks;
277279
expect(children?.length).toBeGreaterThan(0);
278280
expect(children?.map(({ type }) => type)).not.toContain("markdown");
279281
}
@@ -580,10 +582,10 @@ describe("the booking confirmation", () => {
580582
// Measured live: Slack refuses a `markdown` child of a container and loses
581583
// the whole message with it.
582584
const container = confirmed().find(({ type }) => type === "container") as {
583-
blocks: { type: string }[];
585+
child_blocks: { type: string }[];
584586
};
585587

586-
expect(container.blocks.map(({ type }) => type)).toEqual([
588+
expect(container.child_blocks.map(({ type }) => type)).toEqual([
587589
"header",
588590
"section",
589591
"divider",

0 commit comments

Comments
 (0)