@elizaos/cli 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/README.md +9 -16
  2. package/dist/assets/{index-Cxd2b7is.js → index-Cuyjmso1.js} +1434 -13725
  3. package/dist/assets/{index-Cxd2b7is.js.map → index-Cuyjmso1.js.map} +1 -1
  4. package/dist/assets/index-Df1AFSuJ.css +1 -0
  5. package/dist/assets/index-Df1AFSuJ.css.br +0 -0
  6. package/dist/assets/{index-CCyz05Yl.js → index-poChVCDJ.js} +72 -89
  7. package/dist/assets/index-poChVCDJ.js.br +0 -0
  8. package/dist/assets/index-poChVCDJ.js.map +1 -0
  9. package/dist/assets/vendor-DSdxb8P-.js.map +1 -1
  10. package/dist/{chunk-Z6GVELRX.js → chunk-HBV76MGW.js} +58 -29
  11. package/dist/{chunk-CVADLFW6.js → chunk-LQ6XHF53.js} +4543 -3043
  12. package/dist/{chunk-Y755OOSP.js → chunk-QLKBXRME.js} +883 -1553
  13. package/dist/{chunk-JWONHNLD.js → chunk-RIAWNDYI.js} +2 -9
  14. package/dist/{chunk-HZQCHL3J.js → chunk-TPLM6M7M.js} +13 -18
  15. package/dist/{chunk-IEKLJDUU.js → chunk-WS4DWCDZ.js} +54 -32
  16. package/dist/commands/agent/actions/index.d.ts +5 -1
  17. package/dist/commands/agent/actions/index.js +5 -3
  18. package/dist/commands/agent/index.js +3 -3
  19. package/dist/commands/create/actions/index.js +4 -4
  20. package/dist/commands/create/index.js +5 -5
  21. package/dist/{fileFromPath-DCRQMDLJ.js → fileFromPath-KB6XMTJ4.js} +1 -0
  22. package/dist/index.html +2 -2
  23. package/dist/index.js +9351 -102236
  24. package/dist/{migrator-KZLCVEIH.js → migrator-JREQPDN3.js} +42 -220
  25. package/dist/pglite.data +0 -0
  26. package/dist/pglite.wasm +0 -0
  27. package/dist/plugin-creator-T4K2673C.js +910 -0
  28. package/dist/{registry-W7CIK4O2.js → registry-PTOPJQEB.js} +3 -3
  29. package/dist/templates/plugin-starter/README.md +255 -0
  30. package/dist/templates/plugin-starter/bunfig.toml +6 -0
  31. package/dist/templates/plugin-starter/cypress.config.ts +18 -0
  32. package/dist/templates/plugin-starter/index.html +13 -0
  33. package/dist/templates/plugin-starter/package.json +95 -0
  34. package/dist/templates/plugin-starter/postcss.config.js +3 -0
  35. package/dist/templates/plugin-starter/scripts/test-e2e-manual.js +201 -0
  36. package/dist/templates/plugin-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +404 -0
  37. package/dist/templates/plugin-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +287 -0
  38. package/dist/templates/plugin-starter/src/__tests__/cypress/support/commands.ts +38 -0
  39. package/dist/templates/plugin-starter/src/__tests__/cypress/support/component-index.html +11 -0
  40. package/dist/templates/plugin-starter/src/__tests__/cypress/support/component.ts +33 -0
  41. package/dist/templates/plugin-starter/src/__tests__/cypress/support/e2e.ts +11 -0
  42. package/dist/templates/plugin-starter/src/__tests__/cypress/tsconfig.json +10 -0
  43. package/dist/templates/plugin-starter/src/__tests__/e2e/README.md +47 -0
  44. package/dist/templates/plugin-starter/src/__tests__/e2e/starter-plugin.ts +320 -0
  45. package/{templates/plugin-starter → dist/templates/plugin-starter/src}/__tests__/integration.test.ts +22 -17
  46. package/{templates/plugin-starter → dist/templates/plugin-starter/src}/__tests__/plugin.test.ts +8 -8
  47. package/{templates/plugin-starter → dist/templates/plugin-starter/src}/__tests__/test-utils.ts +17 -17
  48. package/dist/templates/plugin-starter/src/frontend/index.css +77 -0
  49. package/dist/templates/plugin-starter/src/frontend/index.tsx +164 -0
  50. package/dist/templates/plugin-starter/src/frontend/utils.ts +6 -0
  51. package/dist/templates/plugin-starter/src/index.ts +274 -0
  52. package/dist/templates/plugin-starter/src/tests.ts +6 -0
  53. package/dist/templates/plugin-starter/tailwind.config.js +62 -0
  54. package/dist/templates/plugin-starter/tsconfig.build.json +11 -0
  55. package/dist/templates/plugin-starter/tsconfig.json +28 -0
  56. package/dist/templates/plugin-starter/tsup.config.ts +20 -0
  57. package/dist/templates/plugin-starter/vite.config.ts +20 -0
  58. package/dist/templates/project-starter/.env.example +153 -0
  59. package/dist/templates/project-starter/README.md +109 -0
  60. package/dist/templates/project-starter/bunfig.toml +6 -0
  61. package/dist/templates/project-starter/cypress.config.ts +31 -0
  62. package/dist/templates/project-starter/index.html +13 -0
  63. package/dist/templates/project-starter/package.json +83 -0
  64. package/dist/templates/project-starter/postcss.config.js +3 -0
  65. package/dist/templates/project-starter/scripts/test-all.sh +101 -0
  66. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/actions.test.ts +6 -6
  67. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/character.test.ts +3 -3
  68. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/config.test.ts +18 -18
  69. package/dist/templates/project-starter/src/__tests__/cypress/component/Accessibility.cy.tsx +271 -0
  70. package/dist/templates/project-starter/src/__tests__/cypress/component/ApiIntegration.cy.tsx +220 -0
  71. package/dist/templates/project-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +146 -0
  72. package/dist/templates/project-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +51 -0
  73. package/dist/templates/project-starter/src/__tests__/cypress/e2e/agent-chat.cy.ts +235 -0
  74. package/dist/templates/project-starter/src/__tests__/cypress/e2e/dashboard.cy.ts +146 -0
  75. package/dist/templates/project-starter/src/__tests__/cypress/e2e/user-workflow.cy.ts +257 -0
  76. package/dist/templates/project-starter/src/__tests__/cypress/support/commands.ts +44 -0
  77. package/dist/templates/project-starter/src/__tests__/cypress/support/component-index.html +11 -0
  78. package/dist/templates/project-starter/src/__tests__/cypress/support/component.ts +33 -0
  79. package/dist/templates/project-starter/src/__tests__/cypress/support/e2e.ts +179 -0
  80. package/dist/templates/project-starter/src/__tests__/e2e/index.ts +14 -0
  81. package/dist/templates/project-starter/src/__tests__/e2e/natural-language.test.ts +246 -0
  82. package/dist/templates/project-starter/src/__tests__/e2e/project.test.ts +155 -0
  83. package/dist/templates/project-starter/src/__tests__/e2e/starter-plugin.test.ts +421 -0
  84. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/env.test.ts +2 -2
  85. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/error-handling.test.ts +17 -17
  86. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/events.test.ts +7 -7
  87. package/dist/templates/project-starter/src/__tests__/file-structure.test.ts +135 -0
  88. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/integration.test.ts +25 -25
  89. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/models.test.ts +6 -6
  90. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/plugin.test.ts +9 -9
  91. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/provider.test.ts +7 -7
  92. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/routes.test.ts +3 -3
  93. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/test-utils.ts +17 -17
  94. package/{templates/project-starter → dist/templates/project-starter/src}/__tests__/utils/core-test-utils.ts +3 -3
  95. package/dist/templates/project-starter/src/frontend/index.css +77 -0
  96. package/dist/templates/project-starter/src/frontend/index.html +19 -0
  97. package/dist/templates/project-starter/src/frontend/index.tsx +98 -0
  98. package/dist/templates/project-starter/src/frontend/utils.ts +6 -0
  99. package/dist/templates/project-starter/src/index.ts +153 -0
  100. package/dist/templates/project-starter/src/plugin.ts +255 -0
  101. package/dist/templates/project-starter/tailwind.config.js +62 -0
  102. package/dist/templates/project-starter/tsconfig.build.json +20 -0
  103. package/dist/templates/project-starter/tsconfig.json +39 -0
  104. package/dist/templates/project-starter/tsup.config.ts +19 -0
  105. package/dist/templates/project-starter/vite.config.ts +39 -0
  106. package/dist/templates/project-tee-starter/.dockerignore +20 -0
  107. package/dist/templates/project-tee-starter/.env.example +55 -0
  108. package/dist/templates/project-tee-starter/Dockerfile +66 -0
  109. package/dist/templates/project-tee-starter/GUIDE.md +235 -0
  110. package/dist/templates/project-tee-starter/README.md +173 -0
  111. package/dist/templates/project-tee-starter/__tests__/actions.test.ts +9 -0
  112. package/dist/templates/project-tee-starter/__tests__/character.test.ts +86 -0
  113. package/dist/templates/project-tee-starter/__tests__/config.test.ts +31 -0
  114. package/dist/templates/project-tee-starter/__tests__/env.test.ts +87 -0
  115. package/dist/templates/project-tee-starter/__tests__/error-handling.test.ts +30 -0
  116. package/dist/templates/project-tee-starter/__tests__/events.test.ts +21 -0
  117. package/{templates/project-starter → dist/templates/project-tee-starter}/__tests__/file-structure.test.ts +6 -6
  118. package/dist/templates/project-tee-starter/__tests__/integration.test.ts +205 -0
  119. package/dist/templates/project-tee-starter/__tests__/models.test.ts +22 -0
  120. package/dist/templates/project-tee-starter/__tests__/plugin.test.ts +38 -0
  121. package/dist/templates/project-tee-starter/__tests__/provider.test.ts +189 -0
  122. package/dist/templates/project-tee-starter/__tests__/routes.test.ts +21 -0
  123. package/dist/templates/project-tee-starter/__tests__/test-utils.ts +121 -0
  124. package/dist/templates/project-tee-starter/__tests__/utils/core-test-utils.ts +167 -0
  125. package/dist/templates/project-tee-starter/assets/mr-tee-portrait.jpg +0 -0
  126. package/dist/templates/project-tee-starter/bunfig.toml +6 -0
  127. package/dist/templates/project-tee-starter/docker-compose.yaml +57 -0
  128. package/dist/templates/project-tee-starter/e2e/project.test.ts +38 -0
  129. package/dist/templates/project-tee-starter/e2e/starter-plugin.test.ts +92 -0
  130. package/dist/templates/project-tee-starter/package.json +74 -0
  131. package/dist/templates/project-tee-starter/src/character.ts +257 -0
  132. package/dist/templates/project-tee-starter/src/index.ts +33 -0
  133. package/dist/templates/project-tee-starter/src/plugin.ts +169 -0
  134. package/dist/templates/project-tee-starter/tsconfig.build.json +13 -0
  135. package/dist/templates/project-tee-starter/tsconfig.json +30 -0
  136. package/dist/templates/project-tee-starter/tsup.config.ts +19 -0
  137. package/dist/{utils-2G2QVMW3.js → utils-TDE6Y3CB.js} +9 -7
  138. package/package.json +28 -9
  139. package/templates/plugin-starter/README.md +38 -13
  140. package/templates/plugin-starter/bunfig.toml +6 -0
  141. package/templates/plugin-starter/cypress.config.ts +18 -0
  142. package/templates/plugin-starter/index.html +13 -0
  143. package/templates/plugin-starter/package.json +19 -7
  144. package/templates/plugin-starter/postcss.config.js +3 -0
  145. package/templates/plugin-starter/scripts/test-e2e-manual.js +201 -0
  146. package/templates/plugin-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +404 -0
  147. package/templates/plugin-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +287 -0
  148. package/templates/plugin-starter/src/__tests__/cypress/support/commands.ts +38 -0
  149. package/templates/plugin-starter/src/__tests__/cypress/support/component-index.html +11 -0
  150. package/templates/plugin-starter/src/__tests__/cypress/support/component.ts +33 -0
  151. package/templates/plugin-starter/src/__tests__/cypress/support/e2e.ts +11 -0
  152. package/templates/plugin-starter/src/__tests__/cypress/tsconfig.json +10 -0
  153. package/templates/plugin-starter/src/__tests__/e2e/README.md +47 -0
  154. package/templates/plugin-starter/src/__tests__/e2e/starter-plugin.ts +320 -0
  155. package/templates/plugin-starter/src/__tests__/integration.test.ts +138 -0
  156. package/templates/plugin-starter/src/__tests__/plugin.test.ts +182 -0
  157. package/templates/plugin-starter/src/__tests__/test-utils.ts +162 -0
  158. package/templates/plugin-starter/src/frontend/index.css +77 -0
  159. package/templates/plugin-starter/src/frontend/index.tsx +164 -0
  160. package/templates/plugin-starter/src/frontend/utils.ts +6 -0
  161. package/templates/plugin-starter/src/index.ts +30 -7
  162. package/templates/plugin-starter/src/tests.ts +6 -0
  163. package/templates/plugin-starter/tailwind.config.js +62 -0
  164. package/templates/plugin-starter/tsconfig.json +8 -8
  165. package/templates/plugin-starter/vite.config.ts +20 -0
  166. package/templates/project-starter/bunfig.toml +6 -0
  167. package/templates/project-starter/cypress.config.ts +31 -0
  168. package/templates/project-starter/index.html +13 -0
  169. package/templates/project-starter/package.json +37 -14
  170. package/templates/project-starter/postcss.config.js +3 -0
  171. package/templates/project-starter/scripts/test-all.sh +101 -0
  172. package/templates/project-starter/src/__tests__/actions.test.ts +155 -0
  173. package/templates/project-starter/src/__tests__/character.test.ts +86 -0
  174. package/templates/project-starter/src/__tests__/config.test.ts +193 -0
  175. package/templates/project-starter/src/__tests__/cypress/component/Accessibility.cy.tsx +271 -0
  176. package/templates/project-starter/src/__tests__/cypress/component/ApiIntegration.cy.tsx +220 -0
  177. package/templates/project-starter/src/__tests__/cypress/component/ExampleRoute.cy.tsx +146 -0
  178. package/templates/project-starter/src/__tests__/cypress/component/PanelComponent.cy.tsx +51 -0
  179. package/templates/project-starter/src/__tests__/cypress/e2e/agent-chat.cy.ts +235 -0
  180. package/templates/project-starter/src/__tests__/cypress/e2e/dashboard.cy.ts +146 -0
  181. package/templates/project-starter/src/__tests__/cypress/e2e/user-workflow.cy.ts +257 -0
  182. package/templates/project-starter/src/__tests__/cypress/support/commands.ts +44 -0
  183. package/templates/project-starter/src/__tests__/cypress/support/component-index.html +11 -0
  184. package/templates/project-starter/src/__tests__/cypress/support/component.ts +33 -0
  185. package/templates/project-starter/src/__tests__/cypress/support/e2e.ts +179 -0
  186. package/templates/project-starter/src/__tests__/e2e/index.ts +14 -0
  187. package/templates/project-starter/src/__tests__/e2e/natural-language.test.ts +246 -0
  188. package/templates/project-starter/src/__tests__/e2e/project.test.ts +155 -0
  189. package/templates/project-starter/src/__tests__/e2e/starter-plugin.test.ts +421 -0
  190. package/templates/project-starter/src/__tests__/env.test.ts +87 -0
  191. package/templates/project-starter/src/__tests__/error-handling.test.ts +177 -0
  192. package/templates/project-starter/src/__tests__/events.test.ts +144 -0
  193. package/templates/project-starter/src/__tests__/file-structure.test.ts +135 -0
  194. package/templates/project-starter/src/__tests__/integration.test.ts +209 -0
  195. package/templates/project-starter/src/__tests__/models.test.ts +152 -0
  196. package/templates/project-starter/src/__tests__/plugin.test.ts +393 -0
  197. package/templates/project-starter/src/__tests__/provider.test.ts +325 -0
  198. package/templates/project-starter/src/__tests__/routes.test.ts +79 -0
  199. package/templates/project-starter/src/__tests__/test-utils.ts +121 -0
  200. package/templates/project-starter/src/__tests__/utils/core-test-utils.ts +180 -0
  201. package/templates/project-starter/src/frontend/index.css +77 -0
  202. package/templates/project-starter/src/frontend/index.html +19 -0
  203. package/templates/project-starter/src/frontend/index.tsx +98 -0
  204. package/templates/project-starter/src/frontend/utils.ts +6 -0
  205. package/templates/project-starter/src/index.ts +3 -0
  206. package/templates/project-starter/tailwind.config.js +62 -0
  207. package/templates/project-starter/tsconfig.build.json +9 -2
  208. package/templates/project-starter/tsconfig.json +15 -6
  209. package/templates/project-starter/tsup.config.ts +1 -1
  210. package/templates/project-starter/vite.config.ts +39 -0
  211. package/templates/project-tee-starter/__tests__/actions.test.ts +1 -1
  212. package/templates/project-tee-starter/__tests__/character.test.ts +1 -1
  213. package/templates/project-tee-starter/__tests__/config.test.ts +1 -1
  214. package/templates/project-tee-starter/__tests__/env.test.ts +2 -2
  215. package/templates/project-tee-starter/__tests__/error-handling.test.ts +1 -1
  216. package/templates/project-tee-starter/__tests__/events.test.ts +1 -1
  217. package/templates/project-tee-starter/__tests__/file-structure.test.ts +5 -5
  218. package/templates/project-tee-starter/__tests__/integration.test.ts +22 -26
  219. package/templates/project-tee-starter/__tests__/models.test.ts +1 -1
  220. package/templates/project-tee-starter/__tests__/plugin.test.ts +6 -12
  221. package/templates/project-tee-starter/__tests__/provider.test.ts +6 -6
  222. package/templates/project-tee-starter/__tests__/routes.test.ts +1 -1
  223. package/templates/project-tee-starter/__tests__/test-utils.ts +15 -15
  224. package/templates/project-tee-starter/__tests__/utils/core-test-utils.ts +3 -3
  225. package/templates/project-tee-starter/bunfig.toml +6 -0
  226. package/templates/project-tee-starter/package.json +10 -12
  227. package/dist/assets/index-CCyz05Yl.js.br +0 -0
  228. package/dist/assets/index-CCyz05Yl.js.map +0 -1
  229. package/dist/assets/index-DeXwJbtm.css +0 -1
  230. package/dist/assets/index-DeXwJbtm.css.br +0 -0
  231. package/dist/chunk-CEE6RKN5.js +0 -2746
  232. package/dist/chunk-TUAYJIF2.js +0 -3649
  233. package/dist/plugin-creator-IK6H4LVZ.js +0 -29165
  234. package/templates/plugin-starter/e2e/starter-plugin.test.ts +0 -171
  235. package/templates/plugin-starter/images/README.md +0 -24
  236. package/templates/plugin-starter/vitest.config.ts +0 -16
  237. package/templates/project-starter/e2e/project.test.ts +0 -34
  238. package/templates/project-starter/e2e/starter-plugin.test.ts +0 -217
  239. package/templates/project-starter/vitest.config.ts +0 -16
  240. package/templates/project-tee-starter/vitest.config.ts +0 -19
