@nextsparkjs/theme-default 0.1.0-beta.2 → 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 +8 -4
- package/templates/(public)/page.tsx +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
- package/LICENSE +0 -21
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
feature: Superadmin Dashboard (Admin Panel)
|
|
3
|
+
priority: critical
|
|
4
|
+
tags: [sector7, superadmin, dashboard, navigation]
|
|
5
|
+
grepTags: [uat, feat-sector7, superadmin, dashboard]
|
|
6
|
+
coverage: 6
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Superadmin Dashboard (Admin Panel)
|
|
10
|
+
|
|
11
|
+
> Tests for the Admin Panel superadmin dashboard including access control, navigation menu, quick stats display, and navigation to management pages.
|
|
12
|
+
|
|
13
|
+
## @test ADMIN-DASH-001: Dashboard Access
|
|
14
|
+
|
|
15
|
+
### Metadata
|
|
16
|
+
- **Priority:** Critical
|
|
17
|
+
- **Type:** Smoke
|
|
18
|
+
- **Tags:** sector7, dashboard, access
|
|
19
|
+
- **Grep:** `@smoke`
|
|
20
|
+
|
|
21
|
+
```gherkin:en
|
|
22
|
+
Scenario: Superadmin can access Admin Panel dashboard
|
|
23
|
+
|
|
24
|
+
Given I am logged in as Superadmin (superadmin@nextspark.dev)
|
|
25
|
+
When I visit /admin
|
|
26
|
+
Then the URL should include /admin
|
|
27
|
+
And the sector7 container should be visible
|
|
28
|
+
And the header should display "Super Administrator Control Panel"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```gherkin:es
|
|
32
|
+
Scenario: Superadmin puede acceder al dashboard de Admin Panel
|
|
33
|
+
|
|
34
|
+
Given estoy logueado como Superadmin (superadmin@nextspark.dev)
|
|
35
|
+
When visito /admin
|
|
36
|
+
Then la URL deberia incluir /admin
|
|
37
|
+
And el contenedor de sector7 deberia estar visible
|
|
38
|
+
And el header deberia mostrar "Super Administrator Control Panel"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Expected Results
|
|
42
|
+
- Dashboard loads correctly
|
|
43
|
+
- Header displays correct title
|
|
44
|
+
- No access denied errors
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## @test ADMIN-DASH-002: Navigation Menu
|
|
49
|
+
|
|
50
|
+
### Metadata
|
|
51
|
+
- **Priority:** Critical
|
|
52
|
+
- **Type:** Smoke
|
|
53
|
+
- **Tags:** sector7, navigation, menu
|
|
54
|
+
- **Grep:** `@smoke`
|
|
55
|
+
|
|
56
|
+
```gherkin:en
|
|
57
|
+
Scenario: Dashboard displays all navigation items
|
|
58
|
+
|
|
59
|
+
Given I am logged in as Superadmin
|
|
60
|
+
When I visit /admin
|
|
61
|
+
Then the dashboard nav item should be visible
|
|
62
|
+
And the users nav item should be visible
|
|
63
|
+
And the teams nav item should be visible
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```gherkin:es
|
|
67
|
+
Scenario: Dashboard muestra todos los items de navegacion
|
|
68
|
+
|
|
69
|
+
Given estoy logueado como Superadmin
|
|
70
|
+
When visito /admin
|
|
71
|
+
Then el nav item de dashboard deberia estar visible
|
|
72
|
+
And el nav item de users deberia estar visible
|
|
73
|
+
And el nav item de teams deberia estar visible
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Expected Results
|
|
77
|
+
- All navigation items visible
|
|
78
|
+
- Navigation items are clickable
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## @test ADMIN-DASH-003: Quick Stats Display
|
|
83
|
+
|
|
84
|
+
### Metadata
|
|
85
|
+
- **Priority:** High
|
|
86
|
+
- **Type:** Regression
|
|
87
|
+
- **Tags:** sector7, stats, dashboard
|
|
88
|
+
|
|
89
|
+
```gherkin:en
|
|
90
|
+
Scenario: Dashboard displays system statistics
|
|
91
|
+
|
|
92
|
+
Given I am logged in as Superadmin
|
|
93
|
+
When I visit /admin
|
|
94
|
+
Then the sector7 container should be visible
|
|
95
|
+
And I should see stats cards (users count, teams count) if available
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```gherkin:es
|
|
99
|
+
Scenario: Dashboard muestra estadisticas del sistema
|
|
100
|
+
|
|
101
|
+
Given estoy logueado como Superadmin
|
|
102
|
+
When visito /admin
|
|
103
|
+
Then el contenedor de sector7 deberia estar visible
|
|
104
|
+
And deberia ver cards de estadisticas (conteo de usuarios, teams) si estan disponibles
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Expected Results
|
|
108
|
+
- Stats section displays or gracefully handles absence
|
|
109
|
+
- Data reflects current system state
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## @test ADMIN-DASH-004: Navigation to Users
|
|
114
|
+
|
|
115
|
+
### Metadata
|
|
116
|
+
- **Priority:** High
|
|
117
|
+
- **Type:** Regression
|
|
118
|
+
- **Tags:** sector7, navigation, users
|
|
119
|
+
|
|
120
|
+
```gherkin:en
|
|
121
|
+
Scenario: Navigate to Users management from dashboard
|
|
122
|
+
|
|
123
|
+
Given I am logged in as Superadmin
|
|
124
|
+
And I am on /admin
|
|
125
|
+
When I click on the Users nav item
|
|
126
|
+
Then the URL should include /admin/users
|
|
127
|
+
And I should see "User Management" heading
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```gherkin:es
|
|
131
|
+
Scenario: Navegar a gestion de Users desde dashboard
|
|
132
|
+
|
|
133
|
+
Given estoy logueado como Superadmin
|
|
134
|
+
And estoy en /admin
|
|
135
|
+
When hago click en el nav item de Users
|
|
136
|
+
Then la URL deberia incluir /admin/users
|
|
137
|
+
And deberia ver el heading "User Management"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Expected Results
|
|
141
|
+
- Navigation works correctly
|
|
142
|
+
- Users page loads
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## @test ADMIN-DASH-005: Navigation to Teams
|
|
147
|
+
|
|
148
|
+
### Metadata
|
|
149
|
+
- **Priority:** High
|
|
150
|
+
- **Type:** Regression
|
|
151
|
+
- **Tags:** sector7, navigation, teams
|
|
152
|
+
|
|
153
|
+
```gherkin:en
|
|
154
|
+
Scenario: Navigate to Teams management from dashboard
|
|
155
|
+
|
|
156
|
+
Given I am logged in as Superadmin
|
|
157
|
+
And I am on /admin
|
|
158
|
+
When I click on the Teams nav item
|
|
159
|
+
Then the URL should include /admin/teams
|
|
160
|
+
And I should see "Team Management" heading
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
```gherkin:es
|
|
164
|
+
Scenario: Navegar a gestion de Teams desde dashboard
|
|
165
|
+
|
|
166
|
+
Given estoy logueado como Superadmin
|
|
167
|
+
And estoy en /admin
|
|
168
|
+
When hago click en el nav item de Teams
|
|
169
|
+
Then la URL deberia incluir /admin/teams
|
|
170
|
+
And deberia ver el heading "Team Management"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Expected Results
|
|
174
|
+
- Navigation works correctly
|
|
175
|
+
- Teams page loads
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## @test ADMIN-DASH-006: Exit to Main Dashboard
|
|
180
|
+
|
|
181
|
+
### Metadata
|
|
182
|
+
- **Priority:** Normal
|
|
183
|
+
- **Type:** Regression
|
|
184
|
+
- **Tags:** sector7, navigation, exit
|
|
185
|
+
|
|
186
|
+
```gherkin:en
|
|
187
|
+
Scenario: Exit Admin Panel to main dashboard
|
|
188
|
+
|
|
189
|
+
Given I am logged in as Superadmin
|
|
190
|
+
And I am on /admin
|
|
191
|
+
When I click on the exit to dashboard button
|
|
192
|
+
Then the URL should include /dashboard
|
|
193
|
+
And the URL should not include /admin
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
```gherkin:es
|
|
197
|
+
Scenario: Salir de Admin Panel al dashboard principal
|
|
198
|
+
|
|
199
|
+
Given estoy logueado como Superadmin
|
|
200
|
+
And estoy en /admin
|
|
201
|
+
When hago click en el boton de salir al dashboard
|
|
202
|
+
Then la URL deberia incluir /dashboard
|
|
203
|
+
And la URL no deberia incluir /admin
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Expected Results
|
|
207
|
+
- Exit button works
|
|
208
|
+
- Returns to main dashboard
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## UI Elements
|
|
213
|
+
|
|
214
|
+
| Element | Selector | Description |
|
|
215
|
+
|---------|----------|-------------|
|
|
216
|
+
| Container | `[data-cy="sector7-container"]` | Main Admin Panel container |
|
|
217
|
+
| Nav Dashboard | `[data-cy="sector7-nav-dashboard"]` | Dashboard nav item |
|
|
218
|
+
| Nav Users | `[data-cy="sector7-nav-users"]` | Users nav item |
|
|
219
|
+
| Nav Teams | `[data-cy="sector7-nav-teams"]` | Teams nav item |
|
|
220
|
+
| Stats Users | `[data-cy="sector7-stats-users"]` | Users count stat |
|
|
221
|
+
| Stats Teams | `[data-cy="sector7-stats-teams"]` | Teams count stat |
|
|
222
|
+
| Exit Button | `[data-cy="sector7-sidebar-exit-to-dashboard"]` | Exit to dashboard button |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Summary
|
|
227
|
+
|
|
228
|
+
| Test ID | Block | Description | Tags |
|
|
229
|
+
|---------|-------|-------------|------|
|
|
230
|
+
| ADMIN-DASH-001 | Access | Dashboard access | `@smoke` |
|
|
231
|
+
| ADMIN-DASH-002 | Navigation | Navigation menu items | `@smoke` |
|
|
232
|
+
| ADMIN-DASH-003 | Stats | Quick stats display | |
|
|
233
|
+
| ADMIN-DASH-004 | Navigation | Navigate to Users | |
|
|
234
|
+
| ADMIN-DASH-005 | Navigation | Navigate to Teams | |
|
|
235
|
+
| ADMIN-DASH-006 | Navigation | Exit to main dashboard | |
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Superadmin Dashboard Tests
|
|
5
|
+
*
|
|
6
|
+
* Tests the Admin Panel superadmin dashboard:
|
|
7
|
+
* - Dashboard access and layout
|
|
8
|
+
* - Navigation menu items
|
|
9
|
+
* - Quick stats display
|
|
10
|
+
* - Recent activity
|
|
11
|
+
*
|
|
12
|
+
* Tags: @uat, @feat-superadmin, @superadmin, @dashboard
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as allure from 'allure-cypress'
|
|
16
|
+
|
|
17
|
+
import { loginAsDefaultSuperadmin } from '../../src/session-helpers'
|
|
18
|
+
import { SuperadminPOM } from '../../src/features/SuperadminPOM'
|
|
19
|
+
|
|
20
|
+
describe('Admin - Superadmin Dashboard', {
|
|
21
|
+
tags: ['@uat', '@feat-superadmin', '@superadmin', '@dashboard']
|
|
22
|
+
}, () => {
|
|
23
|
+
const superadmin = SuperadminPOM.create()
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
allure.epic('Admin')
|
|
27
|
+
allure.feature('Dashboard')
|
|
28
|
+
allure.story('Superadmin Dashboard')
|
|
29
|
+
loginAsDefaultSuperadmin()
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
describe('ADMIN-DASH-001: Dashboard Access', { tags: '@smoke' }, () => {
|
|
33
|
+
it('should access Admin dashboard', { tags: '@smoke' }, () => {
|
|
34
|
+
allure.severity('critical')
|
|
35
|
+
|
|
36
|
+
// 1. Visit Admin
|
|
37
|
+
superadmin.visitDashboard()
|
|
38
|
+
|
|
39
|
+
// 2. Validate on Superadmin
|
|
40
|
+
superadmin.assertOnSuperadmin()
|
|
41
|
+
|
|
42
|
+
// 3. Validate dashboard container
|
|
43
|
+
superadmin.assertDashboardVisible()
|
|
44
|
+
|
|
45
|
+
// 4. Validate header
|
|
46
|
+
cy.contains('Super Administrator Control Panel').should('be.visible')
|
|
47
|
+
|
|
48
|
+
cy.log('✅ Admin dashboard accessible')
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
describe('ADMIN-DASH-002: Navigation Menu', { tags: '@smoke' }, () => {
|
|
53
|
+
it('should display all navigation items', { tags: '@smoke' }, () => {
|
|
54
|
+
allure.severity('critical')
|
|
55
|
+
|
|
56
|
+
// 1. Visit Admin
|
|
57
|
+
superadmin.visitDashboard()
|
|
58
|
+
|
|
59
|
+
// 2. Validate navigation items exist
|
|
60
|
+
superadmin.assertNavVisible()
|
|
61
|
+
cy.get(superadmin.selectors.navDashboard).should('be.visible')
|
|
62
|
+
cy.get(superadmin.selectors.navUsers).should('be.visible')
|
|
63
|
+
cy.get(superadmin.selectors.navTeams).should('be.visible')
|
|
64
|
+
|
|
65
|
+
cy.log('✅ All navigation items visible')
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
describe('ADMIN-DASH-003: Quick Stats Display', () => {
|
|
70
|
+
it('should display system statistics', () => {
|
|
71
|
+
allure.severity('high')
|
|
72
|
+
|
|
73
|
+
// 1. Visit Admin dashboard
|
|
74
|
+
superadmin.visitDashboard()
|
|
75
|
+
|
|
76
|
+
// 2. Validate stats cards (if they exist)
|
|
77
|
+
cy.get(superadmin.selectors.dashboardContainer).then(($container) => {
|
|
78
|
+
// Check for stats section or cards (defensive)
|
|
79
|
+
if ($container.find(superadmin.selectors.statsUsers).length > 0) {
|
|
80
|
+
cy.get(superadmin.selectors.statsUsers).should('be.visible')
|
|
81
|
+
cy.get(superadmin.selectors.statsTeams).should('be.visible')
|
|
82
|
+
cy.log('✅ Stats displayed')
|
|
83
|
+
} else {
|
|
84
|
+
cy.log('⚠️ Stats cards not found - dashboard uses different layout')
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
cy.log('✅ Dashboard stats section checked')
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
describe('ADMIN-DASH-004: Navigation to Users', () => {
|
|
93
|
+
it('should navigate to Users management', () => {
|
|
94
|
+
allure.severity('high')
|
|
95
|
+
|
|
96
|
+
// 1. Visit Admin
|
|
97
|
+
superadmin.visitDashboard()
|
|
98
|
+
|
|
99
|
+
// 2. Click on Users nav
|
|
100
|
+
superadmin.clickNavUsers()
|
|
101
|
+
|
|
102
|
+
// 3. Validate users page
|
|
103
|
+
cy.url().should('include', '/superadmin/users')
|
|
104
|
+
cy.contains('User Management').should('be.visible')
|
|
105
|
+
|
|
106
|
+
cy.log('✅ Users navigation works')
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
describe('ADMIN-DASH-005: Navigation to Teams', () => {
|
|
111
|
+
it('should navigate to Teams management', () => {
|
|
112
|
+
allure.severity('high')
|
|
113
|
+
|
|
114
|
+
// 1. Visit Admin
|
|
115
|
+
superadmin.visitDashboard()
|
|
116
|
+
|
|
117
|
+
// 2. Click on Teams nav
|
|
118
|
+
superadmin.clickNavTeams()
|
|
119
|
+
|
|
120
|
+
// 3. Validate teams page
|
|
121
|
+
cy.url().should('include', '/superadmin/teams')
|
|
122
|
+
cy.contains('Team Management').should('be.visible')
|
|
123
|
+
|
|
124
|
+
cy.log('✅ Teams navigation works')
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
describe('ADMIN-DASH-006: Exit to Main Dashboard', () => {
|
|
129
|
+
it('should exit Admin to main dashboard', () => {
|
|
130
|
+
allure.severity('normal')
|
|
131
|
+
|
|
132
|
+
// 1. Visit Admin
|
|
133
|
+
superadmin.visitDashboard()
|
|
134
|
+
|
|
135
|
+
// 2. Click exit button (using selector from DevAreaPOM pattern)
|
|
136
|
+
cy.get('[data-cy="superadmin-sidebar-exit-to-dashboard"]').click()
|
|
137
|
+
|
|
138
|
+
// 3. Validate redirect to main dashboard
|
|
139
|
+
cy.url().should('include', '/dashboard')
|
|
140
|
+
cy.url().should('not.include', '/superadmin')
|
|
141
|
+
|
|
142
|
+
cy.log('✅ Exit to main dashboard works')
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
after(() => {
|
|
147
|
+
cy.log('✅ Sector7 dashboard tests completed')
|
|
148
|
+
})
|
|
149
|
+
})
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
---
|
|
2
|
+
feature: Superadmin Subscriptions Overview
|
|
3
|
+
priority: high
|
|
4
|
+
tags: [sector7, superadmin, subscriptions, metrics]
|
|
5
|
+
grepTags: [uat, feat-sector7, superadmin, subscriptions]
|
|
6
|
+
coverage: 8
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Superadmin Subscriptions Overview
|
|
10
|
+
|
|
11
|
+
> Tests for the Admin Panel subscriptions overview page. Superadmin can view platform-wide subscription metrics including revenue, plan distribution, subscription counts, and free vs paid team breakdowns.
|
|
12
|
+
>
|
|
13
|
+
> Note: The route is `/admin/subscriptions` (not `/billing`)
|
|
14
|
+
|
|
15
|
+
## @test ADMIN-SUBS-001: Subscriptions Page Access
|
|
16
|
+
|
|
17
|
+
### Metadata
|
|
18
|
+
- **Priority:** Critical
|
|
19
|
+
- **Type:** Smoke
|
|
20
|
+
- **Tags:** sector7, subscriptions, access
|
|
21
|
+
- **Grep:** `@smoke`
|
|
22
|
+
|
|
23
|
+
```gherkin:en
|
|
24
|
+
Scenario: Superadmin can access subscriptions overview page
|
|
25
|
+
|
|
26
|
+
Given I am logged in as Superadmin (superadmin@nextspark.dev)
|
|
27
|
+
When I visit /admin/subscriptions
|
|
28
|
+
Then the URL should include /admin/subscriptions
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```gherkin:es
|
|
32
|
+
Scenario: Superadmin puede acceder a la pagina de subscriptions overview
|
|
33
|
+
|
|
34
|
+
Given estoy logueado como Superadmin (superadmin@nextspark.dev)
|
|
35
|
+
When visito /admin/subscriptions
|
|
36
|
+
Then la URL deberia incluir /admin/subscriptions
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Expected Results
|
|
40
|
+
- Subscriptions page loads correctly
|
|
41
|
+
- Container is visible
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## @test ADMIN-SUBS-002: Revenue Metrics
|
|
46
|
+
|
|
47
|
+
### Metadata
|
|
48
|
+
- **Priority:** High
|
|
49
|
+
- **Type:** Regression
|
|
50
|
+
- **Tags:** sector7, subscriptions, revenue
|
|
51
|
+
|
|
52
|
+
```gherkin:en
|
|
53
|
+
Scenario: Display revenue metrics if available
|
|
54
|
+
|
|
55
|
+
Given I am logged in as Superadmin
|
|
56
|
+
When I visit /admin/subscriptions
|
|
57
|
+
Then I should see MRR (Monthly Recurring Revenue) metric if implemented
|
|
58
|
+
Or the page should load successfully
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```gherkin:es
|
|
62
|
+
Scenario: Mostrar metricas de revenue si estan disponibles
|
|
63
|
+
|
|
64
|
+
Given estoy logueado como Superadmin
|
|
65
|
+
When visito /admin/subscriptions
|
|
66
|
+
Then deberia ver la metrica de MRR (Monthly Recurring Revenue) si esta implementada
|
|
67
|
+
Or la pagina deberia cargar exitosamente
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Expected Results
|
|
71
|
+
- Revenue metric visible (if implemented)
|
|
72
|
+
- Page loads without errors
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## @test ADMIN-SUBS-003: Plan Distribution
|
|
77
|
+
|
|
78
|
+
### Metadata
|
|
79
|
+
- **Priority:** High
|
|
80
|
+
- **Type:** Regression
|
|
81
|
+
- **Tags:** sector7, subscriptions, plans
|
|
82
|
+
|
|
83
|
+
```gherkin:en
|
|
84
|
+
Scenario: Display plan distribution stats if available
|
|
85
|
+
|
|
86
|
+
Given I am logged in as Superadmin
|
|
87
|
+
When I visit /admin/subscriptions
|
|
88
|
+
Then I should see plan distribution breakdown if implemented
|
|
89
|
+
Or the page should load successfully
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```gherkin:es
|
|
93
|
+
Scenario: Mostrar estadisticas de distribucion de planes si estan disponibles
|
|
94
|
+
|
|
95
|
+
Given estoy logueado como Superadmin
|
|
96
|
+
When visito /admin/subscriptions
|
|
97
|
+
Then deberia ver el desglose de distribucion de planes si esta implementado
|
|
98
|
+
Or la pagina deberia cargar exitosamente
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Expected Results
|
|
102
|
+
- Plan distribution visible (if implemented)
|
|
103
|
+
- All plan tiers represented
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## @test ADMIN-SUBS-004: Active Subscriptions Count
|
|
108
|
+
|
|
109
|
+
### Metadata
|
|
110
|
+
- **Priority:** Normal
|
|
111
|
+
- **Type:** Regression
|
|
112
|
+
- **Tags:** sector7, subscriptions, active
|
|
113
|
+
|
|
114
|
+
```gherkin:en
|
|
115
|
+
Scenario: Display active subscriptions count if available
|
|
116
|
+
|
|
117
|
+
Given I am logged in as Superadmin
|
|
118
|
+
When I visit /admin/subscriptions
|
|
119
|
+
Then I should see the count of active subscriptions if implemented
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```gherkin:es
|
|
123
|
+
Scenario: Mostrar conteo de suscripciones activas si esta disponible
|
|
124
|
+
|
|
125
|
+
Given estoy logueado como Superadmin
|
|
126
|
+
When visito /admin/subscriptions
|
|
127
|
+
Then deberia ver el conteo de suscripciones activas si esta implementado
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Expected Results
|
|
131
|
+
- Active count visible (if implemented)
|
|
132
|
+
- Reflects current state
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## @test ADMIN-SUBS-005: Free vs Paid Teams
|
|
137
|
+
|
|
138
|
+
### Metadata
|
|
139
|
+
- **Priority:** Normal
|
|
140
|
+
- **Type:** Regression
|
|
141
|
+
- **Tags:** sector7, subscriptions, teams
|
|
142
|
+
|
|
143
|
+
```gherkin:en
|
|
144
|
+
Scenario: Display free vs paid teams breakdown if available
|
|
145
|
+
|
|
146
|
+
Given I am logged in as Superadmin
|
|
147
|
+
When I visit /admin/subscriptions
|
|
148
|
+
Then I should see the count of free teams if implemented
|
|
149
|
+
And I should see the count of paid teams if implemented
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```gherkin:es
|
|
153
|
+
Scenario: Mostrar desglose de teams free vs paid si esta disponible
|
|
154
|
+
|
|
155
|
+
Given estoy logueado como Superadmin
|
|
156
|
+
When visito /admin/subscriptions
|
|
157
|
+
Then deberia ver el conteo de teams free si esta implementado
|
|
158
|
+
And deberia ver el conteo de teams paid si esta implementado
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Expected Results
|
|
162
|
+
- Free count visible (if implemented)
|
|
163
|
+
- Paid count visible (if implemented)
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## @test ADMIN-SUBS-006: Trial Teams
|
|
168
|
+
|
|
169
|
+
### Metadata
|
|
170
|
+
- **Priority:** Normal
|
|
171
|
+
- **Type:** Regression
|
|
172
|
+
- **Tags:** sector7, subscriptions, trials
|
|
173
|
+
|
|
174
|
+
```gherkin:en
|
|
175
|
+
Scenario: Display teams on trial if available
|
|
176
|
+
|
|
177
|
+
Given I am logged in as Superadmin
|
|
178
|
+
When I visit /admin/subscriptions
|
|
179
|
+
Then I should see the count of teams on trial if implemented
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```gherkin:es
|
|
183
|
+
Scenario: Mostrar teams en periodo de prueba si esta disponible
|
|
184
|
+
|
|
185
|
+
Given estoy logueado como Superadmin
|
|
186
|
+
When visito /admin/subscriptions
|
|
187
|
+
Then deberia ver el conteo de teams en trial si esta implementado
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Expected Results
|
|
191
|
+
- Trial count visible (if implemented)
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## @test ADMIN-SUBS-007: Navigate to Teams from Subscriptions
|
|
196
|
+
|
|
197
|
+
### Metadata
|
|
198
|
+
- **Priority:** Normal
|
|
199
|
+
- **Type:** Regression
|
|
200
|
+
- **Tags:** sector7, navigation
|
|
201
|
+
|
|
202
|
+
```gherkin:en
|
|
203
|
+
Scenario: Navigate to teams page from subscriptions
|
|
204
|
+
|
|
205
|
+
Given I am logged in as Superadmin
|
|
206
|
+
And I am on /admin/subscriptions
|
|
207
|
+
When I click on the teams nav item
|
|
208
|
+
Then I should be on /admin/teams
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
```gherkin:es
|
|
212
|
+
Scenario: Navegar a pagina de teams desde subscriptions
|
|
213
|
+
|
|
214
|
+
Given estoy logueado como Superadmin
|
|
215
|
+
And estoy en /admin/subscriptions
|
|
216
|
+
When hago click en el nav item de teams
|
|
217
|
+
Then deberia estar en /admin/teams
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Expected Results
|
|
221
|
+
- Navigation works
|
|
222
|
+
- Teams page loads
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## @test ADMIN-SUBS-008: Navigate Back to Dashboard
|
|
227
|
+
|
|
228
|
+
### Metadata
|
|
229
|
+
- **Priority:** Normal
|
|
230
|
+
- **Type:** Regression
|
|
231
|
+
- **Tags:** sector7, navigation
|
|
232
|
+
|
|
233
|
+
```gherkin:en
|
|
234
|
+
Scenario: Navigate back to Admin Panel dashboard
|
|
235
|
+
|
|
236
|
+
Given I am logged in as Superadmin
|
|
237
|
+
And I am on /admin/subscriptions
|
|
238
|
+
When I click on the dashboard nav item
|
|
239
|
+
Then I should be on /admin
|
|
240
|
+
And the dashboard container should be visible
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
```gherkin:es
|
|
244
|
+
Scenario: Navegar de vuelta al dashboard de Admin Panel
|
|
245
|
+
|
|
246
|
+
Given estoy logueado como Superadmin
|
|
247
|
+
And estoy en /admin/subscriptions
|
|
248
|
+
When hago click en el nav item de dashboard
|
|
249
|
+
Then deberia estar en /admin
|
|
250
|
+
And el contenedor del dashboard deberia estar visible
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Expected Results
|
|
254
|
+
- Navigation works
|
|
255
|
+
- Dashboard loads
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## UI Elements
|
|
260
|
+
|
|
261
|
+
| Element | Selector | Description |
|
|
262
|
+
|---------|----------|-------------|
|
|
263
|
+
| Container | `[data-cy="sector7-container"]` | Admin Panel main container |
|
|
264
|
+
| MRR Metric | `[data-cy="subscriptions-mrr"]` | Monthly Recurring Revenue |
|
|
265
|
+
| Revenue | `[data-cy="subscriptions-revenue"]` | Total revenue metric |
|
|
266
|
+
| Plan Distribution | `[data-cy="subscriptions-plan-distribution"]` | Plan breakdown chart |
|
|
267
|
+
| Plan Count | `[data-cy="subscriptions-plan-count-{planName}"]` | Individual plan count |
|
|
268
|
+
| Active Count | `[data-cy="subscriptions-active-count"]` | Active subscriptions count |
|
|
269
|
+
| Free Teams | `[data-cy="subscriptions-free-teams"]` | Free teams count |
|
|
270
|
+
| Paid Teams | `[data-cy="subscriptions-paid-teams"]` | Paid teams count |
|
|
271
|
+
| Trial Teams | `[data-cy="subscriptions-trial-teams"]` | Trial teams count |
|
|
272
|
+
| Nav Dashboard | `[data-cy="sector7-nav-dashboard"]` | Dashboard nav item |
|
|
273
|
+
| Nav Teams | `[data-cy="sector7-nav-teams"]` | Teams nav item |
|
|
274
|
+
|
|
275
|
+
> Note: Many UI elements may not have data-cy selectors yet. Tests are defensive and will pass if page loads correctly.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Summary
|
|
280
|
+
|
|
281
|
+
| Test ID | Block | Description | Tags |
|
|
282
|
+
|---------|-------|-------------|------|
|
|
283
|
+
| ADMIN-SUBS-001 | Access | Subscriptions page access | `@smoke` |
|
|
284
|
+
| ADMIN-SUBS-002 | Metrics | Revenue metrics | |
|
|
285
|
+
| ADMIN-SUBS-003 | Metrics | Plan distribution | |
|
|
286
|
+
| ADMIN-SUBS-004 | Metrics | Active subscriptions | |
|
|
287
|
+
| ADMIN-SUBS-005 | Metrics | Free vs paid teams | |
|
|
288
|
+
| ADMIN-SUBS-006 | Metrics | Trial teams | |
|
|
289
|
+
| ADMIN-SUBS-007 | Navigation | Navigate to teams | |
|
|
290
|
+
| ADMIN-SUBS-008 | Navigation | Back to dashboard | |
|