Skip to content

Commit c8ae7dc

Browse files
authored
fix: Add track event button to test-snaps (#3550)
`test-snaps` was missing a button to test events.
1 parent e8633e9 commit c8ae7dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/test-snaps/src/features/snaps/preinstalled/Preinstalled.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ export const Preinstalled: FunctionComponent = () => {
3030
}).catch(logError);
3131
};
3232

33+
const handleSubmitTrackEvent = () => {
34+
invokeSnap({
35+
snapId: PREINSTALLED_SNAP_ID,
36+
method: 'trackEvent',
37+
}).catch(logError);
38+
};
39+
3340
const handleStartTrace = () => {
3441
invokeSnap({
3542
snapId: PREINSTALLED_SNAP_ID,
@@ -76,6 +83,14 @@ export const Preinstalled: FunctionComponent = () => {
7683
>
7784
Track error
7885
</Button>
86+
<Button
87+
variant="primary"
88+
id="trackEvent"
89+
disabled={isLoading}
90+
onClick={handleSubmitTrackEvent}
91+
>
92+
Track event
93+
</Button>
7994
</ButtonGroup>
8095
<ButtonGroup className="mb-3">
8196
<Button

0 commit comments

Comments
 (0)