@nextsparkjs/core 0.1.0-beta.39 → 0.1.0-beta.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/styles/classes.json +1 -1
  2. package/dist/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.bdd.md +278 -0
  3. package/dist/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +22 -14
  4. package/dist/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +160 -0
  5. package/dist/templates/contents/themes/starter/tests/cypress/src/components/EntityForm.ts +375 -0
  6. package/dist/templates/contents/themes/starter/tests/cypress/src/components/EntityList.ts +389 -0
  7. package/dist/templates/contents/themes/starter/tests/cypress/src/components/TeamSwitcherPOM.ts +450 -0
  8. package/dist/templates/contents/themes/starter/tests/cypress/src/components/index.ts +13 -0
  9. package/dist/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +576 -0
  10. package/dist/templates/contents/themes/starter/tests/cypress/src/core/index.ts +2 -0
  11. package/dist/templates/contents/themes/starter/tests/cypress/{e2e/uat/entities/tasks → src/entities}/TasksPOM.ts +1 -1
  12. package/dist/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +10 -0
  13. package/dist/templates/contents/themes/starter/tests/cypress/src/features/BillingPOM.ts +385 -0
  14. package/dist/templates/contents/themes/starter/tests/cypress/src/features/DashboardPOM.ts +245 -0
  15. package/dist/templates/contents/themes/starter/tests/cypress/src/features/DevtoolsPOM.ts +750 -0
  16. package/dist/templates/contents/themes/starter/tests/cypress/src/features/ScheduledActionsPOM.ts +463 -0
  17. package/dist/templates/contents/themes/starter/tests/cypress/src/features/SettingsPOM.ts +362 -0
  18. package/dist/templates/contents/themes/starter/tests/cypress/src/features/SuperadminPOM.ts +331 -0
  19. package/dist/templates/contents/themes/starter/tests/cypress/src/features/index.ts +18 -0
  20. package/dist/templates/contents/themes/starter/tests/cypress/src/index.ts +88 -0
  21. package/dist/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +332 -88
  22. package/dist/templates/contents/themes/starter/tests/cypress.config.ts +4 -1
  23. package/package.json +1 -1
  24. package/scripts/test/jest-theme.mjs +7 -3
  25. package/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.bdd.md +278 -0
  26. package/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +22 -14
  27. package/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +160 -0
  28. package/templates/contents/themes/starter/tests/cypress/src/components/EntityForm.ts +375 -0
  29. package/templates/contents/themes/starter/tests/cypress/src/components/EntityList.ts +389 -0
  30. package/templates/contents/themes/starter/tests/cypress/src/components/TeamSwitcherPOM.ts +450 -0
  31. package/templates/contents/themes/starter/tests/cypress/src/components/index.ts +13 -0
  32. package/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +576 -0
  33. package/templates/contents/themes/starter/tests/cypress/src/core/index.ts +2 -0
  34. package/templates/contents/themes/starter/tests/cypress/{e2e/uat/entities/tasks → src/entities}/TasksPOM.ts +1 -1
  35. package/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +10 -0
  36. package/templates/contents/themes/starter/tests/cypress/src/features/BillingPOM.ts +385 -0
  37. package/templates/contents/themes/starter/tests/cypress/src/features/DashboardPOM.ts +245 -0
  38. package/templates/contents/themes/starter/tests/cypress/src/features/DevtoolsPOM.ts +750 -0
  39. package/templates/contents/themes/starter/tests/cypress/src/features/ScheduledActionsPOM.ts +463 -0
  40. package/templates/contents/themes/starter/tests/cypress/src/features/SettingsPOM.ts +362 -0
  41. package/templates/contents/themes/starter/tests/cypress/src/features/SuperadminPOM.ts +331 -0
  42. package/templates/contents/themes/starter/tests/cypress/src/features/index.ts +18 -0
  43. package/templates/contents/themes/starter/tests/cypress/src/index.ts +88 -0
  44. package/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +332 -88
  45. package/templates/contents/themes/starter/tests/cypress.config.ts +4 -1
  46. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/pages-editor.bdd.md +0 -207
  47. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/pages-editor.cy.ts +0 -211
  48. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/posts-editor.bdd.md +0 -184
  49. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/posts-editor.cy.ts +0 -350
  50. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/public.cy.ts +0 -112
  51. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/taxonomies.cy.ts +0 -126
  52. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/pages-editor.bdd.md +0 -207
  53. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/pages-editor.cy.ts +0 -211
  54. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/posts-editor.bdd.md +0 -184
  55. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/posts-editor.cy.ts +0 -350
  56. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/public.cy.ts +0 -112
  57. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/selectors/taxonomies.cy.ts +0 -126
