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

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 (220) 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.config.ts +150 -0
  208. package/tests/jest/components/post-header.test.tsx +377 -0
  209. package/tests/jest/config/role-config.test.ts +529 -0
  210. package/tests/jest/jest.config.ts +81 -0
  211. package/tests/jest/langchain/COVERAGE.md +372 -0
  212. package/tests/jest/langchain/guardrails.test.ts +465 -0
  213. package/tests/jest/langchain/streaming.test.ts +367 -0
  214. package/tests/jest/langchain/token-tracker.test.ts +455 -0
  215. package/tests/jest/langchain/tracer-callbacks.test.ts +881 -0
  216. package/tests/jest/langchain/tracer.test.ts +823 -0
  217. package/tests/jest/user-roles/role-helpers.test.ts +432 -0
  218. package/tests/jest/validation/categories.test.ts +429 -0
  219. package/tests/jest/validation/posts.test.ts +546 -0
  220. package/tests/tsconfig.json +15 -0
@@ -0,0 +1,375 @@
1
+ ---
2
+ feature: Post Category Management
3
+ priority: high
4
+ tags: [posts, categories, crud, icons, colors]
5
+ grepTags: [uat, feat-posts, feat-categories]
6
+ coverage: 10
7
+ ---
8
+
9
+ # Post Categories - Admin UI
10
+
11
+ > Test suite for managing post categories. Covers full CRUD operations plus visual features like colors and icons display.
12
+
13
+ ## Background
14
+
15
+ ```gherkin:en
16
+ Given I am logged in as Owner (owner@nextspark.dev)
17
+ And I have navigated to the Categories page
18
+ And the categories list has loaded successfully
19
+ ```
20
+
21
+ ```gherkin:es
22
+ Given estoy logueado como Owner (owner@nextspark.dev)
23
+ And he navegado a la pagina de Categorias
24
+ And la lista de categorias ha cargado exitosamente
25
+ ```
26
+
27
+ ---
28
+
29
+ ## @test CAT-001: Navigate to categories page
30
+
31
+ ### Metadata
32
+ - **Priority:** Critical
33
+ - **Type:** Smoke
34
+ - **Tags:** navigation, page-load
35
+ - **Grep:** `@smoke`
36
+
37
+ ```gherkin:en
38
+ Scenario: Navigate to categories page
39
+
40
+ Given I am logged in as Owner
41
+ When I navigate to the categories page
42
+ And the API returns the categories
43
+ Then the page should be visible
44
+ ```
45
+
46
+ ```gherkin:es
47
+ Scenario: Navegar a pagina de categorias
48
+
49
+ Given estoy logueado como Owner
50
+ When navego a la pagina de categorias
51
+ And la API retorna las categorias
52
+ Then la pagina deberia estar visible
53
+ ```
54
+
55
+ ### Expected Results
56
+ - Categories page is accessible
57
+ - Page loads successfully
58
+ - API returns category data
59
+
60
+ ---
61
+
62
+ ## @test CAT-002: Display categories in list
63
+
64
+ ### Metadata
65
+ - **Priority:** High
66
+ - **Type:** Regression
67
+ - **Tags:** list, display, table
68
+
69
+ ```gherkin:en
70
+ Scenario: Display categories in list
71
+
72
+ Given I am on the categories page
73
+ Then the list should have at least 1 category row
74
+ ```
75
+
76
+ ```gherkin:es
77
+ Scenario: Mostrar categorias en lista
78
+
79
+ Given estoy en la pagina de categorias
80
+ Then la lista deberia tener al menos 1 fila de categoria
81
+ ```
82
+
83
+ ### Expected Results
84
+ - Categories list displays correctly
85
+ - At least one category row is visible
86
+ - Table structure is correct
87
+
88
+ ---
89
+
90
+ ## @test CAT-003: Open create category dialog
91
+
92
+ ### Metadata
93
+ - **Priority:** High
94
+ - **Type:** Regression
95
+ - **Tags:** create, dialog, ui
96
+
97
+ ```gherkin:en
98
+ Scenario: Open create category dialog
99
+
100
+ Given I am on the categories page
101
+ When I click the create button
102
+ And I wait for the dialog to open
103
+ Then the dialog should be visible
104
+ ```
105
+
106
+ ```gherkin:es
107
+ Scenario: Abrir dialogo de crear categoria
108
+
109
+ Given estoy en la pagina de categorias
110
+ When hago clic en el boton crear
111
+ And espero que el dialogo abra
112
+ Then el dialogo deberia estar visible
113
+ ```
114
+
115
+ ### Expected Results
116
+ - Create button is visible and clickable
117
+ - Dialog opens correctly
118
+ - Form fields are displayed
119
+
120
+ ---
121
+
122
+ ## @test CAT-004: Create a new category
123
+
124
+ ### Metadata
125
+ - **Priority:** Critical
126
+ - **Type:** Smoke
127
+ - **Tags:** create, form, crud
128
+ - **Grep:** `@smoke`
129
+
130
+ ```gherkin:en
131
+ Scenario: Create a new category
132
+
133
+ Given I am on the categories page
134
+ When I click the create button
135
+ And the dialog opens
136
+ And I fill the name with a unique value
137
+ And I fill the slug with a unique value
138
+ And I save the category
139
+ And I wait for the API create response
140
+ And the dialog closes
141
+ Then the new category should appear in the list
142
+ ```
143
+
144
+ ```gherkin:es
145
+ Scenario: Crear una nueva categoria
146
+
147
+ Given estoy en la pagina de categorias
148
+ When hago clic en el boton crear
149
+ And el dialogo abre
150
+ And completo el nombre con un valor unico
151
+ And completo el slug con un valor unico
152
+ And guardo la categoria
153
+ And espero la respuesta de API create
154
+ And el dialogo cierra
155
+ Then la nueva categoria deberia aparecer en la lista
156
+ ```
157
+
158
+ ### Expected Results
159
+ - Category creation form works correctly
160
+ - Name and slug fields accept input
161
+ - Save operation completes successfully
162
+ - New category appears in list
163
+ - Dialog closes after save
164
+
165
+ ---
166
+
167
+ ## @test CAT-005: Validate slug field accessibility
168
+
169
+ ### Metadata
170
+ - **Priority:** Medium
171
+ - **Type:** Regression
172
+ - **Tags:** form, validation, slug
173
+
174
+ ```gherkin:en
175
+ Scenario: Slug field accessibility
176
+
177
+ Given I am on the categories page
178
+ When I click the create button
179
+ And the dialog opens
180
+ And I fill only the name field
181
+ Then the slug input should be visible
182
+ When I cancel the form
183
+ Then the dialog should close
184
+ ```
185
+
186
+ ```gherkin:es
187
+ Scenario: Accesibilidad del campo slug
188
+
189
+ Given estoy en la pagina de categorias
190
+ When hago clic en el boton crear
191
+ And el dialogo abre
192
+ And completo solo el campo nombre
193
+ Then el input de slug deberia estar visible
194
+ When cancelo el formulario
195
+ Then el dialogo deberia cerrarse
196
+ ```
197
+
198
+ ### Expected Results
199
+ - Slug field is visible and accessible
200
+ - Form can be cancelled
201
+ - Dialog closes on cancel
202
+
203
+ ---
204
+
205
+ ## @test CAT-006: Edit an existing category
206
+
207
+ ### Metadata
208
+ - **Priority:** High
209
+ - **Type:** Regression
210
+ - **Tags:** edit, update, crud
211
+
212
+ ```gherkin:en
213
+ Scenario: Edit existing category
214
+
215
+ Given I am on the categories page
216
+ When I click the edit button on the first row
217
+ And the dialog opens
218
+ And I update the name with a unique value
219
+ And I save the category
220
+ And I wait for the API update response
221
+ And the dialog closes
222
+ Then the updated name should be visible in the list
223
+ ```
224
+
225
+ ```gherkin:es
226
+ Scenario: Editar categoria existente
227
+
228
+ Given estoy en la pagina de categorias
229
+ When hago clic en el boton editar de la primera fila
230
+ And el dialogo abre
231
+ And actualizo el nombre con un valor unico
232
+ And guardo la categoria
233
+ And espero la respuesta de API update
234
+ And el dialogo cierra
235
+ Then el nombre actualizado deberia estar visible en la lista
236
+ ```
237
+
238
+ ### Expected Results
239
+ - Edit button is accessible
240
+ - Edit dialog opens with pre-filled data
241
+ - Name can be updated
242
+ - Changes are saved correctly
243
+ - Updated data reflects in list
244
+
245
+ ---
246
+
247
+ ## @test CAT-007: Delete a category
248
+
249
+ ### Metadata
250
+ - **Priority:** High
251
+ - **Type:** Regression
252
+ - **Tags:** delete, crud, confirmation
253
+
254
+ ```gherkin:en
255
+ Scenario: Delete a category
256
+
257
+ Given I am on the categories page
258
+ And I have created a test category via API
259
+ And the test category is visible in the list
260
+ When I click the delete button on the test category row
261
+ And I confirm the deletion
262
+ And I wait for the API delete response
263
+ Then the category should no longer be in the list
264
+ ```
265
+
266
+ ```gherkin:es
267
+ Scenario: Eliminar una categoria
268
+
269
+ Given estoy en la pagina de categorias
270
+ And he creado una categoria de prueba via API
271
+ And la categoria de prueba esta visible en la lista
272
+ When hago clic en el boton eliminar de la fila de categoria de prueba
273
+ And confirmo la eliminacion
274
+ And espero la respuesta de API delete
275
+ Then la categoria ya no deberia estar en la lista
276
+ ```
277
+
278
+ ### Expected Results
279
+ - Delete button is accessible
280
+ - Confirmation dialog appears
281
+ - Category is deleted after confirmation
282
+ - Category no longer appears in list
283
+
284
+ ---
285
+
286
+ ## @test CAT-008: Cancel category deletion
287
+
288
+ ### Metadata
289
+ - **Priority:** Medium
290
+ - **Type:** Regression
291
+ - **Tags:** delete, cancel, dialog
292
+
293
+ ```gherkin:en
294
+ Scenario: Cancel category deletion
295
+
296
+ Given I am on the categories page
297
+ When I click the delete button on the first row
298
+ And the confirmation dialog appears
299
+ And I click cancel
300
+ Then the dialog should close
301
+ And at least 1 category should remain in the list
302
+ ```
303
+
304
+ ```gherkin:es
305
+ Scenario: Cancelar eliminacion de categoria
306
+
307
+ Given estoy en la pagina de categorias
308
+ When hago clic en el boton eliminar de la primera fila
309
+ And el dialogo de confirmacion aparece
310
+ And hago clic en cancelar
311
+ Then el dialogo deberia cerrarse
312
+ And al menos 1 categoria deberia permanecer en la lista
313
+ ```
314
+
315
+ ### Expected Results
316
+ - Confirmation dialog has cancel option
317
+ - Cancelling closes dialog
318
+ - Category is NOT deleted
319
+ - List remains unchanged
320
+
321
+ ---
322
+
323
+ ## @test CAT-009: Display category colors in table
324
+
325
+ ### Metadata
326
+ - **Priority:** Medium
327
+ - **Type:** Regression
328
+ - **Tags:** colors, display, visual
329
+
330
+ ```gherkin:en
331
+ Scenario: Display category colors
332
+
333
+ Given I am on the categories page
334
+ Then the table should contain elements with background or color styles
335
+ ```
336
+
337
+ ```gherkin:es
338
+ Scenario: Mostrar colores de categoria
339
+
340
+ Given estoy en la pagina de categorias
341
+ Then la tabla deberia contener elementos con estilos de background o color
342
+ ```
343
+
344
+ ### Expected Results
345
+ - Color badges are displayed
346
+ - Categories show their assigned colors
347
+ - Visual styling is applied correctly
348
+
349
+ ---
350
+
351
+ ## @test CAT-010: Display category icons in table
352
+
353
+ ### Metadata
354
+ - **Priority:** Medium
355
+ - **Type:** Regression
356
+ - **Tags:** icons, display, visual
357
+
358
+ ```gherkin:en
359
+ Scenario: Display category icons
360
+
361
+ Given I am on the categories page
362
+ Then the table should contain SVG or icon elements
363
+ ```
364
+
365
+ ```gherkin:es
366
+ Scenario: Mostrar iconos de categoria
367
+
368
+ Given estoy en la pagina de categorias
369
+ Then la tabla deberia contener elementos SVG o iconos
370
+ ```
371
+
372
+ ### Expected Results
373
+ - Icon elements are displayed
374
+ - Categories show their assigned icons
375
+ - SVG or icon components render correctly
@@ -0,0 +1,241 @@
1
+ /// <reference types="cypress" />
2
+
3
+ /**
4
+ * Post Categories - Admin UI Tests
5
+ *
6
+ * Tests for the post categories management page.
7
+ * Validates CRUD operations for categories with icon, color, and hierarchy support.
8
+ *
9
+ * Tags: @uat, @feat-posts, @admin, @categories, @regression
10
+ */
11
+
12
+ import * as allure from 'allure-cypress'
13
+ import { CategoriesPOM, loginAsOwner } from '../../../../src'
14
+
15
+ describe('Post Categories - Admin UI', {
16
+ tags: ['@uat', '@feat-posts', '@admin', '@categories', '@regression']
17
+ }, () => {
18
+ beforeEach(() => {
19
+ allure.epic('Posts System')
20
+ allure.feature('Categories Management')
21
+
22
+ // Setup API intercepts BEFORE login and navigation
23
+ CategoriesPOM.setupApiIntercepts()
24
+ loginAsOwner()
25
+ CategoriesPOM.visitCategoriesPage()
26
+ CategoriesPOM.api.waitForList()
27
+ CategoriesPOM.waitForPageLoad()
28
+ })
29
+
30
+ // ============================================================
31
+ // Navigation Tests
32
+ // ============================================================
33
+ describe('Navigation', () => {
34
+ it('CAT-001: Should navigate to categories page', { tags: '@smoke' }, () => {
35
+ allure.story('Navigation')
36
+ allure.severity('critical')
37
+
38
+ CategoriesPOM.assertPageVisible()
39
+ cy.log('Successfully navigated to categories page')
40
+ })
41
+
42
+ it('CAT-002: Should display categories in list', () => {
43
+ allure.story('List Display')
44
+ allure.severity('normal')
45
+
46
+ // Verify categories table has content (at least one category)
47
+ cy.get(CategoriesPOM.listSelectors.rowGeneric).should('have.length.at.least', 1)
48
+
49
+ cy.log('Categories visible in list')
50
+ })
51
+ })
52
+
53
+ // ============================================================
54
+ // Create Category Tests
55
+ // ============================================================
56
+ describe('Create Category', () => {
57
+ it('CAT-003: Should open create category dialog', () => {
58
+ allure.story('Create')
59
+ allure.severity('normal')
60
+
61
+ CategoriesPOM.clickCreate()
62
+ CategoriesPOM.waitForDialogOpen()
63
+ CategoriesPOM.assertDialogOpen()
64
+
65
+ cy.log('Create category dialog opened')
66
+ })
67
+
68
+ it('CAT-004: Should create a new category', { tags: '@smoke' }, () => {
69
+ allure.story('Create')
70
+ allure.severity('critical')
71
+
72
+ // Generate unique name using random string to avoid slug conflicts
73
+ const uniqueId = Math.random().toString(36).substring(2, 8)
74
+ const testCategoryName = `CyTest${uniqueId}`
75
+ const testCategorySlug = testCategoryName.toLowerCase()
76
+
77
+ CategoriesPOM.clickCreate()
78
+ CategoriesPOM.waitForDialogOpen()
79
+
80
+ // Fill name and slug
81
+ CategoriesPOM.fillName(testCategoryName)
82
+ CategoriesPOM.fillSlug(testCategorySlug)
83
+
84
+ // Save and wait for API response
85
+ CategoriesPOM.saveCategory()
86
+ CategoriesPOM.api.waitForCreate()
87
+ CategoriesPOM.api.waitForRefresh()
88
+ CategoriesPOM.waitForDialogClose()
89
+
90
+ // Verify new category exists in the table
91
+ CategoriesPOM.assertCategoryInList(testCategoryName)
92
+
93
+ cy.log('Category created successfully')
94
+ })
95
+
96
+ it('CAT-005: Should validate slug field accessibility', () => {
97
+ allure.story('Create')
98
+ allure.severity('minor')
99
+
100
+ CategoriesPOM.clickCreate()
101
+ CategoriesPOM.waitForDialogOpen()
102
+
103
+ // Fill only name
104
+ CategoriesPOM.fillName('Auto Slug Test')
105
+
106
+ // Check if slug input is accessible
107
+ cy.get(CategoriesPOM.formSelectors.slugInput).should('be.visible')
108
+
109
+ // Close dialog
110
+ CategoriesPOM.cancelForm()
111
+ CategoriesPOM.waitForDialogClose()
112
+
113
+ cy.log('Slug field accessible')
114
+ })
115
+ })
116
+
117
+ // ============================================================
118
+ // Edit Category Tests
119
+ // ============================================================
120
+ describe('Edit Category', () => {
121
+ it('CAT-006: Should edit an existing category', () => {
122
+ allure.story('Edit')
123
+ allure.severity('normal')
124
+
125
+ // Click the first row's edit button directly
126
+ cy.get(CategoriesPOM.listSelectors.rowGeneric).first().within(() => {
127
+ cy.get('button').first().click()
128
+ })
129
+
130
+ // Wait for dialog
131
+ CategoriesPOM.waitForDialogOpen()
132
+
133
+ // Update name with unique value
134
+ const updatedName = `Updated Cat ${Date.now()}`
135
+ CategoriesPOM.fillName(updatedName)
136
+
137
+ // Save and wait for API
138
+ CategoriesPOM.saveCategory()
139
+ CategoriesPOM.api.waitForUpdate()
140
+ CategoriesPOM.api.waitForRefresh()
141
+ CategoriesPOM.waitForDialogClose()
142
+
143
+ // Verify updated name in list
144
+ cy.contains(updatedName).should('be.visible')
145
+
146
+ cy.log('Category edited successfully')
147
+ })
148
+ })
149
+
150
+ // ============================================================
151
+ // Delete Category Tests
152
+ // ============================================================
153
+ describe('Delete Category', () => {
154
+ it('CAT-007: Should delete a category', () => {
155
+ allure.story('Delete')
156
+ allure.severity('normal')
157
+
158
+ // Create a test category to delete using API-aware method
159
+ const testCategory = {
160
+ name: `Cat To Delete ${Date.now()}`,
161
+ slug: `cat-to-delete-${Date.now()}`
162
+ }
163
+
164
+ CategoriesPOM.createCategoryWithApiWait(testCategory)
165
+ CategoriesPOM.assertCategoryInList(testCategory.name)
166
+
167
+ // Now delete it
168
+ cy.get(CategoriesPOM.listSelectors.rowGeneric).contains(testCategory.name).closest('tr').within(() => {
169
+ cy.get('button').eq(1).click() // Delete button
170
+ })
171
+
172
+ CategoriesPOM.confirmDelete()
173
+ CategoriesPOM.api.waitForDelete()
174
+ CategoriesPOM.api.waitForRefresh()
175
+
176
+ // Verify category is removed
177
+ CategoriesPOM.assertCategoryNotInList(testCategory.name)
178
+
179
+ cy.log('Category deleted successfully')
180
+ })
181
+
182
+ it('CAT-008: Should cancel category deletion', () => {
183
+ allure.story('Delete')
184
+ allure.severity('normal')
185
+
186
+ // Click delete button on first row (second button in the row)
187
+ cy.get(CategoriesPOM.listSelectors.rowGeneric).first().within(() => {
188
+ cy.get('button').eq(1).click()
189
+ })
190
+
191
+ // Wait for AlertDialog (uses role="alertdialog")
192
+ cy.get('[role="alertdialog"]', { timeout: 5000 }).should('be.visible')
193
+
194
+ // Cancel deletion by clicking cancel button
195
+ cy.get('[role="alertdialog"]').find('button').contains(/cancel/i).click()
196
+
197
+ // Wait for dialog to close
198
+ cy.get('[role="alertdialog"]').should('not.exist')
199
+
200
+ // Verify categories still exist (at least one row remains)
201
+ cy.get(CategoriesPOM.listSelectors.rowGeneric).should('have.length.at.least', 1)
202
+
203
+ cy.log('Category deletion cancelled')
204
+ })
205
+ })
206
+
207
+ // ============================================================
208
+ // Color Badge Tests
209
+ // ============================================================
210
+ describe('Color Badges', () => {
211
+ it('CAT-009: Should display category colors in table', () => {
212
+ allure.story('UI Display')
213
+ allure.severity('minor')
214
+
215
+ // Check that color badges are visible
216
+ cy.get(CategoriesPOM.listSelectors.table).within(() => {
217
+ // Look for color indicators (background, border, or style attributes)
218
+ cy.get('[style*="background"], [style*="color"]').should('exist')
219
+ })
220
+
221
+ cy.log('Category colors visible in table')
222
+ })
223
+ })
224
+
225
+ // ============================================================
226
+ // Icon Display Tests
227
+ // ============================================================
228
+ describe('Icon Display', () => {
229
+ it('CAT-010: Should display category icons in table', () => {
230
+ allure.story('UI Display')
231
+ allure.severity('minor')
232
+
233
+ // Check that icons are visible (typically as SVG or icon components)
234
+ cy.get(CategoriesPOM.listSelectors.table).within(() => {
235
+ cy.get('svg, [class*="icon"]').should('exist')
236
+ })
237
+
238
+ cy.log('Category icons visible in table')
239
+ })
240
+ })
241
+ })