@nextsparkjs/theme-default 0.1.0-beta.1 → 0.1.0-beta.100

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 (325) hide show
  1. package/LICENSE +21 -0
  2. package/api/ai/chat/stream/route.ts +4 -1
  3. package/api/ai/orchestrator/route.ts +10 -3
  4. package/api/ai/single-agent/route.ts +10 -3
  5. package/api/ai/usage/route.ts +4 -1
  6. package/blocks/benefits/component.tsx +4 -4
  7. package/blocks/cta-section/component.tsx +4 -4
  8. package/blocks/faq-accordion/component.tsx +2 -2
  9. package/blocks/features-grid/component.tsx +5 -5
  10. package/blocks/hero/component.tsx +2 -2
  11. package/blocks/hero/fields.ts +1 -1
  12. package/blocks/hero-with-form/component.tsx +7 -7
  13. package/blocks/hero-with-form/fields.ts +1 -1
  14. package/blocks/jumbotron/component.tsx +7 -7
  15. package/blocks/jumbotron/fields.ts +1 -1
  16. package/blocks/logo-cloud/component.tsx +6 -6
  17. package/blocks/logo-cloud/fields.ts +1 -1
  18. package/blocks/post-content/component.tsx +2 -2
  19. package/blocks/pricing-table/component.tsx +5 -5
  20. package/blocks/split-content/component.tsx +5 -5
  21. package/blocks/split-content/fields.ts +1 -1
  22. package/blocks/stats-counter/component.tsx +9 -9
  23. package/blocks/testimonials/component.tsx +4 -4
  24. package/blocks/testimonials/fields.ts +1 -1
  25. package/blocks/text-content/component.tsx +12 -10
  26. package/blocks/timeline/component.tsx +12 -12
  27. package/blocks/video-hero/component.tsx +7 -7
  28. package/blocks/video-hero/fields.ts +1 -1
  29. package/components/ai-chat/ChatPanel.tsx +7 -7
  30. package/components/ai-chat/Message.tsx +2 -2
  31. package/components/ai-chat/MessageInput.tsx +3 -3
  32. package/components/ai-chat/MessageList.tsx +3 -3
  33. package/components/ai-chat/TypingIndicator.tsx +2 -2
  34. package/config/app.config.ts +54 -62
  35. package/config/dashboard.config.ts +14 -0
  36. package/config/features.config.ts +10 -0
  37. package/config/permissions.config.ts +26 -1
  38. package/docs/{01-overview → public/01-overview}/01-introduction.md +5 -0
  39. package/docs/{01-overview → public/01-overview}/02-customization.md +5 -0
  40. package/docs/{02-features → public/02-features}/03-tasks-entity.md +5 -0
  41. package/docs/{03-ai → public/03-ai}/01-overview.md +5 -0
  42. package/docs/{03-ai → public/03-ai}/02-customization.md +5 -0
  43. package/docs/superadmin/01-setup/01-configuration.md +79 -0
  44. package/docs/superadmin/01-setup/02-deployment.md +82 -0
  45. package/docs/superadmin/02-management/01-users.md +83 -0
  46. package/docs/superadmin/03-integrations/01-langchain.md +139 -0
  47. package/entities/customers/api/docs.md +107 -0
  48. package/entities/customers/api/presets.ts +80 -0
  49. package/entities/pages/api/docs.md +114 -0
  50. package/entities/pages/api/presets.ts +72 -0
  51. package/entities/posts/api/docs.md +120 -0
  52. package/entities/posts/api/presets.ts +74 -0
  53. package/entities/tasks/api/docs.md +126 -0
  54. package/entities/tasks/api/presets.ts +84 -0
  55. package/lib/selectors.ts +7 -4
  56. package/messages/de/admin.json +45 -0
  57. package/messages/en/admin.json +56 -0
  58. package/messages/en/navigation.json +2 -1
  59. package/messages/es/admin.json +56 -0
  60. package/messages/es/navigation.json +2 -1
  61. package/messages/fr/admin.json +45 -0
  62. package/messages/it/admin.json +45 -0
  63. package/messages/pt/admin.json +45 -0
  64. package/migrations/093_pages_sample_data.sql +7 -7
  65. package/migrations/098_patterns_sample_data.sql +234 -0
  66. package/package.json +8 -3
  67. package/styles/globals.css +42 -0
  68. package/templates/(public)/blog/[slug]/page.tsx +1 -1
  69. package/templates/(public)/page.tsx +1 -1
  70. package/tests/cypress/e2e/_utils/devtools/access.bdd.md +262 -0
  71. package/tests/cypress/e2e/_utils/devtools/access.cy.ts +171 -0
  72. package/tests/cypress/e2e/_utils/devtools/navigation.bdd.md +261 -0
  73. package/tests/cypress/e2e/_utils/devtools/navigation.cy.ts +157 -0
  74. package/tests/cypress/e2e/_utils/devtools/pages.bdd.md +303 -0
  75. package/tests/cypress/e2e/_utils/devtools/pages.cy.ts +184 -0
  76. package/tests/cypress/e2e/_utils/docs/README.md +215 -0
  77. package/tests/cypress/e2e/_utils/selectors/auth.bdd.md +354 -0
  78. package/tests/cypress/e2e/_utils/selectors/auth.cy.ts +310 -0
  79. package/tests/cypress/e2e/_utils/selectors/billing.bdd.md +276 -0
  80. package/tests/cypress/e2e/_utils/selectors/billing.cy.ts +182 -0
  81. package/tests/cypress/e2e/_utils/selectors/block-editor.bdd.md +615 -0
  82. package/tests/cypress/e2e/_utils/selectors/block-editor.cy.ts +783 -0
  83. package/tests/cypress/e2e/_utils/selectors/dashboard-container.cy.ts +52 -0
  84. package/tests/cypress/e2e/_utils/selectors/dashboard-mobile.bdd.md +205 -0
  85. package/tests/cypress/e2e/_utils/selectors/dashboard-mobile.cy.ts +137 -0
  86. package/tests/cypress/e2e/_utils/selectors/dashboard-navigation.bdd.md +147 -0
  87. package/tests/cypress/e2e/_utils/selectors/dashboard-navigation.cy.ts +114 -0
  88. package/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +76 -0
  89. package/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.cy.ts +68 -0
  90. package/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +326 -0
  91. package/tests/cypress/e2e/_utils/selectors/dashboard-topnav.cy.ts +177 -0
  92. package/tests/cypress/e2e/_utils/selectors/devtools.bdd.md +306 -0
  93. package/tests/cypress/e2e/_utils/selectors/devtools.cy.ts +273 -0
  94. package/tests/cypress/e2e/_utils/selectors/global-search.bdd.md +115 -0
  95. package/tests/cypress/e2e/_utils/selectors/global-search.cy.ts +93 -0
  96. package/tests/cypress/e2e/_utils/selectors/patterns.bdd.md +388 -0
  97. package/tests/cypress/e2e/_utils/selectors/patterns.cy.ts +559 -0
  98. package/tests/cypress/e2e/_utils/selectors/public.cy.ts +112 -0
  99. package/tests/cypress/e2e/_utils/selectors/settings-api-keys.bdd.md +266 -0
  100. package/tests/cypress/e2e/_utils/selectors/settings-api-keys.cy.ts +233 -0
  101. package/tests/cypress/e2e/_utils/selectors/settings-billing.bdd.md +78 -0
  102. package/tests/cypress/e2e/_utils/selectors/settings-billing.cy.ts +108 -0
  103. package/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +129 -0
  104. package/tests/cypress/e2e/_utils/selectors/settings-layout.cy.ts +115 -0
  105. package/tests/cypress/e2e/_utils/selectors/settings-password.bdd.md +82 -0
  106. package/tests/cypress/e2e/_utils/selectors/settings-password.cy.ts +74 -0
  107. package/tests/cypress/e2e/_utils/selectors/settings-profile.bdd.md +77 -0
  108. package/tests/cypress/e2e/_utils/selectors/settings-profile.cy.ts +79 -0
  109. package/tests/cypress/e2e/_utils/selectors/settings-teams.bdd.md +130 -0
  110. package/tests/cypress/e2e/_utils/selectors/settings-teams.cy.ts +86 -0
  111. package/tests/cypress/e2e/_utils/selectors/superadmin.bdd.md +261 -0
  112. package/tests/cypress/e2e/_utils/selectors/superadmin.cy.ts +193 -0
  113. package/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +593 -0
  114. package/tests/cypress/e2e/_utils/selectors/tasks.cy.ts +864 -0
  115. package/tests/cypress/e2e/_utils/selectors/taxonomies.cy.ts +126 -0
  116. package/tests/cypress/e2e/_utils/selectors/teams.bdd.md +278 -0
  117. package/tests/cypress/e2e/_utils/selectors/teams.cy.ts +195 -0
  118. package/tests/cypress/e2e/_utils/superadmin/all-teams.bdd.md +261 -0
  119. package/tests/cypress/e2e/_utils/superadmin/all-teams.cy.ts +177 -0
  120. package/tests/cypress/e2e/_utils/superadmin/all-users.bdd.md +406 -0
  121. package/tests/cypress/e2e/_utils/superadmin/all-users.cy.ts +294 -0
  122. package/tests/cypress/e2e/_utils/superadmin/dashboard.bdd.md +235 -0
  123. package/tests/cypress/e2e/_utils/superadmin/dashboard.cy.ts +149 -0
  124. package/tests/cypress/e2e/_utils/superadmin/subscriptions-overview.bdd.md +290 -0
  125. package/tests/cypress/e2e/_utils/superadmin/subscriptions-overview.cy.ts +194 -0
  126. package/tests/cypress/e2e/ai/ai-usage.cy.ts +209 -0
  127. package/tests/cypress/e2e/ai/chat-api.cy.ts +119 -0
  128. package/tests/cypress/e2e/ai/guardrails.cy.ts +332 -0
  129. package/tests/cypress/e2e/api/_core/billing/BillingAPIController.js +319 -0
  130. package/tests/cypress/e2e/api/_core/billing/check-action.cy.ts +326 -0
  131. package/tests/cypress/e2e/api/_core/billing/checkout.cy.ts +358 -0
  132. package/tests/cypress/e2e/api/_core/billing/lifecycle.cy.ts +423 -0
  133. package/tests/cypress/e2e/api/_core/billing/plans/README.md +345 -0
  134. package/tests/cypress/e2e/api/_core/billing/plans/business.cy.ts +412 -0
  135. package/tests/cypress/e2e/api/_core/billing/plans/downgrade.cy.ts +510 -0
  136. package/tests/cypress/e2e/api/_core/billing/plans/fixtures/billing-plans.json +163 -0
  137. package/tests/cypress/e2e/api/_core/billing/plans/free.cy.ts +500 -0
  138. package/tests/cypress/e2e/api/_core/billing/plans/pro.cy.ts +497 -0
  139. package/tests/cypress/e2e/api/_core/billing/plans/starter.cy.ts +342 -0
  140. package/tests/cypress/e2e/api/_core/billing/portal.cy.ts +313 -0
  141. package/tests/cypress/e2e/api/_core/devtools/registries.bdd.md +300 -0
  142. package/tests/cypress/e2e/api/_core/devtools/registries.cy.ts +368 -0
  143. package/tests/cypress/e2e/api/_core/scheduled-actions/cron-endpoint.bdd.md +375 -0
  144. package/tests/cypress/e2e/api/_core/scheduled-actions/cron-endpoint.cy.ts +346 -0
  145. package/tests/cypress/e2e/api/_core/scheduled-actions/devtools-endpoint.bdd.md +451 -0
  146. package/tests/cypress/e2e/api/_core/scheduled-actions/devtools-endpoint.cy.ts +447 -0
  147. package/tests/cypress/e2e/api/_core/scheduled-actions/scheduling.bdd.md +649 -0
  148. package/tests/cypress/e2e/api/_core/scheduled-actions/scheduling.cy.ts +333 -0
  149. package/tests/cypress/e2e/api/_core/security/security-headers.cy.ts +601 -0
  150. package/tests/cypress/e2e/api/_core/settings/api-keys.crud.cy.ts +923 -0
  151. package/tests/cypress/e2e/api/_core/teams/teams-security.cy.ts +415 -0
  152. package/tests/cypress/e2e/api/_core/users/users-crud.cy.ts +469 -0
  153. package/tests/cypress/e2e/api/_core/users/users-metas.cy.ts +913 -0
  154. package/tests/cypress/e2e/api/_core/users/users-security.cy.ts +375 -0
  155. package/tests/cypress/e2e/api/entities/customers/customers-crud.cy.ts +648 -0
  156. package/tests/cypress/e2e/api/entities/customers/customers-metas.cy.ts +839 -0
  157. package/tests/cypress/e2e/api/entities/media/media-crud.cy.ts +600 -0
  158. package/tests/cypress/e2e/api/entities/media/media-role-permissions.cy.ts +617 -0
  159. package/tests/cypress/e2e/api/entities/media/media-team-isolation.cy.ts +464 -0
  160. package/tests/cypress/e2e/api/entities/pages/blocks-scope.cy.ts +396 -0
  161. package/tests/cypress/e2e/api/entities/pages/pages-crud.cy.ts +425 -0
  162. package/tests/cypress/e2e/api/entities/pages/pages-status.cy.ts +335 -0
  163. package/tests/cypress/e2e/api/entities/posts/post-categories-crud.cy.ts +610 -0
  164. package/tests/cypress/e2e/api/entities/posts/posts-crud.cy.ts +709 -0
  165. package/tests/cypress/e2e/api/entities/posts/posts-status.cy.ts +396 -0
  166. package/tests/cypress/e2e/api/entities/tasks/tasks-crud.cy.ts +602 -0
  167. package/tests/cypress/e2e/api/entities/tasks/tasks-metas.cy.ts +878 -0
  168. package/tests/cypress/e2e/patterns/patterns-in-pages.cy.ts +367 -0
  169. package/tests/cypress/e2e/uat/_core/auth/app-roles/developer-login.bdd.md +231 -0
  170. package/tests/cypress/e2e/uat/_core/auth/app-roles/developer-login.cy.ts +144 -0
  171. package/tests/cypress/e2e/uat/_core/auth/app-roles/superadmin-login.bdd.md +118 -0
  172. package/tests/cypress/e2e/uat/_core/auth/app-roles/superadmin-login.cy.ts +84 -0
  173. package/tests/cypress/e2e/uat/_core/auth/custom-roles/editor-login.bdd.md +288 -0
  174. package/tests/cypress/e2e/uat/_core/auth/custom-roles/editor-login.cy.ts +188 -0
  175. package/tests/cypress/e2e/uat/_core/auth/login-logout.bdd.md +160 -0
  176. package/tests/cypress/e2e/uat/_core/auth/login-logout.cy.ts +116 -0
  177. package/tests/cypress/e2e/uat/_core/auth/password-reset.bdd.md +289 -0
  178. package/tests/cypress/e2e/uat/_core/auth/password-reset.cy.ts +200 -0
  179. package/tests/cypress/e2e/uat/_core/auth/team-roles/admin-login.bdd.md +225 -0
  180. package/tests/cypress/e2e/uat/_core/auth/team-roles/admin-login.cy.ts +148 -0
  181. package/tests/cypress/e2e/uat/_core/auth/team-roles/member-login.bdd.md +251 -0
  182. package/tests/cypress/e2e/uat/_core/auth/team-roles/member-login.cy.ts +163 -0
  183. package/tests/cypress/e2e/uat/_core/auth/team-roles/owner-login.bdd.md +231 -0
  184. package/tests/cypress/e2e/uat/_core/auth/team-roles/owner-login.cy.ts +141 -0
  185. package/tests/cypress/e2e/uat/_core/billing/extended.bdd.md +273 -0
  186. package/tests/cypress/e2e/uat/_core/billing/extended.cy.ts +209 -0
  187. package/tests/cypress/e2e/uat/_core/billing/feature-gates.bdd.md +407 -0
  188. package/tests/cypress/e2e/uat/_core/billing/feature-gates.cy.ts +307 -0
  189. package/tests/cypress/e2e/uat/_core/billing/page.bdd.md +329 -0
  190. package/tests/cypress/e2e/uat/_core/billing/page.cy.ts +250 -0
  191. package/tests/cypress/e2e/uat/_core/billing/status.bdd.md +190 -0
  192. package/tests/cypress/e2e/uat/_core/billing/status.cy.ts +145 -0
  193. package/tests/cypress/e2e/uat/_core/billing/team-switch.bdd.md +156 -0
  194. package/tests/cypress/e2e/uat/_core/billing/team-switch.cy.ts +122 -0
  195. package/tests/cypress/e2e/uat/_core/billing/usage.bdd.md +218 -0
  196. package/tests/cypress/e2e/uat/_core/billing/usage.cy.ts +176 -0
  197. package/tests/cypress/e2e/uat/_core/blocks/hero.bdd.md +124 -0
  198. package/tests/cypress/e2e/uat/_core/blocks/hero.cy.ts +56 -0
  199. package/tests/cypress/e2e/uat/_core/devtools/api-tester.cy.ts +390 -0
  200. package/tests/cypress/e2e/uat/_core/performance/suspense-loading.cy.ts +134 -0
  201. package/tests/cypress/e2e/uat/_core/scheduled-actions/devtools-ui.bdd.md +736 -0
  202. package/tests/cypress/e2e/uat/_core/scheduled-actions/devtools-ui.cy.ts +740 -0
  203. package/tests/cypress/e2e/uat/_core/teams/inline-edit.cy.ts +278 -0
  204. package/tests/cypress/e2e/uat/_core/teams/roles-matrix.bdd.md +553 -0
  205. package/tests/cypress/e2e/uat/_core/teams/roles-matrix.cy.ts +185 -0
  206. package/tests/cypress/e2e/uat/_core/teams/switcher.bdd.md +1151 -0
  207. package/tests/cypress/e2e/uat/_core/teams/switcher.cy.ts +497 -0
  208. package/tests/cypress/e2e/uat/_core/teams/team-switcher.md +198 -0
  209. package/tests/cypress/e2e/uat/entities/customers/member.bdd.md +275 -0
  210. package/tests/cypress/e2e/uat/entities/customers/member.cy.ts +122 -0
  211. package/tests/cypress/e2e/uat/entities/customers/owner.bdd.md +243 -0
  212. package/tests/cypress/e2e/uat/entities/customers/owner.cy.ts +165 -0
  213. package/tests/cypress/e2e/uat/entities/pages/block-crud.bdd.md +476 -0
  214. package/tests/cypress/e2e/uat/entities/pages/block-crud.cy.ts +486 -0
  215. package/tests/cypress/e2e/uat/entities/pages/block-editor.bdd.md +460 -0
  216. package/tests/cypress/e2e/uat/entities/pages/block-editor.cy.ts +301 -0
  217. package/tests/cypress/e2e/uat/entities/pages/list.bdd.md +432 -0
  218. package/tests/cypress/e2e/uat/entities/pages/list.cy.ts +273 -0
  219. package/tests/cypress/e2e/uat/entities/pages/public-rendering.bdd.md +696 -0
  220. package/tests/cypress/e2e/uat/entities/pages/public-rendering.cy.ts +340 -0
  221. package/tests/cypress/e2e/uat/entities/posts/categories-api-aware.bdd.md +161 -0
  222. package/tests/cypress/e2e/uat/entities/posts/categories-api-aware.cy.ts +104 -0
  223. package/tests/cypress/e2e/uat/entities/posts/categories.bdd.md +375 -0
  224. package/tests/cypress/e2e/uat/entities/posts/categories.cy.ts +241 -0
  225. package/tests/cypress/e2e/uat/entities/posts/editor.bdd.md +429 -0
  226. package/tests/cypress/e2e/uat/entities/posts/editor.cy.ts +257 -0
  227. package/tests/cypress/e2e/uat/entities/posts/list.bdd.md +340 -0
  228. package/tests/cypress/e2e/uat/entities/posts/list.cy.ts +177 -0
  229. package/tests/cypress/e2e/uat/entities/posts/public.bdd.md +614 -0
  230. package/tests/cypress/e2e/uat/entities/posts/public.cy.ts +249 -0
  231. package/tests/cypress/e2e/uat/entities/tasks/member.bdd.md +222 -0
  232. package/tests/cypress/e2e/uat/entities/tasks/member.cy.ts +165 -0
  233. package/tests/cypress/e2e/uat/entities/tasks/owner.bdd.md +419 -0
  234. package/tests/cypress/e2e/uat/entities/tasks/owner.cy.ts +191 -0
  235. package/tests/cypress/e2e/uat/features/roles/editor-role.bdd.md +552 -0
  236. package/tests/cypress/e2e/uat/features/roles/editor-role.cy.ts +210 -0
  237. package/tests/cypress/e2e/uat/features/roles/member-restrictions.bdd.md +450 -0
  238. package/tests/cypress/e2e/uat/features/roles/member-restrictions.cy.ts +189 -0
  239. package/tests/cypress/e2e/uat/features/roles/owner-full-crud.bdd.md +530 -0
  240. package/tests/cypress/e2e/uat/features/roles/owner-full-crud.cy.ts +247 -0
  241. package/tests/cypress/fixtures/blocks.json +218 -0
  242. package/tests/cypress/fixtures/entities.json +87 -0
  243. package/tests/cypress/fixtures/page-builder.json +21 -0
  244. package/tests/cypress/src/components/CategoriesPOM.ts +382 -0
  245. package/tests/cypress/src/components/CustomersPOM.ts +439 -0
  246. package/tests/cypress/src/components/DevKeyringPOM.ts +160 -0
  247. package/tests/cypress/src/components/EntityForm.ts +375 -0
  248. package/tests/cypress/src/components/EntityList.ts +389 -0
  249. package/tests/cypress/src/components/PageBuilderPOM.ts +710 -0
  250. package/tests/cypress/src/components/PostEditorPOM.ts +370 -0
  251. package/tests/cypress/src/components/PostsListPOM.ts +223 -0
  252. package/tests/cypress/src/components/PublicPagePOM.ts +447 -0
  253. package/tests/cypress/src/components/PublicPostPOM.ts +146 -0
  254. package/tests/cypress/src/components/TasksPOM.ts +272 -0
  255. package/tests/cypress/src/components/TeamSwitcherPOM.ts +450 -0
  256. package/tests/cypress/src/components/index.ts +21 -0
  257. package/tests/cypress/src/controllers/ApiKeysAPIController.js +178 -0
  258. package/tests/cypress/src/controllers/BaseAPIController.js +317 -0
  259. package/tests/cypress/src/controllers/CustomerAPIController.js +251 -0
  260. package/tests/cypress/src/controllers/MediaAPIController.js +231 -0
  261. package/tests/cypress/src/controllers/PagesAPIController.js +226 -0
  262. package/tests/cypress/src/controllers/PostsAPIController.js +250 -0
  263. package/tests/cypress/src/controllers/TaskAPIController.js +240 -0
  264. package/tests/cypress/src/controllers/UsersAPIController.js +242 -0
  265. package/tests/cypress/src/controllers/index.js +25 -0
  266. package/tests/cypress/src/core/AuthPOM.ts +450 -0
  267. package/tests/cypress/src/core/BasePOM.ts +33 -0
  268. package/tests/cypress/src/core/BlockEditorBasePOM.ts +874 -0
  269. package/tests/cypress/src/core/DashboardEntityPOM.ts +41 -0
  270. package/tests/cypress/src/core/index.ts +14 -0
  271. package/tests/cypress/src/entities/CustomersPOM.ts +172 -0
  272. package/tests/cypress/src/entities/PagesPOM.ts +137 -0
  273. package/tests/cypress/src/entities/PatternsPOM.ts +329 -0
  274. package/tests/cypress/src/entities/PostsPOM.ts +137 -0
  275. package/tests/cypress/src/entities/TasksPOM.ts +246 -0
  276. package/tests/cypress/src/entities/index.ts +16 -0
  277. package/tests/cypress/src/features/BillingPOM.ts +385 -0
  278. package/tests/cypress/src/features/DashboardPOM.ts +271 -0
  279. package/tests/cypress/src/features/DevtoolsPOM.ts +750 -0
  280. package/tests/cypress/src/features/PageBuilderPOM.ts +283 -0
  281. package/tests/cypress/src/features/PostEditorPOM.ts +313 -0
  282. package/tests/cypress/src/features/ScheduledActionsPOM.ts +463 -0
  283. package/tests/cypress/src/features/SettingsPOM.ts +707 -0
  284. package/tests/cypress/src/features/SuperadminPOM.ts +851 -0
  285. package/tests/cypress/src/features/SuperadminTeamRolesPOM.ts +285 -0
  286. package/tests/cypress/src/features/index.ts +28 -0
  287. package/tests/cypress/src/helpers/ApiInterceptor.ts +20 -0
  288. package/tests/cypress/src/index.ts +101 -0
  289. package/tests/cypress/src/pages/dashboard/Dashboard.js +677 -0
  290. package/tests/cypress/src/pages/dashboard/DashboardPage.js +43 -0
  291. package/tests/cypress/src/pages/dashboard/DashboardStats.js +546 -0
  292. package/tests/cypress/src/pages/dashboard/index.js +6 -0
  293. package/tests/cypress/src/pages/index.js +5 -0
  294. package/tests/cypress/src/pages/public/FeaturesPage.js +28 -0
  295. package/tests/cypress/src/pages/public/LandingPage.js +69 -0
  296. package/tests/cypress/src/pages/public/PricingPage.js +33 -0
  297. package/tests/cypress/src/pages/public/index.js +6 -0
  298. package/tests/cypress/src/selectors.ts +46 -0
  299. package/tests/cypress/src/session-helpers.ts +518 -0
  300. package/tests/cypress/support/doc-commands.ts +260 -0
  301. package/tests/cypress/support/e2e.ts +90 -0
  302. package/tests/cypress.config.ts +178 -0
  303. package/tests/jest/__mocks__/@nextsparkjs/core/components/ui/badge.js +16 -0
  304. package/tests/jest/__mocks__/@nextsparkjs/core/lib/db.js +11 -0
  305. package/tests/jest/__mocks__/@nextsparkjs/registries/permissions-registry.ts +160 -0
  306. package/tests/jest/__mocks__/@nextsparkjs/registries/theme-registry.ts +68 -0
  307. package/tests/jest/__mocks__/jose.js +22 -0
  308. package/tests/jest/__mocks__/next/image.js +15 -0
  309. package/tests/jest/__mocks__/next-server.js +56 -0
  310. package/tests/jest/components/post-header.test.tsx +377 -0
  311. package/tests/jest/jest.config.cjs +154 -0
  312. package/tests/jest/langchain/COVERAGE.md +372 -0
  313. package/tests/jest/langchain/guardrails.test.ts +465 -0
  314. package/tests/jest/langchain/streaming.test.ts +370 -0
  315. package/tests/jest/langchain/token-tracker.test.ts +455 -0
  316. package/tests/jest/langchain/tracer-callbacks.test.ts +881 -0
  317. package/tests/jest/langchain/tracer.test.ts +823 -0
  318. package/tests/jest/services/tasks.service.test.ts +707 -0
  319. package/tests/jest/setup.ts +170 -0
  320. package/tests/jest/tsconfig.jest.json +6 -0
  321. package/tests/jest/validation/categories.test.ts +429 -0
  322. package/tests/jest/validation/posts.test.ts +546 -0
  323. package/tests/tsconfig.json +21 -0
  324. /package/docs/{02-features → public/02-features}/01-components.md +0 -0
  325. /package/docs/{02-features → public/02-features}/02-styling.md +0 -0
