@nextsparkjs/theme-default 0.1.0-beta.30 → 0.1.0-beta.35
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/lib/selectors.ts +5 -1
- package/package.json +2 -2
- package/tests/cypress/e2e/{_devtools → _utils/devtools}/access.cy.ts +3 -3
- package/tests/cypress/e2e/{_devtools → _utils/devtools}/navigation.cy.ts +3 -3
- package/tests/cypress/e2e/{_devtools → _utils/devtools}/pages.cy.ts +3 -3
- package/tests/cypress/e2e/_utils/selectors/auth.bdd.md +354 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/auth.cy.ts +39 -35
- package/tests/cypress/e2e/_utils/selectors/billing.bdd.md +276 -0
- package/tests/cypress/e2e/_utils/selectors/billing.cy.ts +182 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-mobile.bdd.md +205 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-mobile.cy.ts +137 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-navigation.bdd.md +147 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-navigation.cy.ts +114 -0
- package/tests/cypress/e2e/_utils/selectors/dashboard-sidebar.bdd.md +111 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/dashboard-sidebar.cy.ts +35 -6
- package/tests/cypress/e2e/_utils/selectors/dashboard-topnav.bdd.md +200 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/dashboard-topnav.cy.ts +30 -43
- package/tests/cypress/e2e/_utils/selectors/devtools.bdd.md +306 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/devtools.cy.ts +77 -14
- package/tests/cypress/e2e/_utils/selectors/global-search.bdd.md +115 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/global-search.cy.ts +15 -10
- package/tests/cypress/e2e/_utils/selectors/pages-editor.bdd.md +207 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/pages-editor.cy.ts +44 -12
- package/tests/cypress/e2e/_utils/selectors/posts-editor.bdd.md +184 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/posts-editor.cy.ts +107 -39
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/public.cy.ts +1 -1
- package/tests/cypress/e2e/_utils/selectors/settings-api-keys.bdd.md +266 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/settings-api-keys.cy.ts +30 -25
- package/tests/cypress/e2e/_utils/selectors/settings-billing.bdd.md +78 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/settings-billing.cy.ts +10 -7
- package/tests/cypress/e2e/_utils/selectors/settings-layout.bdd.md +138 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/settings-layout.cy.ts +12 -8
- package/tests/cypress/e2e/_utils/selectors/settings-password.bdd.md +82 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/settings-password.cy.ts +10 -7
- package/tests/cypress/e2e/_utils/selectors/settings-profile.bdd.md +77 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/settings-profile.cy.ts +15 -18
- package/tests/cypress/e2e/_utils/selectors/settings-teams.bdd.md +130 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/settings-teams.cy.ts +36 -18
- package/tests/cypress/e2e/_utils/selectors/superadmin.bdd.md +261 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/superadmin.cy.ts +23 -15
- package/tests/cypress/e2e/_utils/selectors/tasks.bdd.md +353 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/tasks.cy.ts +11 -10
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/taxonomies.cy.ts +1 -1
- package/tests/cypress/e2e/_utils/selectors/teams.bdd.md +278 -0
- package/tests/cypress/e2e/{_selectors → _utils/selectors}/teams.cy.ts +90 -37
- package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/all-teams.cy.ts +4 -4
- package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/all-users.cy.ts +4 -4
- package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/dashboard.cy.ts +4 -4
- package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/subscriptions-overview.cy.ts +4 -4
- package/tests/cypress/e2e/api/{entities → _core/users}/users-security.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{auth → _core/auth}/login-logout.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{auth → _core/auth}/password-reset.cy.ts +1 -1
- package/tests/cypress/e2e/uat/{billing → _core/billing}/extended.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{billing → _core/billing}/feature-gates.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{billing → _core/billing}/page.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{billing → _core/billing}/status.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{billing → _core/billing}/team-switch.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{billing → _core/billing}/usage.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{devtools → _core/devtools}/api-tester.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{scheduled-actions → _core/scheduled-actions}/devtools-ui.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{teams → _core/teams}/roles-matrix.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{teams → _core/teams}/switcher.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{roles → features/roles}/editor-role.cy.ts +2 -2
- package/tests/cypress/e2e/uat/{roles → features/roles}/member-restrictions.cy.ts +3 -3
- package/tests/cypress/e2e/uat/{roles → features/roles}/owner-full-crud.cy.ts +2 -2
- package/tests/cypress/src/core/DashboardEntityPOM.ts +2 -2
- package/tests/cypress/src/features/DashboardPOM.ts +2 -2
- package/tests/cypress/src/features/DevtoolsPOM.ts +12 -1
- package/tests/cypress/src/session-helpers.ts +35 -17
- package/tests/cypress/support/e2e.ts +2 -1
- package/tests/cypress.config.ts +29 -10
- package/tests/tsconfig.json +13 -7
- package/tests/cypress/e2e/_selectors/billing.cy.ts +0 -89
- package/tests/cypress/e2e/_selectors/dashboard-mobile.cy.ts +0 -113
- package/tests/cypress/e2e/_selectors/dashboard-navigation.cy.ts +0 -89
- /package/tests/cypress/e2e/{_devtools → _utils/devtools}/access.bdd.md +0 -0
- /package/tests/cypress/e2e/{_devtools → _utils/devtools}/navigation.bdd.md +0 -0
- /package/tests/cypress/e2e/{_devtools → _utils/devtools}/pages.bdd.md +0 -0
- /package/tests/cypress/e2e/{_docs → _utils/docs}/README.md +0 -0
- /package/tests/cypress/e2e/{_docs → _utils/docs}/tutorials/sector7-superadmin-teams.narration.json +0 -0
- /package/tests/cypress/e2e/{_docs → _utils/docs}/tutorials/sector7-superadmin.cy.ts +0 -0
- /package/tests/cypress/e2e/{_docs → _utils/docs}/tutorials/teams-system.doc.cy.ts +0 -0
- /package/tests/cypress/e2e/{_docs → _utils/docs}/tutorials/teams-system.narration.json +0 -0
- /package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/all-teams.bdd.md +0 -0
- /package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/all-users.bdd.md +0 -0
- /package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/dashboard.bdd.md +0 -0
- /package/tests/cypress/e2e/{_superadmin → _utils/superadmin}/subscriptions-overview.bdd.md +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/BillingAPIController.js +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/check-action.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/checkout.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/lifecycle.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/README.md +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/business.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/downgrade.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/fixtures/billing-plans.json +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/free.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/pro.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/plans/starter.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{billing → _core/billing}/portal.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{devtools → _core/devtools}/registries.bdd.md +0 -0
- /package/tests/cypress/e2e/api/{devtools → _core/devtools}/registries.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{scheduled-actions → _core/scheduled-actions}/cron-endpoint.bdd.md +0 -0
- /package/tests/cypress/e2e/api/{scheduled-actions → _core/scheduled-actions}/cron-endpoint.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{scheduled-actions → _core/scheduled-actions}/devtools-endpoint.bdd.md +0 -0
- /package/tests/cypress/e2e/api/{scheduled-actions → _core/scheduled-actions}/devtools-endpoint.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{scheduled-actions → _core/scheduled-actions}/scheduling.bdd.md +0 -0
- /package/tests/cypress/e2e/api/{scheduled-actions → _core/scheduled-actions}/scheduling.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{settings → _core/settings}/api-keys.crud.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{entities → _core/users}/users-crud.cy.ts +0 -0
- /package/tests/cypress/e2e/api/{entities → _core/users}/users-metas.cy.ts +0 -0
- /package/tests/cypress/e2e/api/entities/{customers-crud.cy.ts → customers/customers-crud.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{customers-metas.cy.ts → customers/customers-metas.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{blocks-scope.cy.ts → pages/blocks-scope.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{pages-crud.cy.ts → pages/pages-crud.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{pages-status.cy.ts → pages/pages-status.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{post-categories-crud.cy.ts → posts/post-categories-crud.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{posts-crud.cy.ts → posts/posts-crud.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{posts-status.cy.ts → posts/posts-status.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{tasks-crud.cy.ts → tasks/tasks-crud.cy.ts} +0 -0
- /package/tests/cypress/e2e/api/entities/{tasks-metas.cy.ts → tasks/tasks-metas.cy.ts} +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/app-roles/developer-login.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/app-roles/developer-login.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/app-roles/superadmin-login.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/app-roles/superadmin-login.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/custom-roles/editor-login.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/custom-roles/editor-login.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/login-logout.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/password-reset.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/team-roles/admin-login.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/team-roles/admin-login.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/team-roles/member-login.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/team-roles/member-login.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/team-roles/owner-login.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{auth → _core/auth}/team-roles/owner-login.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{billing → _core/billing}/extended.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{billing → _core/billing}/feature-gates.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{billing → _core/billing}/page.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{billing → _core/billing}/status.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{billing → _core/billing}/team-switch.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{billing → _core/billing}/usage.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{blocks → _core/blocks}/hero.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{blocks → _core/blocks}/hero.cy.ts +0 -0
- /package/tests/cypress/e2e/uat/{scheduled-actions → _core/scheduled-actions}/devtools-ui.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{teams → _core/teams}/roles-matrix.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{teams → _core/teams}/switcher.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{teams → _core/teams}/team-switcher.md +0 -0
- /package/tests/cypress/e2e/uat/{roles → features/roles}/editor-role.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{roles → features/roles}/member-restrictions.bdd.md +0 -0
- /package/tests/cypress/e2e/uat/{roles → features/roles}/owner-full-crud.bdd.md +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="cypress" />
|
|
2
2
|
|
|
3
3
|
import * as allure from 'allure-cypress'
|
|
4
|
-
import { BillingPOM } from '
|
|
4
|
+
import { BillingPOM } from '../../../../src/features/BillingPOM'
|
|
5
5
|
import {
|
|
6
6
|
loginAsFreePlanUser,
|
|
7
7
|
loginAsProPlanUser,
|
|
8
8
|
loginAsEnterprisePlanUser
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../../../src/session-helpers'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Billing Usage Limits UAT Tests
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* Workflow Phase: 15 (qa-automation)
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { DevtoolsPOM } from '
|
|
22
|
-
import { loginAsDefaultDeveloper } from '
|
|
21
|
+
import { DevtoolsPOM } from '../../../../src/features/DevtoolsPOM'
|
|
22
|
+
import { loginAsDefaultDeveloper } from '../../../../src/session-helpers'
|
|
23
23
|
|
|
24
24
|
describe('DevTools API Tester UAT', () => {
|
|
25
25
|
const devtools = DevtoolsPOM.create()
|
package/tests/cypress/e2e/uat/{scheduled-actions → _core/scheduled-actions}/devtools-ui.cy.ts
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="cypress" />
|
|
2
2
|
|
|
3
3
|
import * as allure from 'allure-cypress'
|
|
4
|
-
import { ScheduledActionsPOM } from '
|
|
5
|
-
import { loginAsDeveloper } from '
|
|
4
|
+
import { ScheduledActionsPOM } from '../../../../src/features/ScheduledActionsPOM'
|
|
5
|
+
import { loginAsDeveloper } from '../../../../src/session-helpers'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Scheduled Actions DevTools UI - UAT Tests
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
import * as allure from 'allure-cypress'
|
|
17
17
|
|
|
18
|
-
import { SuperadminTeamRolesPOM } from '
|
|
19
|
-
import { loginAsDefaultSuperadmin } from '
|
|
18
|
+
import { SuperadminTeamRolesPOM } from '../../../../src/features/SuperadminTeamRolesPOM'
|
|
19
|
+
import { loginAsDefaultSuperadmin } from '../../../../src/session-helpers'
|
|
20
20
|
|
|
21
21
|
describe('Superadmin - Team Roles Matrix', {
|
|
22
22
|
tags: ['@uat', '@feat-superadmin', '@security', '@regression']
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
import * as allure from 'allure-cypress'
|
|
13
13
|
|
|
14
|
-
import { DevKeyringPOM } from '
|
|
15
|
-
import { TeamSwitcherPOM } from '
|
|
14
|
+
import { DevKeyringPOM } from '../../../../src/components/DevKeyringPOM'
|
|
15
|
+
import { TeamSwitcherPOM } from '../../../../src/components/TeamSwitcherPOM'
|
|
16
16
|
|
|
17
17
|
// Test users from default theme
|
|
18
18
|
// Note: DB data shows different team counts than DevKeyring config comments
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
import * as allure from 'allure-cypress'
|
|
16
16
|
|
|
17
|
-
import { CustomersPOM } from '
|
|
18
|
-
import { loginAsDefaultEditor } from '
|
|
17
|
+
import { CustomersPOM } from '../../../../src/entities/CustomersPOM'
|
|
18
|
+
import { loginAsDefaultEditor } from '../../../../src/session-helpers'
|
|
19
19
|
|
|
20
20
|
describe('Editor Role - Permission Restrictions', {
|
|
21
21
|
tags: ['@uat', '@feat-teams', '@security', '@role-editor', '@regression']
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import * as allure from 'allure-cypress'
|
|
4
4
|
|
|
5
|
-
import { CustomersPOM } from '
|
|
6
|
-
import { TasksPOM } from '
|
|
7
|
-
import { loginAsDefaultMember } from '
|
|
5
|
+
import { CustomersPOM } from '../../../../src/entities/CustomersPOM'
|
|
6
|
+
import { TasksPOM } from '../../../../src/entities/TasksPOM'
|
|
7
|
+
import { loginAsDefaultMember } from '../../../../src/session-helpers'
|
|
8
8
|
|
|
9
9
|
describe('Member Role - Permission Restrictions', {
|
|
10
10
|
tags: ['@uat', '@feat-teams', '@security', '@role-member', '@regression']
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
import * as allure from 'allure-cypress'
|
|
13
13
|
|
|
14
|
-
import { CustomersPOM } from '
|
|
15
|
-
import { loginAsDefaultOwner } from '
|
|
14
|
+
import { CustomersPOM } from '../../../../src/entities/CustomersPOM'
|
|
15
|
+
import { loginAsDefaultOwner } from '../../../../src/session-helpers'
|
|
16
16
|
|
|
17
17
|
describe('Owner Role - Full CRUD Permissions', {
|
|
18
18
|
tags: ['@uat', '@feat-teams', '@security', '@role-owner', '@regression']
|
|
@@ -105,8 +105,8 @@ export abstract class DashboardEntityPOM extends BasePOM {
|
|
|
105
105
|
tableContainer: cySelector('entities.table.container', { slug }),
|
|
106
106
|
table: cySelector('entities.table.element', { slug }),
|
|
107
107
|
addButton: cySelector('entities.table.addButton', { slug }),
|
|
108
|
-
search: cySelector('entities.search
|
|
109
|
-
searchContainer: cySelector('entities.search
|
|
108
|
+
search: cySelector('entities.table.search', { slug }),
|
|
109
|
+
searchContainer: cySelector('entities.table.search', { slug }),
|
|
110
110
|
searchClear: cySelector('entities.search.clear', { slug }),
|
|
111
111
|
selectAll: cySelector('entities.table.selectAll', { slug }),
|
|
112
112
|
selectionCount: cySelector('entities.table.selectionCount', { slug }),
|
|
@@ -58,8 +58,8 @@ export class DashboardPOM extends BasePOM {
|
|
|
58
58
|
topnavNotifications: cySelector('dashboard.topnav.notifications'),
|
|
59
59
|
topnavHelp: cySelector('dashboard.topnav.help'),
|
|
60
60
|
topnavThemeToggle: cySelector('dashboard.topnav.themeToggle'),
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
topnavSuperadmin: cySelector('dashboard.topnav.superadmin'),
|
|
62
|
+
topnavDevtools: cySelector('dashboard.topnav.devtools'),
|
|
63
63
|
topnavUserMenuTrigger: cySelector('dashboard.topnav.userMenuTrigger'),
|
|
64
64
|
topnavUserMenu: cySelector('dashboard.topnav.userMenu'),
|
|
65
65
|
topnavMenuItem: (icon: string) => cySelector('dashboard.topnav.menuItem', { icon }),
|
|
@@ -38,7 +38,7 @@ export class DevtoolsPOM extends BasePOM {
|
|
|
38
38
|
|
|
39
39
|
// Exit navigation
|
|
40
40
|
exitToDashboard: cySelector('devtools.navigation.exitToDashboard'),
|
|
41
|
-
goToAdmin: cySelector('devtools.navigation.
|
|
41
|
+
goToAdmin: cySelector('devtools.navigation.goToSuperadmin'),
|
|
42
42
|
|
|
43
43
|
// Home Page
|
|
44
44
|
homePage: cySelector('devtools.home.page'),
|
|
@@ -85,6 +85,17 @@ export class DevtoolsPOM extends BasePOM {
|
|
|
85
85
|
testsNotFound: cySelector('devtools.tests.notFound'),
|
|
86
86
|
testsBackToList: cySelector('devtools.tests.backToList'),
|
|
87
87
|
|
|
88
|
+
// Test Coverage Dashboard (new)
|
|
89
|
+
testsDashboard: cySelector('devtools.tests.dashboard'),
|
|
90
|
+
testsDashboardButton: cySelector('devtools.tests.dashboardButton'),
|
|
91
|
+
testsDashboardStats: cySelector('devtools.tests.dashboardStats'),
|
|
92
|
+
testsDashboardStatFeatures: cySelector('devtools.tests.dashboardStatFeatures'),
|
|
93
|
+
testsDashboardStatFlows: cySelector('devtools.tests.dashboardStatFlows'),
|
|
94
|
+
testsDashboardStatFiles: cySelector('devtools.tests.dashboardStatFiles'),
|
|
95
|
+
testsDashboardStatTags: cySelector('devtools.tests.dashboardStatTags'),
|
|
96
|
+
testsDashboardGaps: cySelector('devtools.tests.dashboardGaps'),
|
|
97
|
+
testsDashboardGapItem: (slug: string) => cySelector('devtools.tests.dashboardGapItem', { slug }),
|
|
98
|
+
|
|
88
99
|
// Sidebar
|
|
89
100
|
sidebar: cySelector('devtools.navigation.sidebar'),
|
|
90
101
|
|
|
@@ -19,35 +19,53 @@
|
|
|
19
19
|
|
|
20
20
|
import { DevKeyringPOM as DevKeyring } from './components/DevKeyringPOM'
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Environment-based Test Credentials
|
|
24
|
+
*
|
|
25
|
+
* These can be overridden via Cypress env variables (cypress.config.ts or CLI):
|
|
26
|
+
* - CYPRESS_DEVELOPER_EMAIL / CYPRESS_DEVELOPER_PASSWORD - Developer user
|
|
27
|
+
* - CYPRESS_SUPERADMIN_EMAIL / CYPRESS_SUPERADMIN_PASSWORD - Superadmin user
|
|
28
|
+
* - CYPRESS_OWNER_EMAIL, CYPRESS_ADMIN_EMAIL, etc. - Demo theme users
|
|
29
|
+
*
|
|
30
|
+
* Fallback values are the default users from core and theme sample data.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
// Core system user credentials (configurable via env)
|
|
34
|
+
const DEVELOPER_EMAIL = Cypress.env('DEVELOPER_EMAIL') || 'developer@nextspark.dev'
|
|
35
|
+
const DEVELOPER_PASSWORD = Cypress.env('DEVELOPER_PASSWORD') || 'Pandora1234'
|
|
36
|
+
const SUPERADMIN_PASSWORD = Cypress.env('SUPERADMIN_PASSWORD') || 'Pandora1234'
|
|
37
|
+
|
|
38
|
+
// Demo user password (configurable via env)
|
|
39
|
+
const TEST_PASSWORD = Cypress.env('TEST_PASSWORD') || 'Test1234'
|
|
40
|
+
|
|
22
41
|
/**
|
|
23
42
|
* Default Theme Test Users
|
|
24
43
|
* Teams: Everpoint Labs, Ironvale Global, Riverstone Ventures
|
|
44
|
+
*
|
|
45
|
+
* Note: These are fallback demo users. For selector tests, use CORE_USER (developer).
|
|
25
46
|
*/
|
|
26
47
|
export const DEFAULT_THEME_USERS = {
|
|
27
|
-
OWNER: 'carlos.mendoza@nextspark.dev',
|
|
28
|
-
ADMIN: 'james.wilson@nextspark.dev',
|
|
29
|
-
MEMBER: 'emily.johnson@nextspark.dev',
|
|
30
|
-
EDITOR: 'diego.ramirez@nextspark.dev',
|
|
31
|
-
VIEWER: 'sarah.davis@nextspark.dev',
|
|
48
|
+
OWNER: Cypress.env('OWNER_EMAIL') || 'carlos.mendoza@nextspark.dev',
|
|
49
|
+
ADMIN: Cypress.env('ADMIN_EMAIL') || 'james.wilson@nextspark.dev',
|
|
50
|
+
MEMBER: Cypress.env('MEMBER_EMAIL') || 'emily.johnson@nextspark.dev',
|
|
51
|
+
EDITOR: Cypress.env('EDITOR_EMAIL') || 'diego.ramirez@nextspark.dev',
|
|
52
|
+
VIEWER: Cypress.env('VIEWER_EMAIL') || 'sarah.davis@nextspark.dev',
|
|
32
53
|
} as const
|
|
33
54
|
|
|
34
55
|
/**
|
|
35
56
|
* Core System Users (from core/migrations/090_sample_data.sql)
|
|
36
57
|
* These users have special global roles, not team-based roles
|
|
58
|
+
*
|
|
59
|
+
* IMPORTANT: DEVELOPER is the recommended user for most tests.
|
|
60
|
+
* Configurable via CYPRESS_DEVELOPER_EMAIL env variable.
|
|
37
61
|
*/
|
|
38
62
|
export const CORE_USERS = {
|
|
39
|
-
SUPERADMIN: 'superadmin@nextspark.dev',
|
|
40
|
-
DEVELOPER:
|
|
63
|
+
SUPERADMIN: Cypress.env('SUPERADMIN_EMAIL') || 'superadmin@nextspark.dev',
|
|
64
|
+
DEVELOPER: DEVELOPER_EMAIL,
|
|
41
65
|
} as const
|
|
42
66
|
|
|
43
|
-
//
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
// Password for core system users (superadmin/developer)
|
|
47
|
-
const CORE_PASSWORD = 'Pandora1234'
|
|
48
|
-
|
|
49
|
-
// Extended timeout for dev server compilation
|
|
50
|
-
const API_TIMEOUT = 30000
|
|
67
|
+
// Extended timeout for dev server compilation (60s for slow cold starts)
|
|
68
|
+
const API_TIMEOUT = 60000
|
|
51
69
|
|
|
52
70
|
/**
|
|
53
71
|
* Sets up team context after login (requires page to be loaded for localStorage access)
|
|
@@ -290,7 +308,7 @@ export function loginAsDefaultEditor() {
|
|
|
290
308
|
*/
|
|
291
309
|
export function loginAsDefaultSuperadmin() {
|
|
292
310
|
cy.session('default-superadmin-session', () => {
|
|
293
|
-
apiLogin(CORE_USERS.SUPERADMIN,
|
|
311
|
+
apiLogin(CORE_USERS.SUPERADMIN, SUPERADMIN_PASSWORD).then((apiLoginSucceeded) => {
|
|
294
312
|
if (apiLoginSucceeded) {
|
|
295
313
|
cy.visit('/superadmin', { timeout: 60000 })
|
|
296
314
|
}
|
|
@@ -320,7 +338,7 @@ export function loginAsDefaultSuperadmin() {
|
|
|
320
338
|
*/
|
|
321
339
|
export function loginAsDefaultDeveloper() {
|
|
322
340
|
cy.session('default-developer-session', () => {
|
|
323
|
-
apiLogin(CORE_USERS.DEVELOPER,
|
|
341
|
+
apiLogin(CORE_USERS.DEVELOPER, DEVELOPER_PASSWORD).then((apiLoginSucceeded) => {
|
|
324
342
|
if (apiLoginSucceeded) {
|
|
325
343
|
cy.visit('/devtools', { timeout: 60000 })
|
|
326
344
|
}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
import '@testing-library/cypress/add-commands'
|
|
13
13
|
|
|
14
14
|
// Import @cypress/grep for test filtering by tags
|
|
15
|
-
|
|
15
|
+
// v5.x uses named export { register }
|
|
16
|
+
import { register as registerCypressGrep } from '@cypress/grep'
|
|
16
17
|
registerCypressGrep()
|
|
17
18
|
|
|
18
19
|
// Doc commands are optional (require cypress-slow-down)
|
package/tests/cypress.config.ts
CHANGED
|
@@ -16,19 +16,38 @@ import fs from 'fs'
|
|
|
16
16
|
|
|
17
17
|
// Paths relative to this config file
|
|
18
18
|
const themeRoot = path.resolve(__dirname, '..')
|
|
19
|
-
const projectRoot = path.resolve(__dirname, '../../../..')
|
|
20
19
|
const narrationsOutputDir = path.join(__dirname, 'cypress/videos/narrations')
|
|
21
20
|
|
|
22
|
-
// Detect if running in npm mode
|
|
23
|
-
|
|
21
|
+
// Detect if running in npm mode vs monorepo
|
|
22
|
+
// In monorepo: themes/default/tests -> 3 levels up to repo root
|
|
23
|
+
// In npm mode: contents/themes/default/tests -> 4 levels up to project root
|
|
24
|
+
const monorepoRoot = path.resolve(__dirname, '../../..')
|
|
25
|
+
const npmRoot = path.resolve(__dirname, '../../../..')
|
|
26
|
+
const isNpmMode = !fs.existsSync(path.join(monorepoRoot, 'packages/core'))
|
|
27
|
+
const projectRoot = isNpmMode ? npmRoot : monorepoRoot
|
|
24
28
|
|
|
25
29
|
// Load environment variables
|
|
30
|
+
// In monorepo: apps/dev/.env | In npm mode: .env at project root
|
|
26
31
|
import dotenv from 'dotenv'
|
|
27
|
-
|
|
32
|
+
const envPath = isNpmMode
|
|
33
|
+
? path.join(projectRoot, '.env')
|
|
34
|
+
: path.join(projectRoot, 'apps/dev/.env')
|
|
35
|
+
dotenv.config({ path: envPath })
|
|
28
36
|
|
|
29
37
|
// Server port (from .env or default 3000)
|
|
30
38
|
const port = process.env.PORT || 3000
|
|
31
39
|
|
|
40
|
+
// Extract CYPRESS_ prefixed variables from process.env
|
|
41
|
+
// Cypress auto-strips the CYPRESS_ prefix when accessing via Cypress.env()
|
|
42
|
+
const cypressEnvVars: Record<string, string> = {}
|
|
43
|
+
Object.entries(process.env).forEach(([key, value]) => {
|
|
44
|
+
if (key.startsWith('CYPRESS_') && value) {
|
|
45
|
+
// Remove CYPRESS_ prefix for Cypress.env() access
|
|
46
|
+
const cypressKey = key.replace('CYPRESS_', '')
|
|
47
|
+
cypressEnvVars[cypressKey] = value
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
32
51
|
export default defineConfig({
|
|
33
52
|
e2e: {
|
|
34
53
|
// Base URL for the application
|
|
@@ -87,14 +106,13 @@ export default defineConfig({
|
|
|
87
106
|
|
|
88
107
|
// Environment variables
|
|
89
108
|
env: {
|
|
109
|
+
// Spread CYPRESS_ prefixed vars from .env (e.g., CYPRESS_DEVELOPER_EMAIL -> DEVELOPER_EMAIL)
|
|
110
|
+
...cypressEnvVars,
|
|
111
|
+
|
|
90
112
|
// Theme info
|
|
91
113
|
ACTIVE_THEME: 'default',
|
|
92
114
|
THEME_PATH: themeRoot,
|
|
93
115
|
|
|
94
|
-
// Test user credentials
|
|
95
|
-
TEST_USER_EMAIL: 'user@example.com',
|
|
96
|
-
TEST_USER_PASSWORD: 'Testing1234',
|
|
97
|
-
|
|
98
116
|
// Feature flags
|
|
99
117
|
ENABLE_ALLURE: true,
|
|
100
118
|
|
|
@@ -118,8 +136,9 @@ export default defineConfig({
|
|
|
118
136
|
})
|
|
119
137
|
|
|
120
138
|
// @cypress/grep plugin for test filtering by tags
|
|
121
|
-
|
|
122
|
-
|
|
139
|
+
// v5.x uses named export { plugin } from '@cypress/grep/plugin'
|
|
140
|
+
const { plugin: grepPlugin } = await import('@cypress/grep/plugin')
|
|
141
|
+
grepPlugin(config)
|
|
123
142
|
|
|
124
143
|
// Documentation video tasks
|
|
125
144
|
on('task', {
|
package/tests/tsconfig.json
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../../../tsconfig.cypress.json",
|
|
3
2
|
"compilerOptions": {
|
|
4
|
-
"
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"types": ["cypress", "node"],
|
|
12
|
+
"baseUrl": ".",
|
|
5
13
|
"paths": {
|
|
6
|
-
"
|
|
7
|
-
"@/contents/*": ["./contents/*"],
|
|
8
|
-
"@/*": ["./*"]
|
|
14
|
+
"@/*": ["../../../*"]
|
|
9
15
|
}
|
|
10
16
|
},
|
|
11
17
|
"include": [
|
|
12
|
-
"
|
|
13
|
-
"cypress
|
|
18
|
+
"cypress/**/*.ts",
|
|
19
|
+
"cypress.config.ts"
|
|
14
20
|
]
|
|
15
21
|
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI Selectors Validation: Billing Components
|
|
3
|
-
*
|
|
4
|
-
* This test validates that new billing component selectors exist in the DOM.
|
|
5
|
-
* This is a lightweight test that ONLY checks selector presence, not functionality.
|
|
6
|
-
*
|
|
7
|
-
* Purpose:
|
|
8
|
-
* - Validate DowngradeWarning component selectors
|
|
9
|
-
* - Validate ManageBillingButton selector
|
|
10
|
-
* - Validate SubscriptionStatus updates
|
|
11
|
-
* - Run as Phase 12 sub-gate (v4.1) before functional tests
|
|
12
|
-
*
|
|
13
|
-
* Scope:
|
|
14
|
-
* - Only login and navigate
|
|
15
|
-
* - Assert elements exist in DOM (no CRUD operations)
|
|
16
|
-
* - Fast execution (< 30 seconds)
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { loginAsDefaultOwner } from '../../src/session-helpers'
|
|
20
|
-
|
|
21
|
-
describe('UI Selectors Validation: Billing', { tags: ['@ui-selectors'] }, () => {
|
|
22
|
-
beforeEach(() => {
|
|
23
|
-
loginAsDefaultOwner()
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
describe('ManageBillingButton Selector', () => {
|
|
27
|
-
beforeEach(() => {
|
|
28
|
-
cy.visit('/dashboard/settings/billing')
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
it('should have manage-billing-button selector in DOM structure', () => {
|
|
32
|
-
// Note: Button may not be visible if no externalCustomerId
|
|
33
|
-
// We're just checking the selector exists in component code
|
|
34
|
-
// For free tier users, button won't render, so we check conditionally
|
|
35
|
-
|
|
36
|
-
cy.get('body').then(($body) => {
|
|
37
|
-
// If button exists, it should have the correct selector
|
|
38
|
-
if ($body.find('[data-cy="manage-billing-button"]').length > 0) {
|
|
39
|
-
cy.get('[data-cy="manage-billing-button"]').should('exist')
|
|
40
|
-
} else {
|
|
41
|
-
// Button not rendered (expected for free tier)
|
|
42
|
-
cy.log('manage-billing-button not rendered (expected for free tier)')
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
describe('SubscriptionStatus Updated Selectors', () => {
|
|
49
|
-
beforeEach(() => {
|
|
50
|
-
cy.visit('/dashboard/settings/billing')
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
it('should have subscription-manage-billing container selector', () => {
|
|
54
|
-
// Check if container exists (may be empty for free tier)
|
|
55
|
-
cy.get('body').then(($body) => {
|
|
56
|
-
if ($body.find('[data-cy="subscription-manage-billing"]').length > 0) {
|
|
57
|
-
cy.get('[data-cy="subscription-manage-billing"]').should('exist')
|
|
58
|
-
} else {
|
|
59
|
-
cy.log('subscription-manage-billing container not found')
|
|
60
|
-
}
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
describe('DowngradeWarning Selectors', () => {
|
|
66
|
-
// Note: DowngradeWarning only renders when overLimitResources.length > 0
|
|
67
|
-
// This is a modal/alert component that appears in specific workflows
|
|
68
|
-
// We can't easily trigger it without a full downgrade flow
|
|
69
|
-
// For now, we document the selectors exist in the component code
|
|
70
|
-
|
|
71
|
-
it('should have downgrade-warning selectors defined in component', () => {
|
|
72
|
-
// This test verifies the component file exists with correct selectors
|
|
73
|
-
// Actual rendering requires specific state (user with over-limit resources)
|
|
74
|
-
|
|
75
|
-
cy.log('DowngradeWarning component selectors:')
|
|
76
|
-
cy.log('- downgrade-warning')
|
|
77
|
-
cy.log('- downgrade-warning-title')
|
|
78
|
-
cy.log('- downgrade-warning-description')
|
|
79
|
-
cy.log('- downgrade-warning-list')
|
|
80
|
-
cy.log('- downgrade-limit-{slug}')
|
|
81
|
-
cy.log('- downgrade-warning-policy')
|
|
82
|
-
cy.log('- downgrade-warning-confirm')
|
|
83
|
-
cy.log('- downgrade-warning-cancel')
|
|
84
|
-
|
|
85
|
-
// Component exists and is importable
|
|
86
|
-
cy.wrap(true).should('be.true')
|
|
87
|
-
})
|
|
88
|
-
})
|
|
89
|
-
})
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI Selectors Validation: Dashboard Mobile
|
|
3
|
-
*
|
|
4
|
-
* This test validates that dashboard mobile selectors exist in the DOM.
|
|
5
|
-
* This is a lightweight test that ONLY checks selector presence, not functionality.
|
|
6
|
-
*
|
|
7
|
-
* Purpose:
|
|
8
|
-
* - Validate DashboardPOM mobile selectors work correctly
|
|
9
|
-
* - Ensure all dashboard.mobile.* selectors are implemented
|
|
10
|
-
* - Run as Phase 12 sub-gate before functional tests
|
|
11
|
-
*
|
|
12
|
-
* Scope:
|
|
13
|
-
* - Navigate to dashboard (requires login)
|
|
14
|
-
* - Assert elements exist in DOM (no form submissions)
|
|
15
|
-
*
|
|
16
|
-
* IMPORTANT: Mobile selectors are ONLY visible on small viewports (< 1024px).
|
|
17
|
-
* All tests are marked as skip for desktop testing.
|
|
18
|
-
* To test mobile, use: cy.viewport('iphone-x') or similar.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
import { DashboardPOM } from '../../src/features/DashboardPOM'
|
|
22
|
-
|
|
23
|
-
describe('Dashboard Mobile Selectors Validation', { tags: ['@ui-selectors', '@mobile'] }, () => {
|
|
24
|
-
const dashboard = DashboardPOM.create()
|
|
25
|
-
|
|
26
|
-
// ============================================
|
|
27
|
-
// DOCUMENTATION (no login needed)
|
|
28
|
-
// ============================================
|
|
29
|
-
describe('Mobile Testing Documentation', () => {
|
|
30
|
-
it('documents how to test mobile selectors', () => {
|
|
31
|
-
cy.log('Mobile selectors require viewport < 1024px')
|
|
32
|
-
cy.log('To test: Add cy.viewport("iphone-x") in beforeEach')
|
|
33
|
-
cy.log('Or run with: --config viewportWidth=375,viewportHeight=812')
|
|
34
|
-
cy.log('All mobile tests are skipped for desktop viewport')
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
// ============================================
|
|
39
|
-
// MOBILE TOPBAR (4 selectors)
|
|
40
|
-
// NOTE: Only visible on mobile viewports
|
|
41
|
-
// ============================================
|
|
42
|
-
describe('Mobile Topbar Selectors', () => {
|
|
43
|
-
it.skip('should find mobile topbar header (mobile viewport only)', () => {
|
|
44
|
-
// Requires: cy.viewport('iphone-x')
|
|
45
|
-
cy.get(dashboard.selectors.mobileTopbarHeader).should('exist')
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
it.skip('should find mobile user profile button (mobile viewport only)', () => {
|
|
49
|
-
cy.get(dashboard.selectors.mobileTopbarUserProfile).should('exist')
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
it.skip('should find mobile notifications button (mobile viewport only)', () => {
|
|
53
|
-
cy.get(dashboard.selectors.mobileTopbarNotifications).should('exist')
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
it.skip('should find mobile theme toggle (mobile viewport only)', () => {
|
|
57
|
-
cy.get(dashboard.selectors.mobileTopbarThemeToggle).should('exist')
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
// ============================================
|
|
62
|
-
// MOBILE BOTTOM NAV (2 selectors)
|
|
63
|
-
// ============================================
|
|
64
|
-
describe('Mobile Bottom Nav Selectors', () => {
|
|
65
|
-
it.skip('should find mobile bottom nav (mobile viewport only)', () => {
|
|
66
|
-
cy.get(dashboard.selectors.mobileBottomNav).should('exist')
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
it.skip('should find mobile bottom nav item (mobile viewport only)', () => {
|
|
70
|
-
// Example: dashboard, entities, create, more
|
|
71
|
-
cy.get(dashboard.selectors.mobileBottomNavItem('dashboard')).should('exist')
|
|
72
|
-
})
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
// ============================================
|
|
76
|
-
// MOBILE MORE SHEET (5 selectors)
|
|
77
|
-
// ============================================
|
|
78
|
-
describe('Mobile More Sheet Selectors', () => {
|
|
79
|
-
it.skip('should find mobile more sheet content (mobile viewport only)', () => {
|
|
80
|
-
cy.get(dashboard.selectors.mobileMoreSheetContent).should('exist')
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
it.skip('should find mobile more sheet item (mobile viewport only)', () => {
|
|
84
|
-
cy.get(dashboard.selectors.mobileMoreSheetItem('settings')).should('exist')
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
it.skip('should find mobile more sheet sector7 link (mobile viewport only)', () => {
|
|
88
|
-
cy.get(dashboard.selectors.mobileMoreSheetSuperadmin).should('exist')
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
it.skip('should find mobile more sheet team switcher (mobile viewport only)', () => {
|
|
92
|
-
cy.get(dashboard.selectors.mobileMoreSheetTeamSwitcher).should('exist')
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
it.skip('should find mobile more sheet signout button (mobile viewport only)', () => {
|
|
96
|
-
cy.get(dashboard.selectors.mobileMoreSheetSignout).should('exist')
|
|
97
|
-
})
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
// ============================================
|
|
101
|
-
// MOBILE QUICK CREATE SHEET (2 selectors)
|
|
102
|
-
// ============================================
|
|
103
|
-
describe('Mobile Quick Create Sheet Selectors', () => {
|
|
104
|
-
it.skip('should find mobile quick create sheet content (mobile viewport only)', () => {
|
|
105
|
-
cy.get(dashboard.selectors.mobileQuickCreateContent).should('exist')
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
it.skip('should find mobile quick create item (mobile viewport only)', () => {
|
|
109
|
-
// Example: tasks, customers, posts, pages
|
|
110
|
-
cy.get(dashboard.selectors.mobileQuickCreateItem('tasks')).should('exist')
|
|
111
|
-
})
|
|
112
|
-
})
|
|
113
|
-
})
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI Selectors Validation: Dashboard Navigation
|
|
3
|
-
*
|
|
4
|
-
* This test validates that dashboard navigation selectors exist in the DOM.
|
|
5
|
-
* This is a lightweight test that ONLY checks selector presence, not functionality.
|
|
6
|
-
*
|
|
7
|
-
* Purpose:
|
|
8
|
-
* - Validate DashboardPOM navigation selectors work correctly
|
|
9
|
-
* - Ensure all dashboard.navigation.* selectors are implemented
|
|
10
|
-
* - Run as Phase 12 sub-gate before functional tests
|
|
11
|
-
*
|
|
12
|
-
* Scope:
|
|
13
|
-
* - Navigate to dashboard (requires login)
|
|
14
|
-
* - Assert elements exist in DOM (no form submissions)
|
|
15
|
-
* - Fast execution (< 30 seconds per describe block)
|
|
16
|
-
*
|
|
17
|
-
* NOTE: Entity links are dynamic based on permissions.
|
|
18
|
-
* Section selectors require knowing the exact section IDs.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
import { DashboardPOM } from '../../src/features/DashboardPOM'
|
|
22
|
-
import { loginAsDefaultOwner } from '../../src/session-helpers'
|
|
23
|
-
|
|
24
|
-
describe('Dashboard Navigation Selectors Validation', { tags: ['@ui-selectors'] }, () => {
|
|
25
|
-
const dashboard = DashboardPOM.create()
|
|
26
|
-
|
|
27
|
-
beforeEach(() => {
|
|
28
|
-
loginAsDefaultOwner()
|
|
29
|
-
cy.visit('/dashboard', { timeout: 60000, failOnStatusCode: false })
|
|
30
|
-
cy.url().should('include', '/dashboard')
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
// ============================================
|
|
34
|
-
// NAVIGATION STRUCTURE (2 selectors)
|
|
35
|
-
// ============================================
|
|
36
|
-
describe('Navigation Structure', () => {
|
|
37
|
-
it('should find nav main container', () => {
|
|
38
|
-
cy.get(dashboard.selectors.navMain).should('exist')
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
// Selector not implemented in DynamicNavigation component
|
|
42
|
-
it.skip('should find dashboard link (selector not implemented)', () => {
|
|
43
|
-
cy.get(dashboard.selectors.navDashboard).should('exist')
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
// ============================================
|
|
48
|
-
// ENTITY LINKS (dynamic selectors)
|
|
49
|
-
// ============================================
|
|
50
|
-
describe('Entity Links', () => {
|
|
51
|
-
it('should find tasks entity link', () => {
|
|
52
|
-
cy.get(dashboard.selectors.navEntity('tasks')).should('exist')
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
it('should find customers entity link', () => {
|
|
56
|
-
cy.get(dashboard.selectors.navEntity('customers')).should('exist')
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
it('should find posts entity link', () => {
|
|
60
|
-
cy.get(dashboard.selectors.navEntity('posts')).should('exist')
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
it('should find pages entity link', () => {
|
|
64
|
-
cy.get(dashboard.selectors.navEntity('pages')).should('exist')
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
// ============================================
|
|
69
|
-
// NAVIGATION SECTIONS (dynamic selectors)
|
|
70
|
-
// NOTE: Section IDs depend on theme navigation config
|
|
71
|
-
// ============================================
|
|
72
|
-
describe('Navigation Sections', () => {
|
|
73
|
-
// Section IDs from default theme's navigation.config.ts
|
|
74
|
-
it.skip('should find section by ID (requires knowing exact section IDs)', () => {
|
|
75
|
-
// Example: cy.get(dashboard.selectors.navSection('entities')).should('exist')
|
|
76
|
-
cy.wrap(true).should('be.true')
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
it.skip('should find section label (requires knowing exact section IDs)', () => {
|
|
80
|
-
// Example: cy.get(dashboard.selectors.navSectionLabel('entities')).should('exist')
|
|
81
|
-
cy.wrap(true).should('be.true')
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
it.skip('should find section item (requires knowing exact section and item IDs)', () => {
|
|
85
|
-
// Example: cy.get(dashboard.selectors.navSectionItem('entities', 'tasks')).should('exist')
|
|
86
|
-
cy.wrap(true).should('be.true')
|
|
87
|
-
})
|
|
88
|
-
})
|
|
89
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|