Skip to content

Commit

Permalink
feat: improve the hello-action UI
Browse files Browse the repository at this point in the history
Signed-off-by: Raymond Feng <[email protected]>
  • Loading branch information
raymondfeng committed Jul 11, 2023
1 parent 75d6ef3 commit 619bd4e
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 88 deletions.
34 changes: 33 additions & 1 deletion src/__tests__/acceptance/hello-action-ecdsa.acceptance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,45 @@ describe('HelloAction - ecdsa', () => {
description: "Name of person we're greeting",
type: 3,
required: true,
autocomplete: true,
},
],
},
]);
expect(result.response).to.eql({
type: 4,
data: {content: 'Hello, John!', flags: 64},
data: {
content: 'Hello, John!',
embeds: [
{
title: 'Hello Action',
color: 16106056,
author: {
name: 'Collab.Land',
url: 'https://collab.land',
icon_url:
'https://cdn.discordapp.com/app-icons/715138531994894397/8a814f663844a69d22344dc8f4983de6.png',
},
description:
'This is demo Collab.Land action that adds `/hello-action` command to your Discord server. Please click the `Count down` button below to proceed.',
url: 'https://github.com/abridged/collabland-hello-action/',
},
],
components: [
{
type: 1,
components: [
{
type: 2,
label: 'Count down',
style: 1,
custom_id: 'hello-action:count-button',
},
],
},
],
flags: 64,
},
});
});
});
36 changes: 34 additions & 2 deletions src/__tests__/acceptance/hello-action-ed25519.acceptance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('HelloAction - ed25519', () => {
await app.stop();
});

it('invokes action with ecdsa signature', async () => {
it('invokes action with ed25519 signature', async () => {
const result = await client(
app.restServer.url + '/hello-action',
'ed25519:' + signingKey,
Expand All @@ -42,13 +42,45 @@ describe('HelloAction - ed25519', () => {
description: "Name of person we're greeting",
type: 3,
required: true,
autocomplete: true,
},
],
},
]);
expect(result.response).to.eql({
type: 4,
data: {content: 'Hello, John!', flags: 64},
data: {
content: 'Hello, John!',
embeds: [
{
title: 'Hello Action',
color: 16106056,
author: {
name: 'Collab.Land',
url: 'https://collab.land',
icon_url:
'https://cdn.discordapp.com/app-icons/715138531994894397/8a814f663844a69d22344dc8f4983de6.png',
},
description:
'This is demo Collab.Land action that adds `/hello-action` command to your Discord server. Please click the `Count down` button below to proceed.',
url: 'https://github.com/abridged/collabland-hello-action/',
},
],
components: [
{
type: 1,
components: [
{
type: 2,
label: 'Count down',
style: 1,
custom_id: 'hello-action:count-button',
},
],
},
],
flags: 64,
},
});
});
});
Loading

0 comments on commit 619bd4e

Please sign in to comment.