@nextsparkjs/theme-default 0.1.0-beta.20 → 0.1.0-beta.22
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/support/e2e.ts +89 -0
- package/tests/cypress.config.ts +165 -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,412 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Billing API - Business Plan Tests
|
|
6
|
+
*
|
|
7
|
+
* BDD: Feature: Business Plan Features
|
|
8
|
+
* As a user with a Business plan
|
|
9
|
+
* I want to access enterprise-grade features
|
|
10
|
+
* So that I can run my large organization
|
|
11
|
+
*
|
|
12
|
+
* Tests for:
|
|
13
|
+
* - SSO access
|
|
14
|
+
* - Audit logs access
|
|
15
|
+
* - Customer import access
|
|
16
|
+
* - Recurring tasks access
|
|
17
|
+
* - All Pro features included
|
|
18
|
+
* - Limits (50 members, 5000 tasks, 2000 customers, 50 webhooks)
|
|
19
|
+
*
|
|
20
|
+
* Session: 2025-12-20-subscriptions-system-v2
|
|
21
|
+
* Phase: 9 (api-tester)
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This test validates Business plan configuration and compares
|
|
24
|
+
* against Enterprise plan (team-ironvale-002).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import * as allure from 'allure-cypress'
|
|
28
|
+
|
|
29
|
+
const BillingAPIController = require('../BillingAPIController.js')
|
|
30
|
+
import billingPlans from './fixtures/billing-plans.json'
|
|
31
|
+
|
|
32
|
+
describe('Billing API - Business Plan Features', () => {
|
|
33
|
+
let billingAPI: any
|
|
34
|
+
|
|
35
|
+
// Test data from fixtures
|
|
36
|
+
const BUSINESS_PLAN = billingPlans.plans.business
|
|
37
|
+
const PRO_PLAN = billingPlans.plans.pro
|
|
38
|
+
const ENTERPRISE_TEAM = billingPlans.testTeams.enterprise
|
|
39
|
+
const SUPERADMIN = billingPlans.testCredentials.superadmin
|
|
40
|
+
const BASE_URL = Cypress.config('baseUrl') || 'http://localhost:5173'
|
|
41
|
+
|
|
42
|
+
before(() => {
|
|
43
|
+
// Use Enterprise team to test "all features" scenario
|
|
44
|
+
billingAPI = new BillingAPIController(BASE_URL, SUPERADMIN.apiKey, ENTERPRISE_TEAM.teamId)
|
|
45
|
+
cy.log('BillingAPIController initialized for Business Plan tests')
|
|
46
|
+
cy.log(`Using Enterprise team to validate all-features access: ${ENTERPRISE_TEAM.description}`)
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
beforeEach(() => {
|
|
50
|
+
allure.epic('Billing')
|
|
51
|
+
allure.feature('Business Plan')
|
|
52
|
+
allure.owner('qa-automation')
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// ============================================================
|
|
56
|
+
// TEST GROUP 1: Plan Configuration Validation
|
|
57
|
+
// ============================================================
|
|
58
|
+
describe('Plan Configuration', () => {
|
|
59
|
+
it('BUSINESS_001: Business plan should have all expected features', () => {
|
|
60
|
+
allure.story('Feature List')
|
|
61
|
+
allure.severity('critical')
|
|
62
|
+
allure.description(`
|
|
63
|
+
Scenario: Business plan has expected features
|
|
64
|
+
Given the Business plan configuration
|
|
65
|
+
Then it should include: sso, audit_logs, customer_import, recurring_tasks
|
|
66
|
+
And all Pro features
|
|
67
|
+
`)
|
|
68
|
+
|
|
69
|
+
// Business-exclusive features
|
|
70
|
+
const businessExclusiveFeatures = ['sso', 'audit_logs', 'customer_import', 'recurring_tasks']
|
|
71
|
+
businessExclusiveFeatures.forEach((feature) => {
|
|
72
|
+
expect(BUSINESS_PLAN.features).to.include(feature)
|
|
73
|
+
cy.log(`Business plan includes: ${feature}`)
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
// All Pro features should be included
|
|
77
|
+
PRO_PLAN.features.forEach((feature: string) => {
|
|
78
|
+
expect(BUSINESS_PLAN.features).to.include(feature)
|
|
79
|
+
cy.log(`Pro feature "${feature}" is in Business: YES`)
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it('BUSINESS_002: Business plan should have correct limits', () => {
|
|
84
|
+
allure.story('Limits Configuration')
|
|
85
|
+
allure.severity('critical')
|
|
86
|
+
allure.description(`
|
|
87
|
+
Scenario: Business plan has expected limits
|
|
88
|
+
Given the Business plan configuration
|
|
89
|
+
Then the limits should match expected values
|
|
90
|
+
`)
|
|
91
|
+
|
|
92
|
+
expect(BUSINESS_PLAN.limits.team_members).to.eq(50)
|
|
93
|
+
expect(BUSINESS_PLAN.limits.tasks).to.eq(5000)
|
|
94
|
+
expect(BUSINESS_PLAN.limits.customers).to.eq(2000)
|
|
95
|
+
expect(BUSINESS_PLAN.limits.webhooks_count).to.eq(50)
|
|
96
|
+
expect(BUSINESS_PLAN.limits.api_calls).to.eq(500000)
|
|
97
|
+
expect(BUSINESS_PLAN.limits.storage_gb).to.eq(200)
|
|
98
|
+
|
|
99
|
+
cy.log('Business plan limits:')
|
|
100
|
+
cy.log(` team_members: ${BUSINESS_PLAN.limits.team_members}`)
|
|
101
|
+
cy.log(` tasks: ${BUSINESS_PLAN.limits.tasks}`)
|
|
102
|
+
cy.log(` customers: ${BUSINESS_PLAN.limits.customers}`)
|
|
103
|
+
cy.log(` webhooks_count: ${BUSINESS_PLAN.limits.webhooks_count}`)
|
|
104
|
+
cy.log(` api_calls: ${BUSINESS_PLAN.limits.api_calls}`)
|
|
105
|
+
cy.log(` storage_gb: ${BUSINESS_PLAN.limits.storage_gb}`)
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
it('BUSINESS_003: Business plan pricing should be correct', () => {
|
|
109
|
+
allure.story('Pricing')
|
|
110
|
+
allure.severity('normal')
|
|
111
|
+
allure.description(`
|
|
112
|
+
Scenario: Business plan pricing is $79/month
|
|
113
|
+
Given the Business plan configuration
|
|
114
|
+
Then the monthly price should be 7900 (cents)
|
|
115
|
+
And the yearly price should be 79000 (cents)
|
|
116
|
+
`)
|
|
117
|
+
|
|
118
|
+
expect(BUSINESS_PLAN.priceMonthly).to.eq(7900)
|
|
119
|
+
expect(BUSINESS_PLAN.priceYearly).to.eq(79000)
|
|
120
|
+
|
|
121
|
+
cy.log(`Business plan pricing:`)
|
|
122
|
+
cy.log(` Monthly: $${BUSINESS_PLAN.priceMonthly / 100}`)
|
|
123
|
+
cy.log(` Yearly: $${BUSINESS_PLAN.priceYearly / 100}`)
|
|
124
|
+
})
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// ============================================================
|
|
128
|
+
// TEST GROUP 2: Business-Exclusive Features (via Enterprise)
|
|
129
|
+
// ============================================================
|
|
130
|
+
describe('Business-Exclusive Features (via Enterprise)', () => {
|
|
131
|
+
it('BUSINESS_010: Should allow SSO configuration', () => {
|
|
132
|
+
allure.story('Security Features')
|
|
133
|
+
allure.severity('critical')
|
|
134
|
+
allure.description(`
|
|
135
|
+
Scenario: Business plan includes SSO
|
|
136
|
+
When I check action "auth.configure_sso"
|
|
137
|
+
Then the action should be allowed
|
|
138
|
+
(Tested via Enterprise team which has all features)
|
|
139
|
+
`)
|
|
140
|
+
|
|
141
|
+
billingAPI.checkAction('auth.configure_sso').then((response: any) => {
|
|
142
|
+
billingAPI.validateActionAllowed(response)
|
|
143
|
+
|
|
144
|
+
cy.log('SSO allowed for Enterprise (includes all Business features)')
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
it('BUSINESS_011: Should allow audit logs access', () => {
|
|
149
|
+
allure.story('Security Features')
|
|
150
|
+
allure.severity('critical')
|
|
151
|
+
allure.description(`
|
|
152
|
+
Scenario: Business plan includes audit logs
|
|
153
|
+
When I check action "security.view_audit_logs"
|
|
154
|
+
Then the action should be allowed
|
|
155
|
+
`)
|
|
156
|
+
|
|
157
|
+
billingAPI.checkAction('security.view_audit_logs').then((response: any) => {
|
|
158
|
+
billingAPI.validateActionAllowed(response)
|
|
159
|
+
|
|
160
|
+
cy.log('Audit logs allowed for Enterprise')
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
it('BUSINESS_012: Should allow customer import', () => {
|
|
165
|
+
allure.story('Domain Features')
|
|
166
|
+
allure.severity('critical')
|
|
167
|
+
allure.description(`
|
|
168
|
+
Scenario: Business plan includes customer import
|
|
169
|
+
When I check action "customers.bulk_import"
|
|
170
|
+
Then the action should be allowed
|
|
171
|
+
`)
|
|
172
|
+
|
|
173
|
+
billingAPI.checkAction('customers.bulk_import').then((response: any) => {
|
|
174
|
+
billingAPI.validateActionAllowed(response)
|
|
175
|
+
|
|
176
|
+
cy.log('Customer import allowed for Enterprise')
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
it('BUSINESS_013: Should allow recurring tasks', () => {
|
|
181
|
+
allure.story('Domain Features')
|
|
182
|
+
allure.severity('critical')
|
|
183
|
+
allure.description(`
|
|
184
|
+
Scenario: Business plan includes recurring tasks
|
|
185
|
+
When I check action "tasks.create_recurring"
|
|
186
|
+
Then the action should be allowed
|
|
187
|
+
`)
|
|
188
|
+
|
|
189
|
+
billingAPI.checkAction('tasks.create_recurring').then((response: any) => {
|
|
190
|
+
billingAPI.validateActionAllowed(response)
|
|
191
|
+
|
|
192
|
+
cy.log('Recurring tasks allowed for Enterprise')
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
// ============================================================
|
|
198
|
+
// TEST GROUP 3: All Pro Features Included
|
|
199
|
+
// ============================================================
|
|
200
|
+
describe('Pro Features (inherited)', () => {
|
|
201
|
+
it('BUSINESS_020: Should allow all Pro features', () => {
|
|
202
|
+
allure.story('Inherited Features')
|
|
203
|
+
allure.severity('critical')
|
|
204
|
+
allure.description(`
|
|
205
|
+
Scenario: Business plan includes all Pro features
|
|
206
|
+
When I check Pro-level actions
|
|
207
|
+
Then all should be allowed
|
|
208
|
+
`)
|
|
209
|
+
|
|
210
|
+
const proActions = [
|
|
211
|
+
'analytics.view_advanced',
|
|
212
|
+
'analytics.view_realtime',
|
|
213
|
+
'branding.customize',
|
|
214
|
+
'tasks.automate',
|
|
215
|
+
'support.priority_access',
|
|
216
|
+
'api.generate_key',
|
|
217
|
+
'team.invite_guest'
|
|
218
|
+
]
|
|
219
|
+
|
|
220
|
+
proActions.forEach((action) => {
|
|
221
|
+
billingAPI.checkAction(action).then((response: any) => {
|
|
222
|
+
billingAPI.validateActionAllowed(response)
|
|
223
|
+
cy.log(`${action}: ALLOWED`)
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
})
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
// ============================================================
|
|
230
|
+
// TEST GROUP 4: Limits Comparison
|
|
231
|
+
// ============================================================
|
|
232
|
+
describe('Limits Comparison', () => {
|
|
233
|
+
it('BUSINESS_030: Business limits should be greater than Pro', () => {
|
|
234
|
+
allure.story('Limits Comparison')
|
|
235
|
+
allure.severity('normal')
|
|
236
|
+
allure.description(`
|
|
237
|
+
Scenario: Business limits exceed Pro limits
|
|
238
|
+
Given the Pro and Business plan configurations
|
|
239
|
+
Then Business limits should be > Pro limits
|
|
240
|
+
`)
|
|
241
|
+
|
|
242
|
+
const limits = ['team_members', 'tasks', 'customers', 'webhooks_count', 'api_calls', 'storage_gb']
|
|
243
|
+
|
|
244
|
+
limits.forEach((limit) => {
|
|
245
|
+
expect(BUSINESS_PLAN.limits[limit]).to.be.greaterThan(PRO_PLAN.limits[limit])
|
|
246
|
+
cy.log(`${limit}: Pro=${PRO_PLAN.limits[limit]}, Business=${BUSINESS_PLAN.limits[limit]}`)
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
it('BUSINESS_031: Business plan has significant limit increases', () => {
|
|
251
|
+
allure.story('Limits Scaling')
|
|
252
|
+
allure.severity('normal')
|
|
253
|
+
allure.description(`
|
|
254
|
+
Scenario: Business limits are significantly higher
|
|
255
|
+
Given the Pro and Business plan limits
|
|
256
|
+
Then Business should have at least 3x more capacity for key limits
|
|
257
|
+
`)
|
|
258
|
+
|
|
259
|
+
// Key limits should be at least 3x higher
|
|
260
|
+
expect(BUSINESS_PLAN.limits.team_members / PRO_PLAN.limits.team_members).to.be.gte(3)
|
|
261
|
+
expect(BUSINESS_PLAN.limits.tasks / PRO_PLAN.limits.tasks).to.be.gte(5)
|
|
262
|
+
expect(BUSINESS_PLAN.limits.customers / PRO_PLAN.limits.customers).to.be.gte(4)
|
|
263
|
+
expect(BUSINESS_PLAN.limits.webhooks_count / PRO_PLAN.limits.webhooks_count).to.be.gte(5)
|
|
264
|
+
|
|
265
|
+
cy.log('Business plan multipliers vs Pro:')
|
|
266
|
+
cy.log(` team_members: ${BUSINESS_PLAN.limits.team_members / PRO_PLAN.limits.team_members}x`)
|
|
267
|
+
cy.log(` tasks: ${BUSINESS_PLAN.limits.tasks / PRO_PLAN.limits.tasks}x`)
|
|
268
|
+
cy.log(` customers: ${BUSINESS_PLAN.limits.customers / PRO_PLAN.limits.customers}x`)
|
|
269
|
+
cy.log(` webhooks: ${BUSINESS_PLAN.limits.webhooks_count / PRO_PLAN.limits.webhooks_count}x`)
|
|
270
|
+
})
|
|
271
|
+
})
|
|
272
|
+
|
|
273
|
+
// ============================================================
|
|
274
|
+
// TEST GROUP 5: Enterprise Subscription Verification
|
|
275
|
+
// ============================================================
|
|
276
|
+
describe('Enterprise Subscription (for validation)', () => {
|
|
277
|
+
it('BUSINESS_040: Enterprise subscription should be active', () => {
|
|
278
|
+
allure.story('Subscription Status')
|
|
279
|
+
allure.severity('critical')
|
|
280
|
+
allure.description(`
|
|
281
|
+
Scenario: Enterprise subscription is active
|
|
282
|
+
Given I have an Enterprise team
|
|
283
|
+
Then the subscription should be active
|
|
284
|
+
And the plan should be enterprise
|
|
285
|
+
`)
|
|
286
|
+
|
|
287
|
+
billingAPI.getSubscription(ENTERPRISE_TEAM.teamId).then((response: any) => {
|
|
288
|
+
billingAPI.validateSubscriptionResponse(response, {
|
|
289
|
+
status: 'active',
|
|
290
|
+
planSlug: 'enterprise'
|
|
291
|
+
})
|
|
292
|
+
|
|
293
|
+
cy.log('Enterprise subscription verified')
|
|
294
|
+
cy.log(`Plan: ${response.body.data.subscription.plan.name}`)
|
|
295
|
+
})
|
|
296
|
+
})
|
|
297
|
+
|
|
298
|
+
it('BUSINESS_041: Enterprise should have unlimited limits', () => {
|
|
299
|
+
allure.story('Unlimited Limits')
|
|
300
|
+
allure.severity('critical')
|
|
301
|
+
allure.description(`
|
|
302
|
+
Scenario: Enterprise has unlimited limits (-1)
|
|
303
|
+
Given the Enterprise plan configuration
|
|
304
|
+
Then all limits should be -1 (unlimited)
|
|
305
|
+
`)
|
|
306
|
+
|
|
307
|
+
const ENTERPRISE_PLAN = billingPlans.plans.enterprise
|
|
308
|
+
|
|
309
|
+
Object.entries(ENTERPRISE_PLAN.limits).forEach(([key, value]) => {
|
|
310
|
+
expect(value).to.eq(-1)
|
|
311
|
+
cy.log(`${key}: unlimited (-1)`)
|
|
312
|
+
})
|
|
313
|
+
})
|
|
314
|
+
|
|
315
|
+
it('BUSINESS_042: Enterprise should have wildcard features', () => {
|
|
316
|
+
allure.story('Wildcard Features')
|
|
317
|
+
allure.severity('critical')
|
|
318
|
+
allure.description(`
|
|
319
|
+
Scenario: Enterprise has wildcard (*) for all features
|
|
320
|
+
Given the Enterprise plan configuration
|
|
321
|
+
Then features should include "*"
|
|
322
|
+
`)
|
|
323
|
+
|
|
324
|
+
const ENTERPRISE_PLAN = billingPlans.plans.enterprise
|
|
325
|
+
|
|
326
|
+
expect(ENTERPRISE_PLAN.features).to.include('*')
|
|
327
|
+
cy.log('Enterprise has wildcard (*) feature access')
|
|
328
|
+
})
|
|
329
|
+
})
|
|
330
|
+
|
|
331
|
+
// ============================================================
|
|
332
|
+
// TEST GROUP 6: Integration Tests
|
|
333
|
+
// ============================================================
|
|
334
|
+
describe('Integration', () => {
|
|
335
|
+
it('BUSINESS_100: Business plan configuration is complete and valid', () => {
|
|
336
|
+
allure.story('Complete Validation')
|
|
337
|
+
allure.severity('critical')
|
|
338
|
+
allure.description(`
|
|
339
|
+
Integration test that validates Business plan configuration:
|
|
340
|
+
- Has all required properties
|
|
341
|
+
- All Pro features are included
|
|
342
|
+
- Business-exclusive features are included
|
|
343
|
+
- Limits are greater than Pro
|
|
344
|
+
- Pricing is set correctly
|
|
345
|
+
`)
|
|
346
|
+
|
|
347
|
+
// 1. Required properties
|
|
348
|
+
expect(BUSINESS_PLAN).to.have.property('slug', 'business')
|
|
349
|
+
expect(BUSINESS_PLAN).to.have.property('name', 'Business')
|
|
350
|
+
expect(BUSINESS_PLAN).to.have.property('features')
|
|
351
|
+
expect(BUSINESS_PLAN).to.have.property('limits')
|
|
352
|
+
cy.log('1. Required properties verified')
|
|
353
|
+
|
|
354
|
+
// 2. All Pro features included
|
|
355
|
+
const missingProFeatures = PRO_PLAN.features.filter(
|
|
356
|
+
(f: string) => !BUSINESS_PLAN.features.includes(f)
|
|
357
|
+
)
|
|
358
|
+
expect(missingProFeatures.length).to.eq(0)
|
|
359
|
+
cy.log(`2. All ${PRO_PLAN.features.length} Pro features are included`)
|
|
360
|
+
|
|
361
|
+
// 3. Business-exclusive features
|
|
362
|
+
const businessExclusive = ['sso', 'audit_logs', 'customer_import', 'recurring_tasks']
|
|
363
|
+
businessExclusive.forEach((feature) => {
|
|
364
|
+
expect(BUSINESS_PLAN.features).to.include(feature)
|
|
365
|
+
})
|
|
366
|
+
cy.log(`3. Business-exclusive features verified: ${businessExclusive.join(', ')}`)
|
|
367
|
+
|
|
368
|
+
// 4. All limits are greater than Pro
|
|
369
|
+
Object.keys(PRO_PLAN.limits).forEach((key) => {
|
|
370
|
+
expect(BUSINESS_PLAN.limits[key]).to.be.greaterThan(PRO_PLAN.limits[key])
|
|
371
|
+
})
|
|
372
|
+
cy.log('4. All limits are greater than Pro')
|
|
373
|
+
|
|
374
|
+
// 5. Pricing
|
|
375
|
+
expect(BUSINESS_PLAN.priceMonthly).to.be.greaterThan(PRO_PLAN.priceMonthly)
|
|
376
|
+
cy.log(`5. Pricing verified: $${BUSINESS_PLAN.priceMonthly / 100}/mo`)
|
|
377
|
+
|
|
378
|
+
cy.log('Business plan configuration is complete and valid')
|
|
379
|
+
})
|
|
380
|
+
|
|
381
|
+
it('BUSINESS_101: All Business features are accessible via Enterprise', () => {
|
|
382
|
+
allure.story('Feature Access')
|
|
383
|
+
allure.severity('critical')
|
|
384
|
+
allure.description(`
|
|
385
|
+
Scenario: All Business features work via Enterprise team
|
|
386
|
+
Given an Enterprise team (with wildcard features)
|
|
387
|
+
Then all Business-level actions should be allowed
|
|
388
|
+
`)
|
|
389
|
+
|
|
390
|
+
// All Business features should be accessible
|
|
391
|
+
const businessActions = [
|
|
392
|
+
'auth.configure_sso',
|
|
393
|
+
'security.view_audit_logs',
|
|
394
|
+
'customers.bulk_import',
|
|
395
|
+
'tasks.create_recurring',
|
|
396
|
+
'analytics.view_advanced',
|
|
397
|
+
'analytics.view_realtime',
|
|
398
|
+
'branding.customize',
|
|
399
|
+
'tasks.automate'
|
|
400
|
+
]
|
|
401
|
+
|
|
402
|
+
businessActions.forEach((action) => {
|
|
403
|
+
billingAPI.checkAction(action).then((response: any) => {
|
|
404
|
+
billingAPI.validateActionAllowed(response)
|
|
405
|
+
cy.log(`${action}: ALLOWED via Enterprise`)
|
|
406
|
+
})
|
|
407
|
+
})
|
|
408
|
+
|
|
409
|
+
cy.log('All Business features verified accessible via Enterprise')
|
|
410
|
+
})
|
|
411
|
+
})
|
|
412
|
+
})
|