@@ -0,0 +1,126 @@
1
+ /**
2
+ * UI Selectors Validation: Taxonomies (Categories)
3
+ *
4
+ * This test validates that taxonomies selectors exist in the DOM.
5
+ * This is a lightweight test that ONLY checks selector presence, not functionality.
6
+ *
7
+ * Purpose:
8
+ * - Validate CategoriesPOM taxonomies selectors work correctly
9
+ * - Ensure all taxonomies.* selectors are implemented
10
+ * - Run as Phase 12 sub-gate before functional tests
11
+ *
12
+ * IMPORTANT: The /dashboard/taxonomies page does NOT exist yet.
13
+ * Taxonomies are defined in CORE_SELECTORS but the UI is not implemented.
14
+ * All tests are marked as skip until the page is created.
15
+ *
16
+ * NOTE: There IS an API at /api/v1/post-categories but no UI page.
17
+ */
18
+
19
+ import { CategoriesPOM } from '../../../src/components/CategoriesPOM'
20
+
21
+ describe('Taxonomies Selectors Validation', { tags: ['@ui-selectors'] }, () => {
22
+ // ============================================
23
+ // DOCUMENTATION (no login needed)
24
+ // ============================================
25
+ describe('Taxonomies Page Status', () => {
26
+ it('documents that taxonomies page is not implemented', () => {
27
+ cy.log('The /dashboard/taxonomies page does NOT exist')
28
+ cy.log('Taxonomies selectors are defined in CORE_SELECTORS')
29
+ cy.log('API exists at /api/v1/post-categories')
30
+ cy.log('UI page needs to be created to test these selectors')
31
+ })
32
+ })
33
+
34
+ // ============================================
35
+ // LIST PAGE (5 selectors)
36
+ // NOTE: Page not implemented
37
+ // ============================================
38
+ describe('List Page', () => {
39
+ it.skip('should find list container (page not implemented)', () => {
40
+ cy.get(CategoriesPOM.listSelectors.page).should('exist')
41
+ })
42
+
43
+ it.skip('should find create button (page not implemented)', () => {
44
+ cy.get(CategoriesPOM.listSelectors.createBtn).should('exist')
45
+ })
46
+
47
+ it.skip('should find category row (page not implemented)', () => {
48
+ // Example: cy.get(CategoriesPOM.listSelectors.row('cat-123')).should('exist')
49
+ cy.wrap(true).should('be.true')
50
+ })
51
+
52
+ it.skip('should find edit button (page not implemented)', () => {
53
+ // Example: cy.get(CategoriesPOM.listSelectors.editBtn('cat-123')).should('exist')
54
+ cy.wrap(true).should('be.true')
55
+ })
56
+
57
+ it.skip('should find delete button (page not implemented)', () => {
58
+ // Example: cy.get(CategoriesPOM.listSelectors.deleteBtn('cat-123')).should('exist')
59
+ cy.wrap(true).should('be.true')
60
+ })
61
+ })
62
+
63
+ // ============================================
64
+ // FORM DIALOG (10 selectors)
65
+ // NOTE: Page not implemented
66
+ // ============================================
67
+ describe('Form Dialog', () => {
68
+ it.skip('should find form dialog (page not implemented)', () => {
69
+ cy.get(CategoriesPOM.formSelectors.dialog).should('exist')
70
+ })
71
+
72
+ it.skip('should find name input (page not implemented)', () => {
73
+ cy.get(CategoriesPOM.formSelectors.nameInput).should('exist')
74
+ })
75
+
76
+ it.skip('should find slug input (page not implemented)', () => {
77
+ cy.get(CategoriesPOM.formSelectors.slugInput).should('exist')
78
+ })
79
+
80
+ it.skip('should find description input (page not implemented)', () => {
81
+ cy.get(CategoriesPOM.formSelectors.descriptionInput).should('exist')
82
+ })
83
+
84
+ it.skip('should find icon input (page not implemented)', () => {
85
+ cy.get(CategoriesPOM.formSelectors.iconInput).should('exist')
86
+ })
87
+
88
+ it.skip('should find color input (page not implemented)', () => {
89
+ cy.get(CategoriesPOM.formSelectors.colorInput).should('exist')
90
+ })
91
+
92
+ it.skip('should find parent select (page not implemented)', () => {
93
+ cy.get(CategoriesPOM.formSelectors.parentSelect).should('exist')
94
+ })
95
+
96
+ it.skip('should find order input (page not implemented)', () => {
97
+ cy.get(CategoriesPOM.formSelectors.orderInput).should('exist')
98
+ })
99
+
100
+ it.skip('should find save button (page not implemented)', () => {
101
+ cy.get(CategoriesPOM.formSelectors.saveButton).should('exist')
102
+ })
103
+
104
+ it.skip('should find cancel button (page not implemented)', () => {
105
+ cy.get(CategoriesPOM.formSelectors.cancelButton).should('exist')
106
+ })
107
+ })
108
+
109
+ // ============================================
110
+ // CONFIRM DELETE DIALOG (3 selectors)
111
+ // NOTE: Page not implemented
112
+ // ============================================
113
+ describe('Confirm Delete Dialog', () => {
114
+ it.skip('should find delete confirmation dialog (page not implemented)', () => {
115
+ cy.get(CategoriesPOM.confirmDeleteSelectors.dialog).should('exist')
116
+ })
117
+
118
+ it.skip('should find confirm delete button (page not implemented)', () => {
119
+ cy.get(CategoriesPOM.confirmDeleteSelectors.confirmButton).should('exist')
120
+ })
121
+
122
+ it.skip('should find cancel delete button (page not implemented)', () => {
123
+ cy.get(CategoriesPOM.confirmDeleteSelectors.cancelButton).should('exist')
124
+ })
125
+ })
126
+ })
@@ -0,0 +1,278 @@
1
+ ---
2
+ feature: Teams UI Selectors Validation
3
+ priority: high
4
+ tags: [selectors, teams, ui-validation, multi-tenant]
5
+ grepTags: [ui-selectors, teams, SEL_TEAM_001, SEL_TEAM_003, SEL_TEAM_004, SEL_TEAM_006, SEL_TEAM_007, SEL_TEAM_008, multi-team, mobile]
6
+ coverage: 6
7
+ ---
8
+
9
+ # Teams UI Selectors Validation
10
+
11
+ > Validates that teams selectors exist in the DOM. This is a lightweight test that ONLY checks selector presence, not functionality. Runs as Phase 12 sub-gate before functional tests.
12
+
13
+ ## @test SEL_TEAM_001: Team Switcher Selectors
14
+
15
+ ### Metadata
16
+ - **Priority:** High
17
+ - **Type:** Selector Validation
18
+ - **Tags:** teams, switcher, sidebar
19
+ - **Grep:** `@ui-selectors` `@SEL_TEAM_001`
20
+ - **Status:** Active (5 passing)
21
+
22
+ ```gherkin:en
23
+ Scenario: Team switcher has complete structure
24
+
25
+ Given I am logged in as developer
26
+ And I navigate to the dashboard
27
+ And the sidebar is expanded
28
+ Then I should find the team switcher compact trigger
29
+ When I click the team switcher trigger
30
+ Then I should find the team switcher dropdown
31
+ And I should find at least one team option
32
+ And I should find the manage teams link
33
+ ```
34
+
35
+ ```gherkin:es
36
+ Scenario: El switcher de equipos tiene estructura completa
37
+
38
+ Given estoy logueado como developer
39
+ And navego al dashboard
40
+ And el sidebar esta expandido
41
+ Then deberia encontrar el trigger del team switcher compacto
42
+ When hago click en el trigger del team switcher
43
+ Then deberia encontrar el dropdown del team switcher
44
+ And deberia encontrar al menos una opcion de equipo
45
+ And deberia encontrar el link de administrar equipos
46
+ ```
47
+
48
+ ### Expected Results
49
+ - `teams.switcher.compact` selector exists (team-switcher-compact) ✅
50
+ - `teams.switcher.dropdown` selector exists when opened (team-switcher-dropdown) ✅
51
+ - `teams.switcher.option` selector exists for team options (team-option-{slug}) ✅
52
+ - `teams.switcher.manageLink` selector exists (manage-teams-link) ✅
53
+ - Create button documentation ✅
54
+
55
+ ---
56
+
57
+ ## @test SEL_TEAM_003: Create Team Dialog Documentation
58
+
59
+ ### Metadata
60
+ - **Priority:** Low
61
+ - **Type:** Documentation
62
+ - **Tags:** teams, create, dialog
63
+ - **Grep:** `@ui-selectors` `@SEL_TEAM_003`
64
+ - **Status:** Active (documentation only)
65
+
66
+ ```gherkin:en
67
+ Scenario: Create Team Dialog selectors are documented
68
+
69
+ Given the Create Team Dialog is on the settings/teams page
70
+ Then the following selectors are tested in settings-teams.cy.ts:
71
+ | Selector | Value |
72
+ | create-team-dialog | Dialog container |
73
+ | team-name-input | Name input field |
74
+ | team-slug-input | Slug input field |
75
+ | team-description-input | Description input |
76
+ | cancel-create-team | Cancel button |
77
+ | submit-create-team | Submit button |
78
+ ```
79
+
80
+ ```gherkin:es
81
+ Scenario: Los selectores del dialogo de crear equipo estan documentados
82
+
83
+ Given el dialogo de crear equipo esta en la pagina settings/teams
84
+ Then los siguientes selectores se prueban en settings-teams.cy.ts:
85
+ | Selector | Valor |
86
+ | create-team-dialog | Contenedor del dialogo |
87
+ | team-name-input | Campo de nombre |
88
+ | team-slug-input | Campo de slug |
89
+ | team-description-input | Campo de descripcion |
90
+ | cancel-create-team | Boton cancelar |
91
+ | submit-create-team | Boton enviar |
92
+ ```
93
+
94
+ ### Notes
95
+ This test documents that Create Team Dialog selectors are tested in `settings-teams.cy.ts`, not here.
96
+
97
+ ---
98
+
99
+ ## @test SEL_TEAM_004: Dashboard Sidebar Selectors
100
+
101
+ ### Metadata
102
+ - **Priority:** High
103
+ - **Type:** Selector Validation
104
+ - **Tags:** sidebar, dashboard
105
+ - **Grep:** `@ui-selectors` `@SEL_TEAM_004`
106
+ - **Status:** Active (2 passing)
107
+
108
+ ```gherkin:en
109
+ Scenario: Dashboard sidebar has required selectors
110
+
111
+ Given I am logged in as developer
112
+ And I navigate to the dashboard
113
+ Then I should find the sidebar main container
114
+ And I should find the sidebar toggle button
115
+ ```
116
+
117
+ ```gherkin:es
118
+ Scenario: El sidebar del dashboard tiene los selectores requeridos
119
+
120
+ Given estoy logueado como developer
121
+ And navego al dashboard
122
+ Then deberia encontrar el contenedor principal del sidebar
123
+ And deberia encontrar el boton toggle del sidebar
124
+ ```
125
+
126
+ ### Expected Results
127
+ - `dashboard.sidebar.main` selector exists ✅
128
+ - `dashboard.topnav.sidebarToggle` selector exists ✅
129
+
130
+ ---
131
+
132
+ ## @test SEL_TEAM_006: Team Members Documentation
133
+
134
+ ### Metadata
135
+ - **Priority:** Low
136
+ - **Type:** Documentation
137
+ - **Tags:** teams, members, settings
138
+ - **Grep:** `@ui-selectors` `@SEL_TEAM_006`
139
+ - **Status:** Active (documentation only)
140
+
141
+ ```gherkin:en
142
+ Scenario: Team members selectors are documented
143
+
144
+ Given team members management is on the settings/teams page
145
+ Then the team members selectors are tested in settings-teams.cy.ts
146
+ And the path is /dashboard/settings/teams
147
+ ```
148
+
149
+ ```gherkin:es
150
+ Scenario: Los selectores de miembros del equipo estan documentados
151
+
152
+ Given la gestion de miembros del equipo esta en la pagina settings/teams
153
+ Then los selectores de miembros del equipo se prueban en settings-teams.cy.ts
154
+ And la ruta es /dashboard/settings/teams
155
+ ```
156
+
157
+ ### Notes
158
+ This test documents that Team Members selectors are tested in `settings-teams.cy.ts`, not here.
159
+
160
+ ---
161
+
162
+ ## @test SEL_TEAM_007: Multi-Team Switch Modal
163
+
164
+ ### Metadata
165
+ - **Priority:** High
166
+ - **Type:** Selector Validation
167
+ - **Tags:** teams, modal, switch, multi-team
168
+ - **Grep:** `@ui-selectors` `@SEL_TEAM_007` `@multi-team`
169
+ - **Status:** Active (2 passing)
170
+ - **User:** Carlos Mendoza (loginAsDefaultOwner) - has multiple teams
171
+
172
+ ```gherkin:en
173
+ Scenario: Team switch modal appears during team change
174
+
175
+ Given I am logged in as Carlos Mendoza (owner with multiple teams)
176
+ And I navigate to the dashboard
177
+ And the sidebar is expanded
178
+ When I open the team switcher dropdown
179
+ Then I should find at least 2 team options
180
+ When I click on a different team
181
+ Then I should find the team switch modal
182
+ ```
183
+
184
+ ```gherkin:es
185
+ Scenario: El modal de cambio de equipo aparece durante el cambio
186
+
187
+ Given estoy logueado como Carlos Mendoza (owner con multiples equipos)
188
+ And navego al dashboard
189
+ And el sidebar esta expandido
190
+ When abro el dropdown del team switcher
191
+ Then deberia encontrar al menos 2 opciones de equipo
192
+ When hago click en un equipo diferente
193
+ Then deberia encontrar el modal de cambio de equipo
194
+ ```
195
+
196
+ ### Expected Results
197
+ - Multiple team options exist (at least 2) ✅
198
+ - `teams.switchModal.container` selector exists during switch (team-switch-modal) ✅
199
+
200
+ ### Notes
201
+ This test uses `loginAsDefaultOwner()` which logs in as Carlos Mendoza, a user with multiple teams:
202
+ - Carlos Personal (personal team)
203
+ - Everpoint Labs (owner)
204
+ - Other teams where he has membership
205
+
206
+ ---
207
+
208
+ ## @test SEL_TEAM_008: Mobile Team Switcher
209
+
210
+ ### Metadata
211
+ - **Priority:** Medium
212
+ - **Type:** Selector Validation
213
+ - **Tags:** teams, mobile, responsive
214
+ - **Grep:** `@ui-selectors` `@SEL_TEAM_008` `@mobile`
215
+ - **Status:** Active (3 passing)
216
+ - **Viewport:** iphone-x (375x812)
217
+
218
+ ```gherkin:en
219
+ Scenario: Mobile team switcher has required selectors
220
+
221
+ Given I set the viewport to iphone-x
222
+ And I am logged in as developer
223
+ And I navigate to the dashboard
224
+ Then I should find the mobile more button
225
+ When I tap the more button
226
+ Then I should find the mobile more sheet
227
+ And I should find the mobile team switcher inside the sheet
228
+ ```
229
+
230
+ ```gherkin:es
231
+ Scenario: El team switcher movil tiene los selectores requeridos
232
+
233
+ Given configuro el viewport a iphone-x
234
+ And estoy logueado como developer
235
+ And navego al dashboard
236
+ Then deberia encontrar el boton more movil
237
+ When toco el boton more
238
+ Then deberia encontrar el sheet more movil
239
+ And deberia encontrar el team switcher movil dentro del sheet
240
+ ```
241
+
242
+ ### Expected Results
243
+ - `dashboard.mobile.bottomNav.item` with id `more` exists ✅
244
+ - `dashboard.mobile.moreSheet.content` exists when opened ✅
245
+ - `dashboard.mobile.moreSheet.teamSwitcher` exists in sheet ✅
246
+
247
+ ### Notes
248
+ This test uses `cy.viewport('iphone-x')` before login to ensure the mobile layout is rendered.
249
+
250
+ ---
251
+
252
+ ## Related Components
253
+
254
+ | Component | File | Selectors |
255
+ |-----------|------|-----------|
256
+ | TeamSwitcherCompact | `packages/core/src/components/teams/TeamSwitcherCompact.tsx` | team-switcher-compact, team-switcher-dropdown, team-option-{slug}, manage-teams-link |
257
+ | TeamSwitchModal | `packages/core/src/components/teams/TeamSwitchModal.tsx` | team-switch-modal |
258
+ | Sidebar | `packages/core/src/components/dashboard/layouts/Sidebar.tsx` | sidebar-main |
259
+ | TopNavbar | `packages/core/src/components/dashboard/layouts/TopNavbar.tsx` | topnav-sidebar-toggle |
260
+ | MobileMoreSheet | `packages/core/src/components/dashboard/mobile/MobileMoreSheet.tsx` | mobile-more-sheet, mobile-more-sheet-team-switcher |
261
+
262
+ ## Related POMs
263
+
264
+ | POM | File | Usage |
265
+ |-----|------|-------|
266
+ | TeamSwitcherPOM | `themes/default/tests/cypress/src/components/TeamSwitcherPOM.ts` | Team switcher interactions and selectors |
267
+
268
+ ## Test Summary
269
+
270
+ | Test ID | Description | Status | Tests |
271
+ |---------|-------------|--------|-------|
272
+ | SEL_TEAM_001 | Team Switcher Selectors | Active | 5 |
273
+ | SEL_TEAM_003 | Create Team Dialog Documentation | Active | 1 |
274
+ | SEL_TEAM_004 | Dashboard Sidebar Selectors | Active | 2 |
275
+ | SEL_TEAM_006 | Team Members Documentation | Active | 1 |
276
+ | SEL_TEAM_007 | Multi-Team Switch Modal | Active | 2 |
277
+ | SEL_TEAM_008 | Mobile Team Switcher | Active | 3 |
278
+ | **Total** | | **All Active** | **14** |
@@ -0,0 +1,195 @@
1
+ /**
2
+ * UI Selectors Validation: Teams
3
+ *
4
+ * This test validates that teams selectors exist in the DOM.
5
+ * This is a lightweight test that ONLY checks selector presence, not functionality.
6
+ *
7
+ * Purpose:
8
+ * - Validate TeamSwitcherPOM selectors work correctly
9
+ * - Ensure all teams.* selectors are implemented
10
+ * - Run as Phase 12 sub-gate before functional tests
11
+ *
12
+ * Scope:
13
+ * - Navigate to dashboard (requires login)
14
+ * - Assert elements exist in DOM (no form submissions)
15
+ * - Fast execution (< 30 seconds per describe block)
16
+ *
17
+ * Test IDs:
18
+ * - SEL_TEAM_001: Team Switcher Selectors
19
+ * - SEL_TEAM_003: Create Team Dialog Documentation
20
+ * - SEL_TEAM_004: Dashboard Sidebar Selectors
21
+ * - SEL_TEAM_006: Team Members Documentation
22
+ * - SEL_TEAM_007: Multi-Team Switch Modal (Carlos Mendoza - multiple teams)
23
+ * - SEL_TEAM_008: Mobile Team Switcher (iphone-x viewport)
24
+ *
25
+ * NOTE: Some selectors require specific states (dialog open, team selected).
26
+ * Many selectors from CORE_SELECTORS are dynamically scoped.
27
+ */
28
+
29
+ import { TeamSwitcherPOM } from '../../../src/components/TeamSwitcherPOM'
30
+ import { loginAsDefaultDeveloper, loginAsDefaultOwner } from '../../../src/session-helpers'
31
+
32
+ describe('Teams Selectors Validation', { tags: ['@ui-selectors', '@teams'] }, () => {
33
+ const teamSwitcher = TeamSwitcherPOM.create()
34
+
35
+ beforeEach(() => {
36
+ loginAsDefaultDeveloper()
37
+ cy.visit('/dashboard', { timeout: 60000, failOnStatusCode: false })
38
+ cy.url().should('include', '/dashboard')
39
+ })
40
+
41
+ // ============================================
42
+ // SEL_TEAM_001: TEAM SWITCHER SELECTORS
43
+ // ============================================
44
+ describe('SEL_TEAM_001: Team Switcher Selectors', { tags: '@SEL_TEAM_001' }, () => {
45
+ beforeEach(() => {
46
+ teamSwitcher.ensureSidebarExpanded()
47
+ })
48
+
49
+ it('should find team switcher compact trigger', () => {
50
+ cy.get(teamSwitcher.selectors.trigger).should('exist')
51
+ })
52
+
53
+ it('should find team switcher dropdown when opened', () => {
54
+ teamSwitcher.open()
55
+ cy.get(teamSwitcher.selectors.dropdown).should('be.visible')
56
+ })
57
+
58
+ it('should find team option in dropdown', () => {
59
+ teamSwitcher.open()
60
+ cy.get(teamSwitcher.selectors.teamOption).should('have.length.at.least', 1)
61
+ })
62
+
63
+ it('should find manage teams link', () => {
64
+ teamSwitcher.open()
65
+ cy.get(teamSwitcher.selectors.manageTeamsLink).should('exist')
66
+ })
67
+
68
+ // NOTE: Create team button is NOT in TeamSwitcherCompact
69
+ // It is in the full TeamSwitcher (used in settings/teams page)
70
+ // That button is tested in settings-teams.cy.ts
71
+ it('should document that create button is in settings', () => {
72
+ cy.log('Create Team button is in TeamSwitcher (full version)')
73
+ cy.log('Tested at: /dashboard/settings/teams via settings-teams.cy.ts')
74
+ cy.wrap(true).should('be.true')
75
+ })
76
+ })
77
+
78
+ // ============================================
79
+ // SEL_TEAM_003: CREATE TEAM DIALOG DOCUMENTATION
80
+ // NOTE: Create Team Dialog is opened from settings/teams page
81
+ // Those selectors are tested in settings-teams.cy.ts
82
+ // ============================================
83
+ describe('SEL_TEAM_003: Create Team Dialog Documentation', { tags: '@SEL_TEAM_003' }, () => {
84
+ it('should document that Create Team Dialog is in settings', () => {
85
+ cy.log('Create Team Dialog selectors:')
86
+ cy.log('- create-team-dialog')
87
+ cy.log('- team-name-input')
88
+ cy.log('- team-slug-input')
89
+ cy.log('- team-description-input')
90
+ cy.log('- cancel-create-team')
91
+ cy.log('- submit-create-team')
92
+ cy.log('Tested at: /dashboard/settings/teams')
93
+ cy.wrap(true).should('be.true')
94
+ })
95
+ })
96
+
97
+ // ============================================
98
+ // SEL_TEAM_004: DASHBOARD SIDEBAR SELECTORS
99
+ // ============================================
100
+ describe('SEL_TEAM_004: Dashboard Sidebar Selectors', { tags: '@SEL_TEAM_004' }, () => {
101
+ it('should find sidebar main container', () => {
102
+ cy.get(teamSwitcher.selectors.sidebar).should('exist')
103
+ })
104
+
105
+ it('should find sidebar toggle button', () => {
106
+ cy.get(teamSwitcher.selectors.sidebarToggle).should('exist')
107
+ })
108
+ })
109
+
110
+ // ============================================
111
+ // SEL_TEAM_006: TEAM MEMBERS DOCUMENTATION
112
+ // These are tested in settings-teams.cy.ts
113
+ // ============================================
114
+ describe('SEL_TEAM_006: Team Members Documentation', { tags: '@SEL_TEAM_006' }, () => {
115
+ it('should document team members are in settings', () => {
116
+ cy.log('Team members selectors are tested in settings-teams.cy.ts')
117
+ cy.log('Path: /dashboard/settings/teams')
118
+ cy.wrap(true).should('be.true')
119
+ })
120
+ })
121
+ })
122
+
123
+ // ============================================
124
+ // MULTI-TEAM USER TESTS (Carlos Mendoza - Owner)
125
+ // Uses a separate session with multiple teams
126
+ // ============================================
127
+ describe('Teams Selectors - Multi-Team User', { tags: ['@ui-selectors', '@teams', '@multi-team'] }, () => {
128
+ const teamSwitcher = TeamSwitcherPOM.create()
129
+
130
+ beforeEach(() => {
131
+ loginAsDefaultOwner()
132
+ cy.visit('/dashboard', { timeout: 60000, failOnStatusCode: false })
133
+ cy.url().should('include', '/dashboard')
134
+ })
135
+
136
+ // ============================================
137
+ // SEL_TEAM_007: TEAM SWITCH MODAL (Multi-Team)
138
+ // Carlos Mendoza has multiple teams to test switching
139
+ // ============================================
140
+ describe('SEL_TEAM_007: Team Switch Modal', { tags: '@SEL_TEAM_007' }, () => {
141
+ beforeEach(() => {
142
+ teamSwitcher.ensureSidebarExpanded()
143
+ })
144
+
145
+ it('should find multiple team options in dropdown', () => {
146
+ teamSwitcher.open()
147
+ cy.get(teamSwitcher.selectors.teamOption).should('have.length.at.least', 2)
148
+ })
149
+
150
+ it('should find switch modal when changing teams', () => {
151
+ teamSwitcher.open()
152
+ // Get the second team option (different from current)
153
+ cy.get(teamSwitcher.selectors.teamOption).eq(1).click()
154
+ // Switch modal should appear during team change
155
+ cy.get(teamSwitcher.selectors.switchModal, { timeout: 10000 }).should('exist')
156
+ })
157
+ })
158
+ })
159
+
160
+ // ============================================
161
+ // MOBILE VIEWPORT TESTS
162
+ // Uses mobile viewport to test responsive selectors
163
+ // ============================================
164
+ describe('Teams Selectors - Mobile Viewport', { tags: ['@ui-selectors', '@teams', '@mobile'] }, () => {
165
+ const teamSwitcher = TeamSwitcherPOM.create()
166
+
167
+ beforeEach(() => {
168
+ // Set mobile viewport BEFORE login/visit
169
+ cy.viewport('iphone-x')
170
+ loginAsDefaultDeveloper()
171
+ cy.visit('/dashboard', { timeout: 60000, failOnStatusCode: false })
172
+ cy.url().should('include', '/dashboard')
173
+ })
174
+
175
+ // ============================================
176
+ // SEL_TEAM_008: MOBILE TEAM SWITCHER SELECTORS
177
+ // Tests mobile-specific UI elements
178
+ // ============================================
179
+ describe('SEL_TEAM_008: Mobile Team Switcher', { tags: '@SEL_TEAM_008' }, () => {
180
+ it('should find mobile more button', () => {
181
+ cy.get(teamSwitcher.selectors.mobileMoreButton).should('exist')
182
+ })
183
+
184
+ it('should find mobile more sheet when opened', () => {
185
+ cy.get(teamSwitcher.selectors.mobileMoreButton).click()
186
+ cy.get(teamSwitcher.selectors.mobileMoreSheet).should('be.visible')
187
+ })
188
+
189
+ it('should find mobile team switcher in sheet', () => {
190
+ cy.get(teamSwitcher.selectors.mobileMoreButton).click()
191
+ cy.get(teamSwitcher.selectors.mobileMoreSheet).should('be.visible')
192
+ cy.get(teamSwitcher.selectors.mobileTeamSwitcher).should('exist')
193
+ })
194
+ })
195
+ })