@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,349 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Teams System - Documentation Video
|
|
5
|
+
*
|
|
6
|
+
* This test generates a documentation video showing how the multi-tenant
|
|
7
|
+
* team system works, including team switching and permission differences.
|
|
8
|
+
*
|
|
9
|
+
* Run with: NEXT_PUBLIC_ACTIVE_THEME=default pnpm cy:run --spec "teams-system.doc.cy.ts"
|
|
10
|
+
*
|
|
11
|
+
* Output:
|
|
12
|
+
* - Video: cypress/videos/docs/tutorials/teams-system.doc.cy.ts.mp4
|
|
13
|
+
* - Narrations: cypress/videos/narrations/teams-system.doc-narrations.json
|
|
14
|
+
*
|
|
15
|
+
* @tags @doc, @tutorial, @teams
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// Import custom documentation commands (cy.narrate, cy.chapter, etc.)
|
|
19
|
+
import '../../../support/doc-commands'
|
|
20
|
+
|
|
21
|
+
// Import POMs
|
|
22
|
+
import { DevKeyring } from '../../../../../../../../test/cypress/src/classes/components/auth/DevKeyring.js'
|
|
23
|
+
import { TeamSwitcher } from '../../../../../../../../test/cypress/src/classes/components/teams/TeamSwitcher.js'
|
|
24
|
+
|
|
25
|
+
// ============================================
|
|
26
|
+
// Configuration
|
|
27
|
+
// ============================================
|
|
28
|
+
|
|
29
|
+
const CONFIG = {
|
|
30
|
+
// Speed control (ms between commands) - for ~2min video
|
|
31
|
+
commandDelay: 250,
|
|
32
|
+
|
|
33
|
+
// Narration timing (ms)
|
|
34
|
+
narration: {
|
|
35
|
+
short: 1200, // ~10 words
|
|
36
|
+
medium: 1800, // ~15-20 words
|
|
37
|
+
long: 2400, // ~25+ words
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
// Test users
|
|
41
|
+
users: {
|
|
42
|
+
CARLOS: 'carlos.mendoza@nextspark.dev',
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
// Team slugs
|
|
46
|
+
teams: {
|
|
47
|
+
EVERPOINT: 'everpoint-labs',
|
|
48
|
+
RIVERSTONE: 'riverstone-ventures',
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// Spanish role names (app locale)
|
|
52
|
+
roles: {
|
|
53
|
+
OWNER: 'Propietario',
|
|
54
|
+
MEMBER: 'Miembro',
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ============================================
|
|
59
|
+
// Documentation Test
|
|
60
|
+
// ============================================
|
|
61
|
+
|
|
62
|
+
describe('Tutorial: Sistema de Teams', {
|
|
63
|
+
tags: ['@doc', '@tutorial', '@teams'],
|
|
64
|
+
retries: 0, // No retries for documentation videos
|
|
65
|
+
}, () => {
|
|
66
|
+
let teamSwitcher: TeamSwitcher
|
|
67
|
+
|
|
68
|
+
before(() => {
|
|
69
|
+
// Start documentation mode with slow-down
|
|
70
|
+
cy.startDocMode(CONFIG.commandDelay)
|
|
71
|
+
|
|
72
|
+
cy.log('🎬 ═══════════════════════════════════════')
|
|
73
|
+
cy.log('🎬 **DOCUMENTATION VIDEO RECORDING**')
|
|
74
|
+
cy.log('🎬 Sistema de Teams - Multi-Tenancy')
|
|
75
|
+
cy.log('🎬 ═══════════════════════════════════════')
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
beforeEach(() => {
|
|
79
|
+
teamSwitcher = new TeamSwitcher()
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
after(() => {
|
|
83
|
+
// End documentation mode and save narrations
|
|
84
|
+
cy.endDocMode()
|
|
85
|
+
|
|
86
|
+
cy.log('🎬 ═══════════════════════════════════════')
|
|
87
|
+
cy.log('🎬 **RECORDING COMPLETE**')
|
|
88
|
+
cy.log('🎬 ═══════════════════════════════════════')
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
// ============================================
|
|
92
|
+
// Single test that captures the entire tutorial
|
|
93
|
+
// ============================================
|
|
94
|
+
|
|
95
|
+
it('demuestra el sistema completo de equipos y permisos', () => {
|
|
96
|
+
// ─────────────────────────────────────────
|
|
97
|
+
// CHAPTER 1: Introducción
|
|
98
|
+
// ─────────────────────────────────────────
|
|
99
|
+
cy.chapter('Introducción')
|
|
100
|
+
|
|
101
|
+
cy.narrate(
|
|
102
|
+
'Bienvenido al tutorial del Sistema de Teams. Hoy aprenderás cómo organizar tu trabajo en diferentes espacios.',
|
|
103
|
+
{ pause: CONFIG.narration.long }
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
cy.narrate(
|
|
107
|
+
'Carlos es un usuario con acceso a múltiples equipos. Veamos cómo funciona.',
|
|
108
|
+
{ pause: CONFIG.narration.medium }
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
// Login as Carlos
|
|
112
|
+
cy.visit('/login')
|
|
113
|
+
cy.wait(500, { log: false })
|
|
114
|
+
|
|
115
|
+
const devKeyring = new DevKeyring()
|
|
116
|
+
devKeyring.validateVisible()
|
|
117
|
+
|
|
118
|
+
cy.narrate(
|
|
119
|
+
'Iniciamos sesión con la cuenta de Carlos usando el selector de credenciales de prueba.',
|
|
120
|
+
{ pause: CONFIG.narration.medium }
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
devKeyring.quickLoginByEmail(CONFIG.users.CARLOS)
|
|
124
|
+
cy.url().should('include', '/dashboard')
|
|
125
|
+
cy.pauseForEmphasis(500)
|
|
126
|
+
|
|
127
|
+
// ─────────────────────────────────────────
|
|
128
|
+
// CHAPTER 2: El Selector de Equipos
|
|
129
|
+
// ─────────────────────────────────────────
|
|
130
|
+
cy.chapter('El Selector de Equipos')
|
|
131
|
+
|
|
132
|
+
cy.narrate(
|
|
133
|
+
'En el panel lateral izquierdo encontramos el selector de equipos.',
|
|
134
|
+
{ pause: CONFIG.narration.medium }
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
// Ensure sidebar is expanded
|
|
138
|
+
teamSwitcher.ensureSidebarExpanded()
|
|
139
|
+
cy.pauseForEmphasis(300)
|
|
140
|
+
|
|
141
|
+
// Highlight the team switcher
|
|
142
|
+
cy.highlightElement('[data-cy="team-switcher-compact"]')
|
|
143
|
+
|
|
144
|
+
cy.narrate(
|
|
145
|
+
'Aquí vemos el equipo actual: Everpoint Labs, donde Carlos es propietario.',
|
|
146
|
+
{ pause: CONFIG.narration.medium }
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
// Validate current team
|
|
150
|
+
teamSwitcher.validateCurrentTeamName('Everpoint Labs')
|
|
151
|
+
cy.pauseForEmphasis(300)
|
|
152
|
+
|
|
153
|
+
cy.narrate(
|
|
154
|
+
'Al hacer clic, se despliega una lista con todos los equipos disponibles.',
|
|
155
|
+
{ pause: CONFIG.narration.medium }
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
// Open dropdown
|
|
159
|
+
teamSwitcher.open()
|
|
160
|
+
cy.pauseForEmphasis(700)
|
|
161
|
+
|
|
162
|
+
cy.narrate(
|
|
163
|
+
'Observa que cada equipo muestra el rol del usuario. Carlos es Propietario aquí.',
|
|
164
|
+
{ pause: CONFIG.narration.long }
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
// Highlight Everpoint role
|
|
168
|
+
cy.get(`[data-cy="team-option-${CONFIG.teams.EVERPOINT}"]`).then($el => {
|
|
169
|
+
$el.css({
|
|
170
|
+
outline: '3px solid #22c55e',
|
|
171
|
+
outlineOffset: '2px',
|
|
172
|
+
backgroundColor: 'rgba(34, 197, 94, 0.1)',
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
cy.pauseForEmphasis(1000)
|
|
176
|
+
|
|
177
|
+
cy.narrate(
|
|
178
|
+
'También tiene acceso a Riverstone Ventures, pero aquí es solo Miembro.',
|
|
179
|
+
{ pause: CONFIG.narration.medium }
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
// Reset Everpoint, highlight Riverstone
|
|
183
|
+
cy.get(`[data-cy="team-option-${CONFIG.teams.EVERPOINT}"]`).then($el => {
|
|
184
|
+
$el.css({
|
|
185
|
+
outline: 'none',
|
|
186
|
+
backgroundColor: 'transparent',
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
cy.get(`[data-cy="team-option-${CONFIG.teams.RIVERSTONE}"]`).then($el => {
|
|
191
|
+
$el.css({
|
|
192
|
+
outline: '3px solid #f59e0b',
|
|
193
|
+
outlineOffset: '2px',
|
|
194
|
+
backgroundColor: 'rgba(245, 158, 11, 0.1)',
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
cy.pauseForEmphasis(1000)
|
|
198
|
+
|
|
199
|
+
// Close dropdown
|
|
200
|
+
cy.get('body').type('{esc}')
|
|
201
|
+
cy.pauseForEmphasis(300)
|
|
202
|
+
|
|
203
|
+
// ─────────────────────────────────────────
|
|
204
|
+
// CHAPTER 3: Cambiar de Equipo
|
|
205
|
+
// ─────────────────────────────────────────
|
|
206
|
+
cy.chapter('Cambiar de Equipo')
|
|
207
|
+
|
|
208
|
+
cy.narrate(
|
|
209
|
+
'Vamos a cambiar al equipo Riverstone Ventures para ver cómo cambia el contexto.',
|
|
210
|
+
{ pause: CONFIG.narration.medium }
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
// Start team switch
|
|
214
|
+
teamSwitcher.open()
|
|
215
|
+
cy.get(`[data-cy="team-option-${CONFIG.teams.RIVERSTONE}"]`).click()
|
|
216
|
+
|
|
217
|
+
cy.narrate(
|
|
218
|
+
'El sistema está cargando los datos del nuevo equipo.',
|
|
219
|
+
{ pause: CONFIG.narration.medium }
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
// Wait for page to stabilize after team switch
|
|
223
|
+
cy.url().should('include', '/dashboard')
|
|
224
|
+
cy.pauseForEmphasis(1000)
|
|
225
|
+
|
|
226
|
+
cy.narrate(
|
|
227
|
+
'Perfecto. Ahora estamos en Riverstone Ventures. Observa el cambio en el selector.',
|
|
228
|
+
{ pause: CONFIG.narration.medium }
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
// Highlight the changed team name
|
|
232
|
+
cy.highlightElement('[data-cy="team-switcher-compact"]')
|
|
233
|
+
|
|
234
|
+
teamSwitcher.validateCurrentTeamName('Riverstone Ventures')
|
|
235
|
+
|
|
236
|
+
// ─────────────────────────────────────────
|
|
237
|
+
// CHAPTER 4: Datos Separados por Equipo
|
|
238
|
+
// ─────────────────────────────────────────
|
|
239
|
+
cy.chapter('Datos Separados por Equipo')
|
|
240
|
+
|
|
241
|
+
cy.narrate(
|
|
242
|
+
'Cada equipo tiene sus propios datos completamente aislados.',
|
|
243
|
+
{ pause: CONFIG.narration.medium }
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
cy.narrate(
|
|
247
|
+
'Vamos a la sección de Clientes para comprobarlo.',
|
|
248
|
+
{ pause: CONFIG.narration.short }
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
// Navigate to customers
|
|
252
|
+
cy.visit('/dashboard/customers')
|
|
253
|
+
cy.get('[data-cy="customers-list"]', { timeout: 15000 }).should('exist')
|
|
254
|
+
cy.pauseForEmphasis(700)
|
|
255
|
+
|
|
256
|
+
cy.narrate(
|
|
257
|
+
'Estos son los clientes de Riverstone Ventures. Son independientes de los de Everpoint Labs.',
|
|
258
|
+
{ pause: CONFIG.narration.long }
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
cy.highlightElement('[data-cy="customers-list"]')
|
|
262
|
+
|
|
263
|
+
// ─────────────────────────────────────────
|
|
264
|
+
// CHAPTER 5: Permisos por Equipo
|
|
265
|
+
// ─────────────────────────────────────────
|
|
266
|
+
cy.chapter('Permisos por Equipo')
|
|
267
|
+
|
|
268
|
+
cy.narrate(
|
|
269
|
+
'Ahora viene lo interesante: los permisos cambian según tu rol en cada equipo.',
|
|
270
|
+
{ pause: CONFIG.narration.long }
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
cy.narrate(
|
|
274
|
+
'Como Carlos es Miembro aquí, tiene acceso limitado. Observa la interfaz.',
|
|
275
|
+
{ pause: CONFIG.narration.medium }
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
cy.pauseForEmphasis(700)
|
|
279
|
+
|
|
280
|
+
cy.narrate(
|
|
281
|
+
'No hay botón para crear nuevos clientes. Los miembros solo pueden ver los datos.',
|
|
282
|
+
{ pause: CONFIG.narration.long }
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
// Verify no create button and highlight the area where it would be
|
|
286
|
+
cy.get('[data-cy="customers-add"]').should('not.exist')
|
|
287
|
+
|
|
288
|
+
// Highlight header area
|
|
289
|
+
cy.get('[data-cy="customers-list"]').parent().then($parent => {
|
|
290
|
+
$parent.css({
|
|
291
|
+
outline: '3px dashed #ef4444',
|
|
292
|
+
outlineOffset: '4px',
|
|
293
|
+
})
|
|
294
|
+
})
|
|
295
|
+
cy.pauseForEmphasis(1200)
|
|
296
|
+
|
|
297
|
+
cy.get('[data-cy="customers-list"]').parent().then($parent => {
|
|
298
|
+
$parent.css({ outline: 'none' })
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
cy.narrate(
|
|
302
|
+
'Volvamos a Everpoint Labs donde Carlos es Propietario.',
|
|
303
|
+
{ pause: CONFIG.narration.medium }
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
// Switch back to Everpoint
|
|
307
|
+
teamSwitcher.open()
|
|
308
|
+
cy.get(`[data-cy="team-option-${CONFIG.teams.EVERPOINT}"]`).click()
|
|
309
|
+
cy.url().should('include', '/dashboard')
|
|
310
|
+
cy.pauseForEmphasis(1000)
|
|
311
|
+
|
|
312
|
+
// Navigate to customers
|
|
313
|
+
cy.visit('/dashboard/customers')
|
|
314
|
+
cy.get('[data-cy="customers-list"]', { timeout: 15000 }).should('exist')
|
|
315
|
+
cy.pauseForEmphasis(500)
|
|
316
|
+
|
|
317
|
+
cy.narrate(
|
|
318
|
+
'Aquí sí aparece el botón de crear cliente. Los propietarios tienen control total.',
|
|
319
|
+
{ pause: CONFIG.narration.long }
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
// Highlight the create button
|
|
323
|
+
cy.get('[data-cy="customers-add"]').should('be.visible')
|
|
324
|
+
cy.highlightElement('[data-cy="customers-add"]')
|
|
325
|
+
|
|
326
|
+
// ─────────────────────────────────────────
|
|
327
|
+
// CHAPTER 6: Conclusión
|
|
328
|
+
// ─────────────────────────────────────────
|
|
329
|
+
cy.chapter('Conclusión')
|
|
330
|
+
|
|
331
|
+
cy.narrate(
|
|
332
|
+
'Así funciona el sistema de Teams: cada equipo es un espacio aislado con sus propios datos y permisos.',
|
|
333
|
+
{ pause: CONFIG.narration.long }
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
cy.narrate(
|
|
337
|
+
'Puedes colaborar en múltiples equipos con diferentes roles en cada uno.',
|
|
338
|
+
{ pause: CONFIG.narration.medium }
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
cy.pauseForEmphasis(500)
|
|
342
|
+
|
|
343
|
+
cy.log('🎬 ═══════════════════════════════════════')
|
|
344
|
+
cy.log('🎬 **¡Gracias por ver este tutorial!**')
|
|
345
|
+
cy.log('🎬 ═══════════════════════════════════════')
|
|
346
|
+
|
|
347
|
+
cy.pauseForEmphasis(1000)
|
|
348
|
+
})
|
|
349
|
+
})
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Sistema de Teams - Multi-Tenancy",
|
|
3
|
+
"description": "Tutorial que muestra cómo funciona el sistema de equipos, permitiendo tener diferentes entidades y permisos en diferentes espacios de trabajo.",
|
|
4
|
+
"language": "es",
|
|
5
|
+
"estimatedDuration": "3-4 minutos",
|
|
6
|
+
"targetAudience": "Usuarios nuevos del sistema",
|
|
7
|
+
"chapters": [
|
|
8
|
+
{
|
|
9
|
+
"id": "intro",
|
|
10
|
+
"title": "Introducción",
|
|
11
|
+
"narrations": [
|
|
12
|
+
{
|
|
13
|
+
"step": 1,
|
|
14
|
+
"text": "Bienvenido al tutorial del Sistema de Teams. Hoy aprenderás cómo organizar tu trabajo en diferentes espacios.",
|
|
15
|
+
"action": "none",
|
|
16
|
+
"estimatedSeconds": 5
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"step": 2,
|
|
20
|
+
"text": "Carlos es un usuario con acceso a múltiples equipos. Veamos cómo funciona.",
|
|
21
|
+
"action": "login",
|
|
22
|
+
"estimatedSeconds": 4
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "team-switcher",
|
|
28
|
+
"title": "El Selector de Equipos",
|
|
29
|
+
"narrations": [
|
|
30
|
+
{
|
|
31
|
+
"step": 3,
|
|
32
|
+
"text": "En el panel lateral izquierdo encontramos el selector de equipos. Aquí vemos el equipo actual: Everpoint Labs.",
|
|
33
|
+
"action": "highlight-switcher",
|
|
34
|
+
"estimatedSeconds": 5
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"step": 4,
|
|
38
|
+
"text": "Al hacer clic, se despliega una lista con todos los equipos a los que Carlos tiene acceso.",
|
|
39
|
+
"action": "open-dropdown",
|
|
40
|
+
"estimatedSeconds": 4
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"step": 5,
|
|
44
|
+
"text": "Observa que cada equipo muestra el rol del usuario. Carlos es Propietario en Everpoint Labs.",
|
|
45
|
+
"action": "highlight-role",
|
|
46
|
+
"estimatedSeconds": 5
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"step": 6,
|
|
50
|
+
"text": "También tiene acceso a Riverstone Ventures, pero aquí es solo Miembro.",
|
|
51
|
+
"action": "highlight-other-team",
|
|
52
|
+
"estimatedSeconds": 4
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "switching-teams",
|
|
58
|
+
"title": "Cambiar de Equipo",
|
|
59
|
+
"narrations": [
|
|
60
|
+
{
|
|
61
|
+
"step": 7,
|
|
62
|
+
"text": "Vamos a cambiar al equipo Riverstone Ventures para ver cómo cambia el contexto.",
|
|
63
|
+
"action": "click-riverstone",
|
|
64
|
+
"estimatedSeconds": 3
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"step": 8,
|
|
68
|
+
"text": "Aparece un modal de transición mientras el sistema carga los datos del nuevo equipo.",
|
|
69
|
+
"action": "show-modal",
|
|
70
|
+
"estimatedSeconds": 3
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"step": 9,
|
|
74
|
+
"text": "Perfecto. Ahora estamos en Riverstone Ventures. Observa que el nombre del equipo cambió en el selector.",
|
|
75
|
+
"action": "verify-switch",
|
|
76
|
+
"estimatedSeconds": 4
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "different-data",
|
|
82
|
+
"title": "Datos Separados por Equipo",
|
|
83
|
+
"narrations": [
|
|
84
|
+
{
|
|
85
|
+
"step": 10,
|
|
86
|
+
"text": "Cada equipo tiene sus propios datos. Vamos a la sección de Clientes para comprobarlo.",
|
|
87
|
+
"action": "navigate-customers",
|
|
88
|
+
"estimatedSeconds": 4
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"step": 11,
|
|
92
|
+
"text": "Estos son los clientes de Riverstone Ventures. Son completamente independientes de los de Everpoint Labs.",
|
|
93
|
+
"action": "show-customers-list",
|
|
94
|
+
"estimatedSeconds": 5
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "permissions",
|
|
100
|
+
"title": "Permisos por Equipo",
|
|
101
|
+
"narrations": [
|
|
102
|
+
{
|
|
103
|
+
"step": 12,
|
|
104
|
+
"text": "Ahora viene lo interesante: los permisos. Como Carlos es Miembro aquí, tiene acceso limitado.",
|
|
105
|
+
"action": "highlight-permissions",
|
|
106
|
+
"estimatedSeconds": 5
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"step": 13,
|
|
110
|
+
"text": "Observa que NO hay botón para crear nuevos clientes. Los miembros solo pueden ver los datos.",
|
|
111
|
+
"action": "show-no-create-button",
|
|
112
|
+
"estimatedSeconds": 5
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"step": 14,
|
|
116
|
+
"text": "Volvamos a Everpoint Labs donde Carlos es Propietario.",
|
|
117
|
+
"action": "switch-back",
|
|
118
|
+
"estimatedSeconds": 3
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"step": 15,
|
|
122
|
+
"text": "Aquí sí aparece el botón de crear cliente. Los propietarios tienen control total.",
|
|
123
|
+
"action": "show-create-button",
|
|
124
|
+
"estimatedSeconds": 4
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "conclusion",
|
|
130
|
+
"title": "Conclusión",
|
|
131
|
+
"narrations": [
|
|
132
|
+
{
|
|
133
|
+
"step": 16,
|
|
134
|
+
"text": "Así funciona el sistema de Teams: cada equipo es un espacio aislado con sus propios datos y permisos.",
|
|
135
|
+
"action": "none",
|
|
136
|
+
"estimatedSeconds": 5
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"step": 17,
|
|
140
|
+
"text": "Puedes colaborar en múltiples equipos con diferentes roles en cada uno. ¡Gracias por ver este tutorial!",
|
|
141
|
+
"action": "none",
|
|
142
|
+
"estimatedSeconds": 5
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"totalSteps": 17,
|
|
148
|
+
"technicalNotes": {
|
|
149
|
+
"users": {
|
|
150
|
+
"carlos": "carlos.mendoza@nextspark.dev",
|
|
151
|
+
"role_everpoint": "owner",
|
|
152
|
+
"role_riverstone": "member"
|
|
153
|
+
},
|
|
154
|
+
"teams": {
|
|
155
|
+
"everpoint": "everpoint-labs",
|
|
156
|
+
"riverstone": "riverstone-ventures"
|
|
157
|
+
},
|
|
158
|
+
"selectors": {
|
|
159
|
+
"teamSwitcher": "[data-cy='team-switcher-compact']",
|
|
160
|
+
"teamDropdown": "[data-cy='team-switcher-dropdown']",
|
|
161
|
+
"customersAdd": "[data-cy='customers-add']",
|
|
162
|
+
"customersList": "[data-cy='customers-list']"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|