@nextsparkjs/theme-default 0.1.0-beta.20 → 0.1.0-beta.22

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 (221) hide show
  1. package/package.json +1 -1
  2. package/tests/cypress/e2e/_devtools/access.bdd.md +262 -0
  3. package/tests/cypress/e2e/_devtools/access.cy.ts +171 -0
  4. package/tests/cypress/e2e/_devtools/navigation.bdd.md +261 -0
  5. package/tests/cypress/e2e/_devtools/navigation.cy.ts +157 -0
  6. package/tests/cypress/e2e/_devtools/pages.bdd.md +303 -0
  7. package/tests/cypress/e2e/_devtools/pages.cy.ts +184 -0
  8. package/tests/cypress/e2e/_docs/README.md +215 -0
  9. package/tests/cypress/e2e/_docs/tutorials/sector7-superadmin-teams.narration.json +155 -0
  10. package/tests/cypress/e2e/_docs/tutorials/sector7-superadmin.cy.ts +390 -0
  11. package/tests/cypress/e2e/_docs/tutorials/teams-system.doc.cy.ts +349 -0
  12. package/tests/cypress/e2e/_docs/tutorials/teams-system.narration.json +165 -0
  13. package/tests/cypress/e2e/_selectors/auth.cy.ts +306 -0
  14. package/tests/cypress/e2e/_selectors/billing.cy.ts +89 -0
  15. package/tests/cypress/e2e/_selectors/dashboard-mobile.cy.ts +113 -0
  16. package/tests/cypress/e2e/_selectors/dashboard-navigation.cy.ts +89 -0
  17. package/tests/cypress/e2e/_selectors/dashboard-sidebar.cy.ts +60 -0
  18. package/tests/cypress/e2e/_selectors/dashboard-topnav.cy.ts +146 -0
  19. package/tests/cypress/e2e/_selectors/devtools.cy.ts +210 -0
  20. package/tests/cypress/e2e/_selectors/global-search.cy.ts +88 -0
  21. package/tests/cypress/e2e/_selectors/pages-editor.cy.ts +179 -0
  22. package/tests/cypress/e2e/_selectors/posts-editor.cy.ts +282 -0
  23. package/tests/cypress/e2e/_selectors/public.cy.ts +112 -0
  24. package/tests/cypress/e2e/_selectors/settings-api-keys.cy.ts +228 -0
  25. package/tests/cypress/e2e/_selectors/settings-billing.cy.ts +105 -0
  26. package/tests/cypress/e2e/_selectors/settings-layout.cy.ts +119 -0
  27. package/tests/cypress/e2e/_selectors/settings-password.cy.ts +71 -0
  28. package/tests/cypress/e2e/_selectors/settings-profile.cy.ts +82 -0
  29. package/tests/cypress/e2e/_selectors/settings-teams.cy.ts +68 -0
  30. package/tests/cypress/e2e/_selectors/superadmin.cy.ts +185 -0
  31. package/tests/cypress/e2e/_selectors/tasks.cy.ts +242 -0
  32. package/tests/cypress/e2e/_selectors/taxonomies.cy.ts +126 -0
  33. package/tests/cypress/e2e/_selectors/teams.cy.ts +142 -0
  34. package/tests/cypress/e2e/_superadmin/all-teams.bdd.md +261 -0
  35. package/tests/cypress/e2e/_superadmin/all-teams.cy.ts +177 -0
  36. package/tests/cypress/e2e/_superadmin/all-users.bdd.md +406 -0
  37. package/tests/cypress/e2e/_superadmin/all-users.cy.ts +294 -0
  38. package/tests/cypress/e2e/_superadmin/dashboard.bdd.md +235 -0
  39. package/tests/cypress/e2e/_superadmin/dashboard.cy.ts +149 -0
  40. package/tests/cypress/e2e/_superadmin/subscriptions-overview.bdd.md +290 -0
  41. package/tests/cypress/e2e/_superadmin/subscriptions-overview.cy.ts +194 -0
  42. package/tests/cypress/e2e/ai/ai-usage.cy.ts +209 -0
  43. package/tests/cypress/e2e/ai/chat-api.cy.ts +107 -0
  44. package/tests/cypress/e2e/ai/guardrails.cy.ts +332 -0
  45. package/tests/cypress/e2e/api/billing/BillingAPIController.js +319 -0
  46. package/tests/cypress/e2e/api/billing/check-action.cy.ts +326 -0
  47. package/tests/cypress/e2e/api/billing/checkout.cy.ts +358 -0
  48. package/tests/cypress/e2e/api/billing/lifecycle.cy.ts +423 -0
  49. package/tests/cypress/e2e/api/billing/plans/README.md +345 -0
  50. package/tests/cypress/e2e/api/billing/plans/business.cy.ts +412 -0
  51. package/tests/cypress/e2e/api/billing/plans/downgrade.cy.ts +510 -0
  52. package/tests/cypress/e2e/api/billing/plans/fixtures/billing-plans.json +163 -0
  53. package/tests/cypress/e2e/api/billing/plans/free.cy.ts +500 -0
  54. package/tests/cypress/e2e/api/billing/plans/pro.cy.ts +497 -0
  55. package/tests/cypress/e2e/api/billing/plans/starter.cy.ts +342 -0
  56. package/tests/cypress/e2e/api/billing/portal.cy.ts +313 -0
  57. package/tests/cypress/e2e/api/devtools/registries.bdd.md +300 -0
  58. package/tests/cypress/e2e/api/devtools/registries.cy.ts +368 -0
  59. package/tests/cypress/e2e/api/entities/blocks-scope.cy.ts +396 -0
  60. package/tests/cypress/e2e/api/entities/customers-crud.cy.ts +648 -0
  61. package/tests/cypress/e2e/api/entities/customers-metas.cy.ts +839 -0
  62. package/tests/cypress/e2e/api/entities/pages-crud.cy.ts +425 -0
  63. package/tests/cypress/e2e/api/entities/pages-status.cy.ts +335 -0
  64. package/tests/cypress/e2e/api/entities/post-categories-crud.cy.ts +610 -0
  65. package/tests/cypress/e2e/api/entities/posts-crud.cy.ts +709 -0
  66. package/tests/cypress/e2e/api/entities/posts-status.cy.ts +396 -0
  67. package/tests/cypress/e2e/api/entities/tasks-crud.cy.ts +602 -0
  68. package/tests/cypress/e2e/api/entities/tasks-metas.cy.ts +878 -0
  69. package/tests/cypress/e2e/api/entities/users-crud.cy.ts +469 -0
  70. package/tests/cypress/e2e/api/entities/users-metas.cy.ts +913 -0
  71. package/tests/cypress/e2e/api/entities/users-security.cy.ts +375 -0
  72. package/tests/cypress/e2e/api/scheduled-actions/cron-endpoint.bdd.md +375 -0
  73. package/tests/cypress/e2e/api/scheduled-actions/cron-endpoint.cy.ts +346 -0
  74. package/tests/cypress/e2e/api/scheduled-actions/devtools-endpoint.bdd.md +451 -0
  75. package/tests/cypress/e2e/api/scheduled-actions/devtools-endpoint.cy.ts +447 -0
  76. package/tests/cypress/e2e/api/scheduled-actions/scheduling.bdd.md +649 -0
  77. package/tests/cypress/e2e/api/scheduled-actions/scheduling.cy.ts +333 -0
  78. package/tests/cypress/e2e/api/settings/api-keys.crud.cy.ts +923 -0
  79. package/tests/cypress/e2e/uat/auth/app-roles/developer-login.bdd.md +231 -0
  80. package/tests/cypress/e2e/uat/auth/app-roles/developer-login.cy.ts +144 -0
  81. package/tests/cypress/e2e/uat/auth/app-roles/superadmin-login.bdd.md +118 -0
  82. package/tests/cypress/e2e/uat/auth/app-roles/superadmin-login.cy.ts +84 -0
  83. package/tests/cypress/e2e/uat/auth/custom-roles/editor-login.bdd.md +288 -0
  84. package/tests/cypress/e2e/uat/auth/custom-roles/editor-login.cy.ts +188 -0
  85. package/tests/cypress/e2e/uat/auth/login-logout.bdd.md +160 -0
  86. package/tests/cypress/e2e/uat/auth/login-logout.cy.ts +116 -0
  87. package/tests/cypress/e2e/uat/auth/password-reset.bdd.md +289 -0
  88. package/tests/cypress/e2e/uat/auth/password-reset.cy.ts +200 -0
  89. package/tests/cypress/e2e/uat/auth/team-roles/admin-login.bdd.md +225 -0
  90. package/tests/cypress/e2e/uat/auth/team-roles/admin-login.cy.ts +148 -0
  91. package/tests/cypress/e2e/uat/auth/team-roles/member-login.bdd.md +251 -0
  92. package/tests/cypress/e2e/uat/auth/team-roles/member-login.cy.ts +163 -0
  93. package/tests/cypress/e2e/uat/auth/team-roles/owner-login.bdd.md +231 -0
  94. package/tests/cypress/e2e/uat/auth/team-roles/owner-login.cy.ts +141 -0
  95. package/tests/cypress/e2e/uat/billing/extended.bdd.md +273 -0
  96. package/tests/cypress/e2e/uat/billing/extended.cy.ts +209 -0
  97. package/tests/cypress/e2e/uat/billing/feature-gates.bdd.md +407 -0
  98. package/tests/cypress/e2e/uat/billing/feature-gates.cy.ts +307 -0
  99. package/tests/cypress/e2e/uat/billing/page.bdd.md +329 -0
  100. package/tests/cypress/e2e/uat/billing/page.cy.ts +250 -0
  101. package/tests/cypress/e2e/uat/billing/status.bdd.md +190 -0
  102. package/tests/cypress/e2e/uat/billing/status.cy.ts +145 -0
  103. package/tests/cypress/e2e/uat/billing/team-switch.bdd.md +156 -0
  104. package/tests/cypress/e2e/uat/billing/team-switch.cy.ts +122 -0
  105. package/tests/cypress/e2e/uat/billing/usage.bdd.md +218 -0
  106. package/tests/cypress/e2e/uat/billing/usage.cy.ts +176 -0
  107. package/tests/cypress/e2e/uat/blocks/hero.bdd.md +124 -0
  108. package/tests/cypress/e2e/uat/blocks/hero.cy.ts +56 -0
  109. package/tests/cypress/e2e/uat/devtools/api-tester.cy.ts +390 -0
  110. package/tests/cypress/e2e/uat/entities/customers/member.bdd.md +275 -0
  111. package/tests/cypress/e2e/uat/entities/customers/member.cy.ts +122 -0
  112. package/tests/cypress/e2e/uat/entities/customers/owner.bdd.md +243 -0
  113. package/tests/cypress/e2e/uat/entities/customers/owner.cy.ts +165 -0
  114. package/tests/cypress/e2e/uat/entities/pages/block-crud.bdd.md +476 -0
  115. package/tests/cypress/e2e/uat/entities/pages/block-crud.cy.ts +486 -0
  116. package/tests/cypress/e2e/uat/entities/pages/block-editor.bdd.md +460 -0
  117. package/tests/cypress/e2e/uat/entities/pages/block-editor.cy.ts +301 -0
  118. package/tests/cypress/e2e/uat/entities/pages/list.bdd.md +432 -0
  119. package/tests/cypress/e2e/uat/entities/pages/list.cy.ts +273 -0
  120. package/tests/cypress/e2e/uat/entities/pages/public-rendering.bdd.md +696 -0
  121. package/tests/cypress/e2e/uat/entities/pages/public-rendering.cy.ts +340 -0
  122. package/tests/cypress/e2e/uat/entities/posts/categories-api-aware.bdd.md +161 -0
  123. package/tests/cypress/e2e/uat/entities/posts/categories-api-aware.cy.ts +104 -0
  124. package/tests/cypress/e2e/uat/entities/posts/categories.bdd.md +375 -0
  125. package/tests/cypress/e2e/uat/entities/posts/categories.cy.ts +241 -0
  126. package/tests/cypress/e2e/uat/entities/posts/editor.bdd.md +429 -0
  127. package/tests/cypress/e2e/uat/entities/posts/editor.cy.ts +257 -0
  128. package/tests/cypress/e2e/uat/entities/posts/list.bdd.md +340 -0
  129. package/tests/cypress/e2e/uat/entities/posts/list.cy.ts +177 -0
  130. package/tests/cypress/e2e/uat/entities/posts/public.bdd.md +614 -0
  131. package/tests/cypress/e2e/uat/entities/posts/public.cy.ts +249 -0
  132. package/tests/cypress/e2e/uat/entities/tasks/member.bdd.md +222 -0
  133. package/tests/cypress/e2e/uat/entities/tasks/member.cy.ts +165 -0
  134. package/tests/cypress/e2e/uat/entities/tasks/owner.bdd.md +419 -0
  135. package/tests/cypress/e2e/uat/entities/tasks/owner.cy.ts +191 -0
  136. package/tests/cypress/e2e/uat/roles/editor-role.bdd.md +552 -0
  137. package/tests/cypress/e2e/uat/roles/editor-role.cy.ts +210 -0
  138. package/tests/cypress/e2e/uat/roles/member-restrictions.bdd.md +450 -0
  139. package/tests/cypress/e2e/uat/roles/member-restrictions.cy.ts +189 -0
  140. package/tests/cypress/e2e/uat/roles/owner-full-crud.bdd.md +530 -0
  141. package/tests/cypress/e2e/uat/roles/owner-full-crud.cy.ts +247 -0
  142. package/tests/cypress/e2e/uat/scheduled-actions/devtools-ui.bdd.md +736 -0
  143. package/tests/cypress/e2e/uat/scheduled-actions/devtools-ui.cy.ts +740 -0
  144. package/tests/cypress/e2e/uat/teams/roles-matrix.bdd.md +553 -0
  145. package/tests/cypress/e2e/uat/teams/roles-matrix.cy.ts +185 -0
  146. package/tests/cypress/e2e/uat/teams/switcher.bdd.md +1151 -0
  147. package/tests/cypress/e2e/uat/teams/switcher.cy.ts +497 -0
  148. package/tests/cypress/e2e/uat/teams/team-switcher.md +198 -0
  149. package/tests/cypress/fixtures/blocks.json +218 -0
  150. package/tests/cypress/fixtures/entities.json +78 -0
  151. package/tests/cypress/fixtures/page-builder.json +21 -0
  152. package/tests/cypress/src/components/CategoriesPOM.ts +382 -0
  153. package/tests/cypress/src/components/CustomersPOM.ts +439 -0
  154. package/tests/cypress/src/components/DevKeyringPOM.ts +160 -0
  155. package/tests/cypress/src/components/EntityForm.ts +375 -0
  156. package/tests/cypress/src/components/EntityList.ts +389 -0
  157. package/tests/cypress/src/components/PageBuilderPOM.ts +710 -0
  158. package/tests/cypress/src/components/PostEditorPOM.ts +370 -0
  159. package/tests/cypress/src/components/PostsListPOM.ts +223 -0
  160. package/tests/cypress/src/components/PublicPagePOM.ts +447 -0
  161. package/tests/cypress/src/components/PublicPostPOM.ts +146 -0
  162. package/tests/cypress/src/components/TasksPOM.ts +272 -0
  163. package/tests/cypress/src/components/TeamSwitcherPOM.ts +450 -0
  164. package/tests/cypress/src/components/index.ts +21 -0
  165. package/tests/cypress/src/controllers/ApiKeysAPIController.js +178 -0
  166. package/tests/cypress/src/controllers/BaseAPIController.js +317 -0
  167. package/tests/cypress/src/controllers/CustomerAPIController.js +251 -0
  168. package/tests/cypress/src/controllers/PagesAPIController.js +226 -0
  169. package/tests/cypress/src/controllers/PostsAPIController.js +250 -0
  170. package/tests/cypress/src/controllers/TaskAPIController.js +240 -0
  171. package/tests/cypress/src/controllers/UsersAPIController.js +242 -0
  172. package/tests/cypress/src/controllers/index.js +25 -0
  173. package/tests/cypress/src/core/AuthPOM.ts +450 -0
  174. package/tests/cypress/src/core/BasePOM.ts +86 -0
  175. package/tests/cypress/src/core/BlockEditorBasePOM.ts +576 -0
  176. package/tests/cypress/src/core/DashboardEntityPOM.ts +692 -0
  177. package/tests/cypress/src/core/index.ts +14 -0
  178. package/tests/cypress/src/entities/CustomersPOM.ts +172 -0
  179. package/tests/cypress/src/entities/PagesPOM.ts +137 -0
  180. package/tests/cypress/src/entities/PostsPOM.ts +137 -0
  181. package/tests/cypress/src/entities/TasksPOM.ts +176 -0
  182. package/tests/cypress/src/entities/index.ts +14 -0
  183. package/tests/cypress/src/features/BillingPOM.ts +385 -0
  184. package/tests/cypress/src/features/DashboardPOM.ts +245 -0
  185. package/tests/cypress/src/features/DevtoolsPOM.ts +739 -0
  186. package/tests/cypress/src/features/PageBuilderPOM.ts +263 -0
  187. package/tests/cypress/src/features/PostEditorPOM.ts +313 -0
  188. package/tests/cypress/src/features/ScheduledActionsPOM.ts +463 -0
  189. package/tests/cypress/src/features/SettingsPOM.ts +362 -0
  190. package/tests/cypress/src/features/SuperadminPOM.ts +331 -0
  191. package/tests/cypress/src/features/SuperadminTeamRolesPOM.ts +285 -0
  192. package/tests/cypress/src/features/index.ts +28 -0
  193. package/tests/cypress/src/helpers/ApiInterceptor.ts +177 -0
  194. package/tests/cypress/src/index.ts +101 -0
  195. package/tests/cypress/src/pages/dashboard/Dashboard.js +677 -0
  196. package/tests/cypress/src/pages/dashboard/DashboardPage.js +43 -0
  197. package/tests/cypress/src/pages/dashboard/DashboardStats.js +546 -0
  198. package/tests/cypress/src/pages/dashboard/index.js +6 -0
  199. package/tests/cypress/src/pages/index.js +5 -0
  200. package/tests/cypress/src/pages/public/FeaturesPage.js +28 -0
  201. package/tests/cypress/src/pages/public/LandingPage.js +69 -0
  202. package/tests/cypress/src/pages/public/PricingPage.js +33 -0
  203. package/tests/cypress/src/pages/public/index.js +6 -0
  204. package/tests/cypress/src/selectors.ts +46 -0
  205. package/tests/cypress/src/session-helpers.ts +500 -0
  206. package/tests/cypress/support/doc-commands.ts +260 -0
  207. package/tests/cypress/support/e2e.ts +89 -0
  208. package/tests/cypress.config.ts +165 -0
  209. package/tests/jest/components/post-header.test.tsx +377 -0
  210. package/tests/jest/config/role-config.test.ts +529 -0
  211. package/tests/jest/jest.config.ts +81 -0
  212. package/tests/jest/langchain/COVERAGE.md +372 -0
  213. package/tests/jest/langchain/guardrails.test.ts +465 -0
  214. package/tests/jest/langchain/streaming.test.ts +367 -0
  215. package/tests/jest/langchain/token-tracker.test.ts +455 -0
  216. package/tests/jest/langchain/tracer-callbacks.test.ts +881 -0
  217. package/tests/jest/langchain/tracer.test.ts +823 -0
  218. package/tests/jest/user-roles/role-helpers.test.ts +432 -0
  219. package/tests/jest/validation/categories.test.ts +429 -0
  220. package/tests/jest/validation/posts.test.ts +546 -0
  221. package/tests/tsconfig.json +15 -0
