@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.
- package/package.json +1 -1
- package/tests/cypress/e2e/_devtools/access.bdd.md +262 -0
- package/tests/cypress/e2e/_devtools/access.cy.ts +171 -0
- package/tests/cypress/e2e/_devtools/navigation.bdd.md +261 -0
- package/tests/cypress/e2e/_devtools/navigation.cy.ts +157 -0
- package/tests/cypress/e2e/_devtools/pages.bdd.md +303 -0
- package/tests/cypress/e2e/_devtools/pages.cy.ts +184 -0
- package/tests/cypress/e2e/_docs/README.md +215 -0
- package/tests/cypress/e2e/_docs/tutorials/sector7-superadmin-teams.narration.json +155 -0
- package/tests/cypress/e2e/_docs/tutorials/sector7-superadmin.cy.ts +390 -0
- package/tests/cypress/e2e/_docs/tutorials/teams-system.doc.cy.ts +349 -0
- package/tests/cypress/e2e/_docs/tutorials/teams-system.narration.json +165 -0
- package/tests/cypress/e2e/_selectors/auth.cy.ts +306 -0
- package/tests/cypress/e2e/_selectors/billing.cy.ts +89 -0
- package/tests/cypress/e2e/_selectors/dashboard-mobile.cy.ts +113 -0
- package/tests/cypress/e2e/_selectors/dashboard-navigation.cy.ts +89 -0
- package/tests/cypress/e2e/_selectors/dashboard-sidebar.cy.ts +60 -0
- package/tests/cypress/e2e/_selectors/dashboard-topnav.cy.ts +146 -0
- package/tests/cypress/e2e/_selectors/devtools.cy.ts +210 -0
- package/tests/cypress/e2e/_selectors/global-search.cy.ts +88 -0
- package/tests/cypress/e2e/_selectors/pages-editor.cy.ts +179 -0
- package/tests/cypress/e2e/_selectors/posts-editor.cy.ts +282 -0
- package/tests/cypress/e2e/_selectors/public.cy.ts +112 -0
- package/tests/cypress/e2e/_selectors/settings-api-keys.cy.ts +228 -0
- package/tests/cypress/e2e/_selectors/settings-billing.cy.ts +105 -0
- package/tests/cypress/e2e/_selectors/settings-layout.cy.ts +119 -0
- package/tests/cypress/e2e/_selectors/settings-password.cy.ts +71 -0
- package/tests/cypress/e2e/_selectors/settings-profile.cy.ts +82 -0
- package/tests/cypress/e2e/_selectors/settings-teams.cy.ts +68 -0
- package/tests/cypress/e2e/_selectors/superadmin.cy.ts +185 -0
- package/tests/cypress/e2e/_selectors/tasks.cy.ts +242 -0
- package/tests/cypress/e2e/_selectors/taxonomies.cy.ts +126 -0
- package/tests/cypress/e2e/_selectors/teams.cy.ts +142 -0
- package/tests/cypress/e2e/_superadmin/all-teams.bdd.md +261 -0
- package/tests/cypress/e2e/_superadmin/all-teams.cy.ts +177 -0
- package/tests/cypress/e2e/_superadmin/all-users.bdd.md +406 -0
- package/tests/cypress/e2e/_superadmin/all-users.cy.ts +294 -0
- package/tests/cypress/e2e/_superadmin/dashboard.bdd.md +235 -0
- package/tests/cypress/e2e/_superadmin/dashboard.cy.ts +149 -0
- package/tests/cypress/e2e/_superadmin/subscriptions-overview.bdd.md +290 -0
- package/tests/cypress/e2e/_superadmin/subscriptions-overview.cy.ts +194 -0
- package/tests/cypress/e2e/ai/ai-usage.cy.ts +209 -0
- package/tests/cypress/e2e/ai/chat-api.cy.ts +107 -0
- package/tests/cypress/e2e/ai/guardrails.cy.ts +332 -0
- package/tests/cypress/e2e/api/billing/BillingAPIController.js +319 -0
- package/tests/cypress/e2e/api/billing/check-action.cy.ts +326 -0
- package/tests/cypress/e2e/api/billing/checkout.cy.ts +358 -0
- package/tests/cypress/e2e/api/billing/lifecycle.cy.ts +423 -0
- package/tests/cypress/e2e/api/billing/plans/README.md +345 -0
- package/tests/cypress/e2e/api/billing/plans/business.cy.ts +412 -0
- package/tests/cypress/e2e/api/billing/plans/downgrade.cy.ts +510 -0
- package/tests/cypress/e2e/api/billing/plans/fixtures/billing-plans.json +163 -0
- package/tests/cypress/e2e/api/billing/plans/free.cy.ts +500 -0
- package/tests/cypress/e2e/api/billing/plans/pro.cy.ts +497 -0
- package/tests/cypress/e2e/api/billing/plans/starter.cy.ts +342 -0
- package/tests/cypress/e2e/api/billing/portal.cy.ts +313 -0
- package/tests/cypress/e2e/api/devtools/registries.bdd.md +300 -0
- package/tests/cypress/e2e/api/devtools/registries.cy.ts +368 -0
- package/tests/cypress/e2e/api/entities/blocks-scope.cy.ts +396 -0
- package/tests/cypress/e2e/api/entities/customers-crud.cy.ts +648 -0
- package/tests/cypress/e2e/api/entities/customers-metas.cy.ts +839 -0
- package/tests/cypress/e2e/api/entities/pages-crud.cy.ts +425 -0
- package/tests/cypress/e2e/api/entities/pages-status.cy.ts +335 -0
- package/tests/cypress/e2e/api/entities/post-categories-crud.cy.ts +610 -0
- package/tests/cypress/e2e/api/entities/posts-crud.cy.ts +709 -0
- package/tests/cypress/e2e/api/entities/posts-status.cy.ts +396 -0
- package/tests/cypress/e2e/api/entities/tasks-crud.cy.ts +602 -0
- package/tests/cypress/e2e/api/entities/tasks-metas.cy.ts +878 -0
- package/tests/cypress/e2e/api/entities/users-crud.cy.ts +469 -0
- package/tests/cypress/e2e/api/entities/users-metas.cy.ts +913 -0
- package/tests/cypress/e2e/api/entities/users-security.cy.ts +375 -0
- package/tests/cypress/e2e/api/scheduled-actions/cron-endpoint.bdd.md +375 -0
- package/tests/cypress/e2e/api/scheduled-actions/cron-endpoint.cy.ts +346 -0
- package/tests/cypress/e2e/api/scheduled-actions/devtools-endpoint.bdd.md +451 -0
- package/tests/cypress/e2e/api/scheduled-actions/devtools-endpoint.cy.ts +447 -0
- package/tests/cypress/e2e/api/scheduled-actions/scheduling.bdd.md +649 -0
- package/tests/cypress/e2e/api/scheduled-actions/scheduling.cy.ts +333 -0
- package/tests/cypress/e2e/api/settings/api-keys.crud.cy.ts +923 -0
- package/tests/cypress/e2e/uat/auth/app-roles/developer-login.bdd.md +231 -0
- package/tests/cypress/e2e/uat/auth/app-roles/developer-login.cy.ts +144 -0
- package/tests/cypress/e2e/uat/auth/app-roles/superadmin-login.bdd.md +118 -0
- package/tests/cypress/e2e/uat/auth/app-roles/superadmin-login.cy.ts +84 -0
- package/tests/cypress/e2e/uat/auth/custom-roles/editor-login.bdd.md +288 -0
- package/tests/cypress/e2e/uat/auth/custom-roles/editor-login.cy.ts +188 -0
- package/tests/cypress/e2e/uat/auth/login-logout.bdd.md +160 -0
- package/tests/cypress/e2e/uat/auth/login-logout.cy.ts +116 -0
- package/tests/cypress/e2e/uat/auth/password-reset.bdd.md +289 -0
- package/tests/cypress/e2e/uat/auth/password-reset.cy.ts +200 -0
- package/tests/cypress/e2e/uat/auth/team-roles/admin-login.bdd.md +225 -0
- package/tests/cypress/e2e/uat/auth/team-roles/admin-login.cy.ts +148 -0
- package/tests/cypress/e2e/uat/auth/team-roles/member-login.bdd.md +251 -0
- package/tests/cypress/e2e/uat/auth/team-roles/member-login.cy.ts +163 -0
- package/tests/cypress/e2e/uat/auth/team-roles/owner-login.bdd.md +231 -0
- package/tests/cypress/e2e/uat/auth/team-roles/owner-login.cy.ts +141 -0
- package/tests/cypress/e2e/uat/billing/extended.bdd.md +273 -0
- package/tests/cypress/e2e/uat/billing/extended.cy.ts +209 -0
- package/tests/cypress/e2e/uat/billing/feature-gates.bdd.md +407 -0
- package/tests/cypress/e2e/uat/billing/feature-gates.cy.ts +307 -0
- package/tests/cypress/e2e/uat/billing/page.bdd.md +329 -0
- package/tests/cypress/e2e/uat/billing/page.cy.ts +250 -0
- package/tests/cypress/e2e/uat/billing/status.bdd.md +190 -0
- package/tests/cypress/e2e/uat/billing/status.cy.ts +145 -0
- package/tests/cypress/e2e/uat/billing/team-switch.bdd.md +156 -0
- package/tests/cypress/e2e/uat/billing/team-switch.cy.ts +122 -0
- package/tests/cypress/e2e/uat/billing/usage.bdd.md +218 -0
- package/tests/cypress/e2e/uat/billing/usage.cy.ts +176 -0
- package/tests/cypress/e2e/uat/blocks/hero.bdd.md +124 -0
- package/tests/cypress/e2e/uat/blocks/hero.cy.ts +56 -0
- package/tests/cypress/e2e/uat/devtools/api-tester.cy.ts +390 -0
- package/tests/cypress/e2e/uat/entities/customers/member.bdd.md +275 -0
- package/tests/cypress/e2e/uat/entities/customers/member.cy.ts +122 -0
- package/tests/cypress/e2e/uat/entities/customers/owner.bdd.md +243 -0
- package/tests/cypress/e2e/uat/entities/customers/owner.cy.ts +165 -0
- package/tests/cypress/e2e/uat/entities/pages/block-crud.bdd.md +476 -0
- package/tests/cypress/e2e/uat/entities/pages/block-crud.cy.ts +486 -0
- package/tests/cypress/e2e/uat/entities/pages/block-editor.bdd.md +460 -0
- package/tests/cypress/e2e/uat/entities/pages/block-editor.cy.ts +301 -0
- package/tests/cypress/e2e/uat/entities/pages/list.bdd.md +432 -0
- package/tests/cypress/e2e/uat/entities/pages/list.cy.ts +273 -0
- package/tests/cypress/e2e/uat/entities/pages/public-rendering.bdd.md +696 -0
- package/tests/cypress/e2e/uat/entities/pages/public-rendering.cy.ts +340 -0
- package/tests/cypress/e2e/uat/entities/posts/categories-api-aware.bdd.md +161 -0
- package/tests/cypress/e2e/uat/entities/posts/categories-api-aware.cy.ts +104 -0
- package/tests/cypress/e2e/uat/entities/posts/categories.bdd.md +375 -0
- package/tests/cypress/e2e/uat/entities/posts/categories.cy.ts +241 -0
- package/tests/cypress/e2e/uat/entities/posts/editor.bdd.md +429 -0
- package/tests/cypress/e2e/uat/entities/posts/editor.cy.ts +257 -0
- package/tests/cypress/e2e/uat/entities/posts/list.bdd.md +340 -0
- package/tests/cypress/e2e/uat/entities/posts/list.cy.ts +177 -0
- package/tests/cypress/e2e/uat/entities/posts/public.bdd.md +614 -0
- package/tests/cypress/e2e/uat/entities/posts/public.cy.ts +249 -0
- package/tests/cypress/e2e/uat/entities/tasks/member.bdd.md +222 -0
- package/tests/cypress/e2e/uat/entities/tasks/member.cy.ts +165 -0
- package/tests/cypress/e2e/uat/entities/tasks/owner.bdd.md +419 -0
- package/tests/cypress/e2e/uat/entities/tasks/owner.cy.ts +191 -0
- package/tests/cypress/e2e/uat/roles/editor-role.bdd.md +552 -0
- package/tests/cypress/e2e/uat/roles/editor-role.cy.ts +210 -0
- package/tests/cypress/e2e/uat/roles/member-restrictions.bdd.md +450 -0
- package/tests/cypress/e2e/uat/roles/member-restrictions.cy.ts +189 -0
- package/tests/cypress/e2e/uat/roles/owner-full-crud.bdd.md +530 -0
- package/tests/cypress/e2e/uat/roles/owner-full-crud.cy.ts +247 -0
- package/tests/cypress/e2e/uat/scheduled-actions/devtools-ui.bdd.md +736 -0
- package/tests/cypress/e2e/uat/scheduled-actions/devtools-ui.cy.ts +740 -0
- package/tests/cypress/e2e/uat/teams/roles-matrix.bdd.md +553 -0
- package/tests/cypress/e2e/uat/teams/roles-matrix.cy.ts +185 -0
- package/tests/cypress/e2e/uat/teams/switcher.bdd.md +1151 -0
- package/tests/cypress/e2e/uat/teams/switcher.cy.ts +497 -0
- package/tests/cypress/e2e/uat/teams/team-switcher.md +198 -0
- package/tests/cypress/fixtures/blocks.json +218 -0
- package/tests/cypress/fixtures/entities.json +78 -0
- package/tests/cypress/fixtures/page-builder.json +21 -0
- package/tests/cypress/src/components/CategoriesPOM.ts +382 -0
- package/tests/cypress/src/components/CustomersPOM.ts +439 -0
- package/tests/cypress/src/components/DevKeyringPOM.ts +160 -0
- package/tests/cypress/src/components/EntityForm.ts +375 -0
- package/tests/cypress/src/components/EntityList.ts +389 -0
- package/tests/cypress/src/components/PageBuilderPOM.ts +710 -0
- package/tests/cypress/src/components/PostEditorPOM.ts +370 -0
- package/tests/cypress/src/components/PostsListPOM.ts +223 -0
- package/tests/cypress/src/components/PublicPagePOM.ts +447 -0
- package/tests/cypress/src/components/PublicPostPOM.ts +146 -0
- package/tests/cypress/src/components/TasksPOM.ts +272 -0
- package/tests/cypress/src/components/TeamSwitcherPOM.ts +450 -0
- package/tests/cypress/src/components/index.ts +21 -0
- package/tests/cypress/src/controllers/ApiKeysAPIController.js +178 -0
- package/tests/cypress/src/controllers/BaseAPIController.js +317 -0
- package/tests/cypress/src/controllers/CustomerAPIController.js +251 -0
- package/tests/cypress/src/controllers/PagesAPIController.js +226 -0
- package/tests/cypress/src/controllers/PostsAPIController.js +250 -0
- package/tests/cypress/src/controllers/TaskAPIController.js +240 -0
- package/tests/cypress/src/controllers/UsersAPIController.js +242 -0
- package/tests/cypress/src/controllers/index.js +25 -0
- package/tests/cypress/src/core/AuthPOM.ts +450 -0
- package/tests/cypress/src/core/BasePOM.ts +86 -0
- package/tests/cypress/src/core/BlockEditorBasePOM.ts +576 -0
- package/tests/cypress/src/core/DashboardEntityPOM.ts +692 -0
- package/tests/cypress/src/core/index.ts +14 -0
- package/tests/cypress/src/entities/CustomersPOM.ts +172 -0
- package/tests/cypress/src/entities/PagesPOM.ts +137 -0
- package/tests/cypress/src/entities/PostsPOM.ts +137 -0
- package/tests/cypress/src/entities/TasksPOM.ts +176 -0
- package/tests/cypress/src/entities/index.ts +14 -0
- package/tests/cypress/src/features/BillingPOM.ts +385 -0
- package/tests/cypress/src/features/DashboardPOM.ts +245 -0
- package/tests/cypress/src/features/DevtoolsPOM.ts +739 -0
- package/tests/cypress/src/features/PageBuilderPOM.ts +263 -0
- package/tests/cypress/src/features/PostEditorPOM.ts +313 -0
- package/tests/cypress/src/features/ScheduledActionsPOM.ts +463 -0
- package/tests/cypress/src/features/SettingsPOM.ts +362 -0
- package/tests/cypress/src/features/SuperadminPOM.ts +331 -0
- package/tests/cypress/src/features/SuperadminTeamRolesPOM.ts +285 -0
- package/tests/cypress/src/features/index.ts +28 -0
- package/tests/cypress/src/helpers/ApiInterceptor.ts +177 -0
- package/tests/cypress/src/index.ts +101 -0
- package/tests/cypress/src/pages/dashboard/Dashboard.js +677 -0
- package/tests/cypress/src/pages/dashboard/DashboardPage.js +43 -0
- package/tests/cypress/src/pages/dashboard/DashboardStats.js +546 -0
- package/tests/cypress/src/pages/dashboard/index.js +6 -0
- package/tests/cypress/src/pages/index.js +5 -0
- package/tests/cypress/src/pages/public/FeaturesPage.js +28 -0
- package/tests/cypress/src/pages/public/LandingPage.js +69 -0
- package/tests/cypress/src/pages/public/PricingPage.js +33 -0
- package/tests/cypress/src/pages/public/index.js +6 -0
- package/tests/cypress/src/selectors.ts +46 -0
- package/tests/cypress/src/session-helpers.ts +500 -0
- package/tests/cypress/support/doc-commands.ts +260 -0
- package/tests/cypress.config.ts +150 -0
- package/tests/jest/components/post-header.test.tsx +377 -0
- package/tests/jest/config/role-config.test.ts +529 -0
- package/tests/jest/jest.config.ts +81 -0
- package/tests/jest/langchain/COVERAGE.md +372 -0
- package/tests/jest/langchain/guardrails.test.ts +465 -0
- package/tests/jest/langchain/streaming.test.ts +367 -0
- package/tests/jest/langchain/token-tracker.test.ts +455 -0
- package/tests/jest/langchain/tracer-callbacks.test.ts +881 -0
- package/tests/jest/langchain/tracer.test.ts +823 -0
- package/tests/jest/user-roles/role-helpers.test.ts +432 -0
- package/tests/jest/validation/categories.test.ts +429 -0
- package/tests/jest/validation/posts.test.ts +546 -0
- package/tests/tsconfig.json +15 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
---
|
|
2
|
+
feature: Post Editor Interface
|
|
3
|
+
priority: high
|
|
4
|
+
tags: [posts, editor, form, blocks, categories]
|
|
5
|
+
grepTags: [uat, feat-posts, editor]
|
|
6
|
+
coverage: 12
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Post Editor - Admin UI
|
|
10
|
+
|
|
11
|
+
> Test suite for the post editor interface. Covers loading create/edit editors, filling form fields, using block picker with scope filtering, adding/removing blocks, selecting categories, and saving drafts.
|
|
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 Post Editor
|
|
18
|
+
And the editor has loaded successfully
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```gherkin:es
|
|
22
|
+
Given estoy logueado como Owner (owner@nextspark.dev)
|
|
23
|
+
And he navegado al Editor de Posts
|
|
24
|
+
And el editor ha cargado exitosamente
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## @test POST-EDITOR-001: Load create post editor
|
|
30
|
+
|
|
31
|
+
### Metadata
|
|
32
|
+
- **Priority:** Critical
|
|
33
|
+
- **Type:** Smoke
|
|
34
|
+
- **Tags:** editor, load, create
|
|
35
|
+
- **Grep:** `@smoke`
|
|
36
|
+
|
|
37
|
+
```gherkin:en
|
|
38
|
+
Scenario: Load create post editor
|
|
39
|
+
|
|
40
|
+
Given I am logged in as Owner
|
|
41
|
+
When I visit /dashboard/posts/create
|
|
42
|
+
And I wait for the editor to load
|
|
43
|
+
Then the editor should be visible
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```gherkin:es
|
|
47
|
+
Scenario: Cargar editor de crear post
|
|
48
|
+
|
|
49
|
+
Given estoy logueado como Owner
|
|
50
|
+
When visito /dashboard/posts/create
|
|
51
|
+
And espero que el editor cargue
|
|
52
|
+
Then el editor deberia estar visible
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Expected Results
|
|
56
|
+
- Create post URL is accessible
|
|
57
|
+
- Editor loads successfully
|
|
58
|
+
- Editor component is visible
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## @test POST-EDITOR-002: Load edit post editor
|
|
63
|
+
|
|
64
|
+
### Metadata
|
|
65
|
+
- **Priority:** High
|
|
66
|
+
- **Type:** Regression
|
|
67
|
+
- **Tags:** editor, load, edit
|
|
68
|
+
|
|
69
|
+
```gherkin:en
|
|
70
|
+
Scenario: Load edit post editor
|
|
71
|
+
|
|
72
|
+
Given I am logged in as Owner
|
|
73
|
+
And I am on the posts list
|
|
74
|
+
When I click the edit action on the first post
|
|
75
|
+
Then the URL should include /edit
|
|
76
|
+
And the editor should be visible
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```gherkin:es
|
|
80
|
+
Scenario: Cargar editor de editar post
|
|
81
|
+
|
|
82
|
+
Given estoy logueado como Owner
|
|
83
|
+
And estoy en la lista de posts
|
|
84
|
+
When hago clic en la accion editar del primer post
|
|
85
|
+
Then la URL deberia incluir /edit
|
|
86
|
+
And el editor deberia estar visible
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Expected Results
|
|
90
|
+
- Edit action navigates to edit page
|
|
91
|
+
- URL contains /edit
|
|
92
|
+
- Editor loads with post data
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## @test POST-EDITOR-003: Display all required form fields
|
|
97
|
+
|
|
98
|
+
### Metadata
|
|
99
|
+
- **Priority:** High
|
|
100
|
+
- **Type:** Regression
|
|
101
|
+
- **Tags:** form, fields, validation
|
|
102
|
+
|
|
103
|
+
```gherkin:en
|
|
104
|
+
Scenario: Display required form fields
|
|
105
|
+
|
|
106
|
+
Given I am on the create post editor
|
|
107
|
+
Then the title input should be visible
|
|
108
|
+
And the slug input should be visible
|
|
109
|
+
And the excerpt input should be visible
|
|
110
|
+
And the featured image input should be visible
|
|
111
|
+
And the categories select should be visible
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```gherkin:es
|
|
115
|
+
Scenario: Mostrar campos de formulario requeridos
|
|
116
|
+
|
|
117
|
+
Given estoy en el editor de crear post
|
|
118
|
+
Then el input de titulo deberia estar visible
|
|
119
|
+
And el input de slug deberia estar visible
|
|
120
|
+
And el input de extracto deberia estar visible
|
|
121
|
+
And el input de imagen destacada deberia estar visible
|
|
122
|
+
And el select de categorias deberia estar visible
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Expected Results
|
|
126
|
+
- Title input is present
|
|
127
|
+
- Slug input is present
|
|
128
|
+
- Excerpt textarea is present
|
|
129
|
+
- Featured image field is present
|
|
130
|
+
- Categories selector is present
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## @test POST-EDITOR-004: Fill title and slug
|
|
135
|
+
|
|
136
|
+
### Metadata
|
|
137
|
+
- **Priority:** High
|
|
138
|
+
- **Type:** Regression
|
|
139
|
+
- **Tags:** form, title, slug
|
|
140
|
+
|
|
141
|
+
```gherkin:en
|
|
142
|
+
Scenario: Fill title and slug fields
|
|
143
|
+
|
|
144
|
+
Given I am on the create post editor
|
|
145
|
+
When I set the title to "Test Post"
|
|
146
|
+
And I set the slug to "test-post"
|
|
147
|
+
Then the title should have value "Test Post"
|
|
148
|
+
And the slug should have value "test-post"
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```gherkin:es
|
|
152
|
+
Scenario: Completar campos titulo y slug
|
|
153
|
+
|
|
154
|
+
Given estoy en el editor de crear post
|
|
155
|
+
When establezco el titulo como "Test Post"
|
|
156
|
+
And establezco el slug como "test-post"
|
|
157
|
+
Then el titulo deberia tener valor "Test Post"
|
|
158
|
+
And el slug deberia tener valor "test-post"
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Expected Results
|
|
162
|
+
- Title field accepts input
|
|
163
|
+
- Slug field accepts input
|
|
164
|
+
- Values are correctly set
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## @test POST-EDITOR-005: Fill excerpt field
|
|
169
|
+
|
|
170
|
+
### Metadata
|
|
171
|
+
- **Priority:** Medium
|
|
172
|
+
- **Type:** Regression
|
|
173
|
+
- **Tags:** form, excerpt, textarea
|
|
174
|
+
|
|
175
|
+
```gherkin:en
|
|
176
|
+
Scenario: Fill excerpt field
|
|
177
|
+
|
|
178
|
+
Given I am on the create post editor
|
|
179
|
+
When I set the excerpt to "This is a test excerpt for the post."
|
|
180
|
+
Then the excerpt should have the entered value
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```gherkin:es
|
|
184
|
+
Scenario: Completar campo de extracto
|
|
185
|
+
|
|
186
|
+
Given estoy en el editor de crear post
|
|
187
|
+
When establezco el extracto como "This is a test excerpt for the post."
|
|
188
|
+
Then el extracto deberia tener el valor ingresado
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Expected Results
|
|
192
|
+
- Excerpt textarea accepts input
|
|
193
|
+
- Value is correctly set
|
|
194
|
+
- Multi-line text is supported
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## @test POST-EDITOR-006: Fill featured image field
|
|
199
|
+
|
|
200
|
+
### Metadata
|
|
201
|
+
- **Priority:** Medium
|
|
202
|
+
- **Type:** Regression
|
|
203
|
+
- **Tags:** form, image, url
|
|
204
|
+
|
|
205
|
+
```gherkin:en
|
|
206
|
+
Scenario: Fill featured image field
|
|
207
|
+
|
|
208
|
+
Given I am on the create post editor
|
|
209
|
+
When I set the featured image URL to "https://example.com/image.jpg"
|
|
210
|
+
Then the featured image input should have the URL value
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```gherkin:es
|
|
214
|
+
Scenario: Completar campo de imagen destacada
|
|
215
|
+
|
|
216
|
+
Given estoy en el editor de crear post
|
|
217
|
+
When establezco la URL de imagen destacada como "https://example.com/image.jpg"
|
|
218
|
+
Then el input de imagen destacada deberia tener el valor de URL
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Expected Results
|
|
222
|
+
- Featured image field accepts URL
|
|
223
|
+
- URL value is correctly set
|
|
224
|
+
- Field validates URL format
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## @test POST-EDITOR-007: Display block picker
|
|
229
|
+
|
|
230
|
+
### Metadata
|
|
231
|
+
- **Priority:** High
|
|
232
|
+
- **Type:** Regression
|
|
233
|
+
- **Tags:** blocks, picker, ui
|
|
234
|
+
|
|
235
|
+
```gherkin:en
|
|
236
|
+
Scenario: Display block picker
|
|
237
|
+
|
|
238
|
+
Given I am on the create post editor
|
|
239
|
+
And the block picker has loaded
|
|
240
|
+
Then the block picker should be visible
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
```gherkin:es
|
|
244
|
+
Scenario: Mostrar selector de bloques
|
|
245
|
+
|
|
246
|
+
Given estoy en el editor de crear post
|
|
247
|
+
And el selector de bloques ha cargado
|
|
248
|
+
Then el selector de bloques deberia estar visible
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Expected Results
|
|
252
|
+
- Block picker component loads
|
|
253
|
+
- Block picker is visible
|
|
254
|
+
- Available blocks are displayed
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## @test POST-EDITOR-008: Block scope filtering for posts
|
|
259
|
+
|
|
260
|
+
### Metadata
|
|
261
|
+
- **Priority:** Critical
|
|
262
|
+
- **Type:** Regression
|
|
263
|
+
- **Tags:** blocks, scope, filtering
|
|
264
|
+
- **Grep:** `@critical`
|
|
265
|
+
|
|
266
|
+
```gherkin:en
|
|
267
|
+
Scenario: Block scope filtering for posts
|
|
268
|
+
|
|
269
|
+
Given I am on the create post editor
|
|
270
|
+
And the block picker has loaded
|
|
271
|
+
Then the "hero" block should be in the picker
|
|
272
|
+
And the block count should be 2 or less
|
|
273
|
+
|
|
274
|
+
Note: Posts have limited block scope - only blocks with
|
|
275
|
+
scope: ['pages', 'posts'] are available.
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
```gherkin:es
|
|
279
|
+
Scenario: Filtrado de scope de bloques para posts
|
|
280
|
+
|
|
281
|
+
Given estoy en el editor de crear post
|
|
282
|
+
And el selector de bloques ha cargado
|
|
283
|
+
Then el bloque "hero" deberia estar en el selector
|
|
284
|
+
And la cantidad de bloques deberia ser 2 o menos
|
|
285
|
+
|
|
286
|
+
Nota: Los posts tienen scope limitado de bloques - solo
|
|
287
|
+
bloques con scope: ['pages', 'posts'] estan disponibles.
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Expected Results
|
|
291
|
+
- Hero block is available for posts
|
|
292
|
+
- Block scope filtering works correctly
|
|
293
|
+
- Only post-scoped blocks are shown
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## @test POST-EDITOR-009: Add a hero block
|
|
298
|
+
|
|
299
|
+
### Metadata
|
|
300
|
+
- **Priority:** High
|
|
301
|
+
- **Type:** Regression
|
|
302
|
+
- **Tags:** blocks, add, hero
|
|
303
|
+
|
|
304
|
+
```gherkin:en
|
|
305
|
+
Scenario: Add hero block to post
|
|
306
|
+
|
|
307
|
+
Given I am on the create post editor
|
|
308
|
+
And the block picker has loaded
|
|
309
|
+
When I add a "hero" block
|
|
310
|
+
Then the block count should be 1
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
```gherkin:es
|
|
314
|
+
Scenario: Agregar bloque hero al post
|
|
315
|
+
|
|
316
|
+
Given estoy en el editor de crear post
|
|
317
|
+
And el selector de bloques ha cargado
|
|
318
|
+
When agrego un bloque "hero"
|
|
319
|
+
Then la cantidad de bloques deberia ser 1
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Expected Results
|
|
323
|
+
- Block can be added from picker
|
|
324
|
+
- Block appears in editor
|
|
325
|
+
- Block count increments correctly
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## @test POST-EDITOR-010: Remove a block
|
|
330
|
+
|
|
331
|
+
### Metadata
|
|
332
|
+
- **Priority:** High
|
|
333
|
+
- **Type:** Regression
|
|
334
|
+
- **Tags:** blocks, remove, delete
|
|
335
|
+
|
|
336
|
+
```gherkin:en
|
|
337
|
+
Scenario: Remove block from post
|
|
338
|
+
|
|
339
|
+
Given I am on the create post editor
|
|
340
|
+
And I have added a "hero" block
|
|
341
|
+
And the block count is 1
|
|
342
|
+
When I get the block ID
|
|
343
|
+
And I remove the block
|
|
344
|
+
Then the block count should be 0
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
```gherkin:es
|
|
348
|
+
Scenario: Eliminar bloque del post
|
|
349
|
+
|
|
350
|
+
Given estoy en el editor de crear post
|
|
351
|
+
And he agregado un bloque "hero"
|
|
352
|
+
And la cantidad de bloques es 1
|
|
353
|
+
When obtengo el ID del bloque
|
|
354
|
+
And elimino el bloque
|
|
355
|
+
Then la cantidad de bloques deberia ser 0
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Expected Results
|
|
359
|
+
- Block can be removed
|
|
360
|
+
- Block disappears from editor
|
|
361
|
+
- Block count decrements correctly
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## @test POST-EDITOR-011: Display and toggle categories
|
|
366
|
+
|
|
367
|
+
### Metadata
|
|
368
|
+
- **Priority:** High
|
|
369
|
+
- **Type:** Regression
|
|
370
|
+
- **Tags:** categories, select, toggle
|
|
371
|
+
|
|
372
|
+
```gherkin:en
|
|
373
|
+
Scenario: Category selection toggle
|
|
374
|
+
|
|
375
|
+
Given I am on the create post editor
|
|
376
|
+
Then the categories select should have at least 1 category
|
|
377
|
+
When I click on the first category
|
|
378
|
+
Then the category should become selected (have bg-primary class)
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
```gherkin:es
|
|
382
|
+
Scenario: Toggle de seleccion de categoria
|
|
383
|
+
|
|
384
|
+
Given estoy en el editor de crear post
|
|
385
|
+
Then el select de categorias deberia tener al menos 1 categoria
|
|
386
|
+
When hago clic en la primera categoria
|
|
387
|
+
Then la categoria deberia quedar seleccionada (tener clase bg-primary)
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Expected Results
|
|
391
|
+
- Categories are displayed
|
|
392
|
+
- Categories can be clicked
|
|
393
|
+
- Selection state updates visually
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## @test POST-EDITOR-012: Save a draft post
|
|
398
|
+
|
|
399
|
+
### Metadata
|
|
400
|
+
- **Priority:** High
|
|
401
|
+
- **Type:** Regression
|
|
402
|
+
- **Tags:** save, draft, form
|
|
403
|
+
|
|
404
|
+
```gherkin:en
|
|
405
|
+
Scenario: Save draft post
|
|
406
|
+
|
|
407
|
+
Given I am on the create post editor
|
|
408
|
+
When I set the title to "Draft Test Post"
|
|
409
|
+
And I set the slug to "draft-test-post"
|
|
410
|
+
And I save the post
|
|
411
|
+
And I wait for the API create response
|
|
412
|
+
Then the URL should include /dashboard/posts
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
```gherkin:es
|
|
416
|
+
Scenario: Guardar borrador de post
|
|
417
|
+
|
|
418
|
+
Given estoy en el editor de crear post
|
|
419
|
+
When establezco el titulo como "Draft Test Post"
|
|
420
|
+
And establezco el slug como "draft-test-post"
|
|
421
|
+
And guardo el post
|
|
422
|
+
And espero la respuesta de API create
|
|
423
|
+
Then la URL deberia incluir /dashboard/posts
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Expected Results
|
|
427
|
+
- Post can be saved as draft
|
|
428
|
+
- API create request completes
|
|
429
|
+
- Redirect to posts list after save
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Post Editor - Admin UI Tests
|
|
5
|
+
*
|
|
6
|
+
* Tests for the post editor (create/edit) with block integration.
|
|
7
|
+
* Validates form fields, block selector filtering, and save/publish operations.
|
|
8
|
+
*
|
|
9
|
+
* Tags: @uat, @feat-posts, @admin, @block-editor, @regression
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import * as allure from 'allure-cypress'
|
|
13
|
+
import { PostEditorPOM, PostsListPOM, loginAsOwner } from '../../../../src'
|
|
14
|
+
|
|
15
|
+
describe('Post Editor - Admin UI', {
|
|
16
|
+
tags: ['@uat', '@feat-posts', '@admin', '@block-editor', '@regression']
|
|
17
|
+
}, () => {
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
allure.epic('Posts System')
|
|
20
|
+
allure.feature('Post Editor')
|
|
21
|
+
|
|
22
|
+
// Setup API intercepts BEFORE login
|
|
23
|
+
PostEditorPOM.setupApiIntercepts()
|
|
24
|
+
PostsListPOM.setupApiIntercepts()
|
|
25
|
+
loginAsOwner()
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
// ============================================================
|
|
29
|
+
// Editor Load Tests
|
|
30
|
+
// ============================================================
|
|
31
|
+
describe('Editor Load', () => {
|
|
32
|
+
it('POST-EDITOR-001: Should load create post editor', { tags: '@smoke' }, () => {
|
|
33
|
+
allure.story('Editor Load')
|
|
34
|
+
allure.severity('critical')
|
|
35
|
+
|
|
36
|
+
PostEditorPOM.visitCreate()
|
|
37
|
+
PostEditorPOM.waitForEditorLoad()
|
|
38
|
+
PostEditorPOM.assertEditorVisible()
|
|
39
|
+
|
|
40
|
+
cy.log('Create post editor loaded successfully')
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('POST-EDITOR-002: Should load edit post editor', () => {
|
|
44
|
+
allure.story('Editor Load')
|
|
45
|
+
allure.severity('normal')
|
|
46
|
+
|
|
47
|
+
// First get a post ID from the list
|
|
48
|
+
PostsListPOM.visitList()
|
|
49
|
+
PostsListPOM.api.waitForList()
|
|
50
|
+
PostsListPOM.waitForListLoad()
|
|
51
|
+
|
|
52
|
+
// Click the first row's dropdown trigger
|
|
53
|
+
cy.get(PostsListPOM.listSelectors.rowGeneric).first().within(() => {
|
|
54
|
+
cy.get('[data-cy^="posts-edit-"]').click()
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
// Wait for dropdown and click edit link
|
|
58
|
+
cy.get('[role="menuitem"]').contains(/edit/i).click()
|
|
59
|
+
|
|
60
|
+
cy.url().should('include', '/edit')
|
|
61
|
+
PostEditorPOM.waitForEditorLoad()
|
|
62
|
+
PostEditorPOM.assertEditorVisible()
|
|
63
|
+
|
|
64
|
+
cy.log('Edit post editor loaded successfully')
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
// ============================================================
|
|
69
|
+
// Form Field Tests
|
|
70
|
+
// ============================================================
|
|
71
|
+
describe('Form Fields', () => {
|
|
72
|
+
it('POST-EDITOR-003: Should display all required form fields', () => {
|
|
73
|
+
allure.story('Form Fields')
|
|
74
|
+
allure.severity('normal')
|
|
75
|
+
|
|
76
|
+
PostEditorPOM.visitCreate()
|
|
77
|
+
PostEditorPOM.waitForEditorLoad()
|
|
78
|
+
|
|
79
|
+
cy.get(PostEditorPOM.editorSelectors.titleInput).should('be.visible')
|
|
80
|
+
cy.get(PostEditorPOM.editorSelectors.slugInput).should('be.visible')
|
|
81
|
+
cy.get(PostEditorPOM.editorSelectors.excerptInput).should('be.visible')
|
|
82
|
+
cy.get(PostEditorPOM.editorSelectors.featuredImage).should('be.visible')
|
|
83
|
+
cy.get(PostEditorPOM.editorSelectors.categoriesSelect).should('be.visible')
|
|
84
|
+
|
|
85
|
+
cy.log('All required form fields present')
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
it('POST-EDITOR-004: Should fill title and slug', () => {
|
|
89
|
+
allure.story('Form Fields')
|
|
90
|
+
allure.severity('normal')
|
|
91
|
+
|
|
92
|
+
PostEditorPOM.visitCreate()
|
|
93
|
+
PostEditorPOM.waitForEditorLoad()
|
|
94
|
+
|
|
95
|
+
PostEditorPOM.setTitle('Test Post')
|
|
96
|
+
PostEditorPOM.setSlug('test-post')
|
|
97
|
+
|
|
98
|
+
PostEditorPOM.assertTitleValue('Test Post')
|
|
99
|
+
PostEditorPOM.assertSlugValue('test-post')
|
|
100
|
+
|
|
101
|
+
cy.log('Title and slug fields working')
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
it('POST-EDITOR-005: Should fill excerpt field', () => {
|
|
105
|
+
allure.story('Form Fields')
|
|
106
|
+
allure.severity('normal')
|
|
107
|
+
|
|
108
|
+
PostEditorPOM.visitCreate()
|
|
109
|
+
PostEditorPOM.waitForEditorLoad()
|
|
110
|
+
|
|
111
|
+
const testExcerpt = 'This is a test excerpt for the post.'
|
|
112
|
+
PostEditorPOM.setExcerpt(testExcerpt)
|
|
113
|
+
|
|
114
|
+
cy.get(PostEditorPOM.editorSelectors.excerptInput).should('have.value', testExcerpt)
|
|
115
|
+
|
|
116
|
+
cy.log('Excerpt field working')
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('POST-EDITOR-006: Should fill featured image field', () => {
|
|
120
|
+
allure.story('Form Fields')
|
|
121
|
+
allure.severity('normal')
|
|
122
|
+
|
|
123
|
+
PostEditorPOM.visitCreate()
|
|
124
|
+
PostEditorPOM.waitForEditorLoad()
|
|
125
|
+
|
|
126
|
+
const testImageUrl = 'https://example.com/image.jpg'
|
|
127
|
+
PostEditorPOM.setFeaturedImage(testImageUrl)
|
|
128
|
+
|
|
129
|
+
cy.get(PostEditorPOM.editorSelectors.featuredImage).should('have.value', testImageUrl)
|
|
130
|
+
|
|
131
|
+
cy.log('Featured image field working')
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
// ============================================================
|
|
136
|
+
// Block Editor Tests
|
|
137
|
+
// ============================================================
|
|
138
|
+
describe('Block Editor', () => {
|
|
139
|
+
it('POST-EDITOR-007: Should display block picker', () => {
|
|
140
|
+
allure.story('Block Editor')
|
|
141
|
+
allure.severity('normal')
|
|
142
|
+
|
|
143
|
+
PostEditorPOM.visitCreate()
|
|
144
|
+
PostEditorPOM.waitForEditorLoad()
|
|
145
|
+
PostEditorPOM.waitForBlockPickerLoad()
|
|
146
|
+
|
|
147
|
+
PostEditorPOM.assertBlockPickerVisible()
|
|
148
|
+
|
|
149
|
+
cy.log('Block picker displayed')
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
it('POST-EDITOR-008: Should only show hero block for posts (scope filtering)', { tags: '@critical' }, () => {
|
|
153
|
+
allure.story('Block Scope')
|
|
154
|
+
allure.severity('critical')
|
|
155
|
+
|
|
156
|
+
PostEditorPOM.visitCreate()
|
|
157
|
+
PostEditorPOM.waitForEditorLoad()
|
|
158
|
+
PostEditorPOM.waitForBlockPickerLoad()
|
|
159
|
+
|
|
160
|
+
// Hero block should be visible (scope: ['pages', 'posts'])
|
|
161
|
+
PostEditorPOM.assertBlockInPicker('hero')
|
|
162
|
+
|
|
163
|
+
// Count visible blocks - should be minimal (only hero)
|
|
164
|
+
cy.get(PostEditorPOM.editorSelectors.blockPicker).within(() => {
|
|
165
|
+
cy.get('[data-cy^="block-item-"]').should('have.length.lte', 2)
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
cy.log('Block scope filtering working - only hero block shown')
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
it('POST-EDITOR-009: Should add a hero block', () => {
|
|
172
|
+
allure.story('Block Editor')
|
|
173
|
+
allure.severity('normal')
|
|
174
|
+
|
|
175
|
+
PostEditorPOM.visitCreate()
|
|
176
|
+
PostEditorPOM.waitForEditorLoad()
|
|
177
|
+
PostEditorPOM.waitForBlockPickerLoad()
|
|
178
|
+
|
|
179
|
+
PostEditorPOM.addBlock('hero')
|
|
180
|
+
PostEditorPOM.assertBlockCount(1)
|
|
181
|
+
|
|
182
|
+
cy.log('Hero block added successfully')
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
it('POST-EDITOR-010: Should remove a block', () => {
|
|
186
|
+
allure.story('Block Editor')
|
|
187
|
+
allure.severity('normal')
|
|
188
|
+
|
|
189
|
+
PostEditorPOM.visitCreate()
|
|
190
|
+
PostEditorPOM.waitForEditorLoad()
|
|
191
|
+
PostEditorPOM.waitForBlockPickerLoad()
|
|
192
|
+
|
|
193
|
+
PostEditorPOM.addBlock('hero')
|
|
194
|
+
PostEditorPOM.assertBlockCount(1)
|
|
195
|
+
|
|
196
|
+
cy.get(PostEditorPOM.editorSelectors.sortableBlockGeneric).first().then(($block) => {
|
|
197
|
+
const blockId = $block.attr('data-cy')?.replace('sortable-block-', '')
|
|
198
|
+
if (blockId) {
|
|
199
|
+
PostEditorPOM.removeBlock(blockId)
|
|
200
|
+
PostEditorPOM.assertBlockCount(0)
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
cy.log('Block removed successfully')
|
|
205
|
+
})
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
// ============================================================
|
|
209
|
+
// Category Selection Tests
|
|
210
|
+
// ============================================================
|
|
211
|
+
describe('Category Selection', () => {
|
|
212
|
+
it('POST-EDITOR-011: Should display and toggle categories', () => {
|
|
213
|
+
allure.story('Categories')
|
|
214
|
+
allure.severity('normal')
|
|
215
|
+
|
|
216
|
+
PostEditorPOM.visitCreate()
|
|
217
|
+
PostEditorPOM.waitForEditorLoad()
|
|
218
|
+
|
|
219
|
+
cy.get(PostEditorPOM.editorSelectors.categoriesSelect).within(() => {
|
|
220
|
+
cy.get('.cursor-pointer').should('have.length.at.least', 1)
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
cy.get(PostEditorPOM.editorSelectors.categoriesSelect)
|
|
224
|
+
.find('.cursor-pointer')
|
|
225
|
+
.first()
|
|
226
|
+
.as('firstCategory')
|
|
227
|
+
|
|
228
|
+
cy.get('@firstCategory').click()
|
|
229
|
+
cy.get('@firstCategory').should('have.class', 'bg-primary')
|
|
230
|
+
|
|
231
|
+
cy.log('Category selection working - badges toggle correctly')
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
// ============================================================
|
|
236
|
+
// Save/Publish Tests
|
|
237
|
+
// ============================================================
|
|
238
|
+
describe('Save and Publish', () => {
|
|
239
|
+
it('POST-EDITOR-012: Should save a draft post', () => {
|
|
240
|
+
allure.story('Save Operations')
|
|
241
|
+
allure.severity('critical')
|
|
242
|
+
|
|
243
|
+
PostEditorPOM.visitCreate()
|
|
244
|
+
PostEditorPOM.waitForEditorLoad()
|
|
245
|
+
|
|
246
|
+
PostEditorPOM.setTitle('Draft Test Post')
|
|
247
|
+
PostEditorPOM.setSlug('draft-test-post')
|
|
248
|
+
|
|
249
|
+
PostEditorPOM.savePost()
|
|
250
|
+
PostEditorPOM.api.waitForCreate()
|
|
251
|
+
|
|
252
|
+
cy.url().should('include', '/dashboard/posts')
|
|
253
|
+
|
|
254
|
+
cy.log('Draft post saved successfully')
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
})
|