@@ -1,350 +0,0 @@
1
- /**
2
- * POC Test: Posts Block Editor Selectors Validation
3
- *
4
- * This test validates that the new POM architecture with dynamic selectors
5
- * works correctly for the block-based page builder.
6
- *
7
- * Purpose:
8
- * - Validate selectors from BlockEditorBasePOM work correctly
9
- * - Ensure dynamic selector generation produces valid CSS selectors
10
- * - Test before migrating existing tests to new architecture
11
- *
12
- * Scope:
13
- * - Only login and navigate
14
- * - Assert elements exist in DOM (no full CRUD operations)
15
- *
16
- * Test IDs:
17
- * - SEL_PTED_001: Posts List Page Selectors
18
- * - SEL_PTED_002: Block Editor Core Selectors
19
- * - SEL_PTED_003: Block Picker Selectors
20
- * - SEL_PTED_004: Block Canvas Selectors
21
- * - SEL_PTED_005: Settings Panel Selectors
22
- * - SEL_PTED_006: Status Selector
23
- * - SEL_PTED_007: Block Manipulation Selectors
24
- * - SEL_PTED_008: Post-Specific Selectors
25
- * - SEL_PTED_009: Edit Existing Post
26
- */
27
-
28
- import { PostEditorPOM } from '../../../src/features/PostEditorPOM'
29
- import { PostsPOM } from '../../../src/entities/PostsPOM'
30
- import { loginAsDefaultDeveloper } from '../../../src/session-helpers'
31
-
32
- // Team ID for developer's team (NextSpark Team)
33
- const DEVELOPER_TEAM_ID = 'team-nextspark-001'
34
-
35
- describe('Posts Block Editor Selectors Validation', { tags: ['@ui-selectors', '@posts', '@editor'] }, () => {
36
- const postEditor = PostEditorPOM.create()
37
- const posts = PostsPOM.create()
38
-
39
- beforeEach(() => {
40
- loginAsDefaultDeveloper()
41
- // Set team context for entity API calls (posts is team-based)
42
- cy.window().then((win) => {
43
- win.localStorage.setItem('activeTeamId', DEVELOPER_TEAM_ID)
44
- })
45
- })
46
-
47
- // ============================================
48
- // SEL_PTED_001: POSTS LIST PAGE SELECTORS
49
- // ============================================
50
- describe('SEL_PTED_001: Posts List Page Selectors', { tags: '@SEL_PTED_001' }, () => {
51
- beforeEach(() => {
52
- posts.visitList()
53
- posts.waitForList()
54
- })
55
-
56
- it('should find posts table container', () => {
57
- cy.get(posts.selectors.tableContainer).should('exist')
58
- })
59
-
60
- it('should find posts add button', () => {
61
- cy.get(posts.selectors.addButton).should('exist')
62
- })
63
-
64
- it('should find posts search input', () => {
65
- cy.get(posts.selectors.search).should('exist')
66
- })
67
-
68
- // NOTE: Pagination only shows when there are posts
69
- // This test is conditional - passes if data exists, otherwise logs warning
70
- it('should find posts pagination (requires sample data)', () => {
71
- cy.get('body').then(($body) => {
72
- // Check if rows exist (not empty state)
73
- if ($body.find('[data-cy^="posts-row-"]').length === 0) {
74
- cy.log('⚠️ No posts found - pagination not visible (add sample data)')
75
- return // Skip gracefully
76
- }
77
- cy.get(posts.selectors.pagination).should('exist')
78
- })
79
- })
80
-
81
- // NOTE: Conditional test - requires sample posts data
82
- it('should find at least one post row (requires sample data)', () => {
83
- cy.get('body').then(($body) => {
84
- // Check if rows exist
85
- if ($body.find('[data-cy^="posts-row-"]').length === 0) {
86
- cy.log('⚠️ No posts found - skipping row test (add sample data)')
87
- return // Skip gracefully
88
- }
89
- cy.get(posts.selectors.rowGeneric).should('have.length.at.least', 1)
90
- })
91
- })
92
- })
93
-
94
- // ============================================
95
- // SEL_PTED_002: BLOCK EDITOR CORE SELECTORS
96
- // ============================================
97
- describe('SEL_PTED_002: Block Editor Core Selectors', { tags: '@SEL_PTED_002' }, () => {
98
- beforeEach(() => {
99
- postEditor.visitCreate()
100
- postEditor.waitForEditor()
101
- })
102
-
103
- it('should find editor container', () => {
104
- cy.get(postEditor.editorSelectors.container).should('exist')
105
- })
106
-
107
- it('should find title input', () => {
108
- cy.get(postEditor.editorSelectors.titleInput).should('exist')
109
- })
110
-
111
- it('should find slug input', () => {
112
- cy.get(postEditor.editorSelectors.slugInput).should('exist')
113
- })
114
-
115
- it('should find save button', () => {
116
- cy.get(postEditor.editorSelectors.saveButton).should('exist')
117
- })
118
-
119
- it('should find status badge', () => {
120
- cy.get(postEditor.editorSelectors.statusBadge).should('exist')
121
- })
122
-
123
- it('should find left sidebar toggle', () => {
124
- cy.get(postEditor.editorSelectors.leftSidebarToggle).should('exist')
125
- })
126
-
127
- it('should find view mode toggle', () => {
128
- cy.get(postEditor.editorSelectors.viewModeToggle).should('exist')
129
- })
130
- })
131
-
132
- // ============================================
133
- // SEL_PTED_003: BLOCK PICKER SELECTORS
134
- // ============================================
135
- describe('SEL_PTED_003: Block Picker Selectors', { tags: '@SEL_PTED_003' }, () => {
136
- beforeEach(() => {
137
- postEditor.visitCreate()
138
- postEditor.waitForEditor()
139
- })
140
-
141
- it('should find block picker container', () => {
142
- cy.get(postEditor.editorSelectors.blockPicker).should('exist')
143
- })
144
-
145
- it('should find block search input', () => {
146
- cy.get(postEditor.editorSelectors.blockSearch).should('exist')
147
- })
148
-
149
- it('should find category "All" button', () => {
150
- cy.get(postEditor.editorSelectors.categoryAll).should('exist')
151
- })
152
-
153
- it('should find block items with dynamic selectors', () => {
154
- // Test a known block slug - post-content is the main content block for posts
155
- cy.get(postEditor.editorSelectors.blockItem('post-content')).should('exist')
156
- cy.get(postEditor.editorSelectors.addBlock('post-content')).should('exist')
157
- })
158
-
159
- it('should find category selectors', () => {
160
- // Categories should be visible
161
- cy.get(postEditor.editorSelectors.category('content')).should('exist')
162
- })
163
- })
164
-
165
- // ============================================
166
- // SEL_PTED_004: BLOCK CANVAS SELECTORS
167
- // ============================================
168
- describe('SEL_PTED_004: Block Canvas Selectors', { tags: '@SEL_PTED_004' }, () => {
169
- beforeEach(() => {
170
- postEditor.visitCreate()
171
- postEditor.waitForEditor()
172
- })
173
-
174
- it('should find empty state when no blocks added', () => {
175
- cy.get(postEditor.editorSelectors.blockCanvasEmpty).should('exist')
176
- })
177
-
178
- it('should find block canvas container when block is added', () => {
179
- // Add a block - canvas container appears
180
- postEditor.addBlock('post-content')
181
- cy.get(postEditor.editorSelectors.blockCanvas).should('exist')
182
- })
183
- })
184
-
185
- // ============================================
186
- // SEL_PTED_005: SETTINGS PANEL SELECTORS
187
- // ============================================
188
- describe('SEL_PTED_005: Settings Panel Selectors', { tags: '@SEL_PTED_005' }, () => {
189
- beforeEach(() => {
190
- postEditor.visitCreate()
191
- postEditor.waitForEditor()
192
- })
193
-
194
- it('should find settings panel empty state when no block selected', () => {
195
- // When no block is selected, empty state is shown
196
- cy.get(postEditor.editorSelectors.settingsPanelEmpty).should('exist')
197
- })
198
-
199
- it('should find settings panel container when block is selected', () => {
200
- // Add a block first - settings panel appears with block selected
201
- postEditor.addBlock('post-content')
202
- cy.get(postEditor.editorSelectors.settingsPanel).should('exist')
203
- })
204
- })
205
-
206
- // ============================================
207
- // SEL_PTED_006: STATUS SELECTOR
208
- // ============================================
209
- describe('SEL_PTED_006: Status Selector', { tags: '@SEL_PTED_006' }, () => {
210
- beforeEach(() => {
211
- postEditor.visitCreate()
212
- postEditor.waitForEditor()
213
- })
214
-
215
- it('should find status selector trigger', () => {
216
- cy.get(postEditor.editorSelectors.statusSelector).should('exist')
217
- })
218
-
219
- it('should find status options when clicked', () => {
220
- // Scroll into view and click - the selector may be hidden due to sidebar
221
- cy.get(postEditor.editorSelectors.statusSelector).scrollIntoView().click({ force: true })
222
- cy.get(postEditor.editorSelectors.statusOption('draft')).should('exist')
223
- cy.get(postEditor.editorSelectors.statusOption('published')).should('exist')
224
- })
225
- })
226
-
227
- // ============================================
228
- // SEL_PTED_007: BLOCK MANIPULATION SELECTORS
229
- // ============================================
230
- describe('SEL_PTED_007: Block Manipulation Selectors', { tags: '@SEL_PTED_007' }, () => {
231
- beforeEach(() => {
232
- postEditor.visitCreate()
233
- postEditor.waitForEditor()
234
- })
235
-
236
- it('should find preview block controls after adding a block', () => {
237
- // Add a post-content block
238
- postEditor.addBlock('post-content')
239
-
240
- // Wait for block to appear using preview-block pattern (not sortable-block)
241
- // The editor uses preview-block-{id} for the canvas blocks
242
- cy.get('[data-cy^="preview-block-"]')
243
- .first()
244
- .invoke('attr', 'data-cy')
245
- .then((dataCy) => {
246
- // Extract ID - format is preview-block-{uuid}
247
- const match = dataCy?.match(/^preview-block-([a-f0-9-]+)$/)
248
- const blockId = match ? match[1] : ''
249
- expect(blockId).to.not.be.empty
250
-
251
- // Validate preview block selectors (actual selectors in DOM)
252
- cy.get(postEditor.editorSelectors.previewBlock(blockId)).should('exist')
253
- cy.get(postEditor.editorSelectors.previewMoveUp(blockId)).should('exist')
254
- cy.get(postEditor.editorSelectors.previewMoveDown(blockId)).should('exist')
255
- })
256
- })
257
-
258
- // NOTE: sortable-block, drag-handle, duplicate-block selectors don't exist in current implementation
259
- // The editor uses preview-block pattern instead. Skipping these tests.
260
- it.skip('should find sortable block controls (sortable-block selectors not implemented)', () => {
261
- postEditor.addBlock('post-content')
262
- cy.get('[data-cy^="sortable-block-"]').first().should('exist')
263
- })
264
-
265
- it('should find settings panel and tabs after adding a block', () => {
266
- // Add a post-content block - settings panel appears automatically
267
- postEditor.addBlock('post-content')
268
-
269
- // Settings panel should appear with tabs
270
- cy.get(postEditor.editorSelectors.settingsPanel).should('exist')
271
- cy.get(postEditor.editorSelectors.tabContent).should('exist')
272
- cy.get(postEditor.editorSelectors.tabDesign).should('exist')
273
- cy.get(postEditor.editorSelectors.tabAdvanced).should('exist')
274
- })
275
-
276
- it('should find block settings actions', () => {
277
- postEditor.addBlock('post-content')
278
-
279
- // Settings panel actions
280
- cy.get(postEditor.editorSelectors.resetProps).should('exist')
281
- cy.get(postEditor.editorSelectors.removeBlockSettings).should('exist')
282
- })
283
- })
284
-
285
- // ============================================
286
- // SEL_PTED_008: POST-SPECIFIC SELECTORS
287
- // ============================================
288
- describe('SEL_PTED_008: Post-Specific Selectors', { tags: '@SEL_PTED_008' }, () => {
289
- beforeEach(() => {
290
- postEditor.visitCreate()
291
- postEditor.waitForEditor()
292
- // Switch to "Campos" tab to see entity fields
293
- cy.get('[data-cy="sidebar-fields"]').click()
294
- })
295
-
296
- it('should find excerpt input', () => {
297
- cy.get(postEditor.postSelectors.excerptInput).should('exist')
298
- })
299
-
300
- it('should find featured image input', () => {
301
- cy.get(postEditor.postSelectors.featuredImage).should('exist')
302
- })
303
-
304
- // NOTE: Categories and Locale selectors don't have data-cy attributes yet
305
- // These tests are skipped until the component adds proper selectors
306
- it.skip('should find categories select (missing data-cy)', () => {
307
- cy.get(postEditor.postSelectors.categoriesSelect).should('exist')
308
- })
309
-
310
- it.skip('should find locale select (missing data-cy)', () => {
311
- cy.get(postEditor.postSelectors.localeSelect).should('exist')
312
- })
313
- })
314
-
315
- // ============================================
316
- // SEL_PTED_009: EDIT EXISTING POST
317
- // ============================================
318
- describe('SEL_PTED_009: Edit Existing Post', { tags: '@SEL_PTED_009' }, () => {
319
- it('should find editor elements when editing an existing post (requires sample data)', () => {
320
- // Get a post ID from the list
321
- posts.visitList()
322
- posts.waitForList()
323
-
324
- // Conditional: skip if no posts exist
325
- cy.get('body').then(($body) => {
326
- // Check if rows exist
327
- if ($body.find('[data-cy^="posts-row-"]').length === 0) {
328
- cy.log('⚠️ No posts found - skipping edit test (add sample data)')
329
- return // Skip gracefully
330
- }
331
-
332
- cy.get(posts.selectors.rowGeneric)
333
- .first()
334
- .invoke('attr', 'data-cy')
335
- .then((dataCy) => {
336
- const id = dataCy?.replace('posts-row-', '') || ''
337
-
338
- // Navigate to edit
339
- postEditor.visitEdit(id)
340
- postEditor.waitForEditor()
341
-
342
- // Validate editor is loaded with existing content
343
- cy.get(postEditor.editorSelectors.container).should('exist')
344
- cy.get(postEditor.editorSelectors.titleInput).should('exist')
345
- cy.get(postEditor.editorSelectors.saveButton).should('exist')
346
- })
347
- })
348
- })
349
- })
350
- })
@@ -1,112 +0,0 @@
1
- /**
2
- * UI Selectors Validation: Public Pages
3
- *
4
- * This test validates that public page selectors exist in the DOM.
5
- * This is a lightweight test that ONLY checks selector presence, not functionality.
6
- *
7
- * Purpose:
8
- * - Validate PublicPagePOM navbar/footer selectors work correctly
9
- * - Ensure all public.* selectors are implemented
10
- * - Run as Phase 12 sub-gate before functional tests
11
- *
12
- * Scope:
13
- * - Navigate to public pages (NO login required)
14
- * - Assert elements exist in DOM (no form submissions)
15
- * - Fast execution (< 30 seconds per describe block)
16
- *
17
- * NOTE: Public pages use PublicNavbar and PublicFooter from core.
18
- * Blog and page selectors (public.page.*, public.blog.*) are pending
19
- * as they require specific content to exist.
20
- */
21
-
22
- import { PublicPagePOM } from '../../../src/components/PublicPagePOM'
23
-
24
- describe('Public Page Selectors Validation', { tags: ['@ui-selectors'] }, () => {
25
- // ============================================
26
- // NAVBAR (4 selectors)
27
- // ============================================
28
- describe('Public Navbar', () => {
29
- beforeEach(() => {
30
- // Visit home page (public, no login needed)
31
- cy.visit('/', { timeout: 60000, failOnStatusCode: false })
32
- })
33
-
34
- it('should find navbar container', () => {
35
- cy.get(PublicPagePOM.navbarSelectors.container).should('exist')
36
- })
37
-
38
- it('should find navbar logo', () => {
39
- cy.get(PublicPagePOM.navbarSelectors.logo).should('exist')
40
- })
41
-
42
- it('should find login button (when not logged in)', () => {
43
- cy.get(PublicPagePOM.navbarSelectors.loginButton).should('exist')
44
- })
45
-
46
- it('should find signup button (when not logged in)', () => {
47
- cy.get(PublicPagePOM.navbarSelectors.signupButton).should('exist')
48
- })
49
- })
50
-
51
- // ============================================
52
- // FOOTER (2 selectors)
53
- // ============================================
54
- describe('Public Footer', () => {
55
- beforeEach(() => {
56
- cy.visit('/', { timeout: 60000, failOnStatusCode: false })
57
- })
58
-
59
- it('should find footer container', () => {
60
- cy.get(PublicPagePOM.footerSelectors.container).should('exist')
61
- })
62
-
63
- it('should find footer logo', () => {
64
- cy.get(PublicPagePOM.footerSelectors.logo).should('exist')
65
- })
66
- })
67
-
68
- // ============================================
69
- // PAGE SELECTORS (3 selectors)
70
- // NOTE: Requires published pages to exist
71
- // ============================================
72
- describe('Public Page Selectors', () => {
73
- // public.page.container - dynamic selector 'public-page-{slug}'
74
- it.skip('should find page container (requires published page)', () => {
75
- // Example: cy.visit('/about-us')
76
- // cy.get('[data-cy="public-page-about-us"]').should('exist')
77
- cy.wrap(true).should('be.true')
78
- })
79
-
80
- // public.page.title - 'page-title'
81
- it.skip('should find page title (requires published page)', () => {
82
- // cy.get('[data-cy="page-title"]').should('exist')
83
- cy.wrap(true).should('be.true')
84
- })
85
-
86
- // public.page.content - 'page-content'
87
- it.skip('should find page content (requires published page)', () => {
88
- // cy.get('[data-cy="page-content"]').should('exist')
89
- cy.wrap(true).should('be.true')
90
- })
91
- })
92
-
93
- // ============================================
94
- // BLOG SELECTORS (2 selectors)
95
- // NOTE: Requires blog posts to exist
96
- // ============================================
97
- describe('Public Blog Selectors', () => {
98
- // public.blog.listContainer - 'blog-list'
99
- it.skip('should find blog list container (requires blog posts)', () => {
100
- // cy.visit('/blog')
101
- // cy.get('[data-cy="blog-list"]').should('exist')
102
- cy.wrap(true).should('be.true')
103
- })
104
-
105
- // public.blog.postCard - dynamic selector 'blog-post-{slug}'
106
- it.skip('should find blog post card (requires blog posts)', () => {
107
- // cy.visit('/blog')
108
- // cy.get('[data-cy="blog-post-my-first-post"]').should('exist')
109
- cy.wrap(true).should('be.true')
110
- })
111
- })
112
- })
@@ -1,126 +0,0 @@
1
- /**
2
- * UI Selectors Validation: Taxonomies (Categories)
3
- *
4
- * This test validates that taxonomies selectors exist in the DOM.
5
- * This is a lightweight test that ONLY checks selector presence, not functionality.
6
- *
7
- * Purpose:
8
- * - Validate CategoriesPOM taxonomies selectors work correctly
9
- * - Ensure all taxonomies.* selectors are implemented
10
- * - Run as Phase 12 sub-gate before functional tests
11
- *
12
- * IMPORTANT: The /dashboard/taxonomies page does NOT exist yet.
13
- * Taxonomies are defined in CORE_SELECTORS but the UI is not implemented.
14
- * All tests are marked as skip until the page is created.
15
- *
16
- * NOTE: There IS an API at /api/v1/post-categories but no UI page.
17
- */
18
-
19
- import { CategoriesPOM } from '../../../src/components/CategoriesPOM'
20
-
21
- describe('Taxonomies Selectors Validation', { tags: ['@ui-selectors'] }, () => {
22
- // ============================================
23
- // DOCUMENTATION (no login needed)
24
- // ============================================
25
- describe('Taxonomies Page Status', () => {
26
- it('documents that taxonomies page is not implemented', () => {
27
- cy.log('The /dashboard/taxonomies page does NOT exist')
28
- cy.log('Taxonomies selectors are defined in CORE_SELECTORS')
29
- cy.log('API exists at /api/v1/post-categories')
30
- cy.log('UI page needs to be created to test these selectors')
31
- })
32
- })
33
-
34
- // ============================================
35
- // LIST PAGE (5 selectors)
36
- // NOTE: Page not implemented
37
- // ============================================
38
- describe('List Page', () => {
39
- it.skip('should find list container (page not implemented)', () => {
40
- cy.get(CategoriesPOM.listSelectors.page).should('exist')
41
- })
42
-
43
- it.skip('should find create button (page not implemented)', () => {
44
- cy.get(CategoriesPOM.listSelectors.createBtn).should('exist')
45
- })
46
-
47
- it.skip('should find category row (page not implemented)', () => {
48
- // Example: cy.get(CategoriesPOM.listSelectors.row('cat-123')).should('exist')
49
- cy.wrap(true).should('be.true')
50
- })
51
-
52
- it.skip('should find edit button (page not implemented)', () => {
53
- // Example: cy.get(CategoriesPOM.listSelectors.editBtn('cat-123')).should('exist')
54
- cy.wrap(true).should('be.true')
55
- })
56
-
57
- it.skip('should find delete button (page not implemented)', () => {
58
- // Example: cy.get(CategoriesPOM.listSelectors.deleteBtn('cat-123')).should('exist')
59
- cy.wrap(true).should('be.true')
60
- })
61
- })
62
-
63
- // ============================================
64
- // FORM DIALOG (10 selectors)
65
- // NOTE: Page not implemented
66
- // ============================================
67
- describe('Form Dialog', () => {
68
- it.skip('should find form dialog (page not implemented)', () => {
69
- cy.get(CategoriesPOM.formSelectors.dialog).should('exist')
70
- })
71
-
72
- it.skip('should find name input (page not implemented)', () => {
73
- cy.get(CategoriesPOM.formSelectors.nameInput).should('exist')
74
- })
75
-
76
- it.skip('should find slug input (page not implemented)', () => {
77
- cy.get(CategoriesPOM.formSelectors.slugInput).should('exist')
78
- })
79
-
80
- it.skip('should find description input (page not implemented)', () => {
81
- cy.get(CategoriesPOM.formSelectors.descriptionInput).should('exist')
82
- })
83
-
84
- it.skip('should find icon input (page not implemented)', () => {
85
- cy.get(CategoriesPOM.formSelectors.iconInput).should('exist')
86
- })
87
-
88
- it.skip('should find color input (page not implemented)', () => {
89
- cy.get(CategoriesPOM.formSelectors.colorInput).should('exist')
90
- })
91
-
92
- it.skip('should find parent select (page not implemented)', () => {
93
- cy.get(CategoriesPOM.formSelectors.parentSelect).should('exist')
94
- })
95
-
96
- it.skip('should find order input (page not implemented)', () => {
97
- cy.get(CategoriesPOM.formSelectors.orderInput).should('exist')
98
- })
99
-
100
- it.skip('should find save button (page not implemented)', () => {
101
- cy.get(CategoriesPOM.formSelectors.saveButton).should('exist')
102
- })
103
-
104
- it.skip('should find cancel button (page not implemented)', () => {
105
- cy.get(CategoriesPOM.formSelectors.cancelButton).should('exist')
106
- })
107
- })
108
-
109
- // ============================================
110
- // CONFIRM DELETE DIALOG (3 selectors)
111
- // NOTE: Page not implemented
112
- // ============================================
113
- describe('Confirm Delete Dialog', () => {
114
- it.skip('should find delete confirmation dialog (page not implemented)', () => {
115
- cy.get(CategoriesPOM.confirmDeleteSelectors.dialog).should('exist')
116
- })
117
-
118
- it.skip('should find confirm delete button (page not implemented)', () => {
119
- cy.get(CategoriesPOM.confirmDeleteSelectors.confirmButton).should('exist')
120
- })
121
-
122
- it.skip('should find cancel delete button (page not implemented)', () => {
123
- cy.get(CategoriesPOM.confirmDeleteSelectors.cancelButton).should('exist')
124
- })
125
- })
126
- })