@nextsparkjs/theme-default 0.1.0-beta.44 → 0.1.0-beta.45
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/components/ai-chat/ChatPanel.tsx +7 -7
- package/components/ai-chat/Message.tsx +2 -2
- package/components/ai-chat/MessageInput.tsx +3 -3
- package/components/ai-chat/MessageList.tsx +3 -3
- package/components/ai-chat/TypingIndicator.tsx +2 -2
- package/entities/customers/api/docs.md +107 -0
- package/entities/customers/api/presets.ts +80 -0
- package/entities/pages/api/docs.md +114 -0
- package/entities/pages/api/presets.ts +72 -0
- package/entities/posts/api/docs.md +120 -0
- package/entities/posts/api/presets.ts +74 -0
- package/entities/tasks/api/docs.md +126 -0
- package/entities/tasks/api/presets.ts +84 -0
- package/lib/selectors.ts +2 -2
- package/messages/de/admin.json +45 -0
- package/messages/en/admin.json +45 -0
- package/messages/es/admin.json +45 -0
- package/messages/fr/admin.json +45 -0
- package/messages/it/admin.json +45 -0
- package/messages/pt/admin.json +45 -0
- package/package.json +3 -3
- package/styles/globals.css +24 -0
- package/tests/cypress/e2e/_utils/selectors/block-editor.bdd.md +491 -0
- package/tests/cypress/e2e/_utils/selectors/block-editor.cy.ts +475 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-container.cy.ts +52 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-mobile.cy.ts +14 -14
- package/tests/cypress/e2e/_utils/selectors/dashboard-navigation.cy.ts +3 -3
- package/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +38 -73
- package/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.cy.ts +21 -42
- package/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +117 -38
- package/tests/cypress/e2e/_utils/selectors/dashboard-topnav.cy.ts +35 -12
- package/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +50 -59
- package/tests/cypress/e2e/_utils/selectors/settings-layout.cy.ts +15 -23
- package/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +395 -155
- package/tests/cypress/e2e/_utils/selectors/tasks.cy.ts +795 -174
- package/tests/cypress/e2e/api/_core/teams/teams-security.cy.ts +415 -0
- package/tests/cypress/e2e/uat/_core/teams/inline-edit.cy.ts +278 -0
- package/tests/cypress/src/core/BlockEditorBasePOM.ts +269 -99
- package/tests/cypress/src/core/DashboardEntityPOM.ts +1 -1
- package/tests/cypress/src/features/DashboardPOM.ts +49 -28
- package/tests/cypress/src/features/PageBuilderPOM.ts +20 -0
- package/tests/cypress/src/features/SettingsPOM.ts +511 -166
- package/tests/cypress/src/features/SuperadminPOM.ts +679 -159
- package/tests/cypress/src/features/index.ts +10 -10
- package/tests/cypress/e2e/_utils/selectors/pages-editor.bdd.md +0 -207
- package/tests/cypress/e2e/_utils/selectors/pages-editor.cy.ts +0 -211
- package/tests/cypress/e2e/_utils/selectors/posts-editor.bdd.md +0 -184
- package/tests/cypress/e2e/_utils/selectors/posts-editor.cy.ts +0 -350
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
---
|
|
2
|
+
feature: Block Editor UI Selectors Validation
|
|
3
|
+
priority: high
|
|
4
|
+
tags: [selectors, block-editor, page-builder, ui-validation]
|
|
5
|
+
grepTags: [ui-selectors, block-editor, selector-validation, SEL_BE_001, SEL_BE_002, SEL_BE_003, SEL_BE_004, SEL_BE_005, SEL_BE_006, SEL_BE_007]
|
|
6
|
+
coverage: 7
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Block Editor UI Selectors Validation
|
|
10
|
+
|
|
11
|
+
> Comprehensive test suite validating ALL selectors in BlockEditorBasePOM. Uses the `pages` entity as the test base. Validates selector presence across all block editor panels: Header, Block Picker, Entity Fields, Layout Canvas, Preview Canvas, Block Properties, and Array Fields.
|
|
12
|
+
|
|
13
|
+
**IMPORTANT:** Uses `PageBuilderPOM` which provides editor selectors. Tests run as developer role with team context.
|
|
14
|
+
|
|
15
|
+
**Login:** Uses Developer via `loginAsDefaultDeveloper()` with team-nextspark-001.
|
|
16
|
+
|
|
17
|
+
## @test SEL_BE_001: Header Selectors
|
|
18
|
+
|
|
19
|
+
### Metadata
|
|
20
|
+
- **Priority:** High
|
|
21
|
+
- **Type:** Selector Validation
|
|
22
|
+
- **Tags:** block-editor, header, view-mode
|
|
23
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_001`
|
|
24
|
+
- **Status:** Active (11 passing, 0 skipped)
|
|
25
|
+
|
|
26
|
+
```gherkin:en
|
|
27
|
+
Scenario: Block editor header has all required selectors
|
|
28
|
+
|
|
29
|
+
Given I am logged in as developer
|
|
30
|
+
And I navigate to the page builder create page
|
|
31
|
+
When the editor loads
|
|
32
|
+
Then I should find the editor container
|
|
33
|
+
And I should find the back button
|
|
34
|
+
And I should find the title input
|
|
35
|
+
And I should find the slug input
|
|
36
|
+
And I should find the view mode toggle
|
|
37
|
+
And I should find the layout mode button (viewEditor)
|
|
38
|
+
And I should find the preview mode button (viewPreview)
|
|
39
|
+
And I should find the save button
|
|
40
|
+
And I should find the publish button
|
|
41
|
+
And I should find the status dot
|
|
42
|
+
And I should find the status label
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```gherkin:es
|
|
46
|
+
Scenario: El header del editor de bloques tiene todos los selectores requeridos
|
|
47
|
+
|
|
48
|
+
Given estoy logueado como developer
|
|
49
|
+
And navego a la pagina de crear page builder
|
|
50
|
+
When el editor carga
|
|
51
|
+
Then deberia encontrar el contenedor del editor
|
|
52
|
+
And deberia encontrar el boton de volver
|
|
53
|
+
And deberia encontrar el input de titulo
|
|
54
|
+
And deberia encontrar el input de slug
|
|
55
|
+
And deberia encontrar el toggle de modo de vista
|
|
56
|
+
And deberia encontrar el boton de modo layout (viewEditor)
|
|
57
|
+
And deberia encontrar el boton de modo preview (viewPreview)
|
|
58
|
+
And deberia encontrar el boton de guardar
|
|
59
|
+
And deberia encontrar el boton de publicar
|
|
60
|
+
And deberia encontrar el dot de status
|
|
61
|
+
And deberia encontrar el label de status
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Expected Results
|
|
65
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
66
|
+
|---------|---------------|--------------|---------------|
|
|
67
|
+
| SEL_BE_001_01 | editorSelectors.container | pom.editorSelectors.container | block-editor-container |
|
|
68
|
+
| SEL_BE_001_02 | editorSelectors.backButton | pom.editorSelectors.backButton | block-editor-back |
|
|
69
|
+
| SEL_BE_001_03 | editorSelectors.titleInput | pom.editorSelectors.titleInput | block-editor-title |
|
|
70
|
+
| SEL_BE_001_04 | editorSelectors.slugInput | pom.editorSelectors.slugInput | block-editor-slug |
|
|
71
|
+
| SEL_BE_001_05 | editorSelectors.viewModeToggle | pom.editorSelectors.viewModeToggle | block-editor-view-toggle |
|
|
72
|
+
| SEL_BE_001_06 | editorSelectors.viewEditor | pom.editorSelectors.viewEditor | block-editor-view-editor |
|
|
73
|
+
| SEL_BE_001_07 | editorSelectors.viewPreview | pom.editorSelectors.viewPreview | block-editor-view-preview |
|
|
74
|
+
| SEL_BE_001_08 | editorSelectors.saveButton | pom.editorSelectors.saveButton | block-editor-save |
|
|
75
|
+
| SEL_BE_001_09 | editorSelectors.publishButton | pom.editorSelectors.publishButton | block-editor-publish |
|
|
76
|
+
| SEL_BE_001_10 | editorSelectors.statusDot | pom.editorSelectors.statusDot | block-editor-status-dot |
|
|
77
|
+
| SEL_BE_001_11 | editorSelectors.statusLabel | pom.editorSelectors.statusLabel | block-editor-status-label |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## @test SEL_BE_002: Block Picker Selectors
|
|
82
|
+
|
|
83
|
+
### Metadata
|
|
84
|
+
- **Priority:** High
|
|
85
|
+
- **Type:** Selector Validation
|
|
86
|
+
- **Tags:** block-editor, block-picker, blocks-tab
|
|
87
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_002`
|
|
88
|
+
- **Status:** Active (8 passing, 0 skipped)
|
|
89
|
+
|
|
90
|
+
```gherkin:en
|
|
91
|
+
Scenario: Block picker panel has all required selectors
|
|
92
|
+
|
|
93
|
+
Given I am logged in as developer
|
|
94
|
+
And I navigate to the page builder create page
|
|
95
|
+
When the editor loads
|
|
96
|
+
Then I should find the block picker container
|
|
97
|
+
And I should find the blocks tab
|
|
98
|
+
And I should find the config tab
|
|
99
|
+
And I should find the block search input
|
|
100
|
+
And I should find the category chips container
|
|
101
|
+
And I should find category chip by name
|
|
102
|
+
And I should find the hero block card
|
|
103
|
+
When I hover over the hero block card
|
|
104
|
+
Then I should find the hero add button
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```gherkin:es
|
|
108
|
+
Scenario: El panel del selector de bloques tiene todos los selectores requeridos
|
|
109
|
+
|
|
110
|
+
Given estoy logueado como developer
|
|
111
|
+
And navego a la pagina de crear page builder
|
|
112
|
+
When el editor carga
|
|
113
|
+
Then deberia encontrar el contenedor del selector de bloques
|
|
114
|
+
And deberia encontrar el tab de bloques
|
|
115
|
+
And deberia encontrar el tab de config
|
|
116
|
+
And deberia encontrar el input de busqueda de bloques
|
|
117
|
+
And deberia encontrar el contenedor de chips de categoria
|
|
118
|
+
And deberia encontrar chip de categoria por nombre
|
|
119
|
+
And deberia encontrar la tarjeta del bloque hero
|
|
120
|
+
When hago hover sobre la tarjeta del bloque hero
|
|
121
|
+
Then deberia encontrar el boton de agregar hero
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Expected Results
|
|
125
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
126
|
+
|---------|---------------|--------------|---------------|
|
|
127
|
+
| SEL_BE_002_01 | editorSelectors.blockPicker | pom.editorSelectors.blockPicker | block-picker |
|
|
128
|
+
| SEL_BE_002_02 | editorSelectors.tabBlocks | pom.editorSelectors.tabBlocks | block-picker-tab-blocks |
|
|
129
|
+
| SEL_BE_002_03 | editorSelectors.tabConfig | pom.editorSelectors.tabConfig | block-picker-tab-config |
|
|
130
|
+
| SEL_BE_002_04 | editorSelectors.blockSearch | pom.editorSelectors.blockSearch | block-picker-search |
|
|
131
|
+
| SEL_BE_002_05 | editorSelectors.categoryChips | pom.editorSelectors.categoryChips | block-picker-categories |
|
|
132
|
+
| SEL_BE_002_06 | (dynamic) | `[data-cy^="block-picker-category-"]` | block-picker-category-{name} |
|
|
133
|
+
| SEL_BE_002_07 | editorSelectors.blockItem(name) | pom.editorSelectors.blockItem('hero') | block-item-hero |
|
|
134
|
+
| SEL_BE_002_08 | editorSelectors.addBlock(name) | pom.editorSelectors.addBlock('hero') | block-add-hero |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## @test SEL_BE_003: Entity Fields Panel Selectors
|
|
139
|
+
|
|
140
|
+
### Metadata
|
|
141
|
+
- **Priority:** Medium
|
|
142
|
+
- **Type:** Selector Validation
|
|
143
|
+
- **Tags:** block-editor, entity-fields, config-tab
|
|
144
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_003`
|
|
145
|
+
- **Status:** Active (3 tests, conditional)
|
|
146
|
+
|
|
147
|
+
```gherkin:en
|
|
148
|
+
Scenario: Entity fields panel has selectors when in config tab
|
|
149
|
+
|
|
150
|
+
Given I am logged in as developer
|
|
151
|
+
And a test page exists for editing
|
|
152
|
+
And I navigate to edit the test page
|
|
153
|
+
When the editor loads
|
|
154
|
+
And I click the config tab
|
|
155
|
+
Then I should find the entity fields panel container
|
|
156
|
+
And I should find entity field selectors by name
|
|
157
|
+
And if taxonomies are enabled
|
|
158
|
+
Then I should find the category list selector
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
```gherkin:es
|
|
162
|
+
Scenario: El panel de campos de entidad tiene selectores cuando esta en tab config
|
|
163
|
+
|
|
164
|
+
Given estoy logueado como developer
|
|
165
|
+
And existe una pagina de prueba para editar
|
|
166
|
+
And navego a editar la pagina de prueba
|
|
167
|
+
When el editor carga
|
|
168
|
+
And hago click en el tab de config
|
|
169
|
+
Then deberia encontrar el contenedor del panel de campos de entidad
|
|
170
|
+
And deberia encontrar selectores de campo de entidad por nombre
|
|
171
|
+
And si taxonomias estan habilitadas
|
|
172
|
+
Then deberia encontrar el selector de lista de categorias
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Expected Results
|
|
176
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
177
|
+
|---------|---------------|--------------|---------------|
|
|
178
|
+
| SEL_BE_003_01 | editorSelectors.entityFieldsPanel | pom.editorSelectors.entityFieldsPanel | entity-fields-panel |
|
|
179
|
+
| SEL_BE_003_02 | (dynamic) | `[data-cy^="entity-field-"]` | entity-field-{name} |
|
|
180
|
+
| SEL_BE_003_03 | editorSelectors.entityCategoryList | pom.editorSelectors.entityCategoryList | entity-category-list |
|
|
181
|
+
|
|
182
|
+
### Notes
|
|
183
|
+
- Test SEL_BE_003_03 is conditional - only runs if taxonomies are enabled for pages entity
|
|
184
|
+
- Entity fields depend on the entity configuration
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## @test SEL_BE_004: Layout Canvas Selectors
|
|
189
|
+
|
|
190
|
+
### Metadata
|
|
191
|
+
- **Priority:** High
|
|
192
|
+
- **Type:** Selector Validation
|
|
193
|
+
- **Tags:** block-editor, layout-canvas, sortable
|
|
194
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_004`
|
|
195
|
+
- **Status:** Active (8 passing, 0 skipped)
|
|
196
|
+
|
|
197
|
+
```gherkin:en
|
|
198
|
+
Scenario: Layout canvas shows empty state when no blocks
|
|
199
|
+
|
|
200
|
+
Given I am logged in as developer
|
|
201
|
+
And I navigate to the page builder create page
|
|
202
|
+
When the editor loads
|
|
203
|
+
And I switch to layout mode
|
|
204
|
+
Then I should find the empty state selector
|
|
205
|
+
|
|
206
|
+
Scenario: Layout canvas has block selectors when blocks exist
|
|
207
|
+
|
|
208
|
+
Given I am logged in as developer
|
|
209
|
+
And I navigate to the page builder create page
|
|
210
|
+
When the editor loads
|
|
211
|
+
And I switch to layout mode
|
|
212
|
+
And I add a hero block
|
|
213
|
+
Then I should find the layout canvas container
|
|
214
|
+
And I should find sortable blocks with generic selector
|
|
215
|
+
And I should find specific sortable block by ID
|
|
216
|
+
And I should find the drag handle
|
|
217
|
+
And I should find the duplicate button
|
|
218
|
+
And I should find the remove button
|
|
219
|
+
And I should see the block name in sortable card
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
```gherkin:es
|
|
223
|
+
Scenario: El canvas de layout muestra estado vacio cuando no hay bloques
|
|
224
|
+
|
|
225
|
+
Given estoy logueado como developer
|
|
226
|
+
And navego a la pagina de crear page builder
|
|
227
|
+
When el editor carga
|
|
228
|
+
And cambio a modo layout
|
|
229
|
+
Then deberia encontrar el selector de estado vacio
|
|
230
|
+
|
|
231
|
+
Scenario: El canvas de layout tiene selectores de bloque cuando existen bloques
|
|
232
|
+
|
|
233
|
+
Given estoy logueado como developer
|
|
234
|
+
And navego a la pagina de crear page builder
|
|
235
|
+
When el editor carga
|
|
236
|
+
And cambio a modo layout
|
|
237
|
+
And agrego un bloque hero
|
|
238
|
+
Then deberia encontrar el contenedor del canvas de layout
|
|
239
|
+
And deberia encontrar bloques ordenables con selector generico
|
|
240
|
+
And deberia encontrar bloque ordenable especifico por ID
|
|
241
|
+
And deberia encontrar el handle de arrastrar
|
|
242
|
+
And deberia encontrar el boton de duplicar
|
|
243
|
+
And deberia encontrar el boton de remover
|
|
244
|
+
And deberia ver el nombre del bloque en tarjeta ordenable
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Expected Results
|
|
248
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
249
|
+
|---------|---------------|--------------|---------------|
|
|
250
|
+
| SEL_BE_004_01 | editorSelectors.layoutCanvasEmpty | pom.editorSelectors.layoutCanvasEmpty | layout-canvas-empty |
|
|
251
|
+
| SEL_BE_004_02 | editorSelectors.layoutCanvas | pom.editorSelectors.layoutCanvas | layout-canvas |
|
|
252
|
+
| SEL_BE_004_03 | editorSelectors.sortableBlockGeneric | pom.editorSelectors.sortableBlockGeneric | sortable-block-* |
|
|
253
|
+
| SEL_BE_004_04 | editorSelectors.sortableBlock(id) | pom.editorSelectors.sortableBlock(id) | sortable-block-{id} |
|
|
254
|
+
| SEL_BE_004_05 | editorSelectors.dragHandle(id) | pom.editorSelectors.dragHandle(id) | block-drag-{id} |
|
|
255
|
+
| SEL_BE_004_06 | editorSelectors.duplicateBlock(id) | pom.editorSelectors.duplicateBlock(id) | block-duplicate-{id} |
|
|
256
|
+
| SEL_BE_004_07 | editorSelectors.removeBlock(id) | pom.editorSelectors.removeBlock(id) | block-remove-{id} |
|
|
257
|
+
| SEL_BE_004_08 | (text content) | Block name displayed in card | N/A |
|
|
258
|
+
|
|
259
|
+
### Notes
|
|
260
|
+
- Layout canvas container only exists when there ARE blocks
|
|
261
|
+
- Empty state only exists when there are NO blocks
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## @test SEL_BE_005: Preview Canvas Selectors
|
|
266
|
+
|
|
267
|
+
### Metadata
|
|
268
|
+
- **Priority:** High
|
|
269
|
+
- **Type:** Selector Validation
|
|
270
|
+
- **Tags:** block-editor, preview-canvas, floating-toolbar
|
|
271
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_005`
|
|
272
|
+
- **Status:** Active (7 passing, 0 skipped)
|
|
273
|
+
|
|
274
|
+
```gherkin:en
|
|
275
|
+
Scenario: Preview canvas has block and toolbar selectors
|
|
276
|
+
|
|
277
|
+
Given I am logged in as developer
|
|
278
|
+
And I navigate to the page builder create page
|
|
279
|
+
When the editor loads
|
|
280
|
+
And I switch to layout mode
|
|
281
|
+
And I add a hero block
|
|
282
|
+
And I switch to preview mode
|
|
283
|
+
Then I should find the preview canvas container
|
|
284
|
+
And I should find preview blocks with generic selector
|
|
285
|
+
And I should find specific preview block by ID
|
|
286
|
+
When I hover over a preview block
|
|
287
|
+
Then I should find the floating toolbar
|
|
288
|
+
And I should find the toolbar block name
|
|
289
|
+
And I should find the toolbar duplicate button
|
|
290
|
+
And I should find the toolbar delete button
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
```gherkin:es
|
|
294
|
+
Scenario: El canvas de preview tiene selectores de bloque y toolbar
|
|
295
|
+
|
|
296
|
+
Given estoy logueado como developer
|
|
297
|
+
And navego a la pagina de crear page builder
|
|
298
|
+
When el editor carga
|
|
299
|
+
And cambio a modo layout
|
|
300
|
+
And agrego un bloque hero
|
|
301
|
+
And cambio a modo preview
|
|
302
|
+
Then deberia encontrar el contenedor del canvas de preview
|
|
303
|
+
And deberia encontrar bloques de preview con selector generico
|
|
304
|
+
And deberia encontrar bloque de preview especifico por ID
|
|
305
|
+
When hago hover sobre un bloque de preview
|
|
306
|
+
Then deberia encontrar el toolbar flotante
|
|
307
|
+
And deberia encontrar el nombre de bloque en toolbar
|
|
308
|
+
And deberia encontrar el boton de duplicar en toolbar
|
|
309
|
+
And deberia encontrar el boton de eliminar en toolbar
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Expected Results
|
|
313
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
314
|
+
|---------|---------------|--------------|---------------|
|
|
315
|
+
| SEL_BE_005_01 | editorSelectors.previewCanvas | pom.editorSelectors.previewCanvas | preview-canvas |
|
|
316
|
+
| SEL_BE_005_02 | editorSelectors.previewBlockGeneric | pom.editorSelectors.previewBlockGeneric | preview-block-* |
|
|
317
|
+
| SEL_BE_005_03 | editorSelectors.previewBlock(id) | pom.editorSelectors.previewBlock(id) | preview-block-{id} |
|
|
318
|
+
| SEL_BE_005_04 | editorSelectors.floatingToolbar(id) | pom.editorSelectors.floatingToolbar(id) | block-toolbar-{id} |
|
|
319
|
+
| SEL_BE_005_05 | editorSelectors.floatingToolbarName(id) | pom.editorSelectors.floatingToolbarName(id) | block-toolbar-name-{id} |
|
|
320
|
+
| SEL_BE_005_06 | editorSelectors.floatingToolbarDuplicate(id) | pom.editorSelectors.floatingToolbarDuplicate(id) | block-toolbar-duplicate-{id} |
|
|
321
|
+
| SEL_BE_005_07 | editorSelectors.floatingToolbarDelete(id) | pom.editorSelectors.floatingToolbarDelete(id) | block-toolbar-delete-{id} |
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## @test SEL_BE_006: Block Properties Panel Selectors
|
|
326
|
+
|
|
327
|
+
### Metadata
|
|
328
|
+
- **Priority:** High
|
|
329
|
+
- **Type:** Selector Validation
|
|
330
|
+
- **Tags:** block-editor, properties-panel, dynamic-form
|
|
331
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_006`
|
|
332
|
+
- **Status:** Active (9 passing, 0 skipped)
|
|
333
|
+
|
|
334
|
+
```gherkin:en
|
|
335
|
+
Scenario: Properties panel shows empty state when no block selected
|
|
336
|
+
|
|
337
|
+
Given I am logged in as developer
|
|
338
|
+
And I navigate to the page builder create page
|
|
339
|
+
When the editor loads
|
|
340
|
+
Then I should find the empty state for block properties
|
|
341
|
+
|
|
342
|
+
Scenario: Properties panel has form selectors when block is selected
|
|
343
|
+
|
|
344
|
+
Given I am logged in as developer
|
|
345
|
+
And I navigate to the page builder create page
|
|
346
|
+
When the editor loads
|
|
347
|
+
And I switch to layout mode
|
|
348
|
+
And I add a hero block
|
|
349
|
+
Then I should find the properties panel container
|
|
350
|
+
And I should find the panel header
|
|
351
|
+
And I should find the block name in header
|
|
352
|
+
And I should find the content tab
|
|
353
|
+
And I should find the design tab
|
|
354
|
+
And I should find the advanced tab
|
|
355
|
+
And I should find the dynamic form container
|
|
356
|
+
And I should find dynamic field by name (title)
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
```gherkin:es
|
|
360
|
+
Scenario: El panel de propiedades muestra estado vacio cuando no hay bloque seleccionado
|
|
361
|
+
|
|
362
|
+
Given estoy logueado como developer
|
|
363
|
+
And navego a la pagina de crear page builder
|
|
364
|
+
When el editor carga
|
|
365
|
+
Then deberia encontrar el estado vacio para propiedades de bloque
|
|
366
|
+
|
|
367
|
+
Scenario: El panel de propiedades tiene selectores de formulario cuando un bloque esta seleccionado
|
|
368
|
+
|
|
369
|
+
Given estoy logueado como developer
|
|
370
|
+
And navego a la pagina de crear page builder
|
|
371
|
+
When el editor carga
|
|
372
|
+
And cambio a modo layout
|
|
373
|
+
And agrego un bloque hero
|
|
374
|
+
Then deberia encontrar el contenedor del panel de propiedades
|
|
375
|
+
And deberia encontrar el header del panel
|
|
376
|
+
And deberia encontrar el nombre del bloque en el header
|
|
377
|
+
And deberia encontrar el tab de contenido
|
|
378
|
+
And deberia encontrar el tab de diseno
|
|
379
|
+
And deberia encontrar el tab avanzado
|
|
380
|
+
And deberia encontrar el contenedor de formulario dinamico
|
|
381
|
+
And deberia encontrar campo dinamico por nombre (title)
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Expected Results
|
|
385
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
386
|
+
|---------|---------------|--------------|---------------|
|
|
387
|
+
| SEL_BE_006_01 | editorSelectors.blockPropertiesEmpty | pom.editorSelectors.blockPropertiesEmpty | block-properties-empty |
|
|
388
|
+
| SEL_BE_006_02 | editorSelectors.blockPropertiesPanel | pom.editorSelectors.blockPropertiesPanel | block-properties-panel |
|
|
389
|
+
| SEL_BE_006_03 | editorSelectors.blockPropertiesHeader | pom.editorSelectors.blockPropertiesHeader | block-properties-header |
|
|
390
|
+
| SEL_BE_006_04 | editorSelectors.blockPropertiesName | pom.editorSelectors.blockPropertiesName | block-properties-name |
|
|
391
|
+
| SEL_BE_006_05 | editorSelectors.tabContent | pom.editorSelectors.tabContent | block-properties-tab-content |
|
|
392
|
+
| SEL_BE_006_06 | editorSelectors.tabDesign | pom.editorSelectors.tabDesign | block-properties-tab-design |
|
|
393
|
+
| SEL_BE_006_07 | editorSelectors.tabAdvanced | pom.editorSelectors.tabAdvanced | block-properties-tab-advanced |
|
|
394
|
+
| SEL_BE_006_08 | editorSelectors.dynamicForm | pom.editorSelectors.dynamicForm | block-dynamic-form |
|
|
395
|
+
| SEL_BE_006_09 | editorSelectors.dynamicField(name) | pom.editorSelectors.dynamicField('title') | block-field-{name} |
|
|
396
|
+
|
|
397
|
+
### Notes
|
|
398
|
+
- Properties panel container only exists when a block IS selected
|
|
399
|
+
- Empty state only exists when NO block is selected
|
|
400
|
+
- Block is auto-selected after adding
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## @test SEL_BE_007: Array Fields Selectors
|
|
405
|
+
|
|
406
|
+
### Metadata
|
|
407
|
+
- **Priority:** Medium
|
|
408
|
+
- **Type:** Selector Validation
|
|
409
|
+
- **Tags:** block-editor, array-fields, features-grid
|
|
410
|
+
- **Grep:** `@ui-selectors` `@SEL_BE_007`
|
|
411
|
+
- **Status:** Active (6 passing, 0 skipped)
|
|
412
|
+
|
|
413
|
+
```gherkin:en
|
|
414
|
+
Scenario: Array fields have container and add button
|
|
415
|
+
|
|
416
|
+
Given I am logged in as developer
|
|
417
|
+
And I navigate to the page builder create page
|
|
418
|
+
When the editor loads
|
|
419
|
+
And I switch to layout mode
|
|
420
|
+
And I add a features-grid block
|
|
421
|
+
Then I should find the array field container
|
|
422
|
+
And I should find the array field add button
|
|
423
|
+
|
|
424
|
+
Scenario: Array field items have control selectors
|
|
425
|
+
|
|
426
|
+
Given the above setup with features-grid block
|
|
427
|
+
When I click the add button to add an item
|
|
428
|
+
Then I should find array field item controls
|
|
429
|
+
When I add a second item
|
|
430
|
+
Then I should find array field item move up button
|
|
431
|
+
And I should find array field item move down button
|
|
432
|
+
And I should find array field item remove button
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
```gherkin:es
|
|
436
|
+
Scenario: Los campos de array tienen contenedor y boton de agregar
|
|
437
|
+
|
|
438
|
+
Given estoy logueado como developer
|
|
439
|
+
And navego a la pagina de crear page builder
|
|
440
|
+
When el editor carga
|
|
441
|
+
And cambio a modo layout
|
|
442
|
+
And agrego un bloque features-grid
|
|
443
|
+
Then deberia encontrar el contenedor del campo de array
|
|
444
|
+
And deberia encontrar el boton de agregar del campo de array
|
|
445
|
+
|
|
446
|
+
Scenario: Los items del campo de array tienen selectores de control
|
|
447
|
+
|
|
448
|
+
Given la configuracion anterior con bloque features-grid
|
|
449
|
+
When hago click en el boton de agregar para agregar un item
|
|
450
|
+
Then deberia encontrar controles del item del campo de array
|
|
451
|
+
When agrego un segundo item
|
|
452
|
+
Then deberia encontrar el boton de mover arriba del item
|
|
453
|
+
And deberia encontrar el boton de mover abajo del item
|
|
454
|
+
And deberia encontrar el boton de remover del item
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### Expected Results
|
|
458
|
+
| Test ID | Selector Path | POM Accessor | data-cy Value |
|
|
459
|
+
|---------|---------------|--------------|---------------|
|
|
460
|
+
| SEL_BE_007_01 | (dynamic) | `[data-cy^="block-array-"]` | block-array-{name} |
|
|
461
|
+
| SEL_BE_007_02 | (dynamic) | `[data-cy$="-add"][data-cy^="block-array-"]` | block-array-{name}-add |
|
|
462
|
+
| SEL_BE_007_03 | (dynamic) | `[data-cy$="-remove"][data-cy^="block-array-"]` | block-array-{name}-{index}-remove |
|
|
463
|
+
| SEL_BE_007_04 | (dynamic) | `[data-cy$="-up"][data-cy^="block-array-"]` | block-array-{name}-{index}-up |
|
|
464
|
+
| SEL_BE_007_05 | (dynamic) | `[data-cy$="-down"][data-cy^="block-array-"]` | block-array-{name}-{index}-down |
|
|
465
|
+
| SEL_BE_007_06 | (dynamic) | `[data-cy$="-remove"][data-cy^="block-array-"]` | block-array-{name}-{index}-remove |
|
|
466
|
+
|
|
467
|
+
### Notes
|
|
468
|
+
- Uses features-grid block which has 'features' array field
|
|
469
|
+
- Move up/down buttons require at least 2 items in array
|
|
470
|
+
- Item index is 0-based in selector pattern
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## Related Components
|
|
475
|
+
|
|
476
|
+
| Component | File | Selectors |
|
|
477
|
+
|-----------|------|-----------|
|
|
478
|
+
| BlockEditorHeader | `packages/core/src/components/page-builder/BlockEditorHeader.tsx` | container, back, title, slug, view-toggle, save, publish, status |
|
|
479
|
+
| BlockPicker | `packages/core/src/components/page-builder/BlockPicker.tsx` | block-picker, tabs, search, categories, block-items |
|
|
480
|
+
| EntityFieldsPanel | `packages/core/src/components/page-builder/EntityFieldsPanel.tsx` | entity-fields-panel, entity-field-{name} |
|
|
481
|
+
| LayoutCanvas | `packages/core/src/components/page-builder/LayoutCanvas.tsx` | layout-canvas, sortable-block-{id}, drag/duplicate/remove |
|
|
482
|
+
| PreviewCanvas | `packages/core/src/components/page-builder/PreviewCanvas.tsx` | preview-canvas, preview-block-{id}, floating-toolbar |
|
|
483
|
+
| BlockPropertiesPanel | `packages/core/src/components/page-builder/BlockPropertiesPanel.tsx` | block-properties-panel, tabs, dynamic-form |
|
|
484
|
+
| ArrayFieldItems | `packages/core/src/components/page-builder/ArrayFieldItems.tsx` | block-array-{name}, item controls |
|
|
485
|
+
|
|
486
|
+
## Related POMs
|
|
487
|
+
|
|
488
|
+
| POM | File | Usage |
|
|
489
|
+
|-----|------|-------|
|
|
490
|
+
| PageBuilderPOM | `themes/default/tests/cypress/src/features/PageBuilderPOM.ts` | Block editor selectors and methods |
|
|
491
|
+
| PagesPOM | `themes/default/tests/cypress/src/entities/PagesPOM.ts` | Pages entity selectors |
|