@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,740 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
|
|
3
|
+
import * as allure from 'allure-cypress'
|
|
4
|
+
import { ScheduledActionsPOM } from '../../../src/features/ScheduledActionsPOM'
|
|
5
|
+
import { loginAsDeveloper } from '../../../src/session-helpers'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Scheduled Actions DevTools UI - UAT Tests
|
|
9
|
+
*
|
|
10
|
+
* Tests the DevTools scheduled actions page as a developer/superadmin user:
|
|
11
|
+
* - Page loads and displays scheduled actions
|
|
12
|
+
* - Status badges display correctly for all states
|
|
13
|
+
* - Action details are visible in table
|
|
14
|
+
* - Error messages display for failed actions
|
|
15
|
+
* - Filters work correctly
|
|
16
|
+
*
|
|
17
|
+
* These are browser-based UAT tests that validate the UI from the user's perspective.
|
|
18
|
+
*
|
|
19
|
+
* Session: 2025-12-30-scheduled-actions-v1
|
|
20
|
+
*
|
|
21
|
+
* IMPORTANT: DevTools requires developer or superadmin global role.
|
|
22
|
+
* Regular team-based users (owner, member) do NOT have access.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
describe('Scheduled Actions DevTools UI - UAT Tests', {
|
|
26
|
+
tags: ['@uat', '@devtools', '@scheduled-actions']
|
|
27
|
+
}, () => {
|
|
28
|
+
const scheduledActions = ScheduledActionsPOM.create()
|
|
29
|
+
|
|
30
|
+
// ============================================================
|
|
31
|
+
// SETUP - Login as developer
|
|
32
|
+
// ============================================================
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
allure.epic('UAT')
|
|
35
|
+
allure.feature('Scheduled Actions')
|
|
36
|
+
allure.story('DevTools UI')
|
|
37
|
+
|
|
38
|
+
// Login as developer (global role with DevTools access)
|
|
39
|
+
loginAsDeveloper()
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// ============================================================
|
|
43
|
+
// AC-22: DevTools shows "Scheduled Actions" section
|
|
44
|
+
// ============================================================
|
|
45
|
+
describe('AC-22: Page Loads', () => {
|
|
46
|
+
it('SCHED-UAT-001: DevTools scheduled actions page is accessible', () => {
|
|
47
|
+
allure.severity('critical')
|
|
48
|
+
allure.description(`
|
|
49
|
+
Scenario: Developer can access DevTools scheduled actions page
|
|
50
|
+
Given I am logged in as a developer
|
|
51
|
+
When I visit /devtools/scheduled-actions
|
|
52
|
+
Then I should see the scheduled actions page
|
|
53
|
+
And the page should be fully loaded
|
|
54
|
+
`)
|
|
55
|
+
|
|
56
|
+
scheduledActions
|
|
57
|
+
.visit()
|
|
58
|
+
.assertOnScheduledActionsPage()
|
|
59
|
+
.assertPageVisible()
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
it('SCHED-UAT-002: Page displays title and description', () => {
|
|
63
|
+
allure.severity('normal')
|
|
64
|
+
allure.description(`
|
|
65
|
+
Scenario: Page shows title and helpful description
|
|
66
|
+
Given I am on the scheduled actions page
|
|
67
|
+
Then I should see "Scheduled Actions" title
|
|
68
|
+
And I should see a description of the feature
|
|
69
|
+
`)
|
|
70
|
+
|
|
71
|
+
scheduledActions
|
|
72
|
+
.visit()
|
|
73
|
+
.assertPageVisible()
|
|
74
|
+
|
|
75
|
+
// Check for translated title and description (uses i18n)
|
|
76
|
+
cy.get(scheduledActions.selectors.page)
|
|
77
|
+
.should('contain.text', 'Scheduled Actions')
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// ============================================================
|
|
82
|
+
// AC-23: List displays pending, running, completed, failed
|
|
83
|
+
// ============================================================
|
|
84
|
+
describe('AC-23: Status Display', () => {
|
|
85
|
+
it('SCHED-UAT-010: Table shows status badges for all states', () => {
|
|
86
|
+
allure.severity('critical')
|
|
87
|
+
allure.description(`
|
|
88
|
+
Scenario: Status badges are visible for different action states
|
|
89
|
+
Given I am on the scheduled actions page
|
|
90
|
+
When the table loads
|
|
91
|
+
Then I should see status badges with different states
|
|
92
|
+
And badges should have distinct visual styles (colors)
|
|
93
|
+
`)
|
|
94
|
+
|
|
95
|
+
scheduledActions
|
|
96
|
+
.visit()
|
|
97
|
+
.waitForPage()
|
|
98
|
+
|
|
99
|
+
// Assert status badges exist (at least one of each type may be present)
|
|
100
|
+
// Note: Actual presence depends on data, but selectors should be defined
|
|
101
|
+
cy.get(scheduledActions.selectors.page).should('be.visible')
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
it('SCHED-UAT-011: Pending status badge is visible', () => {
|
|
105
|
+
allure.severity('normal')
|
|
106
|
+
allure.description(`
|
|
107
|
+
Scenario: Pending actions show pending badge
|
|
108
|
+
Given there are pending actions
|
|
109
|
+
Then I should see at least one "Pending" status badge
|
|
110
|
+
`)
|
|
111
|
+
|
|
112
|
+
scheduledActions
|
|
113
|
+
.visit()
|
|
114
|
+
.waitForPage()
|
|
115
|
+
|
|
116
|
+
// If there are pending actions, badge should be visible
|
|
117
|
+
// This test may pass or fail depending on data
|
|
118
|
+
cy.get('body').then(($body) => {
|
|
119
|
+
if ($body.find('[data-cy="scheduled-actions-status-pending"]').length > 0) {
|
|
120
|
+
scheduledActions.assertPendingActionsVisible()
|
|
121
|
+
} else {
|
|
122
|
+
cy.log('No pending actions in database - skipping assertion')
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
it('SCHED-UAT-012: Completed status badge is visible when actions complete', () => {
|
|
128
|
+
allure.severity('normal')
|
|
129
|
+
allure.description(`
|
|
130
|
+
Scenario: Completed actions show completed badge
|
|
131
|
+
Given there are completed actions
|
|
132
|
+
Then I should see at least one "Completed" status badge
|
|
133
|
+
`)
|
|
134
|
+
|
|
135
|
+
scheduledActions
|
|
136
|
+
.visit()
|
|
137
|
+
.waitForPage()
|
|
138
|
+
|
|
139
|
+
// If there are completed actions, badge should be visible
|
|
140
|
+
cy.get('body').then(($body) => {
|
|
141
|
+
if ($body.find('[data-cy="scheduled-actions-status-completed"]').length > 0) {
|
|
142
|
+
scheduledActions.assertCompletedActionsVisible()
|
|
143
|
+
} else {
|
|
144
|
+
cy.log('No completed actions in database - skipping assertion')
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
it('SCHED-UAT-013: Failed status badge is visible for failed actions', () => {
|
|
150
|
+
allure.severity('normal')
|
|
151
|
+
allure.description(`
|
|
152
|
+
Scenario: Failed actions show failed badge with destructive styling
|
|
153
|
+
Given there are failed actions
|
|
154
|
+
Then I should see at least one "Failed" status badge
|
|
155
|
+
And the badge should have destructive (red) styling
|
|
156
|
+
`)
|
|
157
|
+
|
|
158
|
+
scheduledActions
|
|
159
|
+
.visit()
|
|
160
|
+
.waitForPage()
|
|
161
|
+
|
|
162
|
+
// If there are failed actions, badge should be visible
|
|
163
|
+
cy.get('body').then(($body) => {
|
|
164
|
+
if ($body.find('[data-cy="scheduled-actions-status-failed"]').length > 0) {
|
|
165
|
+
scheduledActions.assertFailedActionsVisible()
|
|
166
|
+
} else {
|
|
167
|
+
cy.log('No failed actions in database - skipping assertion')
|
|
168
|
+
}
|
|
169
|
+
})
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
// ============================================================
|
|
174
|
+
// AC-24: Each action shows type, status, scheduledAt, team, payload
|
|
175
|
+
// ============================================================
|
|
176
|
+
describe('AC-24: Action Details Display', () => {
|
|
177
|
+
it('SCHED-UAT-020: Table shows all required columns', () => {
|
|
178
|
+
allure.severity('critical')
|
|
179
|
+
allure.description(`
|
|
180
|
+
Scenario: Table displays all required column headers
|
|
181
|
+
Given I am on the scheduled actions page
|
|
182
|
+
Then I should see column headers for:
|
|
183
|
+
- Type
|
|
184
|
+
- Status
|
|
185
|
+
- Scheduled At
|
|
186
|
+
- Team
|
|
187
|
+
- Payload
|
|
188
|
+
- Error
|
|
189
|
+
`)
|
|
190
|
+
|
|
191
|
+
scheduledActions
|
|
192
|
+
.visit()
|
|
193
|
+
.waitForPage()
|
|
194
|
+
.assertColumnHeadersVisible()
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
it('SCHED-UAT-021: Action type is displayed in table', () => {
|
|
198
|
+
allure.severity('normal')
|
|
199
|
+
allure.description(`
|
|
200
|
+
Scenario: Each action shows its type
|
|
201
|
+
Given there are actions in the table
|
|
202
|
+
Then each row should display the action type
|
|
203
|
+
And the type should be in monospace font for readability
|
|
204
|
+
`)
|
|
205
|
+
|
|
206
|
+
scheduledActions
|
|
207
|
+
.visit()
|
|
208
|
+
.waitForPage()
|
|
209
|
+
|
|
210
|
+
// Check if table has rows
|
|
211
|
+
scheduledActions.getRows().then(($rows) => {
|
|
212
|
+
if ($rows.length > 0) {
|
|
213
|
+
scheduledActions.assertTableHasRows()
|
|
214
|
+
// Type column should exist
|
|
215
|
+
cy.get(scheduledActions.selectors.cellType).should('be.visible')
|
|
216
|
+
} else {
|
|
217
|
+
cy.log('No actions in database - empty state expected')
|
|
218
|
+
scheduledActions.assertEmptyStateVisible()
|
|
219
|
+
}
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
it('SCHED-UAT-022: Scheduled time is formatted and displayed', () => {
|
|
224
|
+
allure.severity('normal')
|
|
225
|
+
allure.description(`
|
|
226
|
+
Scenario: Each action shows when it's scheduled to run
|
|
227
|
+
Given there are actions in the table
|
|
228
|
+
Then each row should display the scheduled time
|
|
229
|
+
And the time should be formatted in a readable way
|
|
230
|
+
`)
|
|
231
|
+
|
|
232
|
+
scheduledActions
|
|
233
|
+
.visit()
|
|
234
|
+
.waitForPage()
|
|
235
|
+
|
|
236
|
+
// Check if table has rows
|
|
237
|
+
scheduledActions.getRows().then(($rows) => {
|
|
238
|
+
if ($rows.length > 0) {
|
|
239
|
+
// Scheduled At column should exist
|
|
240
|
+
cy.get(scheduledActions.selectors.cellScheduledAt).should('be.visible')
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
|
|
245
|
+
it('SCHED-UAT-023: Team ID is displayed or shows "Global"', () => {
|
|
246
|
+
allure.severity('normal')
|
|
247
|
+
allure.description(`
|
|
248
|
+
Scenario: Each action shows team context
|
|
249
|
+
Given there are actions in the table
|
|
250
|
+
Then each row should display the team ID
|
|
251
|
+
Or show "Global" for system-wide actions (no team context)
|
|
252
|
+
`)
|
|
253
|
+
|
|
254
|
+
scheduledActions
|
|
255
|
+
.visit()
|
|
256
|
+
.waitForPage()
|
|
257
|
+
|
|
258
|
+
// Check if table has rows
|
|
259
|
+
scheduledActions.getRows().then(($rows) => {
|
|
260
|
+
if ($rows.length > 0) {
|
|
261
|
+
// Team column should exist
|
|
262
|
+
cy.get(scheduledActions.selectors.cellTeam).should('be.visible')
|
|
263
|
+
}
|
|
264
|
+
})
|
|
265
|
+
})
|
|
266
|
+
|
|
267
|
+
it('SCHED-UAT-024: Payload preview is visible', () => {
|
|
268
|
+
allure.severity('normal')
|
|
269
|
+
allure.description(`
|
|
270
|
+
Scenario: Each action shows a payload preview
|
|
271
|
+
Given there are actions in the table
|
|
272
|
+
Then each row should show a preview of the payload
|
|
273
|
+
And clicking the row should expand to show full payload
|
|
274
|
+
`)
|
|
275
|
+
|
|
276
|
+
scheduledActions
|
|
277
|
+
.visit()
|
|
278
|
+
.waitForPage()
|
|
279
|
+
|
|
280
|
+
// Check if table has rows
|
|
281
|
+
scheduledActions.getRows().then(($rows) => {
|
|
282
|
+
if ($rows.length > 0) {
|
|
283
|
+
// Payload column should exist
|
|
284
|
+
cy.get(scheduledActions.selectors.cellPayload).should('be.visible')
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
})
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
// ============================================================
|
|
291
|
+
// AC-25: Failed actions show error message
|
|
292
|
+
// ============================================================
|
|
293
|
+
describe('AC-25: Error Display', () => {
|
|
294
|
+
it('SCHED-UAT-030: Error column is visible in table', () => {
|
|
295
|
+
allure.severity('critical')
|
|
296
|
+
allure.description(`
|
|
297
|
+
Scenario: Table has an error column
|
|
298
|
+
Given I am on the scheduled actions page
|
|
299
|
+
Then I should see an "Error" column header
|
|
300
|
+
`)
|
|
301
|
+
|
|
302
|
+
scheduledActions
|
|
303
|
+
.visit()
|
|
304
|
+
.waitForPage()
|
|
305
|
+
.assertErrorColumnVisible()
|
|
306
|
+
})
|
|
307
|
+
|
|
308
|
+
it('SCHED-UAT-031: Failed actions display error message', () => {
|
|
309
|
+
allure.severity('critical')
|
|
310
|
+
allure.description(`
|
|
311
|
+
Scenario: Failed actions show error details
|
|
312
|
+
Given there are failed actions in the table
|
|
313
|
+
Then each failed action should display its error message
|
|
314
|
+
And the error should be visible in the Error column
|
|
315
|
+
`)
|
|
316
|
+
|
|
317
|
+
scheduledActions
|
|
318
|
+
.visit()
|
|
319
|
+
.waitForPage()
|
|
320
|
+
|
|
321
|
+
// Check for failed actions
|
|
322
|
+
cy.get('body').then(($body) => {
|
|
323
|
+
if ($body.find('[data-cy="scheduled-actions-status-failed"]').length > 0) {
|
|
324
|
+
// If there are failed actions, error messages should be visible
|
|
325
|
+
cy.log('Failed actions found - verifying error display')
|
|
326
|
+
// Error column should contain error text
|
|
327
|
+
cy.get(scheduledActions.selectors.cellError).should('be.visible')
|
|
328
|
+
} else {
|
|
329
|
+
cy.log('No failed actions in database - cannot verify error display')
|
|
330
|
+
}
|
|
331
|
+
})
|
|
332
|
+
})
|
|
333
|
+
|
|
334
|
+
it('SCHED-UAT-032: Error message is expandable for full details', () => {
|
|
335
|
+
allure.severity('normal')
|
|
336
|
+
allure.description(`
|
|
337
|
+
Scenario: User can expand row to see full error message
|
|
338
|
+
Given there is a failed action with an error message
|
|
339
|
+
When I click on the row
|
|
340
|
+
Then the row should expand
|
|
341
|
+
And I should see the full error message
|
|
342
|
+
`)
|
|
343
|
+
|
|
344
|
+
scheduledActions
|
|
345
|
+
.visit()
|
|
346
|
+
.waitForPage()
|
|
347
|
+
|
|
348
|
+
// This test depends on having failed actions with errors
|
|
349
|
+
// If no failed actions exist, log and pass
|
|
350
|
+
cy.get('body').then(($body) => {
|
|
351
|
+
if ($body.find('[data-cy="scheduled-actions-status-failed"]').length > 0) {
|
|
352
|
+
cy.log('Failed action found - testing row expansion')
|
|
353
|
+
// Click on first failed action row (if exists)
|
|
354
|
+
cy.get('[data-cy^="scheduled-actions-row-"]').first().click()
|
|
355
|
+
// After click, full error should be visible
|
|
356
|
+
} else {
|
|
357
|
+
cy.log('No failed actions - skipping expansion test')
|
|
358
|
+
}
|
|
359
|
+
})
|
|
360
|
+
})
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
// ============================================================
|
|
364
|
+
// AC-26: UI has filters by status and action type
|
|
365
|
+
// ============================================================
|
|
366
|
+
describe('AC-26: Filters Work', () => {
|
|
367
|
+
it('SCHED-UAT-040: Status filter is visible and functional', () => {
|
|
368
|
+
allure.severity('critical')
|
|
369
|
+
allure.description(`
|
|
370
|
+
Scenario: User can filter by action status
|
|
371
|
+
Given I am on the scheduled actions page
|
|
372
|
+
Then I should see a status filter dropdown
|
|
373
|
+
And the dropdown should have options: All, Pending, Running, Completed, Failed
|
|
374
|
+
`)
|
|
375
|
+
|
|
376
|
+
scheduledActions
|
|
377
|
+
.visit()
|
|
378
|
+
.waitForPage()
|
|
379
|
+
.assertFiltersVisible()
|
|
380
|
+
|
|
381
|
+
// Check status filter is visible (SelectTrigger)
|
|
382
|
+
cy.get(scheduledActions.selectors.filterStatus).should('be.visible')
|
|
383
|
+
|
|
384
|
+
// Open the dropdown to verify options (shadcn/ui Select uses Radix UI)
|
|
385
|
+
cy.get(scheduledActions.selectors.filterStatus).click()
|
|
386
|
+
cy.get('[data-radix-select-viewport]').should('be.visible')
|
|
387
|
+
|
|
388
|
+
// Check options are present (SelectItems)
|
|
389
|
+
cy.get('[data-radix-select-viewport]').within(() => {
|
|
390
|
+
cy.contains('All').should('be.visible')
|
|
391
|
+
cy.contains('Pending').should('be.visible')
|
|
392
|
+
cy.contains('Running').should('be.visible')
|
|
393
|
+
cy.contains('Completed').should('be.visible')
|
|
394
|
+
cy.contains('Failed').should('be.visible')
|
|
395
|
+
})
|
|
396
|
+
|
|
397
|
+
// Close dropdown by pressing Escape
|
|
398
|
+
cy.get('body').type('{esc}')
|
|
399
|
+
})
|
|
400
|
+
|
|
401
|
+
it('SCHED-UAT-041: Action type filter is visible and functional', () => {
|
|
402
|
+
allure.severity('critical')
|
|
403
|
+
allure.description(`
|
|
404
|
+
Scenario: User can filter by action type
|
|
405
|
+
Given I am on the scheduled actions page
|
|
406
|
+
Then I should see an action type filter dropdown
|
|
407
|
+
And the dropdown should have "All" plus registered action types
|
|
408
|
+
`)
|
|
409
|
+
|
|
410
|
+
scheduledActions
|
|
411
|
+
.visit()
|
|
412
|
+
.waitForPage()
|
|
413
|
+
.assertFiltersVisible()
|
|
414
|
+
|
|
415
|
+
// Check action type filter is visible (SelectTrigger)
|
|
416
|
+
cy.get(scheduledActions.selectors.filterType).should('be.visible')
|
|
417
|
+
|
|
418
|
+
// Open the dropdown to verify options (shadcn/ui Select uses Radix UI)
|
|
419
|
+
cy.get(scheduledActions.selectors.filterType).click()
|
|
420
|
+
cy.get('[data-radix-select-viewport]').should('be.visible')
|
|
421
|
+
|
|
422
|
+
// Check "All" option is present
|
|
423
|
+
cy.get('[data-radix-select-viewport]').within(() => {
|
|
424
|
+
cy.contains('All').should('be.visible')
|
|
425
|
+
// Other options depend on registered actions (webhook:send, billing:check-renewals)
|
|
426
|
+
})
|
|
427
|
+
|
|
428
|
+
// Close dropdown by pressing Escape
|
|
429
|
+
cy.get('body').type('{esc}')
|
|
430
|
+
})
|
|
431
|
+
|
|
432
|
+
it('SCHED-UAT-042: Filtering by status updates the table', () => {
|
|
433
|
+
allure.severity('critical')
|
|
434
|
+
allure.description(`
|
|
435
|
+
Scenario: Filtering by status shows only matching actions
|
|
436
|
+
Given I am on the scheduled actions page
|
|
437
|
+
And there are actions with different statuses
|
|
438
|
+
When I select "Pending" from the status filter
|
|
439
|
+
Then the table should only show pending actions
|
|
440
|
+
`)
|
|
441
|
+
|
|
442
|
+
scheduledActions
|
|
443
|
+
.visit()
|
|
444
|
+
.waitForPage()
|
|
445
|
+
|
|
446
|
+
// Get initial row count
|
|
447
|
+
scheduledActions.getRows().then(($initialRows) => {
|
|
448
|
+
const initialCount = $initialRows.length
|
|
449
|
+
|
|
450
|
+
if (initialCount > 0) {
|
|
451
|
+
// Apply pending filter
|
|
452
|
+
scheduledActions.filterByStatus('pending')
|
|
453
|
+
|
|
454
|
+
// Wait for table to update (TanStack Query refetch)
|
|
455
|
+
cy.wait(1000)
|
|
456
|
+
|
|
457
|
+
// After filter, check if rows changed
|
|
458
|
+
scheduledActions.getRows().then(($filteredRows) => {
|
|
459
|
+
const filteredCount = $filteredRows.length
|
|
460
|
+
|
|
461
|
+
// If there were pending actions, count should be different OR same
|
|
462
|
+
// (depends on data, but filtering should work)
|
|
463
|
+
cy.log(`Initial rows: ${initialCount}, After pending filter: ${filteredCount}`)
|
|
464
|
+
})
|
|
465
|
+
} else {
|
|
466
|
+
cy.log('No actions in table - cannot test filtering')
|
|
467
|
+
}
|
|
468
|
+
})
|
|
469
|
+
})
|
|
470
|
+
|
|
471
|
+
it('SCHED-UAT-043: Filtering by action type updates the table', () => {
|
|
472
|
+
allure.severity('critical')
|
|
473
|
+
allure.description(`
|
|
474
|
+
Scenario: Filtering by action type shows only matching actions
|
|
475
|
+
Given I am on the scheduled actions page
|
|
476
|
+
And there are actions of different types
|
|
477
|
+
When I select a specific action type from the filter
|
|
478
|
+
Then the table should only show actions of that type
|
|
479
|
+
`)
|
|
480
|
+
|
|
481
|
+
scheduledActions
|
|
482
|
+
.visit()
|
|
483
|
+
.waitForPage()
|
|
484
|
+
|
|
485
|
+
// Open the dropdown to get available action types (shadcn/ui Select)
|
|
486
|
+
cy.get(scheduledActions.selectors.filterType).click()
|
|
487
|
+
cy.get('[data-radix-select-viewport]').should('be.visible')
|
|
488
|
+
|
|
489
|
+
// Get all options (excluding "All")
|
|
490
|
+
cy.get('[data-radix-select-viewport] [role="option"]').then(($options) => {
|
|
491
|
+
// Filter out the "All" option and get other action types
|
|
492
|
+
const actionTypes = [...$options]
|
|
493
|
+
.map((opt) => opt.getAttribute('data-value'))
|
|
494
|
+
.filter((val) => val && val !== 'all')
|
|
495
|
+
|
|
496
|
+
// Close dropdown first
|
|
497
|
+
cy.get('body').type('{esc}')
|
|
498
|
+
|
|
499
|
+
if (actionTypes.length > 0) {
|
|
500
|
+
// Select first available action type
|
|
501
|
+
const firstType = actionTypes[0]!
|
|
502
|
+
scheduledActions.filterByType(firstType)
|
|
503
|
+
|
|
504
|
+
// Wait for table to update
|
|
505
|
+
cy.wait(1000)
|
|
506
|
+
|
|
507
|
+
cy.log(`Filtered by action type: ${firstType}`)
|
|
508
|
+
} else {
|
|
509
|
+
cy.log('No action types registered - cannot test type filtering')
|
|
510
|
+
}
|
|
511
|
+
})
|
|
512
|
+
})
|
|
513
|
+
|
|
514
|
+
it('SCHED-UAT-044: Reset button clears all filters', () => {
|
|
515
|
+
allure.severity('normal')
|
|
516
|
+
allure.description(`
|
|
517
|
+
Scenario: User can reset filters to show all actions
|
|
518
|
+
Given I have applied filters (status or action type)
|
|
519
|
+
When I click the reset button
|
|
520
|
+
Then all filters should be cleared
|
|
521
|
+
And the table should show all actions again
|
|
522
|
+
`)
|
|
523
|
+
|
|
524
|
+
scheduledActions
|
|
525
|
+
.visit()
|
|
526
|
+
.waitForPage()
|
|
527
|
+
|
|
528
|
+
// Apply a filter first
|
|
529
|
+
scheduledActions.filterByStatus('pending')
|
|
530
|
+
|
|
531
|
+
// Wait for filter to apply
|
|
532
|
+
cy.wait(500)
|
|
533
|
+
|
|
534
|
+
// Reset button should now be visible (only shows when filters are active)
|
|
535
|
+
cy.get('body').then(($body) => {
|
|
536
|
+
if ($body.find(scheduledActions.selectors.filterReset).length > 0) {
|
|
537
|
+
scheduledActions
|
|
538
|
+
.assertResetButtonVisible()
|
|
539
|
+
.resetFilters()
|
|
540
|
+
|
|
541
|
+
// Wait for reset to take effect
|
|
542
|
+
cy.wait(500)
|
|
543
|
+
|
|
544
|
+
// After reset, filters should be back to default
|
|
545
|
+
cy.log('Filters reset successfully')
|
|
546
|
+
} else {
|
|
547
|
+
cy.log('No reset button visible - filters may already be at default')
|
|
548
|
+
}
|
|
549
|
+
})
|
|
550
|
+
})
|
|
551
|
+
|
|
552
|
+
it('SCHED-UAT-045: Multiple filters can be combined', () => {
|
|
553
|
+
allure.severity('normal')
|
|
554
|
+
allure.description(`
|
|
555
|
+
Scenario: User can combine status and action type filters
|
|
556
|
+
Given I am on the scheduled actions page
|
|
557
|
+
When I select a status filter
|
|
558
|
+
And I select an action type filter (if available)
|
|
559
|
+
Then the table should show actions matching the filters
|
|
560
|
+
`)
|
|
561
|
+
|
|
562
|
+
scheduledActions
|
|
563
|
+
.visit()
|
|
564
|
+
.waitForPage()
|
|
565
|
+
|
|
566
|
+
// Get initial row count
|
|
567
|
+
scheduledActions.getRows().then(($initialRows) => {
|
|
568
|
+
const initialCount = $initialRows.length
|
|
569
|
+
|
|
570
|
+
if (initialCount > 0) {
|
|
571
|
+
// Apply status filter first
|
|
572
|
+
scheduledActions.filterByStatus('completed')
|
|
573
|
+
|
|
574
|
+
// Wait for filter to apply
|
|
575
|
+
cy.wait(500)
|
|
576
|
+
|
|
577
|
+
// Check if action type dropdown has options beyond "All Types"
|
|
578
|
+
cy.get(scheduledActions.selectors.filterType).click()
|
|
579
|
+
cy.get('[data-radix-select-viewport]').should('be.visible')
|
|
580
|
+
|
|
581
|
+
// Count available options (excluding "All Types")
|
|
582
|
+
cy.get('[data-radix-select-viewport] [role="option"]').then(($options) => {
|
|
583
|
+
const optionCount = $options.length
|
|
584
|
+
|
|
585
|
+
// Close the dropdown
|
|
586
|
+
cy.get('body').type('{esc}')
|
|
587
|
+
|
|
588
|
+
if (optionCount > 1) {
|
|
589
|
+
// If there are action type options, apply second filter
|
|
590
|
+
// Get text of first non-All option
|
|
591
|
+
const firstOptionText = $options.eq(1).text()
|
|
592
|
+
cy.log(`Applying action type filter: ${firstOptionText}`)
|
|
593
|
+
|
|
594
|
+
scheduledActions.filterByType(firstOptionText)
|
|
595
|
+
|
|
596
|
+
// Wait for filters to apply
|
|
597
|
+
cy.wait(500)
|
|
598
|
+
|
|
599
|
+
cy.log(`Applied combined filters: status=completed, type=${firstOptionText}`)
|
|
600
|
+
} else {
|
|
601
|
+
// Only "All Types" available - still validates status filter works
|
|
602
|
+
cy.log('No specific action types available - status filter applied successfully')
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// Verify table is still visible after filtering
|
|
606
|
+
scheduledActions.assertPageVisible()
|
|
607
|
+
})
|
|
608
|
+
}
|
|
609
|
+
})
|
|
610
|
+
})
|
|
611
|
+
})
|
|
612
|
+
|
|
613
|
+
// ============================================================
|
|
614
|
+
// ADDITIONAL: Empty State
|
|
615
|
+
// ============================================================
|
|
616
|
+
describe('Empty State', () => {
|
|
617
|
+
it('SCHED-UAT-050: Empty state is shown when no actions exist', () => {
|
|
618
|
+
allure.severity('normal')
|
|
619
|
+
allure.description(`
|
|
620
|
+
Scenario: Empty state message when no actions
|
|
621
|
+
Given there are no scheduled actions in the database
|
|
622
|
+
When I visit the page
|
|
623
|
+
Then I should see an empty state message
|
|
624
|
+
And the message should explain there are no scheduled actions
|
|
625
|
+
`)
|
|
626
|
+
|
|
627
|
+
scheduledActions
|
|
628
|
+
.visit()
|
|
629
|
+
.waitForPage()
|
|
630
|
+
|
|
631
|
+
// Check if table is empty
|
|
632
|
+
scheduledActions.getRows().then(($rows) => {
|
|
633
|
+
if ($rows.length === 0) {
|
|
634
|
+
scheduledActions.assertEmptyStateVisible()
|
|
635
|
+
cy.log('Empty state is correctly displayed')
|
|
636
|
+
} else {
|
|
637
|
+
cy.log('Table has data - empty state not shown')
|
|
638
|
+
}
|
|
639
|
+
})
|
|
640
|
+
})
|
|
641
|
+
})
|
|
642
|
+
|
|
643
|
+
// ============================================================
|
|
644
|
+
// ADDITIONAL: Pagination
|
|
645
|
+
// ============================================================
|
|
646
|
+
describe('Pagination', () => {
|
|
647
|
+
it('SCHED-UAT-060: Pagination controls are visible when needed', () => {
|
|
648
|
+
allure.severity('normal')
|
|
649
|
+
allure.description(`
|
|
650
|
+
Scenario: Pagination appears when there are many actions
|
|
651
|
+
Given there are more than 20 actions (default page size)
|
|
652
|
+
When I visit the page
|
|
653
|
+
Then I should see pagination controls
|
|
654
|
+
And I should see Previous and Next buttons
|
|
655
|
+
`)
|
|
656
|
+
|
|
657
|
+
scheduledActions
|
|
658
|
+
.visit()
|
|
659
|
+
.waitForPage()
|
|
660
|
+
|
|
661
|
+
// Check if pagination exists (depends on data)
|
|
662
|
+
cy.get('body').then(($body) => {
|
|
663
|
+
if ($body.find(scheduledActions.selectors.pagination).length > 0) {
|
|
664
|
+
scheduledActions.assertPaginationVisible()
|
|
665
|
+
cy.log('Pagination controls are visible')
|
|
666
|
+
} else {
|
|
667
|
+
cy.log('Not enough data for pagination - expected behavior')
|
|
668
|
+
}
|
|
669
|
+
})
|
|
670
|
+
})
|
|
671
|
+
|
|
672
|
+
it('SCHED-UAT-061: Next button works when there are more pages', () => {
|
|
673
|
+
allure.severity('normal')
|
|
674
|
+
allure.description(`
|
|
675
|
+
Scenario: User can navigate to next page
|
|
676
|
+
Given there are multiple pages of actions
|
|
677
|
+
When I click the Next button
|
|
678
|
+
Then the table should load the next page
|
|
679
|
+
And different actions should be displayed
|
|
680
|
+
`)
|
|
681
|
+
|
|
682
|
+
scheduledActions
|
|
683
|
+
.visit()
|
|
684
|
+
.waitForPage()
|
|
685
|
+
|
|
686
|
+
// Check if Next button exists and is enabled
|
|
687
|
+
cy.get('body').then(($body) => {
|
|
688
|
+
if ($body.find(scheduledActions.selectors.paginationNext).length > 0) {
|
|
689
|
+
cy.get(scheduledActions.selectors.paginationNext).then(($btn) => {
|
|
690
|
+
if (!$btn.is(':disabled')) {
|
|
691
|
+
scheduledActions.clickNextPage()
|
|
692
|
+
cy.wait(1000)
|
|
693
|
+
cy.log('Navigated to next page successfully')
|
|
694
|
+
} else {
|
|
695
|
+
cy.log('Next button disabled - no more pages')
|
|
696
|
+
}
|
|
697
|
+
})
|
|
698
|
+
} else {
|
|
699
|
+
cy.log('No pagination - not enough data')
|
|
700
|
+
}
|
|
701
|
+
})
|
|
702
|
+
})
|
|
703
|
+
|
|
704
|
+
it('SCHED-UAT-062: Previous button works when on later pages', () => {
|
|
705
|
+
allure.severity('normal')
|
|
706
|
+
allure.description(`
|
|
707
|
+
Scenario: User can navigate to previous page
|
|
708
|
+
Given I am on page 2 or later
|
|
709
|
+
When I click the Previous button
|
|
710
|
+
Then the table should load the previous page
|
|
711
|
+
`)
|
|
712
|
+
|
|
713
|
+
scheduledActions
|
|
714
|
+
.visit()
|
|
715
|
+
.waitForPage()
|
|
716
|
+
|
|
717
|
+
// First go to next page (if possible)
|
|
718
|
+
cy.get('body').then(($body) => {
|
|
719
|
+
if ($body.find(scheduledActions.selectors.paginationNext).length > 0) {
|
|
720
|
+
cy.get(scheduledActions.selectors.paginationNext).then(($btn) => {
|
|
721
|
+
if (!$btn.is(':disabled')) {
|
|
722
|
+
// Go to next page
|
|
723
|
+
scheduledActions.clickNextPage()
|
|
724
|
+
cy.wait(1000)
|
|
725
|
+
|
|
726
|
+
// Now try to go back
|
|
727
|
+
scheduledActions.clickPrevPage()
|
|
728
|
+
cy.wait(1000)
|
|
729
|
+
cy.log('Navigated back to previous page successfully')
|
|
730
|
+
} else {
|
|
731
|
+
cy.log('Cannot test Previous button - only one page of data')
|
|
732
|
+
}
|
|
733
|
+
})
|
|
734
|
+
} else {
|
|
735
|
+
cy.log('No pagination - not enough data')
|
|
736
|
+
}
|
|
737
|
+
})
|
|
738
|
+
})
|
|
739
|
+
})
|
|
740
|
+
})
|