@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
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
* Feature POM exports
|
|
3
3
|
*
|
|
4
4
|
* Specialized POMs for complex features:
|
|
5
|
-
* - PageBuilderPOM: Create/edit pages with blocks
|
|
6
|
-
* - PostEditorPOM: Create/edit posts with blocks
|
|
7
|
-
* - PublicPagePOM: Test public page rendering
|
|
8
|
-
* - PublicPostPOM: Test public post rendering
|
|
9
|
-
* - AdminTeamRolesPOM: Admin team roles matrix
|
|
10
5
|
* - DashboardPOM: Dashboard navigation and shell
|
|
11
6
|
* - SettingsPOM: Settings area (profile, team, billing)
|
|
12
|
-
* -
|
|
7
|
+
* - SuperadminPOM: Superadmin area
|
|
8
|
+
* - SuperadminTeamRolesPOM: Superadmin team roles matrix
|
|
13
9
|
* - BillingPOM: Billing settings
|
|
14
10
|
* - DevtoolsPOM: Developer tools area
|
|
11
|
+
* - ScheduledActionsPOM: Scheduled actions devtools
|
|
12
|
+
* - PageBuilderPOM: Create/edit pages with blocks
|
|
13
|
+
* - PostEditorPOM: Create/edit posts with blocks
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
|
-
export { PageBuilderPOM, type PageFormData, type BlockData as PageBlockData } from './PageBuilderPOM'
|
|
18
|
-
export { PostEditorPOM, type PostFormData, type BlockData as PostBlockData } from './PostEditorPOM'
|
|
19
|
-
export { AdminTeamRolesPOM, type RoleHierarchy } from './AdminTeamRolesPOM'
|
|
20
16
|
export { DashboardPOM } from './DashboardPOM'
|
|
21
17
|
export { SettingsPOM } from './SettingsPOM'
|
|
22
|
-
export {
|
|
18
|
+
export { SuperadminPOM } from './SuperadminPOM'
|
|
19
|
+
export { SuperadminTeamRolesPOM } from './SuperadminTeamRolesPOM'
|
|
23
20
|
export { BillingPOM } from './BillingPOM'
|
|
24
21
|
export { DevtoolsPOM } from './DevtoolsPOM'
|
|
22
|
+
export { ScheduledActionsPOM } from './ScheduledActionsPOM'
|
|
23
|
+
export { PageBuilderPOM } from './PageBuilderPOM'
|
|
24
|
+
export { PostEditorPOM } from './PostEditorPOM'
|
|
25
25
|
|
|
26
26
|
// Re-export public POMs from components (until migrated)
|
|
27
27
|
export { PublicPagePOM } from '../components/PublicPagePOM'
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
feature: Pages Block Editor UI Selectors Validation
|
|
3
|
-
priority: high
|
|
4
|
-
tags: [selectors, pages, editor, page-builder, ui-validation]
|
|
5
|
-
grepTags: [ui-selectors, pages, editor, SEL_PGED_001, SEL_PGED_002, SEL_PGED_003, SEL_PGED_004, SEL_PGED_005, SEL_PGED_006]
|
|
6
|
-
coverage: 6
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Pages Block Editor UI Selectors Validation
|
|
10
|
-
|
|
11
|
-
> Validates selectors specific to the Page Builder including page settings, SEO, and locale features. These tests ensure the page editor has all required UI elements.
|
|
12
|
-
|
|
13
|
-
## @test SEL_PGED_001: Pages List Page Selectors
|
|
14
|
-
|
|
15
|
-
### Metadata
|
|
16
|
-
- **Priority:** High
|
|
17
|
-
- **Type:** Selector Validation
|
|
18
|
-
- **Tags:** pages, list, table
|
|
19
|
-
- **Grep:** `@ui-selectors` `@SEL_PGED_001`
|
|
20
|
-
- **Status:** Active
|
|
21
|
-
|
|
22
|
-
```gherkin:en
|
|
23
|
-
Scenario: Pages list has required selectors
|
|
24
|
-
|
|
25
|
-
Given I am logged in as a valid user
|
|
26
|
-
And I navigate to the pages list
|
|
27
|
-
Then I should find the pages table container
|
|
28
|
-
And I should find the add page button
|
|
29
|
-
And I should find at least one page row
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
```gherkin:es
|
|
33
|
-
Scenario: Lista de paginas tiene selectores requeridos
|
|
34
|
-
|
|
35
|
-
Given estoy logueado como usuario valido
|
|
36
|
-
And navego a la lista de paginas
|
|
37
|
-
Then deberia encontrar el contenedor de tabla de paginas
|
|
38
|
-
And deberia encontrar el boton de agregar pagina
|
|
39
|
-
And deberia encontrar al menos una fila de pagina
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## @test SEL_PGED_002: Block Editor Core Selectors
|
|
45
|
-
|
|
46
|
-
### Metadata
|
|
47
|
-
- **Priority:** High
|
|
48
|
-
- **Type:** Selector Validation
|
|
49
|
-
- **Tags:** pages, editor, core
|
|
50
|
-
- **Grep:** `@ui-selectors` `@SEL_PGED_002`
|
|
51
|
-
- **Status:** Active
|
|
52
|
-
|
|
53
|
-
```gherkin:en
|
|
54
|
-
Scenario: Page editor has core selectors
|
|
55
|
-
|
|
56
|
-
Given I am logged in as a valid user
|
|
57
|
-
And I create a new page
|
|
58
|
-
Then I should find the editor container
|
|
59
|
-
And I should find the title input
|
|
60
|
-
And I should find the slug input
|
|
61
|
-
And I should find the save button
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```gherkin:es
|
|
65
|
-
Scenario: Editor de paginas tiene selectores core
|
|
66
|
-
|
|
67
|
-
Given estoy logueado como usuario valido
|
|
68
|
-
And creo una nueva pagina
|
|
69
|
-
Then deberia encontrar el contenedor del editor
|
|
70
|
-
And deberia encontrar el input de titulo
|
|
71
|
-
And deberia encontrar el input de slug
|
|
72
|
-
And deberia encontrar el boton de guardar
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## @test SEL_PGED_003: Page Settings Selectors
|
|
78
|
-
|
|
79
|
-
### Metadata
|
|
80
|
-
- **Priority:** Medium
|
|
81
|
-
- **Type:** Selector Validation
|
|
82
|
-
- **Tags:** pages, settings, seo, locale
|
|
83
|
-
- **Grep:** `@ui-selectors` `@SEL_PGED_003`
|
|
84
|
-
- **Status:** Partial - 2 passing, 2 skipped (SEO not implemented)
|
|
85
|
-
|
|
86
|
-
```gherkin:en
|
|
87
|
-
Scenario: Page editor has settings and SEO selectors
|
|
88
|
-
|
|
89
|
-
Given I am logged in as a valid user
|
|
90
|
-
And I edit an existing page
|
|
91
|
-
When I click on the fields tab
|
|
92
|
-
Then I should find the entity fields sidebar
|
|
93
|
-
And I should find the locale selector
|
|
94
|
-
And the SEO trigger should exist (skipped - not implemented)
|
|
95
|
-
And the SEO fields should exist when expanded (skipped - not implemented)
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
```gherkin:es
|
|
99
|
-
Scenario: Editor de paginas tiene selectores de configuracion y SEO
|
|
100
|
-
|
|
101
|
-
Given estoy logueado como usuario valido
|
|
102
|
-
And edito una pagina existente
|
|
103
|
-
When hago click en la tab de campos
|
|
104
|
-
Then deberia encontrar el sidebar de campos de entidad
|
|
105
|
-
And deberia encontrar el selector de locale
|
|
106
|
-
And el trigger de SEO deberia existir (skipped - no implementado)
|
|
107
|
-
And los campos de SEO deberian existir cuando se expanden (skipped - no implementado)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## @test SEL_PGED_004: Block Picker Selectors
|
|
113
|
-
|
|
114
|
-
### Metadata
|
|
115
|
-
- **Priority:** High
|
|
116
|
-
- **Type:** Selector Validation
|
|
117
|
-
- **Tags:** pages, blocks, picker
|
|
118
|
-
- **Grep:** `@ui-selectors` `@SEL_PGED_004`
|
|
119
|
-
- **Status:** Active
|
|
120
|
-
|
|
121
|
-
```gherkin:en
|
|
122
|
-
Scenario: Page editor has block picker selectors
|
|
123
|
-
|
|
124
|
-
Given I am logged in as a valid user
|
|
125
|
-
And I create a new page
|
|
126
|
-
Then I should find the block picker container
|
|
127
|
-
And I should find the hero block item
|
|
128
|
-
And I should find the add hero block button
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
```gherkin:es
|
|
132
|
-
Scenario: Editor de paginas tiene selectores de block picker
|
|
133
|
-
|
|
134
|
-
Given estoy logueado como usuario valido
|
|
135
|
-
And creo una nueva pagina
|
|
136
|
-
Then deberia encontrar el contenedor del block picker
|
|
137
|
-
And deberia encontrar el item de bloque hero
|
|
138
|
-
And deberia encontrar el boton de agregar bloque hero
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## @test SEL_PGED_005: Block Canvas and Settings
|
|
144
|
-
|
|
145
|
-
### Metadata
|
|
146
|
-
- **Priority:** High
|
|
147
|
-
- **Type:** Selector Validation
|
|
148
|
-
- **Tags:** pages, canvas, settings
|
|
149
|
-
- **Grep:** `@ui-selectors` `@SEL_PGED_005`
|
|
150
|
-
- **Status:** Active
|
|
151
|
-
|
|
152
|
-
```gherkin:en
|
|
153
|
-
Scenario: Page editor canvas and settings work
|
|
154
|
-
|
|
155
|
-
Given I am logged in as a valid user
|
|
156
|
-
And I create a new page
|
|
157
|
-
Then I should find the empty state when no blocks added
|
|
158
|
-
When I add a hero block
|
|
159
|
-
Then I should find the block canvas
|
|
160
|
-
And I should find the settings panel
|
|
161
|
-
And I should find the content and design tabs
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
```gherkin:es
|
|
165
|
-
Scenario: Canvas y configuracion del editor de paginas funcionan
|
|
166
|
-
|
|
167
|
-
Given estoy logueado como usuario valido
|
|
168
|
-
And creo una nueva pagina
|
|
169
|
-
Then deberia encontrar el estado vacio cuando no hay bloques
|
|
170
|
-
When agrego un bloque hero
|
|
171
|
-
Then deberia encontrar el canvas de bloques
|
|
172
|
-
And deberia encontrar el panel de configuracion
|
|
173
|
-
And deberia encontrar las tabs de contenido y diseno
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## @test SEL_PGED_006: Edit Existing Page
|
|
179
|
-
|
|
180
|
-
### Metadata
|
|
181
|
-
- **Priority:** High
|
|
182
|
-
- **Type:** Selector Validation
|
|
183
|
-
- **Tags:** pages, edit, existing
|
|
184
|
-
- **Grep:** `@ui-selectors` `@SEL_PGED_006`
|
|
185
|
-
- **Status:** Active
|
|
186
|
-
|
|
187
|
-
```gherkin:en
|
|
188
|
-
Scenario: Editing existing page loads editor correctly
|
|
189
|
-
|
|
190
|
-
Given I am logged in as a valid user
|
|
191
|
-
And I navigate to the pages list
|
|
192
|
-
When I select an existing page to edit
|
|
193
|
-
Then I should find the editor container
|
|
194
|
-
And I should find the title input with existing content
|
|
195
|
-
And I should find the save button
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
```gherkin:es
|
|
199
|
-
Scenario: Editar pagina existente carga el editor correctamente
|
|
200
|
-
|
|
201
|
-
Given estoy logueado como usuario valido
|
|
202
|
-
And navego a la lista de paginas
|
|
203
|
-
When selecciono una pagina existente para editar
|
|
204
|
-
Then deberia encontrar el contenedor del editor
|
|
205
|
-
And deberia encontrar el input de titulo con contenido existente
|
|
206
|
-
And deberia encontrar el boton de guardar
|
|
207
|
-
```
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POC Test: Pages Block Editor Selectors Validation
|
|
3
|
-
*
|
|
4
|
-
* This test validates selectors specific to the Page Builder that are NOT
|
|
5
|
-
* available in the Posts editor:
|
|
6
|
-
* - Page Settings panel
|
|
7
|
-
* - SEO settings (meta title, description, keywords)
|
|
8
|
-
* - Locale selector
|
|
9
|
-
*
|
|
10
|
-
* Purpose:
|
|
11
|
-
* - Validate selectors from BlockEditorBasePOM work correctly for pages
|
|
12
|
-
* - Test page-specific features (SEO, locale)
|
|
13
|
-
*
|
|
14
|
-
* Scope:
|
|
15
|
-
* - Only login and navigate
|
|
16
|
-
* - Assert elements exist in DOM (no full CRUD operations)
|
|
17
|
-
*
|
|
18
|
-
* Test IDs:
|
|
19
|
-
* - SEL_PGED_001: Pages List Page Selectors
|
|
20
|
-
* - SEL_PGED_002: Block Editor Core Selectors
|
|
21
|
-
* - SEL_PGED_003: Page Settings Selectors
|
|
22
|
-
* - SEL_PGED_004: Block Picker Selectors
|
|
23
|
-
* - SEL_PGED_005: Block Canvas and Settings
|
|
24
|
-
* - SEL_PGED_006: Edit Existing Page
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
import { PageBuilderPOM } from '../../../src/features/PageBuilderPOM'
|
|
28
|
-
import { PagesPOM } from '../../../src/entities/PagesPOM'
|
|
29
|
-
import { loginAsDefaultDeveloper } from '../../../src/session-helpers'
|
|
30
|
-
|
|
31
|
-
// Team ID for developer's team (NextSpark Team)
|
|
32
|
-
const DEVELOPER_TEAM_ID = 'team-nextspark-001'
|
|
33
|
-
|
|
34
|
-
describe('Pages Block Editor Selectors Validation', { tags: ['@ui-selectors', '@pages', '@editor'] }, () => {
|
|
35
|
-
const pageBuilder = PageBuilderPOM.create()
|
|
36
|
-
const pages = PagesPOM.create()
|
|
37
|
-
|
|
38
|
-
beforeEach(() => {
|
|
39
|
-
loginAsDefaultDeveloper()
|
|
40
|
-
// Set team context for entity API calls (pages is team-based)
|
|
41
|
-
cy.window().then((win) => {
|
|
42
|
-
win.localStorage.setItem('activeTeamId', DEVELOPER_TEAM_ID)
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
// ============================================
|
|
47
|
-
// SEL_PGED_001: PAGES LIST PAGE SELECTORS
|
|
48
|
-
// ============================================
|
|
49
|
-
describe('SEL_PGED_001: Pages List Page Selectors', { tags: '@SEL_PGED_001' }, () => {
|
|
50
|
-
beforeEach(() => {
|
|
51
|
-
pages.visitList()
|
|
52
|
-
pages.waitForList()
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
it('should find pages table container', () => {
|
|
56
|
-
cy.get(pages.selectors.tableContainer).should('exist')
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
it('should find pages add button', () => {
|
|
60
|
-
cy.get(pages.selectors.addButton).should('exist')
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
it('should find at least one page row', () => {
|
|
64
|
-
cy.get(pages.selectors.rowGeneric).should('have.length.at.least', 1)
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
// ============================================
|
|
69
|
-
// SEL_PGED_002: BLOCK EDITOR CORE SELECTORS
|
|
70
|
-
// ============================================
|
|
71
|
-
describe('SEL_PGED_002: Block Editor Core Selectors', { tags: '@SEL_PGED_002' }, () => {
|
|
72
|
-
beforeEach(() => {
|
|
73
|
-
pageBuilder.visitCreate()
|
|
74
|
-
pageBuilder.waitForEditor()
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
it('should find editor container', () => {
|
|
78
|
-
cy.get(pageBuilder.editorSelectors.container).should('exist')
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
it('should find title input', () => {
|
|
82
|
-
cy.get(pageBuilder.editorSelectors.titleInput).should('exist')
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
it('should find slug input', () => {
|
|
86
|
-
cy.get(pageBuilder.editorSelectors.slugInput).should('exist')
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
it('should find save button', () => {
|
|
90
|
-
cy.get(pageBuilder.editorSelectors.saveButton).should('exist')
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
// ============================================
|
|
95
|
-
// SEL_PGED_003: PAGE SETTINGS SELECTORS
|
|
96
|
-
// ============================================
|
|
97
|
-
describe('SEL_PGED_003: Page Settings Selectors', { tags: '@SEL_PGED_003' }, () => {
|
|
98
|
-
beforeEach(() => {
|
|
99
|
-
// Navigate to edit an existing page to see page settings and SEO
|
|
100
|
-
pages.visitList()
|
|
101
|
-
pages.waitForList()
|
|
102
|
-
|
|
103
|
-
cy.get(pages.selectors.rowGeneric)
|
|
104
|
-
.first()
|
|
105
|
-
.invoke('attr', 'data-cy')
|
|
106
|
-
.then((dataCy) => {
|
|
107
|
-
const id = dataCy?.replace('pages-row-', '') || ''
|
|
108
|
-
pageBuilder.visitEdit(id)
|
|
109
|
-
pageBuilder.waitForEditor()
|
|
110
|
-
})
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
it('should find entity fields sidebar in edit mode', () => {
|
|
114
|
-
// Switch to "Campos" tab to see entity fields
|
|
115
|
-
cy.get('[data-cy="sidebar-fields"]').click()
|
|
116
|
-
// Uses entity-fields-sidebar instead of page-settings-panel
|
|
117
|
-
cy.get(pageBuilder.editorSelectors.entityFieldsSidebar).should('exist')
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
// NOTE: SEO settings are not yet implemented in the page editor
|
|
121
|
-
// These tests are skipped until the SEO section is added
|
|
122
|
-
it.skip('should find SEO trigger in edit mode (SEO not implemented)', () => {
|
|
123
|
-
cy.get('[data-cy="sidebar-fields"]').click()
|
|
124
|
-
cy.get(pageBuilder.editorSelectors.seoTrigger).should('exist')
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
it.skip('should find SEO fields when expanded (SEO not implemented)', () => {
|
|
128
|
-
cy.get('[data-cy="sidebar-fields"]').click()
|
|
129
|
-
pageBuilder.openSeoSettings()
|
|
130
|
-
cy.get(pageBuilder.editorSelectors.metaTitle).should('exist')
|
|
131
|
-
cy.get(pageBuilder.editorSelectors.metaDescription).should('exist')
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
it('should find locale selector', () => {
|
|
135
|
-
cy.get('[data-cy="sidebar-fields"]').click()
|
|
136
|
-
// Uses field-locale pattern from entity fields
|
|
137
|
-
cy.get(pageBuilder.pageSelectors.localeSelect).should('exist')
|
|
138
|
-
})
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
// ============================================
|
|
142
|
-
// SEL_PGED_004: BLOCK PICKER SELECTORS
|
|
143
|
-
// ============================================
|
|
144
|
-
describe('SEL_PGED_004: Block Picker Selectors', { tags: '@SEL_PGED_004' }, () => {
|
|
145
|
-
beforeEach(() => {
|
|
146
|
-
pageBuilder.visitCreate()
|
|
147
|
-
pageBuilder.waitForEditor()
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
it('should find block picker container', () => {
|
|
151
|
-
cy.get(pageBuilder.editorSelectors.blockPicker).should('exist')
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
it('should find hero block (common in pages)', () => {
|
|
155
|
-
cy.get(pageBuilder.editorSelectors.blockItem('hero')).should('exist')
|
|
156
|
-
cy.get(pageBuilder.editorSelectors.addBlock('hero')).should('exist')
|
|
157
|
-
})
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
// ============================================
|
|
161
|
-
// SEL_PGED_005: BLOCK CANVAS AND SETTINGS
|
|
162
|
-
// ============================================
|
|
163
|
-
describe('SEL_PGED_005: Block Canvas and Settings', { tags: '@SEL_PGED_005' }, () => {
|
|
164
|
-
beforeEach(() => {
|
|
165
|
-
pageBuilder.visitCreate()
|
|
166
|
-
pageBuilder.waitForEditor()
|
|
167
|
-
})
|
|
168
|
-
|
|
169
|
-
it('should find empty state when no blocks added', () => {
|
|
170
|
-
cy.get(pageBuilder.editorSelectors.blockCanvasEmpty).should('exist')
|
|
171
|
-
})
|
|
172
|
-
|
|
173
|
-
it('should find block canvas and settings when block is added', () => {
|
|
174
|
-
// Add a hero block
|
|
175
|
-
pageBuilder.addBlock('hero')
|
|
176
|
-
|
|
177
|
-
// Canvas and settings should appear
|
|
178
|
-
cy.get(pageBuilder.editorSelectors.blockCanvas).should('exist')
|
|
179
|
-
cy.get(pageBuilder.editorSelectors.settingsPanel).should('exist')
|
|
180
|
-
cy.get(pageBuilder.editorSelectors.tabContent).should('exist')
|
|
181
|
-
cy.get(pageBuilder.editorSelectors.tabDesign).should('exist')
|
|
182
|
-
})
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
// ============================================
|
|
186
|
-
// SEL_PGED_006: EDIT EXISTING PAGE
|
|
187
|
-
// ============================================
|
|
188
|
-
describe('SEL_PGED_006: Edit Existing Page', { tags: '@SEL_PGED_006' }, () => {
|
|
189
|
-
it('should find editor elements when editing an existing page', () => {
|
|
190
|
-
// Get a page ID from the list
|
|
191
|
-
pages.visitList()
|
|
192
|
-
pages.waitForList()
|
|
193
|
-
|
|
194
|
-
cy.get(pages.selectors.rowGeneric)
|
|
195
|
-
.first()
|
|
196
|
-
.invoke('attr', 'data-cy')
|
|
197
|
-
.then((dataCy) => {
|
|
198
|
-
const id = dataCy?.replace('pages-row-', '') || ''
|
|
199
|
-
|
|
200
|
-
// Navigate to edit
|
|
201
|
-
pageBuilder.visitEdit(id)
|
|
202
|
-
pageBuilder.waitForEditor()
|
|
203
|
-
|
|
204
|
-
// Validate editor is loaded with existing content
|
|
205
|
-
cy.get(pageBuilder.editorSelectors.container).should('exist')
|
|
206
|
-
cy.get(pageBuilder.editorSelectors.titleInput).should('exist')
|
|
207
|
-
cy.get(pageBuilder.editorSelectors.saveButton).should('exist')
|
|
208
|
-
})
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
})
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
feature: Posts Block Editor UI Selectors Validation
|
|
3
|
-
priority: high
|
|
4
|
-
tags: [selectors, posts, editor, block-editor, ui-validation]
|
|
5
|
-
grepTags: [ui-selectors, posts, editor, SEL_PTED_001, SEL_PTED_002, SEL_PTED_003, SEL_PTED_004, SEL_PTED_005, SEL_PTED_006, SEL_PTED_007, SEL_PTED_008, SEL_PTED_009]
|
|
6
|
-
coverage: 9
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Posts Block Editor UI Selectors Validation
|
|
10
|
-
|
|
11
|
-
> Validates that the block-based post editor has all required selectors. Tests the POM architecture with dynamic selectors.
|
|
12
|
-
|
|
13
|
-
## @test SEL_PTED_001: Posts List Page Selectors
|
|
14
|
-
|
|
15
|
-
### Metadata
|
|
16
|
-
- **Priority:** High
|
|
17
|
-
- **Type:** Selector Validation
|
|
18
|
-
- **Tags:** posts, list, table
|
|
19
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_001`
|
|
20
|
-
- **Status:** Active
|
|
21
|
-
|
|
22
|
-
```gherkin:en
|
|
23
|
-
Scenario: Posts list has required selectors
|
|
24
|
-
|
|
25
|
-
Given I am logged in as a valid user
|
|
26
|
-
And I navigate to the posts list
|
|
27
|
-
Then I should find the posts table container
|
|
28
|
-
And I should find the add post button
|
|
29
|
-
And I should find the search input
|
|
30
|
-
And I should find pagination
|
|
31
|
-
And I should find at least one post row
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```gherkin:es
|
|
35
|
-
Scenario: Lista de posts tiene selectores requeridos
|
|
36
|
-
|
|
37
|
-
Given estoy logueado como usuario valido
|
|
38
|
-
And navego a la lista de posts
|
|
39
|
-
Then deberia encontrar el contenedor de tabla de posts
|
|
40
|
-
And deberia encontrar el boton de agregar post
|
|
41
|
-
And deberia encontrar el input de busqueda
|
|
42
|
-
And deberia encontrar paginacion
|
|
43
|
-
And deberia encontrar al menos una fila de post
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## @test SEL_PTED_002: Block Editor Core Selectors
|
|
49
|
-
|
|
50
|
-
### Metadata
|
|
51
|
-
- **Priority:** High
|
|
52
|
-
- **Type:** Selector Validation
|
|
53
|
-
- **Tags:** posts, editor, core
|
|
54
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_002`
|
|
55
|
-
- **Status:** Active
|
|
56
|
-
|
|
57
|
-
```gherkin:en
|
|
58
|
-
Scenario: Post editor has core selectors
|
|
59
|
-
|
|
60
|
-
Given I am logged in as a valid user
|
|
61
|
-
And I create a new post
|
|
62
|
-
Then I should find the editor container
|
|
63
|
-
And I should find the title input
|
|
64
|
-
And I should find the slug input
|
|
65
|
-
And I should find the save button
|
|
66
|
-
And I should find the status badge
|
|
67
|
-
And I should find the sidebar toggle
|
|
68
|
-
And I should find the view mode toggle
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
```gherkin:es
|
|
72
|
-
Scenario: Editor de posts tiene selectores core
|
|
73
|
-
|
|
74
|
-
Given estoy logueado como usuario valido
|
|
75
|
-
And creo un nuevo post
|
|
76
|
-
Then deberia encontrar el contenedor del editor
|
|
77
|
-
And deberia encontrar el input de titulo
|
|
78
|
-
And deberia encontrar el input de slug
|
|
79
|
-
And deberia encontrar el boton de guardar
|
|
80
|
-
And deberia encontrar el badge de estado
|
|
81
|
-
And deberia encontrar el toggle del sidebar
|
|
82
|
-
And deberia encontrar el toggle de modo de vista
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## @test SEL_PTED_003: Block Picker Selectors
|
|
88
|
-
|
|
89
|
-
### Metadata
|
|
90
|
-
- **Priority:** High
|
|
91
|
-
- **Type:** Selector Validation
|
|
92
|
-
- **Tags:** posts, blocks, picker
|
|
93
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_003`
|
|
94
|
-
- **Status:** Active
|
|
95
|
-
|
|
96
|
-
```gherkin:en
|
|
97
|
-
Scenario: Post editor has block picker selectors
|
|
98
|
-
|
|
99
|
-
Given I am logged in as a valid user
|
|
100
|
-
And I create a new post
|
|
101
|
-
Then I should find the block picker container
|
|
102
|
-
And I should find the block search input
|
|
103
|
-
And I should find the "All" category button
|
|
104
|
-
And I should find block items with dynamic selectors
|
|
105
|
-
And I should find category selectors
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
```gherkin:es
|
|
109
|
-
Scenario: Editor de posts tiene selectores de block picker
|
|
110
|
-
|
|
111
|
-
Given estoy logueado como usuario valido
|
|
112
|
-
And creo un nuevo post
|
|
113
|
-
Then deberia encontrar el contenedor del block picker
|
|
114
|
-
And deberia encontrar el input de busqueda de bloques
|
|
115
|
-
And deberia encontrar el boton de categoria "All"
|
|
116
|
-
And deberia encontrar items de bloque con selectores dinamicos
|
|
117
|
-
And deberia encontrar selectores de categoria
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## @test SEL_PTED_004: Block Canvas Selectors
|
|
123
|
-
|
|
124
|
-
### Metadata
|
|
125
|
-
- **Priority:** High
|
|
126
|
-
- **Type:** Selector Validation
|
|
127
|
-
- **Tags:** posts, canvas, empty-state
|
|
128
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_004`
|
|
129
|
-
- **Status:** Active
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## @test SEL_PTED_005: Settings Panel Selectors
|
|
134
|
-
|
|
135
|
-
### Metadata
|
|
136
|
-
- **Priority:** High
|
|
137
|
-
- **Type:** Selector Validation
|
|
138
|
-
- **Tags:** posts, settings, panel
|
|
139
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_005`
|
|
140
|
-
- **Status:** Active
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## @test SEL_PTED_006: Status Selector
|
|
145
|
-
|
|
146
|
-
### Metadata
|
|
147
|
-
- **Priority:** Medium
|
|
148
|
-
- **Type:** Selector Validation
|
|
149
|
-
- **Tags:** posts, status, draft, published
|
|
150
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_006`
|
|
151
|
-
- **Status:** Active
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## @test SEL_PTED_007: Block Manipulation Selectors
|
|
156
|
-
|
|
157
|
-
### Metadata
|
|
158
|
-
- **Priority:** Medium
|
|
159
|
-
- **Type:** Selector Validation
|
|
160
|
-
- **Tags:** posts, blocks, preview, controls
|
|
161
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_007`
|
|
162
|
-
- **Status:** Partial - sortable-block skipped
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## @test SEL_PTED_008: Post-Specific Selectors
|
|
167
|
-
|
|
168
|
-
### Metadata
|
|
169
|
-
- **Priority:** Medium
|
|
170
|
-
- **Type:** Selector Validation
|
|
171
|
-
- **Tags:** posts, excerpt, featured-image
|
|
172
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_008`
|
|
173
|
-
- **Status:** Partial - categories/locale skipped
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## @test SEL_PTED_009: Edit Existing Post
|
|
178
|
-
|
|
179
|
-
### Metadata
|
|
180
|
-
- **Priority:** High
|
|
181
|
-
- **Type:** Selector Validation
|
|
182
|
-
- **Tags:** posts, edit, existing
|
|
183
|
-
- **Grep:** `@ui-selectors` `@SEL_PTED_009`
|
|
184
|
-
- **Status:** Active
|