@@ -0,0 +1,362 @@
1
+ /**
2
+ * SettingsPOM - Page Object Model for Settings Area
3
+ *
4
+ * Handles settings pages navigation and basic visibility:
5
+ * - Profile settings
6
+ * - Team settings
7
+ * - Billing settings (navigation only - use BillingPOM for detailed billing tests)
8
+ * - API Keys settings
9
+ * - Member management
10
+ *
11
+ * Uses selectors from centralized selectors.ts
12
+ *
13
+ * NOTE: For detailed billing tests (upgrade, invoices, payment methods),
14
+ * use BillingPOM from features/BillingPOM.ts instead.
15
+ */
16
+
17
+ import { BasePOM } from '../core/BasePOM'
18
+ import { cySelector } from '../selectors'
19
+
20
+ export class SettingsPOM extends BasePOM {
21
+ // ============================================
22
+ // FACTORY METHOD
23
+ // ============================================
24
+
25
+ static create(): SettingsPOM {
26
+ return new SettingsPOM()
27
+ }
28
+
29
+ // ============================================
30
+ // SELECTORS
31
+ // ============================================
32
+
33
+ get selectors() {
34
+ return {
35
+ // ============================================
36
+ // LAYOUT (7 selectors)
37
+ // ============================================
38
+ layoutMain: cySelector('settings.layout.main'),
39
+ layoutNav: cySelector('settings.layout.nav'),
40
+ layoutBackToDashboard: cySelector('settings.layout.backToDashboard'),
41
+ layoutHeader: cySelector('settings.layout.header'),
42
+ layoutContentArea: cySelector('settings.layout.contentArea'),
43
+ layoutSidebar: cySelector('settings.layout.sidebar'),
44
+ layoutPageContent: cySelector('settings.layout.pageContent'),
45
+
46
+ // ============================================
47
+ // SIDEBAR (4 selectors)
48
+ // ============================================
49
+ navContainer: cySelector('settings.sidebar.main'),
50
+ sidebarHeader: cySelector('settings.sidebar.header'),
51
+ sidebarNavItems: cySelector('settings.sidebar.navItems'),
52
+ navItem: (section: string) => cySelector('settings.sidebar.navItem', { section }),
53
+
54
+ // ============================================
55
+ // PROFILE (9 selectors)
56
+ // ============================================
57
+ profileContainer: cySelector('settings.profile.container'),
58
+ profileForm: cySelector('settings.profile.form'),
59
+ profileAvatar: cySelector('settings.profile.avatar'),
60
+ profileAvatarUpload: cySelector('settings.profile.avatarUpload'),
61
+ profileFirstName: cySelector('settings.profile.firstName'),
62
+ profileLastName: cySelector('settings.profile.lastName'),
63
+ profileEmail: cySelector('settings.profile.email'),
64
+ profileSubmit: cySelector('settings.profile.submitButton'),
65
+ profileSuccess: cySelector('settings.profile.successMessage'),
66
+
67
+ // ============================================
68
+ // PASSWORD (7 selectors)
69
+ // ============================================
70
+ passwordContainer: cySelector('settings.password.container'),
71
+ passwordForm: cySelector('settings.password.form'),
72
+ passwordCurrent: cySelector('settings.password.currentPassword'),
73
+ passwordNew: cySelector('settings.password.newPassword'),
74
+ passwordConfirm: cySelector('settings.password.confirmPassword'),
75
+ passwordSubmit: cySelector('settings.password.submitButton'),
76
+ passwordSuccess: cySelector('settings.password.successMessage'),
77
+
78
+ // ============================================
79
+ // TEAM (10 selectors)
80
+ // ============================================
81
+ teamContainer: cySelector('settings.team.container'),
82
+ teamName: cySelector('settings.team.name'),
83
+ teamSlug: cySelector('settings.team.slug'),
84
+ teamDescription: cySelector('settings.team.description'),
85
+ teamAvatar: cySelector('settings.team.avatar'),
86
+ teamAvatarUpload: cySelector('settings.team.avatarUpload'),
87
+ teamSubmit: cySelector('settings.team.submitButton'),
88
+ teamDelete: cySelector('settings.team.deleteButton'),
89
+ teamDeleteDialog: cySelector('settings.team.deleteDialog'),
90
+ teamDeleteConfirm: cySelector('settings.team.deleteConfirm'),
91
+
92
+ // ============================================
93
+ // MEMBERS (12 selectors)
94
+ // ============================================
95
+ membersContainer: cySelector('settings.members.container'),
96
+ membersInvite: cySelector('settings.members.inviteButton'),
97
+ membersInviteDialog: cySelector('settings.members.inviteDialog'),
98
+ membersInviteEmail: cySelector('settings.members.inviteEmail'),
99
+ membersInviteRole: cySelector('settings.members.inviteRole'),
100
+ membersInviteSubmit: cySelector('settings.members.inviteSubmit'),
101
+ memberRow: (id: string) => cySelector('settings.members.memberRow', { id }),
102
+ memberRowGeneric: '[data-cy^="member-row-"]',
103
+ memberRole: (id: string) => cySelector('settings.members.memberRole', { id }),
104
+ memberRemove: (id: string) => cySelector('settings.members.memberRemove', { id }),
105
+ membersPendingInvites: cySelector('settings.members.pendingInvites'),
106
+ membersPendingInvite: (id: string) => cySelector('settings.members.pendingInvite', { id }),
107
+ membersCancelInvite: (id: string) => cySelector('settings.members.cancelInvite', { id }),
108
+
109
+ // ============================================
110
+ // BILLING (19 selectors)
111
+ // ============================================
112
+ billingContainer: cySelector('settings.billing.container'),
113
+ billingMain: cySelector('settings.billing.main'),
114
+ billingHeader: cySelector('settings.billing.header'),
115
+ billingCurrentPlan: cySelector('settings.billing.currentPlan'),
116
+ billingUpgrade: cySelector('settings.billing.upgradeButton'),
117
+ billingUpgradePlan: cySelector('settings.billing.upgradePlan'),
118
+ billingCancel: cySelector('settings.billing.cancelButton'),
119
+ billingAddPayment: cySelector('settings.billing.addPayment'),
120
+ billingInvoices: cySelector('settings.billing.invoicesTable'),
121
+ billingInvoicesAlt: cySelector('settings.billing.invoicesTableAlt'),
122
+ billingInvoiceRow: (id: string) => cySelector('settings.billing.invoiceRow', { id }),
123
+ billingInvoicesRow: cySelector('settings.billing.invoicesRow'),
124
+ billingInvoiceDownload: (id: string) => cySelector('settings.billing.invoiceDownload', { id }),
125
+ billingInvoicesLoadMore: cySelector('settings.billing.invoicesLoadMore'),
126
+ billingPaymentMethod: cySelector('settings.billing.paymentMethod'),
127
+ billingPaymentMethodAlt: cySelector('settings.billing.paymentMethodAlt'),
128
+ billingUpdatePayment: cySelector('settings.billing.updatePayment'),
129
+ billingUsage: cySelector('settings.billing.usage'),
130
+ billingUsageDashboard: cySelector('settings.billing.usageDashboard'),
131
+
132
+ // ============================================
133
+ // API KEYS (56 selectors)
134
+ // ============================================
135
+ apiKeysPage: cySelector('settings.apiKeys.page'),
136
+ apiKeysTitle: cySelector('settings.apiKeys.title'),
137
+ apiKeysContainer: cySelector('settings.apiKeys.container'),
138
+ apiKeysCreate: cySelector('settings.apiKeys.createButton'),
139
+ apiKeysCreateDialog: cySelector('settings.apiKeys.createDialog'),
140
+ apiKeysList: cySelector('settings.apiKeys.list'),
141
+ apiKeysSkeleton: cySelector('settings.apiKeys.skeleton'),
142
+ apiKeysEmpty: cySelector('settings.apiKeys.empty'),
143
+ apiKeysEmptyCreate: cySelector('settings.apiKeys.emptyCreateButton'),
144
+ apiKeyName: cySelector('settings.apiKeys.keyName'),
145
+ apiKeyScopes: cySelector('settings.apiKeys.keyScopes'),
146
+ apiKeyScopeOption: (scope: string) => cySelector('settings.apiKeys.scopeOption', { scope }),
147
+ apiKeyCreateSubmit: cySelector('settings.apiKeys.createSubmit'),
148
+ apiKeyRow: (id: string) => cySelector('settings.apiKeys.keyRow', { id }),
149
+ apiKeyRowGeneric: '[data-cy^="api-key-row-"]',
150
+ apiKeyNameById: (id: string) => cySelector('settings.apiKeys.keyName_', { id }),
151
+ apiKeyPrefix: (id: string) => cySelector('settings.apiKeys.keyPrefix', { id }),
152
+ apiKeyCopyPrefix: (id: string) => cySelector('settings.apiKeys.copyPrefix', { id }),
153
+ apiKeyStatus: (id: string) => cySelector('settings.apiKeys.keyStatus', { id }),
154
+ apiKeyStatusBadge: (id: string) => cySelector('settings.apiKeys.statusBadge', { id }),
155
+ apiKeyMenuTrigger: (id: string) => cySelector('settings.apiKeys.menuTrigger', { id }),
156
+ apiKeyMenu: (id: string) => cySelector('settings.apiKeys.menu', { id }),
157
+ apiKeyViewDetails: (id: string) => cySelector('settings.apiKeys.viewDetails', { id }),
158
+ apiKeyToggle: (id: string) => cySelector('settings.apiKeys.toggle', { id }),
159
+ apiKeyRevoke: (id: string) => cySelector('settings.apiKeys.revoke', { id }),
160
+ apiKeyScopes: (id: string) => cySelector('settings.apiKeys.scopes', { id }),
161
+ apiKeyScope: (id: string, scope: string) => cySelector('settings.apiKeys.scope', { id, scope }),
162
+ apiKeyStats: (id: string) => cySelector('settings.apiKeys.stats', { id }),
163
+ apiKeyTotalRequests: (id: string) => cySelector('settings.apiKeys.totalRequests', { id }),
164
+ apiKeyLast24h: (id: string) => cySelector('settings.apiKeys.last24h', { id }),
165
+ apiKeyAvgTime: (id: string) => cySelector('settings.apiKeys.avgTime', { id }),
166
+ apiKeyMetadata: (id: string) => cySelector('settings.apiKeys.metadata', { id }),
167
+ apiKeyCreatedAt: (id: string) => cySelector('settings.apiKeys.createdAt', { id }),
168
+ apiKeyLastUsed: (id: string) => cySelector('settings.apiKeys.lastUsed', { id }),
169
+ apiKeyExpiresAt: (id: string) => cySelector('settings.apiKeys.expiresAt', { id }),
170
+ apiKeysDetailsDialog: cySelector('settings.apiKeys.detailsDialog'),
171
+ apiKeysDetailsTitle: cySelector('settings.apiKeys.detailsTitle'),
172
+ apiKeysDetailsLoading: cySelector('settings.apiKeys.detailsLoading'),
173
+ apiKeysDetailsContent: cySelector('settings.apiKeys.detailsContent'),
174
+ apiKeysDetailsBasicInfo: cySelector('settings.apiKeys.detailsBasicInfo'),
175
+ apiKeysDetailsName: cySelector('settings.apiKeys.detailsName'),
176
+ apiKeysDetailsStatus: cySelector('settings.apiKeys.detailsStatus'),
177
+ apiKeysDetailsStats: cySelector('settings.apiKeys.detailsStats'),
178
+ apiKeysDetailsTotalRequests: cySelector('settings.apiKeys.detailsTotalRequests'),
179
+ apiKeysDetailsLast24h: cySelector('settings.apiKeys.detailsLast24h'),
180
+ apiKeysDetailsLast7d: cySelector('settings.apiKeys.detailsLast7d'),
181
+ apiKeysDetailsLast30d: cySelector('settings.apiKeys.detailsLast30d'),
182
+ apiKeysDetailsAvgTime: cySelector('settings.apiKeys.detailsAvgTime'),
183
+ apiKeysDetailsSuccessRate: cySelector('settings.apiKeys.detailsSuccessRate'),
184
+ apiKeyReveal: (id: string) => cySelector('settings.apiKeys.keyReveal', { id }),
185
+ apiKeyRevokeById: (id: string) => cySelector('settings.apiKeys.keyRevoke', { id }),
186
+ apiKeyRevokeDialog: cySelector('settings.apiKeys.revokeDialog'),
187
+ apiKeyRevokeConfirm: cySelector('settings.apiKeys.revokeConfirm'),
188
+ apiKeyNewDisplay: cySelector('settings.apiKeys.newKeyDisplay'),
189
+ apiKeyCopyKey: cySelector('settings.apiKeys.copyKey'),
190
+ apiKeysDialogFooter: cySelector('settings.apiKeys.dialogFooter'),
191
+ }
192
+ }
193
+
194
+ // ============================================
195
+ // NAVIGATION
196
+ // ============================================
197
+
198
+ /**
199
+ * Navigate to settings home
200
+ */
201
+ visitSettings() {
202
+ cy.visit('/dashboard/settings', { timeout: 60000 })
203
+ return this
204
+ }
205
+
206
+ /**
207
+ * Navigate to profile settings
208
+ */
209
+ visitProfile() {
210
+ cy.visit('/dashboard/settings/profile', { timeout: 60000 })
211
+ return this
212
+ }
213
+
214
+ /**
215
+ * Navigate to team settings
216
+ */
217
+ visitTeam() {
218
+ cy.visit('/dashboard/settings/team', { timeout: 60000 })
219
+ return this
220
+ }
221
+
222
+ /**
223
+ * Navigate to billing settings
224
+ */
225
+ visitBilling() {
226
+ cy.visit('/dashboard/settings/billing', { timeout: 60000 })
227
+ return this
228
+ }
229
+
230
+ /**
231
+ * Navigate to members settings
232
+ */
233
+ visitMembers() {
234
+ cy.visit('/dashboard/settings/members', { timeout: 60000 })
235
+ return this
236
+ }
237
+
238
+ /**
239
+ * Navigate to API keys settings
240
+ */
241
+ visitApiKeys() {
242
+ cy.visit('/dashboard/settings/api-keys', { timeout: 60000 })
243
+ return this
244
+ }
245
+
246
+ /**
247
+ * Navigate to password settings
248
+ */
249
+ visitPassword() {
250
+ cy.visit('/dashboard/settings/password', { timeout: 60000 })
251
+ return this
252
+ }
253
+
254
+ /**
255
+ * Click on a settings nav item
256
+ */
257
+ clickNavItem(section: string) {
258
+ cy.get(this.selectors.navItem(section)).click()
259
+ return this
260
+ }
261
+
262
+ // ============================================
263
+ // ASSERTIONS
264
+ // ============================================
265
+
266
+ /**
267
+ * Assert settings page is visible
268
+ */
269
+ assertSettingsVisible() {
270
+ cy.url().should('include', '/settings')
271
+ return this
272
+ }
273
+
274
+ /**
275
+ * Assert profile settings is visible
276
+ */
277
+ assertProfileVisible() {
278
+ cy.get(this.selectors.profileContainer).should('be.visible')
279
+ return this
280
+ }
281
+
282
+ /**
283
+ * Assert team settings is visible
284
+ */
285
+ assertTeamVisible() {
286
+ cy.get(this.selectors.teamContainer).should('be.visible')
287
+ return this
288
+ }
289
+
290
+ /**
291
+ * Assert billing settings is visible
292
+ */
293
+ assertBillingVisible() {
294
+ cy.get(this.selectors.billingContainer).should('be.visible')
295
+ return this
296
+ }
297
+
298
+ /**
299
+ * Assert nav item is visible
300
+ */
301
+ assertNavItemVisible(section: string) {
302
+ cy.get(this.selectors.navItem(section)).should('be.visible')
303
+ return this
304
+ }
305
+
306
+ /**
307
+ * Assert nav item is NOT visible (restricted)
308
+ */
309
+ assertNavItemNotVisible(section: string) {
310
+ cy.get(this.selectors.navItem(section)).should('not.exist')
311
+ return this
312
+ }
313
+
314
+ /**
315
+ * Assert members container is visible
316
+ */
317
+ assertMembersVisible() {
318
+ cy.get(this.selectors.membersContainer).should('be.visible')
319
+ return this
320
+ }
321
+
322
+ /**
323
+ * Assert API keys container is visible
324
+ */
325
+ assertApiKeysVisible() {
326
+ cy.get(this.selectors.apiKeysContainer).should('be.visible')
327
+ return this
328
+ }
329
+
330
+ // ============================================
331
+ // WAITS
332
+ // ============================================
333
+
334
+ /**
335
+ * Wait for settings page to load
336
+ */
337
+ waitForSettings() {
338
+ cy.url().should('include', '/settings')
339
+ cy.get(this.selectors.navContainer, { timeout: 15000 }).should('be.visible')
340
+ return this
341
+ }
342
+
343
+ /**
344
+ * Wait for billing page to load
345
+ */
346
+ waitForBilling() {
347
+ cy.url().should('include', '/settings/billing')
348
+ cy.get(this.selectors.billingContainer, { timeout: 15000 }).should('be.visible')
349
+ return this
350
+ }
351
+
352
+ /**
353
+ * Wait for team page to load
354
+ */
355
+ waitForTeam() {
356
+ cy.url().should('include', '/settings/team')
357
+ cy.get(this.selectors.teamContainer, { timeout: 15000 }).should('be.visible')
358
+ return this
359
+ }
360
+ }
361
+
362
+ export default SettingsPOM
@@ -0,0 +1,331 @@
1
+ /**
2
+ * SuperadminPOM - Page Object Model for Superadmin Area
3
+ *
4
+ * Handles Superadmin Panel pages:
5
+ * - Dashboard with system stats (/superadmin)
6
+ * - All users management (/superadmin/users)
7
+ * - All teams management (/superadmin/teams)
8
+ * - Subscriptions overview (/superadmin/subscriptions)
9
+ * - System configuration (/superadmin/system)
10
+ *
11
+ * Uses selectors from centralized selectors.ts
12
+ *
13
+ * NOTE: For /superadmin/team-roles (permissions matrix), use SuperadminTeamRolesPOM instead.
14
+ */
15
+
16
+ import { BasePOM } from '../core/BasePOM'
17
+ import { cySelector } from '../selectors'
18
+
19
+ export class SuperadminPOM extends BasePOM {
20
+ // ============================================
21
+ // FACTORY METHOD
22
+ // ============================================
23
+
24
+ static create(): SuperadminPOM {
25
+ return new SuperadminPOM()
26
+ }
27
+
28
+ // ============================================
29
+ // SELECTORS
30
+ // ============================================
31
+
32
+ get selectors() {
33
+ return {
34
+ // Navigation
35
+ navContainer: cySelector('superadmin.container'),
36
+ navDashboard: cySelector('superadmin.navigation.dashboard'),
37
+ navUsers: cySelector('superadmin.navigation.users'),
38
+ navTeams: cySelector('superadmin.navigation.teams'),
39
+ navTeamRoles: cySelector('superadmin.navigation.teamRoles'),
40
+ navSubscriptions: cySelector('superadmin.navigation.subscriptions'),
41
+ exitToDashboard: cySelector('superadmin.navigation.exitToDashboard'),
42
+
43
+ // Dashboard
44
+ dashboardContainer: cySelector('superadmin.dashboard.container'),
45
+
46
+ // Users
47
+ usersContainer: cySelector('superadmin.users.container'),
48
+ usersTable: cySelector('superadmin.users.table'),
49
+ usersSearch: cySelector('superadmin.users.search'),
50
+ userRow: (id: string) => cySelector('superadmin.users.row', { id }),
51
+ userView: (id: string) => cySelector('superadmin.users.viewButton', { id }),
52
+ userEdit: (id: string) => cySelector('superadmin.users.editButton', { id }),
53
+ userBan: (id: string) => cySelector('superadmin.users.banButton', { id }),
54
+ userDelete: (id: string) => cySelector('superadmin.users.deleteButton', { id }),
55
+ userImpersonate: (id: string) => cySelector('superadmin.users.impersonateButton', { id }),
56
+
57
+ // Teams
58
+ teamsContainer: cySelector('superadmin.teams.container'),
59
+ teamsTable: cySelector('superadmin.teams.table'),
60
+ teamsSearch: cySelector('superadmin.teams.search'),
61
+ teamRow: (id: string) => cySelector('superadmin.teams.row', { id }),
62
+ teamActionsButton: (id: string) => cySelector('superadmin.teams.actionsButton', { id }),
63
+ teamView: (id: string) => cySelector('superadmin.teams.viewButton', { id }),
64
+ teamEdit: (id: string) => cySelector('superadmin.teams.editButton', { id }),
65
+ teamDelete: (id: string) => cySelector('superadmin.teams.deleteButton', { id }),
66
+
67
+ // Pagination (shared across superadmin pages)
68
+ paginationPageSize: cySelector('superadmin.pagination.pageSize'),
69
+ paginationFirst: cySelector('superadmin.pagination.first'),
70
+ paginationPrev: cySelector('superadmin.pagination.prev'),
71
+ paginationNext: cySelector('superadmin.pagination.next'),
72
+ paginationLast: cySelector('superadmin.pagination.last'),
73
+
74
+ // Permissions (team-roles page)
75
+ permissionRow: (permission: string) => cySelector('superadmin.permissions.row', { permission: permission.replace(/\./g, '-') }),
76
+
77
+ // Subscriptions
78
+ subscriptionsContainer: cySelector('superadmin.subscriptions.container'),
79
+ subscriptionsMrr: cySelector('superadmin.subscriptions.mrr'),
80
+ subscriptionsPlanDistribution: cySelector('superadmin.subscriptions.planDistribution'),
81
+ subscriptionsPlanCount: (plan: string) => cySelector('superadmin.subscriptions.planCount', { plan }),
82
+ subscriptionsActiveCount: cySelector('superadmin.subscriptions.activeCount'),
83
+ }
84
+ }
85
+
86
+ // ============================================
87
+ // NAVIGATION
88
+ // ============================================
89
+
90
+ /**
91
+ * Navigate to Superadmin dashboard
92
+ */
93
+ visitDashboard() {
94
+ cy.visit('/superadmin', { timeout: 60000 })
95
+ return this
96
+ }
97
+
98
+ /**
99
+ * Navigate to all users page
100
+ */
101
+ visitUsers() {
102
+ cy.visit('/superadmin/users', { timeout: 60000 })
103
+ return this
104
+ }
105
+
106
+ /**
107
+ * Navigate to all teams page
108
+ */
109
+ visitTeams() {
110
+ cy.visit('/superadmin/teams', { timeout: 60000 })
111
+ return this
112
+ }
113
+
114
+ /**
115
+ * Navigate to subscriptions overview
116
+ */
117
+ visitSubscriptions() {
118
+ cy.visit('/superadmin/subscriptions', { timeout: 60000 })
119
+ return this
120
+ }
121
+
122
+ /**
123
+ * Click nav link to dashboard
124
+ */
125
+ clickNavDashboard() {
126
+ cy.get(this.selectors.navDashboard).click()
127
+ return this
128
+ }
129
+
130
+ /**
131
+ * Click nav link to users
132
+ */
133
+ clickNavUsers() {
134
+ cy.get(this.selectors.navUsers).click()
135
+ return this
136
+ }
137
+
138
+ /**
139
+ * Click nav link to teams
140
+ */
141
+ clickNavTeams() {
142
+ cy.get(this.selectors.navTeams).click()
143
+ return this
144
+ }
145
+
146
+ // ============================================
147
+ // USERS ACTIONS
148
+ // ============================================
149
+
150
+ /**
151
+ * Search users
152
+ */
153
+ searchUsers(query: string) {
154
+ cy.get(this.selectors.usersSearch).clear().type(query)
155
+ return this
156
+ }
157
+
158
+ /**
159
+ * View user details
160
+ */
161
+ viewUser(id: string) {
162
+ cy.get(this.selectors.userView(id)).click()
163
+ return this
164
+ }
165
+
166
+ /**
167
+ * Ban a user
168
+ */
169
+ banUser(id: string) {
170
+ cy.get(this.selectors.userBan(id)).click()
171
+ return this
172
+ }
173
+
174
+ /**
175
+ * Impersonate a user
176
+ */
177
+ impersonateUser(id: string) {
178
+ cy.get(this.selectors.userImpersonate(id)).click()
179
+ return this
180
+ }
181
+
182
+ // ============================================
183
+ // TEAMS ACTIONS
184
+ // ============================================
185
+
186
+ /**
187
+ * Search teams
188
+ */
189
+ searchTeams(query: string) {
190
+ cy.get(this.selectors.teamsSearch).clear().type(query)
191
+ return this
192
+ }
193
+
194
+ /**
195
+ * View team details
196
+ */
197
+ viewTeam(id: string) {
198
+ cy.get(this.selectors.teamView(id)).click()
199
+ return this
200
+ }
201
+
202
+ // ============================================
203
+ // ASSERTIONS
204
+ // ============================================
205
+
206
+ /**
207
+ * Assert on Superadmin area
208
+ */
209
+ assertOnSuperadmin() {
210
+ cy.url().should('include', '/superadmin')
211
+ return this
212
+ }
213
+
214
+ /**
215
+ * Assert dashboard is visible
216
+ */
217
+ assertDashboardVisible() {
218
+ cy.get(this.selectors.dashboardContainer).should('be.visible')
219
+ return this
220
+ }
221
+
222
+ /**
223
+ * Assert stats cards are visible
224
+ */
225
+ assertStatsVisible() {
226
+ cy.get(this.selectors.statsUsers).should('be.visible')
227
+ cy.get(this.selectors.statsTeams).should('be.visible')
228
+ return this
229
+ }
230
+
231
+ /**
232
+ * Assert users page is visible
233
+ */
234
+ assertUsersVisible() {
235
+ cy.get(this.selectors.usersContainer).should('be.visible')
236
+ return this
237
+ }
238
+
239
+ /**
240
+ * Assert users table is visible
241
+ */
242
+ assertUsersTableVisible() {
243
+ cy.get(this.selectors.usersTable).should('be.visible')
244
+ return this
245
+ }
246
+
247
+ /**
248
+ * Assert teams page is visible
249
+ */
250
+ assertTeamsVisible() {
251
+ cy.get(this.selectors.teamsContainer).should('be.visible')
252
+ return this
253
+ }
254
+
255
+ /**
256
+ * Assert teams table is visible
257
+ */
258
+ assertTeamsTableVisible() {
259
+ cy.get(this.selectors.teamsTable).should('be.visible')
260
+ return this
261
+ }
262
+
263
+ /**
264
+ * Assert nav items are visible
265
+ */
266
+ assertNavVisible() {
267
+ cy.get(this.selectors.navContainer).should('be.visible')
268
+ return this
269
+ }
270
+
271
+ /**
272
+ * Assert subscriptions page is visible
273
+ */
274
+ assertSubscriptionsVisible() {
275
+ cy.get(this.selectors.subscriptionsContainer).should('be.visible')
276
+ return this
277
+ }
278
+
279
+ /**
280
+ * Assert access denied (redirect from superadmin)
281
+ */
282
+ assertAccessDenied() {
283
+ cy.url().should('not.include', '/superadmin')
284
+ cy.url().should('satisfy', (url: string) => {
285
+ return url.includes('/dashboard') || url.includes('error=access_denied')
286
+ })
287
+ return this
288
+ }
289
+
290
+ // ============================================
291
+ // WAITS
292
+ // ============================================
293
+
294
+ /**
295
+ * Wait for Superadmin dashboard to load
296
+ */
297
+ waitForDashboard() {
298
+ cy.url().should('include', '/superadmin')
299
+ cy.get(this.selectors.dashboardContainer, { timeout: 15000 }).should('be.visible')
300
+ return this
301
+ }
302
+
303
+ /**
304
+ * Wait for users page to load
305
+ */
306
+ waitForUsers() {
307
+ cy.url().should('include', '/superadmin/users')
308
+ cy.get(this.selectors.usersContainer, { timeout: 15000 }).should('be.visible')
309
+ return this
310
+ }
311
+
312
+ /**
313
+ * Wait for teams page to load
314
+ */
315
+ waitForTeams() {
316
+ cy.url().should('include', '/superadmin/teams')
317
+ cy.get(this.selectors.teamsContainer, { timeout: 15000 }).should('be.visible')
318
+ return this
319
+ }
320
+
321
+ /**
322
+ * Wait for subscriptions page to load
323
+ */
324
+ waitForSubscriptions() {
325
+ cy.url().should('include', '/superadmin/subscriptions')
326
+ cy.get(this.selectors.subscriptionsContainer, { timeout: 15000 }).should('be.visible')
327
+ return this
328
+ }
329
+ }
330
+
331
+ export default SuperadminPOM