@@ -0,0 +1,235 @@
1
+ /**
2
+ * E2E Tests for Agent Chat Functionality
3
+ *
4
+ * These tests verify the chat interface and agent interactions
5
+ * in the running application.
6
+ */
7
+
8
+ describe('Agent Chat E2E Tests', () => {
9
+ beforeEach(() => {
10
+ // Visit the dashboard
11
+ cy.visit('/');
12
+
13
+ // Navigate to chat or agents section
14
+ cy.get('a[href*="chat"], a[href*="agent"], button:contains("chat"), button:contains("agent")', {
15
+ timeout: 5000,
16
+ })
17
+ .first()
18
+ .click({ force: true });
19
+ });
20
+
21
+ describe('Chat Interface', () => {
22
+ it('should display the chat interface', () => {
23
+ // Look for chat-related elements
24
+ cy.get('[data-testid="chat-container"], .chat-container, #chat, [role="main"]').should(
25
+ 'be.visible'
26
+ );
27
+ });
28
+
29
+ it('should have a message input field', () => {
30
+ // Look for input field
31
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
32
+ .filter(':visible')
33
+ .first()
34
+ .should('be.visible')
35
+ .should('not.be.disabled');
36
+ });
37
+
38
+ it('should have a send button', () => {
39
+ // Look for send button
40
+ cy.get('button')
41
+ .filter(':contains("Send"), :contains("send"), [aria-label*="send"]')
42
+ .should('be.visible')
43
+ .should('not.be.disabled');
44
+ });
45
+ });
46
+
47
+ describe('Sending Messages', () => {
48
+ it('should send a message when typing and clicking send', () => {
49
+ const testMessage = 'Hello, this is a test message';
50
+
51
+ // Type message
52
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
53
+ .filter(':visible')
54
+ .first()
55
+ .type(testMessage);
56
+
57
+ // Click send
58
+ cy.get('button')
59
+ .filter(':contains("Send"), :contains("send"), [aria-label*="send"]')
60
+ .first()
61
+ .click();
62
+
63
+ // Verify message appears in chat
64
+ cy.contains(testMessage, { timeout: 10000 }).should('be.visible');
65
+ });
66
+
67
+ it('should send a message when pressing Enter', () => {
68
+ const testMessage = 'Test message with Enter key';
69
+
70
+ // Type message and press Enter
71
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
72
+ .filter(':visible')
73
+ .first()
74
+ .type(`${testMessage}{enter}`);
75
+
76
+ // Verify message appears
77
+ cy.contains(testMessage, { timeout: 10000 }).should('be.visible');
78
+ });
79
+
80
+ it('should clear input after sending', () => {
81
+ const testMessage = 'Message to clear';
82
+
83
+ // Get input element
84
+ const input = cy
85
+ .get('input[type="text"], textarea, [contenteditable="true"]')
86
+ .filter(':visible')
87
+ .first();
88
+
89
+ // Type and send
90
+ input.type(testMessage);
91
+
92
+ cy.get('button')
93
+ .filter(':contains("Send"), :contains("send"), [aria-label*="send"]')
94
+ .first()
95
+ .click();
96
+
97
+ // Verify input is cleared
98
+ input.should('have.value', '');
99
+ });
100
+ });
101
+
102
+ describe('Agent Responses', () => {
103
+ it('should receive a response from the agent', () => {
104
+ // Send a simple message
105
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
106
+ .filter(':visible')
107
+ .first()
108
+ .type('Hello agent{enter}');
109
+
110
+ // Wait for agent response
111
+ // Look for typical agent response indicators
112
+ cy.get('[data-testid*="agent"], [class*="agent"], [role="article"]', {
113
+ timeout: 15000,
114
+ }).should('have.length.greaterThan', 0);
115
+ });
116
+
117
+ it('should show typing indicator while agent is responding', () => {
118
+ // Send message
119
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
120
+ .filter(':visible')
121
+ .first()
122
+ .type('Tell me about yourself{enter}');
123
+
124
+ // Look for typing indicator
125
+ cy.get('[data-testid="typing"], [class*="typing"], [aria-label*="typing"]', {
126
+ timeout: 5000,
127
+ }).should('be.visible');
128
+
129
+ // Typing indicator should disappear after response
130
+ cy.get('[data-testid="typing"], [class*="typing"], [aria-label*="typing"]', {
131
+ timeout: 15000,
132
+ }).should('not.exist');
133
+ });
134
+ });
135
+
136
+ describe('Chat History', () => {
137
+ it('should maintain chat history', () => {
138
+ const messages = ['First message', 'Second message', 'Third message'];
139
+
140
+ // Send multiple messages
141
+ messages.forEach((msg, index) => {
142
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
143
+ .filter(':visible')
144
+ .first()
145
+ .type(`${msg}{enter}`);
146
+
147
+ // Wait a bit between messages
148
+ cy.wait(1000);
149
+ });
150
+
151
+ // Verify all messages are visible
152
+ messages.forEach((msg) => {
153
+ cy.contains(msg).should('be.visible');
154
+ });
155
+ });
156
+
157
+ it('should scroll to latest message', () => {
158
+ // Send multiple messages to create scroll
159
+ for (let i = 0; i < 10; i++) {
160
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
161
+ .filter(':visible')
162
+ .first()
163
+ .type(`Message number ${i}{enter}`);
164
+ cy.wait(500);
165
+ }
166
+
167
+ // Check that the latest message is in view
168
+ cy.contains('Message number 9').should('be.visible');
169
+ });
170
+ });
171
+
172
+ describe('Error Handling', () => {
173
+ it('should handle network errors gracefully', () => {
174
+ // Intercept API calls and force error
175
+ cy.intercept('POST', '**/api/chat/**', {
176
+ statusCode: 500,
177
+ body: { error: 'Server error' },
178
+ }).as('chatError');
179
+
180
+ // Send message
181
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
182
+ .filter(':visible')
183
+ .first()
184
+ .type('This will fail{enter}');
185
+
186
+ // Should show error message
187
+ cy.contains(/error|failed|try again/i, { timeout: 10000 }).should('be.visible');
188
+ });
189
+
190
+ it('should prevent sending empty messages', () => {
191
+ // Try to send empty message
192
+ cy.get('button')
193
+ .filter(':contains("Send"), :contains("send"), [aria-label*="send"]')
194
+ .first()
195
+ .click();
196
+
197
+ // Should not create any new message elements
198
+ cy.get('[data-testid*="message"], [class*="message"]').should('have.length', 0);
199
+ });
200
+ });
201
+ });
202
+
203
+ /**
204
+ * CHAT TESTING PATTERNS
205
+ *
206
+ * 1. MESSAGE FLOW
207
+ * - Test sending messages
208
+ * - Verify message display
209
+ * - Check input clearing
210
+ * - Test keyboard shortcuts
211
+ *
212
+ * 2. AGENT INTERACTION
213
+ * - Wait for responses
214
+ * - Check typing indicators
215
+ * - Verify response format
216
+ * - Test conversation context
217
+ *
218
+ * 3. UI BEHAVIOR
219
+ * - Auto-scroll to latest
220
+ * - Maintain history
221
+ * - Handle long messages
222
+ * - Responsive layout
223
+ *
224
+ * 4. ERROR CASES
225
+ * - Network failures
226
+ * - Empty messages
227
+ * - Rate limiting
228
+ * - Session timeouts
229
+ *
230
+ * TIPS:
231
+ * - Use generous timeouts for agent responses
232
+ * - Test real-world scenarios
233
+ * - Verify accessibility features
234
+ * - Check mobile interactions
235
+ */
@@ -0,0 +1,146 @@
1
+ /**
2
+ * E2E Tests for ElizaOS Dashboard
3
+ *
4
+ * These tests verify the full application flow from a user's perspective,
5
+ * testing real interactions with the running application.
6
+ */
7
+
8
+ describe('Dashboard E2E Tests', () => {
9
+ beforeEach(() => {
10
+ // Visit the dashboard before each test
11
+ cy.visit('/');
12
+ });
13
+
14
+ describe('Dashboard Loading', () => {
15
+ it('should load the dashboard successfully', () => {
16
+ // Check that the page loads
17
+ cy.url().should('include', 'localhost:3000');
18
+
19
+ // Look for common dashboard elements
20
+ cy.get('body').should('be.visible');
21
+
22
+ // Check for any loading indicators
23
+ cy.get('[data-testid="loading"]', { timeout: 5000 }).should('not.exist');
24
+ });
25
+
26
+ it('should display the application title or logo', () => {
27
+ // Look for application branding
28
+ cy.contains(/eliza|agent/i).should('be.visible');
29
+ });
30
+
31
+ it('should have proper meta tags', () => {
32
+ // Check viewport meta tag
33
+ cy.get('meta[name="viewport"]')
34
+ .should('exist')
35
+ .should('have.attr', 'content')
36
+ .and('include', 'width=device-width');
37
+ });
38
+ });
39
+
40
+ describe('Navigation', () => {
41
+ it('should navigate to different sections', () => {
42
+ // Look for navigation elements
43
+ cy.get('nav, [role="navigation"], .navigation').should('exist');
44
+
45
+ // Check for common navigation items
46
+ const navItems = ['agents', 'chat', 'settings', 'docs'];
47
+ navItems.forEach((item) => {
48
+ cy.get(`a[href*="${item}"], button:contains("${item}")`, { timeout: 2000 }).should('exist');
49
+ });
50
+ });
51
+
52
+ it('should handle navigation clicks', () => {
53
+ // Click on a navigation item if it exists
54
+ cy.get('a[href*="agents"], button:contains("agents")', { timeout: 2000 })
55
+ .first()
56
+ .click({ force: true });
57
+
58
+ // Verify URL changed or content updated
59
+ cy.url().should('match', /agents|agent/i);
60
+ });
61
+ });
62
+
63
+ describe('Responsive Design', () => {
64
+ it('should be responsive on mobile', () => {
65
+ // Test mobile viewport
66
+ cy.viewport(375, 667);
67
+ cy.wait(500);
68
+
69
+ // Check that content is still visible
70
+ cy.get('body').should('be.visible');
71
+
72
+ // Mobile menu might be hidden
73
+ cy.get('nav, [role="navigation"]').then(($nav) => {
74
+ if ($nav.is(':visible')) {
75
+ expect($nav).to.be.visible;
76
+ } else {
77
+ // Look for mobile menu button
78
+ cy.get('[aria-label*="menu"], button[class*="menu"]').should('be.visible');
79
+ }
80
+ });
81
+ });
82
+
83
+ it('should be responsive on tablet', () => {
84
+ // Test tablet viewport
85
+ cy.viewport(768, 1024);
86
+ cy.wait(500);
87
+
88
+ cy.get('body').should('be.visible');
89
+ });
90
+ });
91
+
92
+ describe('Error Handling', () => {
93
+ it('should handle 404 pages gracefully', () => {
94
+ cy.visit('/non-existent-page', { failOnStatusCode: false });
95
+
96
+ // Should show some error message or redirect
97
+ cy.contains(/404|not found|error/i, { timeout: 5000 }).should('be.visible');
98
+ });
99
+
100
+ it('should handle network errors', () => {
101
+ // Intercept and force a network error
102
+ cy.intercept('GET', '/api/**', { forceNetworkError: true }).as('networkError');
103
+
104
+ cy.visit('/');
105
+
106
+ // Should handle the error gracefully
107
+ cy.get('body').should('be.visible');
108
+ });
109
+ });
110
+ });
111
+
112
+ /**
113
+ * E2E TESTING PATTERNS FOR ELIZAOS
114
+ *
115
+ * 1. REAL APPLICATION TESTING
116
+ * - Test against the running application
117
+ * - No mocking unless testing error scenarios
118
+ * - Verify actual user workflows
119
+ *
120
+ * 2. PAGE NAVIGATION
121
+ * - Test all navigation paths
122
+ * - Verify URL changes
123
+ * - Check for proper redirects
124
+ *
125
+ * 3. RESPONSIVE TESTING
126
+ * - Test multiple viewport sizes
127
+ * - Verify mobile menu behavior
128
+ * - Check touch interactions
129
+ *
130
+ * 4. PERFORMANCE
131
+ * - Set reasonable timeouts
132
+ * - Check for loading indicators
133
+ * - Verify async operations complete
134
+ *
135
+ * 5. ERROR SCENARIOS
136
+ * - Test 404 pages
137
+ * - Network failures
138
+ * - API errors
139
+ * - Form validation
140
+ *
141
+ * BEST PRACTICES:
142
+ * - Use data-testid attributes for reliable selection
143
+ * - Avoid brittle selectors based on classes
144
+ * - Test user-visible behavior, not implementation
145
+ * - Keep tests independent and idempotent
146
+ */
@@ -0,0 +1,257 @@
1
+ /**
2
+ * E2E Tests for Complete User Workflows
3
+ *
4
+ * These tests simulate real user journeys through the application,
5
+ * testing multiple features in sequence as a user would experience them.
6
+ */
7
+
8
+ describe('Complete User Workflow E2E Tests', () => {
9
+ describe('New User Onboarding', () => {
10
+ it('should complete the full onboarding flow', () => {
11
+ // Start at the home page
12
+ cy.visit('/');
13
+
14
+ // Check for welcome message or onboarding prompt
15
+ cy.get('body').then(($body) => {
16
+ if ($body.text().includes('Welcome') || $body.text().includes('Get Started')) {
17
+ // Click get started if available
18
+ cy.contains(/get started|start|begin/i)
19
+ .first()
20
+ .click();
21
+ }
22
+ });
23
+
24
+ // Navigate to agents/chat
25
+ cy.get('a[href*="agent"], button:contains("agent"), a[href*="chat"], button:contains("chat")')
26
+ .first()
27
+ .click({ force: true });
28
+
29
+ // Wait for page to load
30
+ cy.wait(1000);
31
+
32
+ // Send first message
33
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
34
+ .filter(':visible')
35
+ .first()
36
+ .type('Hello, I am a new user{enter}');
37
+
38
+ // Wait for response
39
+ cy.get('[data-testid*="message"], [class*="message"], [role="article"]', {
40
+ timeout: 15000,
41
+ }).should('have.length.greaterThan', 0);
42
+
43
+ // Continue conversation
44
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
45
+ .filter(':visible')
46
+ .first()
47
+ .type('What can you help me with?{enter}');
48
+
49
+ // Verify we got another response
50
+ cy.get('[data-testid*="message"], [class*="message"], [role="article"]', {
51
+ timeout: 15000,
52
+ }).should('have.length.greaterThan', 1);
53
+ });
54
+ });
55
+
56
+ describe('Agent Configuration Workflow', () => {
57
+ it('should configure and interact with an agent', () => {
58
+ cy.visit('/');
59
+
60
+ // Look for settings or configuration
61
+ cy.get(
62
+ 'a[href*="settings"], button:contains("settings"), a[href*="config"], button:contains("config")'
63
+ )
64
+ .first()
65
+ .then(($elem) => {
66
+ if ($elem.length) {
67
+ cy.wrap($elem).click({ force: true });
68
+
69
+ // Look for agent configuration options
70
+ cy.contains(/agent|model|personality/i).should('be.visible');
71
+
72
+ // Navigate back to chat
73
+ cy.get('a[href*="chat"], button:contains("chat")').first().click({ force: true });
74
+ }
75
+ });
76
+
77
+ // Test agent with specific queries
78
+ const queries = ['What is your name?', 'Tell me a joke', 'What is 2 + 2?'];
79
+
80
+ queries.forEach((query, index) => {
81
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
82
+ .filter(':visible')
83
+ .first()
84
+ .type(`${query}{enter}`);
85
+
86
+ // Wait for response before next query
87
+ cy.wait(2000);
88
+
89
+ // Verify response received
90
+ cy.get('[data-testid*="message"], [class*="message"], [role="article"]').should(
91
+ 'have.length.greaterThan',
92
+ index * 2
93
+ );
94
+ });
95
+ });
96
+ });
97
+
98
+ describe('Multi-Session Workflow', () => {
99
+ it('should maintain state across page refreshes', () => {
100
+ cy.visit('/');
101
+
102
+ // Navigate to chat
103
+ cy.get('a[href*="chat"], a[href*="agent"], button:contains("chat"), button:contains("agent")')
104
+ .first()
105
+ .click({ force: true });
106
+
107
+ // Send a message
108
+ const testMessage = 'Remember this message for testing';
109
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
110
+ .filter(':visible')
111
+ .first()
112
+ .type(`${testMessage}{enter}`);
113
+
114
+ // Wait for response
115
+ cy.wait(3000);
116
+
117
+ // Refresh the page
118
+ cy.reload();
119
+
120
+ // Check if conversation history is maintained
121
+ cy.contains(testMessage, { timeout: 10000 }).should('be.visible');
122
+ });
123
+
124
+ it('should handle multiple chat sessions', () => {
125
+ cy.visit('/');
126
+
127
+ // Create first chat session
128
+ cy.get('a[href*="chat"], button:contains("chat")').first().click({ force: true });
129
+
130
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
131
+ .filter(':visible')
132
+ .first()
133
+ .type('First session message{enter}');
134
+
135
+ cy.wait(2000);
136
+
137
+ // Look for new chat/session button
138
+ cy.get('button')
139
+ .filter(':contains("New"), :contains("new"), [aria-label*="new"]')
140
+ .first()
141
+ .then(($btn) => {
142
+ if ($btn.length) {
143
+ cy.wrap($btn).click();
144
+
145
+ // Send message in new session
146
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
147
+ .filter(':visible')
148
+ .first()
149
+ .type('Second session message{enter}');
150
+
151
+ // Verify messages are separate
152
+ cy.contains('Second session message').should('be.visible');
153
+ cy.contains('First session message').should('not.be.visible');
154
+ }
155
+ });
156
+ });
157
+ });
158
+
159
+ describe('Error Recovery Workflow', () => {
160
+ it('should recover from errors and continue working', () => {
161
+ cy.visit('/');
162
+
163
+ // Intercept network requests to simulate offline
164
+ cy.intercept('*', { forceNetworkError: true }).as('offlineMode');
165
+
166
+ // Try to send a message
167
+ cy.get('a[href*="chat"], button:contains("chat")').first().click({ force: true });
168
+
169
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
170
+ .filter(':visible')
171
+ .first()
172
+ .type('Offline message{enter}');
173
+
174
+ // Should show error
175
+ cy.contains(/offline|error|connection|failed/i, { timeout: 5000 }).should('be.visible');
176
+
177
+ // Remove the offline intercept to go back online
178
+ cy.intercept('*', (req) => {
179
+ req.continue();
180
+ }).as('onlineMode');
181
+
182
+ // Retry sending
183
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
184
+ .filter(':visible')
185
+ .first()
186
+ .type('Online message{enter}');
187
+
188
+ // Should work now
189
+ cy.contains('Online message', { timeout: 10000 }).should('be.visible');
190
+ });
191
+ });
192
+
193
+ describe('Performance Workflow', () => {
194
+ it('should handle rapid message sending', () => {
195
+ cy.visit('/');
196
+
197
+ cy.get('a[href*="chat"], button:contains("chat")').first().click({ force: true });
198
+
199
+ // Send multiple messages rapidly
200
+ for (let i = 0; i < 5; i++) {
201
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
202
+ .filter(':visible')
203
+ .first()
204
+ .type(`Rapid message ${i}{enter}`);
205
+
206
+ // Very short delay
207
+ cy.wait(100);
208
+ }
209
+
210
+ // All messages should be visible
211
+ for (let i = 0; i < 5; i++) {
212
+ cy.contains(`Rapid message ${i}`).should('be.visible');
213
+ }
214
+
215
+ // Should still be responsive
216
+ cy.get('input[type="text"], textarea, [contenteditable="true"]')
217
+ .filter(':visible')
218
+ .first()
219
+ .should('not.be.disabled');
220
+ });
221
+ });
222
+ });
223
+
224
+ /**
225
+ * WORKFLOW TESTING BEST PRACTICES
226
+ *
227
+ * 1. COMPLETE JOURNEYS
228
+ * - Test from start to finish
229
+ * - Include navigation between features
230
+ * - Verify state persistence
231
+ * - Test error recovery
232
+ *
233
+ * 2. REALISTIC SCENARIOS
234
+ * - New user experience
235
+ * - Power user workflows
236
+ * - Edge cases and errors
237
+ * - Performance under load
238
+ *
239
+ * 3. STATE MANAGEMENT
240
+ * - Test across refreshes
241
+ * - Multiple sessions
242
+ * - Browser back/forward
243
+ * - Local storage
244
+ *
245
+ * 4. INTEGRATION POINTS
246
+ * - API interactions
247
+ * - Real-time updates
248
+ * - Authentication flows
249
+ * - Data persistence
250
+ *
251
+ * WORKFLOW PATTERNS:
252
+ * - Always start from a clean state
253
+ * - Use realistic timing between actions
254
+ * - Verify intermediate states
255
+ * - Test both happy and error paths
256
+ * - Consider mobile workflows
257
+ */
@@ -0,0 +1,44 @@
1
+ // ***********************************************
2
+ // This file is where you can create custom Cypress commands
3
+ // and overwrite existing commands.
4
+ //
5
+ // For comprehensive examples, visit:
6
+ // https://on.cypress.io/custom-commands
7
+ // ***********************************************
8
+
9
+ // Example custom command
10
+ // Cypress.Commands.add('login', (email, password) => { ... })
11
+
12
+ // Extend Window interface
13
+ declare global {
14
+ interface Window {
15
+ ELIZA_CONFIG?: {
16
+ agentId: string;
17
+ apiBase: string;
18
+ };
19
+ }
20
+ }
21
+
22
+ // Custom command to check if element is in dark mode
23
+ Cypress.Commands.add('shouldBeDarkMode', () => {
24
+ cy.get('html').should('have.class', 'dark');
25
+ });
26
+
27
+ // Custom command to set ELIZA_CONFIG
28
+ Cypress.Commands.add('setElizaConfig', (config) => {
29
+ cy.window().then((win) => {
30
+ win.ELIZA_CONFIG = config;
31
+ });
32
+ });
33
+
34
+ // TypeScript definitions
35
+ declare global {
36
+ namespace Cypress {
37
+ interface Chainable {
38
+ shouldBeDarkMode(): Chainable<JQuery<HTMLElement>>;
39
+ setElizaConfig(config: { agentId: string; apiBase: string }): Chainable<Window>;
40
+ }
41
+ }
42
+ }
43
+
44
+ export {};
@@ -0,0 +1,11 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Cypress Component Testing</title>
7
+ </head>
8
+ <body>
9
+ <div data-cy-root></div>
10
+ </body>
11
+ </html>