@open-mercato/core 0.4.5-develop-2e9903a57a → 0.4.5-develop-eeccf7adf4
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 +2 -2
- package/dist/modules/auth/__integration__/TC-AUTH-001.spec.js +0 -9
- package/dist/modules/auth/__integration__/TC-AUTH-001.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-002.spec.js +0 -22
- package/dist/modules/auth/__integration__/TC-AUTH-002.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-003.spec.js +0 -21
- package/dist/modules/auth/__integration__/TC-AUTH-003.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-004.spec.js +0 -15
- package/dist/modules/auth/__integration__/TC-AUTH-004.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-005.spec.js +0 -11
- package/dist/modules/auth/__integration__/TC-AUTH-005.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-006.spec.js +0 -11
- package/dist/modules/auth/__integration__/TC-AUTH-006.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-007.spec.js +0 -14
- package/dist/modules/auth/__integration__/TC-AUTH-007.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-008.spec.js +0 -26
- package/dist/modules/auth/__integration__/TC-AUTH-008.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-009.spec.js +0 -16
- package/dist/modules/auth/__integration__/TC-AUTH-009.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-010.spec.js +0 -32
- package/dist/modules/auth/__integration__/TC-AUTH-010.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-011.spec.js +0 -26
- package/dist/modules/auth/__integration__/TC-AUTH-011.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-012.spec.js +0 -30
- package/dist/modules/auth/__integration__/TC-AUTH-012.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-013.spec.js +0 -41
- package/dist/modules/auth/__integration__/TC-AUTH-013.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-014.spec.js +0 -25
- package/dist/modules/auth/__integration__/TC-AUTH-014.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-015.spec.js +0 -20
- package/dist/modules/auth/__integration__/TC-AUTH-015.spec.js.map +0 -7
- package/dist/modules/auth/__integration__/TC-AUTH-016.spec.js +0 -76
- package/dist/modules/auth/__integration__/TC-AUTH-016.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-001.spec.js +0 -20
- package/dist/modules/catalog/__integration__/TC-CAT-001.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-002.spec.js +0 -12
- package/dist/modules/catalog/__integration__/TC-CAT-002.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-003.spec.js +0 -28
- package/dist/modules/catalog/__integration__/TC-CAT-003.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-004.spec.js +0 -33
- package/dist/modules/catalog/__integration__/TC-CAT-004.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-005.spec.js +0 -30
- package/dist/modules/catalog/__integration__/TC-CAT-005.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-006.spec.js +0 -31
- package/dist/modules/catalog/__integration__/TC-CAT-006.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-007.spec.js +0 -31
- package/dist/modules/catalog/__integration__/TC-CAT-007.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-008.spec.js +0 -65
- package/dist/modules/catalog/__integration__/TC-CAT-008.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-009.spec.js +0 -31
- package/dist/modules/catalog/__integration__/TC-CAT-009.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-010.spec.js +0 -28
- package/dist/modules/catalog/__integration__/TC-CAT-010.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-011.spec.js +0 -34
- package/dist/modules/catalog/__integration__/TC-CAT-011.spec.js.map +0 -7
- package/dist/modules/catalog/__integration__/TC-CAT-012.spec.js +0 -27
- package/dist/modules/catalog/__integration__/TC-CAT-012.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-001.spec.js +0 -44
- package/dist/modules/core/__integration__/admin/TC-ADMIN-001.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-002.spec.js +0 -53
- package/dist/modules/core/__integration__/admin/TC-ADMIN-002.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-003.spec.js +0 -26
- package/dist/modules/core/__integration__/admin/TC-ADMIN-003.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-004.spec.js +0 -47
- package/dist/modules/core/__integration__/admin/TC-ADMIN-004.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-005.spec.js +0 -33
- package/dist/modules/core/__integration__/admin/TC-ADMIN-005.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-006.spec.js +0 -30
- package/dist/modules/core/__integration__/admin/TC-ADMIN-006.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-007.spec.js +0 -36
- package/dist/modules/core/__integration__/admin/TC-ADMIN-007.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-008.spec.js +0 -113
- package/dist/modules/core/__integration__/admin/TC-ADMIN-008.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-009.spec.js +0 -25
- package/dist/modules/core/__integration__/admin/TC-ADMIN-009.spec.js.map +0 -7
- package/dist/modules/core/__integration__/admin/TC-ADMIN-010.spec.js +0 -35
- package/dist/modules/core/__integration__/admin/TC-ADMIN-010.spec.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/api.js +0 -64
- package/dist/modules/core/__integration__/helpers/api.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/auth.js +0 -98
- package/dist/modules/core/__integration__/helpers/auth.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/authUi.js +0 -31
- package/dist/modules/core/__integration__/helpers/authUi.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/catalogFixtures.js +0 -49
- package/dist/modules/core/__integration__/helpers/catalogFixtures.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/crmFixtures.js +0 -73
- package/dist/modules/core/__integration__/helpers/crmFixtures.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/salesFixtures.js +0 -63
- package/dist/modules/core/__integration__/helpers/salesFixtures.js.map +0 -7
- package/dist/modules/core/__integration__/helpers/salesUi.js +0 -464
- package/dist/modules/core/__integration__/helpers/salesUi.js.map +0 -7
- package/dist/modules/core/__integration__/integration/TC-INT-001.spec.js +0 -26
- package/dist/modules/core/__integration__/integration/TC-INT-001.spec.js.map +0 -7
- package/dist/modules/core/__integration__/integration/TC-INT-002.spec.js +0 -60
- package/dist/modules/core/__integration__/integration/TC-INT-002.spec.js.map +0 -7
- package/dist/modules/core/__integration__/integration/TC-INT-003.spec.js +0 -36
- package/dist/modules/core/__integration__/integration/TC-INT-003.spec.js.map +0 -7
- package/dist/modules/core/__integration__/integration/TC-INT-004.spec.js +0 -74
- package/dist/modules/core/__integration__/integration/TC-INT-004.spec.js.map +0 -7
- package/dist/modules/core/__integration__/integration/TC-INT-005.spec.js +0 -21
- package/dist/modules/core/__integration__/integration/TC-INT-005.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-001.spec.js +0 -32
- package/dist/modules/customers/__integration__/TC-CRM-001.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-002.spec.js +0 -35
- package/dist/modules/customers/__integration__/TC-CRM-002.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-003.spec.js +0 -40
- package/dist/modules/customers/__integration__/TC-CRM-003.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-004.spec.js +0 -40
- package/dist/modules/customers/__integration__/TC-CRM-004.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-005.spec.js +0 -37
- package/dist/modules/customers/__integration__/TC-CRM-005.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-006.spec.js +0 -42
- package/dist/modules/customers/__integration__/TC-CRM-006.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-007.spec.js +0 -44
- package/dist/modules/customers/__integration__/TC-CRM-007.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-008.spec.js +0 -50
- package/dist/modules/customers/__integration__/TC-CRM-008.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-009.spec.js +0 -33
- package/dist/modules/customers/__integration__/TC-CRM-009.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-010.spec.js +0 -39
- package/dist/modules/customers/__integration__/TC-CRM-010.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-011.spec.js +0 -37
- package/dist/modules/customers/__integration__/TC-CRM-011.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-012.spec.js +0 -38
- package/dist/modules/customers/__integration__/TC-CRM-012.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-013.spec.js +0 -43
- package/dist/modules/customers/__integration__/TC-CRM-013.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-014.spec.js +0 -23
- package/dist/modules/customers/__integration__/TC-CRM-014.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-015.spec.js +0 -63
- package/dist/modules/customers/__integration__/TC-CRM-015.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-016.spec.js +0 -46
- package/dist/modules/customers/__integration__/TC-CRM-016.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-017.spec.js +0 -29
- package/dist/modules/customers/__integration__/TC-CRM-017.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-018.spec.js +0 -52
- package/dist/modules/customers/__integration__/TC-CRM-018.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-019.spec.js +0 -37
- package/dist/modules/customers/__integration__/TC-CRM-019.spec.js.map +0 -7
- package/dist/modules/customers/__integration__/TC-CRM-020.spec.js +0 -65
- package/dist/modules/customers/__integration__/TC-CRM-020.spec.js.map +0 -7
- package/dist/modules/progress/__integration__/TC-PROG-001.spec.js +0 -51
- package/dist/modules/progress/__integration__/TC-PROG-001.spec.js.map +0 -7
- package/dist/modules/resources/__integration__/TC-INT-007.spec.js +0 -88
- package/dist/modules/resources/__integration__/TC-INT-007.spec.js.map +0 -7
- package/dist/modules/resources/__integration__/helpers/resourcesFixtures.js +0 -45
- package/dist/modules/resources/__integration__/helpers/resourcesFixtures.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-001.spec.js +0 -20
- package/dist/modules/sales/__integration__/TC-SALES-001.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-002.spec.js +0 -31
- package/dist/modules/sales/__integration__/TC-SALES-002.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-003.spec.js +0 -13
- package/dist/modules/sales/__integration__/TC-SALES-003.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-004.spec.js +0 -14
- package/dist/modules/sales/__integration__/TC-SALES-004.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-005.spec.js +0 -15
- package/dist/modules/sales/__integration__/TC-SALES-005.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-006.spec.js +0 -20
- package/dist/modules/sales/__integration__/TC-SALES-006.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-007.spec.js +0 -19
- package/dist/modules/sales/__integration__/TC-SALES-007.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-008.spec.js +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-008.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-009.spec.js +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-009.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-010.spec.js +0 -16
- package/dist/modules/sales/__integration__/TC-SALES-010.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-011.spec.js +0 -20
- package/dist/modules/sales/__integration__/TC-SALES-011.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-012.spec.js +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-012.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-013.spec.js +0 -66
- package/dist/modules/sales/__integration__/TC-SALES-013.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-014.spec.js +0 -13
- package/dist/modules/sales/__integration__/TC-SALES-014.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-015.spec.js +0 -13
- package/dist/modules/sales/__integration__/TC-SALES-015.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-016.spec.js +0 -13
- package/dist/modules/sales/__integration__/TC-SALES-016.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-017.spec.js +0 -44
- package/dist/modules/sales/__integration__/TC-SALES-017.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-018.spec.js +0 -18
- package/dist/modules/sales/__integration__/TC-SALES-018.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-019.spec.js +0 -16
- package/dist/modules/sales/__integration__/TC-SALES-019.spec.js.map +0 -7
- package/dist/modules/sales/__integration__/TC-SALES-020.spec.js +0 -75
- package/dist/modules/sales/__integration__/TC-SALES-020.spec.js.map +0 -7
- package/dist/modules/staff/__integration__/TC-INT-006.spec.js +0 -64
- package/dist/modules/staff/__integration__/TC-INT-006.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-001.spec.js +0 -48
- package/dist/modules/translations/__integration__/TC-TRANS-001.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-002.spec.js +0 -94
- package/dist/modules/translations/__integration__/TC-TRANS-002.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-003.spec.js +0 -61
- package/dist/modules/translations/__integration__/TC-TRANS-003.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-004.spec.js +0 -52
- package/dist/modules/translations/__integration__/TC-TRANS-004.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-005.spec.js +0 -106
- package/dist/modules/translations/__integration__/TC-TRANS-005.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-006.spec.js +0 -94
- package/dist/modules/translations/__integration__/TC-TRANS-006.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-007.spec.js +0 -62
- package/dist/modules/translations/__integration__/TC-TRANS-007.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/TC-TRANS-008.spec.js +0 -168
- package/dist/modules/translations/__integration__/TC-TRANS-008.spec.js.map +0 -7
- package/dist/modules/translations/__integration__/helpers/translationFixtures.js +0 -63
- package/dist/modules/translations/__integration__/helpers/translationFixtures.js.map +0 -7
- package/dist/modules/workflows/__integration__/TC-WF-001.spec.js +0 -73
- package/dist/modules/workflows/__integration__/TC-WF-001.spec.js.map +0 -7
- package/src/__tests__/module-decoupling.test.ts +0 -356
- package/src/modules/api_keys/api/__tests__/keys.route.test.ts +0 -244
- package/src/modules/attachments/api/__tests__/attachments.api.test.ts +0 -240
- package/src/modules/attachments/components/__tests__/AttachmentContentPreview.test.tsx +0 -45
- package/src/modules/attachments/data/__tests__/entities-ocr.test.ts +0 -15
- package/src/modules/attachments/lib/__tests__/ocr-config.test.ts +0 -27
- package/src/modules/attachments/lib/__tests__/textExtraction.test.ts +0 -64
- package/src/modules/audit_logs/api/__tests__/access.route.test.ts +0 -118
- package/src/modules/audit_logs/api/__tests__/redo.route.test.ts +0 -131
- package/src/modules/audit_logs/api/__tests__/undo.route.test.ts +0 -103
- package/src/modules/audit_logs/services/__tests__/actionLogService.test.ts +0 -26
- package/src/modules/auth/__integration__/TC-AUTH-001.spec.ts +0 -13
- package/src/modules/auth/__integration__/TC-AUTH-002.spec.ts +0 -30
- package/src/modules/auth/__integration__/TC-AUTH-003.spec.ts +0 -28
- package/src/modules/auth/__integration__/TC-AUTH-004.spec.ts +0 -21
- package/src/modules/auth/__integration__/TC-AUTH-005.spec.ts +0 -17
- package/src/modules/auth/__integration__/TC-AUTH-006.spec.ts +0 -17
- package/src/modules/auth/__integration__/TC-AUTH-007.spec.ts +0 -19
- package/src/modules/auth/__integration__/TC-AUTH-008.spec.ts +0 -31
- package/src/modules/auth/__integration__/TC-AUTH-009.spec.ts +0 -22
- package/src/modules/auth/__integration__/TC-AUTH-010.spec.ts +0 -39
- package/src/modules/auth/__integration__/TC-AUTH-011.spec.ts +0 -35
- package/src/modules/auth/__integration__/TC-AUTH-012.spec.ts +0 -36
- package/src/modules/auth/__integration__/TC-AUTH-013.spec.ts +0 -48
- package/src/modules/auth/__integration__/TC-AUTH-014.spec.ts +0 -31
- package/src/modules/auth/__integration__/TC-AUTH-015.spec.ts +0 -28
- package/src/modules/auth/__integration__/TC-AUTH-016.spec.ts +0 -109
- package/src/modules/auth/__tests__/cli-rotate-encryption.test.ts +0 -97
- package/src/modules/auth/__tests__/cli-setup-acl.test.ts +0 -148
- package/src/modules/auth/api/__tests__/feature-check.test.ts +0 -65
- package/src/modules/auth/api/__tests__/login.test.ts +0 -47
- package/src/modules/auth/commands/__tests__/roles.custom-fields.test.ts +0 -126
- package/src/modules/auth/commands/__tests__/users.custom-fields.test.ts +0 -147
- package/src/modules/auth/lib/__tests__/rateLimitCheck.test.ts +0 -224
- package/src/modules/auth/services/__tests__/authService.test.ts +0 -32
- package/src/modules/auth/services/__tests__/rbacService.test.ts +0 -814
- package/src/modules/business_rules/api/__tests__/execute.route.test.ts +0 -311
- package/src/modules/business_rules/api/__tests__/logs-detail.route.test.ts +0 -181
- package/src/modules/business_rules/api/__tests__/logs.route.test.ts +0 -261
- package/src/modules/business_rules/api/__tests__/rules-detail.route.test.ts +0 -115
- package/src/modules/business_rules/api/__tests__/rules.route.test.ts +0 -746
- package/src/modules/business_rules/api/__tests__/sets-detail.route.test.ts +0 -169
- package/src/modules/business_rules/api/__tests__/sets-members.route.test.ts +0 -367
- package/src/modules/business_rules/api/__tests__/sets.route.test.ts +0 -361
- package/src/modules/business_rules/api/__tests__/test-helpers.ts +0 -42
- package/src/modules/business_rules/components/utils/__tests__/formHelpers.test.ts +0 -69
- package/src/modules/business_rules/data/__tests__/validators.test.ts +0 -637
- package/src/modules/business_rules/lib/__tests__/action-executor.test.ts +0 -728
- package/src/modules/business_rules/lib/__tests__/expression-evaluator.test.ts +0 -592
- package/src/modules/business_rules/lib/__tests__/rule-engine.test.ts +0 -805
- package/src/modules/business_rules/lib/__tests__/rule-evaluator.test.ts +0 -436
- package/src/modules/catalog/__integration__/TC-CAT-001.spec.ts +0 -32
- package/src/modules/catalog/__integration__/TC-CAT-002.spec.ts +0 -19
- package/src/modules/catalog/__integration__/TC-CAT-003.spec.ts +0 -39
- package/src/modules/catalog/__integration__/TC-CAT-004.spec.ts +0 -41
- package/src/modules/catalog/__integration__/TC-CAT-005.spec.ts +0 -37
- package/src/modules/catalog/__integration__/TC-CAT-006.spec.ts +0 -40
- package/src/modules/catalog/__integration__/TC-CAT-007.spec.ts +0 -37
- package/src/modules/catalog/__integration__/TC-CAT-008.spec.ts +0 -76
- package/src/modules/catalog/__integration__/TC-CAT-009.spec.ts +0 -39
- package/src/modules/catalog/__integration__/TC-CAT-010.spec.ts +0 -36
- package/src/modules/catalog/__integration__/TC-CAT-011.spec.ts +0 -44
- package/src/modules/catalog/__integration__/TC-CAT-012.spec.ts +0 -35
- package/src/modules/catalog/api/__tests__/offers.route.test.ts +0 -161
- package/src/modules/catalog/api/__tests__/prices.route.test.ts +0 -39
- package/src/modules/catalog/api/__tests__/products.route.test.ts +0 -91
- package/src/modules/catalog/api/__tests__/utils.test.ts +0 -36
- package/src/modules/catalog/api/__tests__/variants.route.test.ts +0 -44
- package/src/modules/catalog/backend/catalog/products/__tests__/ProductsDataTable.test.tsx +0 -172
- package/src/modules/catalog/commands/__tests__/products.delete.test.ts +0 -146
- package/src/modules/catalog/commands/__tests__/products.update.test.ts +0 -142
- package/src/modules/catalog/commands/__tests__/registration.test.ts +0 -54
- package/src/modules/catalog/commands/__tests__/shared.test.ts +0 -129
- package/src/modules/catalog/components/__tests__/catalogComponentsRender.test.tsx +0 -373
- package/src/modules/catalog/components/products/__tests__/ProductImageCell.test.tsx +0 -51
- package/src/modules/catalog/components/products/__tests__/productForm.test.ts +0 -32
- package/src/modules/catalog/lib/__tests__/pricing.test.ts +0 -150
- package/src/modules/catalog/services/__tests__/catalogPricingService.test.ts +0 -21
- package/src/modules/configs/components/__tests__/CachePanel.test.tsx +0 -134
- package/src/modules/configs/components/__tests__/SystemStatusPanel.test.tsx +0 -93
- package/src/modules/configs/lib/__tests__/system-status.test.ts +0 -55
- package/src/modules/configs/lib/__tests__/upgrade-actions.test.ts +0 -135
- package/src/modules/core/__integration__/admin/TC-ADMIN-001.spec.ts +0 -70
- package/src/modules/core/__integration__/admin/TC-ADMIN-002.spec.ts +0 -83
- package/src/modules/core/__integration__/admin/TC-ADMIN-003.spec.ts +0 -50
- package/src/modules/core/__integration__/admin/TC-ADMIN-004.spec.ts +0 -77
- package/src/modules/core/__integration__/admin/TC-ADMIN-005.spec.ts +0 -49
- package/src/modules/core/__integration__/admin/TC-ADMIN-006.spec.ts +0 -59
- package/src/modules/core/__integration__/admin/TC-ADMIN-007.spec.ts +0 -68
- package/src/modules/core/__integration__/admin/TC-ADMIN-008.spec.ts +0 -127
- package/src/modules/core/__integration__/admin/TC-ADMIN-009.spec.ts +0 -48
- package/src/modules/core/__integration__/admin/TC-ADMIN-010.spec.ts +0 -57
- package/src/modules/core/__integration__/helpers/api.ts +0 -84
- package/src/modules/core/__integration__/helpers/auth.ts +0 -110
- package/src/modules/core/__integration__/helpers/authUi.ts +0 -33
- package/src/modules/core/__integration__/helpers/catalogFixtures.ts +0 -73
- package/src/modules/core/__integration__/helpers/crmFixtures.ts +0 -101
- package/src/modules/core/__integration__/helpers/salesFixtures.ts +0 -89
- package/src/modules/core/__integration__/helpers/salesUi.ts +0 -528
- package/src/modules/core/__integration__/integration/TC-INT-001.spec.ts +0 -34
- package/src/modules/core/__integration__/integration/TC-INT-002.spec.ts +0 -74
- package/src/modules/core/__integration__/integration/TC-INT-003.spec.ts +0 -43
- package/src/modules/core/__integration__/integration/TC-INT-004.spec.ts +0 -82
- package/src/modules/core/__integration__/integration/TC-INT-005.spec.ts +0 -29
- package/src/modules/currencies/backend/exchange-rates/__tests__/formatDateTimeLocal.test.ts +0 -78
- package/src/modules/currencies/data/__tests__/validators.test.ts +0 -100
- package/src/modules/currencies/services/__tests__/exchangeRateService.test.ts +0 -666
- package/src/modules/currencies/services/__tests__/rateFetchingService.basic.test.ts +0 -398
- package/src/modules/currencies/services/__tests__/rateFetchingService.errors.test.ts +0 -296
- package/src/modules/currencies/services/__tests__/rateFetchingService.providers.test.ts +0 -350
- package/src/modules/currencies/services/__tests__/rateFetchingService.setup.ts +0 -188
- package/src/modules/customers/__integration__/TC-CRM-001.spec.ts +0 -42
- package/src/modules/customers/__integration__/TC-CRM-002.spec.ts +0 -47
- package/src/modules/customers/__integration__/TC-CRM-003.spec.ts +0 -55
- package/src/modules/customers/__integration__/TC-CRM-004.spec.ts +0 -57
- package/src/modules/customers/__integration__/TC-CRM-005.spec.ts +0 -50
- package/src/modules/customers/__integration__/TC-CRM-006.spec.ts +0 -60
- package/src/modules/customers/__integration__/TC-CRM-007.spec.ts +0 -57
- package/src/modules/customers/__integration__/TC-CRM-008.spec.ts +0 -62
- package/src/modules/customers/__integration__/TC-CRM-009.spec.ts +0 -46
- package/src/modules/customers/__integration__/TC-CRM-010.spec.ts +0 -49
- package/src/modules/customers/__integration__/TC-CRM-011.spec.ts +0 -47
- package/src/modules/customers/__integration__/TC-CRM-012.spec.ts +0 -49
- package/src/modules/customers/__integration__/TC-CRM-013.spec.ts +0 -61
- package/src/modules/customers/__integration__/TC-CRM-014.spec.ts +0 -31
- package/src/modules/customers/__integration__/TC-CRM-015.spec.ts +0 -89
- package/src/modules/customers/__integration__/TC-CRM-016.spec.ts +0 -55
- package/src/modules/customers/__integration__/TC-CRM-017.spec.ts +0 -37
- package/src/modules/customers/__integration__/TC-CRM-018.spec.ts +0 -62
- package/src/modules/customers/__integration__/TC-CRM-019.spec.ts +0 -44
- package/src/modules/customers/__integration__/TC-CRM-020.spec.ts +0 -73
- package/src/modules/customers/api/__tests__/utils.test.ts +0 -61
- package/src/modules/customers/api/dashboard/widgets/new-deals/__tests__/route.test.ts +0 -54
- package/src/modules/customers/commands/__tests__/shared.test.ts +0 -263
- package/src/modules/customers/commands/__tests__/undo.custom-fields.test.ts +0 -1184
- package/src/modules/customers/components/detail/__tests__/ActivityForm.validation.test.ts +0 -37
- package/src/modules/customers/components/detail/__tests__/DealForm.validation.test.ts +0 -45
- package/src/modules/customers/components/detail/__tests__/InlineEditors.test.tsx +0 -166
- package/src/modules/customers/components/detail/__tests__/TaskForm.submit.test.ts +0 -21
- package/src/modules/customers/components/detail/hooks/__tests__/useCustomerDictionary.test.ts +0 -97
- package/src/modules/customers/lib/__tests__/customFieldRouting.test.ts +0 -107
- package/src/modules/customers/utils/__tests__/addressFormat.test.ts +0 -105
- package/src/modules/customers/utils/__tests__/phoneDuplicates.test.ts +0 -98
- package/src/modules/dashboards/__tests__/widgets.test.ts +0 -70
- package/src/modules/dashboards/lib/__tests__/aggregations.test.ts +0 -328
- package/src/modules/dashboards/lib/__tests__/formatters.test.ts +0 -128
- package/src/modules/directory/backend/directory/organizations/__tests__/create-submit.test.ts +0 -46
- package/src/modules/directory/backend/directory/organizations/__tests__/edit-submit.test.ts +0 -49
- package/src/modules/directory/components/__tests__/OrganizationSelect.test.tsx +0 -71
- package/src/modules/directory/components/__tests__/TenantSelect.test.tsx +0 -75
- package/src/modules/entities/__tests__/cli-decrypt-database.test.ts +0 -534
- package/src/modules/entities/__tests__/cli-rotate-encryption.test.ts +0 -123
- package/src/modules/entities/api/__tests__/encryption.api.test.ts +0 -57
- package/src/modules/entities/api/__tests__/records.get.custom-entity.test.ts +0 -43
- package/src/modules/entities/api/__tests__/records.validation.test.ts +0 -53
- package/src/modules/entities/backend/entities/user/__tests__/create-entity-submit.test.ts +0 -47
- package/src/modules/entities/backend/entities/user/__tests__/records-submit.test.ts +0 -104
- package/src/modules/feature_toggles/commands/__tests__/global.test.ts +0 -325
- package/src/modules/feature_toggles/commands/__tests__/overrides.test.ts +0 -186
- package/src/modules/feature_toggles/lib/__tests__/feature-flag-check.test.ts +0 -365
- package/src/modules/feature_toggles/lib/__tests__/queries.test.ts +0 -130
- package/src/modules/inbox_ops/api/emails/[id]/reprocess/__tests__/route.test.ts +0 -194
- package/src/modules/inbox_ops/api/proposals/[id]/__tests__/route.test.ts +0 -124
- package/src/modules/inbox_ops/api/proposals/[id]/accept-all/__tests__/route.test.ts +0 -154
- package/src/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/__tests__/route.test.ts +0 -200
- package/src/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/accept/__tests__/route.test.ts +0 -261
- package/src/modules/inbox_ops/api/proposals/[id]/actions/[actionId]/reject/__tests__/route.test.ts +0 -201
- package/src/modules/inbox_ops/api/proposals/[id]/reject/__tests__/route.test.ts +0 -123
- package/src/modules/inbox_ops/api/proposals/[id]/replies/[replyId]/send/__tests__/route.test.ts +0 -232
- package/src/modules/inbox_ops/api/proposals/[id]/translate/__tests__/route.test.ts +0 -173
- package/src/modules/inbox_ops/api/proposals/__tests__/route.test.ts +0 -185
- package/src/modules/inbox_ops/api/webhook/__tests__/inbound.test.ts +0 -317
- package/src/modules/inbox_ops/data/__tests__/validators.test.ts +0 -463
- package/src/modules/inbox_ops/lib/__tests__/catalogLookup.test.ts +0 -143
- package/src/modules/inbox_ops/lib/__tests__/contactMatcher.test.ts +0 -158
- package/src/modules/inbox_ops/lib/__tests__/emailParser.test.ts +0 -191
- package/src/modules/inbox_ops/lib/__tests__/executionEngine.test.ts +0 -1419
- package/src/modules/inbox_ops/lib/__tests__/extractionPrompt.test.ts +0 -151
- package/src/modules/inbox_ops/lib/__tests__/priceValidator.test.ts +0 -259
- package/src/modules/inbox_ops/lib/__tests__/translationProvider.test.ts +0 -99
- package/src/modules/inbox_ops/subscribers/__tests__/extractionWorker.test.ts +0 -803
- package/src/modules/notifications/__tests__/deliver-notification.test.ts +0 -285
- package/src/modules/notifications/__tests__/deliveryStrategies.test.ts +0 -19
- package/src/modules/notifications/__tests__/notificationService.test.ts +0 -248
- package/src/modules/planner/__tests__/availabilityMerge.test.ts +0 -99
- package/src/modules/planner/__tests__/plannerAvailabilityService.test.ts +0 -89
- package/src/modules/planner/data/__tests__/validators.test.ts +0 -78
- package/src/modules/progress/__integration__/TC-PROG-001.spec.ts +0 -67
- package/src/modules/progress/__tests__/progressService.test.ts +0 -377
- package/src/modules/query_index/__tests__/hybrid-engine.test.ts +0 -365
- package/src/modules/query_index/__tests__/indexer.test.ts +0 -175
- package/src/modules/resources/__integration__/TC-INT-007.spec.ts +0 -110
- package/src/modules/resources/__integration__/helpers/resourcesFixtures.ts +0 -50
- package/src/modules/resources/data/__tests__/validators.test.ts +0 -65
- package/src/modules/sales/__integration__/TC-SALES-001.spec.ts +0 -26
- package/src/modules/sales/__integration__/TC-SALES-002.spec.ts +0 -38
- package/src/modules/sales/__integration__/TC-SALES-003.spec.ts +0 -18
- package/src/modules/sales/__integration__/TC-SALES-004.spec.ts +0 -19
- package/src/modules/sales/__integration__/TC-SALES-005.spec.ts +0 -21
- package/src/modules/sales/__integration__/TC-SALES-006.spec.ts +0 -26
- package/src/modules/sales/__integration__/TC-SALES-007.spec.ts +0 -23
- package/src/modules/sales/__integration__/TC-SALES-008.spec.ts +0 -11
- package/src/modules/sales/__integration__/TC-SALES-009.spec.ts +0 -12
- package/src/modules/sales/__integration__/TC-SALES-010.spec.ts +0 -20
- package/src/modules/sales/__integration__/TC-SALES-011.spec.ts +0 -26
- package/src/modules/sales/__integration__/TC-SALES-012.spec.ts +0 -12
- package/src/modules/sales/__integration__/TC-SALES-013.spec.ts +0 -73
- package/src/modules/sales/__integration__/TC-SALES-014.spec.ts +0 -17
- package/src/modules/sales/__integration__/TC-SALES-015.spec.ts +0 -17
- package/src/modules/sales/__integration__/TC-SALES-016.spec.ts +0 -17
- package/src/modules/sales/__integration__/TC-SALES-017.spec.ts +0 -60
- package/src/modules/sales/__integration__/TC-SALES-018.spec.ts +0 -25
- package/src/modules/sales/__integration__/TC-SALES-019.spec.ts +0 -22
- package/src/modules/sales/__integration__/TC-SALES-020.spec.ts +0 -107
- package/src/modules/sales/api/__tests__/channels.route.test.ts +0 -50
- package/src/modules/sales/api/__tests__/document-history.test.ts +0 -146
- package/src/modules/sales/api/__tests__/documents.factory.test.ts +0 -98
- package/src/modules/sales/api/__tests__/documents.routes.test.ts +0 -149
- package/src/modules/sales/api/__tests__/quotes.acceptance.test.ts +0 -209
- package/src/modules/sales/api/__tests__/timeline.test.tsx +0 -165
- package/src/modules/sales/api/dashboard/widgets/new-orders/__tests__/route.test.ts +0 -112
- package/src/modules/sales/api/dashboard/widgets/new-quotes/__tests__/route.test.ts +0 -116
- package/src/modules/sales/commands/__tests__/documents.cache.test.ts +0 -126
- package/src/modules/sales/commands/__tests__/documents.undo.test.ts +0 -170
- package/src/modules/sales/commands/__tests__/registration.test.ts +0 -141
- package/src/modules/sales/components/__tests__/salesComponentsRender.test.tsx +0 -456
- package/src/modules/sales/lib/__tests__/calculations.test.ts +0 -210
- package/src/modules/sales/services/__tests__/salesCalculationService.test.ts +0 -181
- package/src/modules/sales/services/__tests__/taxCalculationService.test.ts +0 -79
- package/src/modules/sales/widgets/dashboard/new-orders/__tests__/config.test.ts +0 -47
- package/src/modules/sales/widgets/dashboard/new-quotes/__tests__/config.test.ts +0 -47
- package/src/modules/staff/__integration__/TC-INT-006.spec.ts +0 -71
- package/src/modules/staff/data/__tests__/validators.test.ts +0 -60
- package/src/modules/translations/__integration__/TC-TRANS-001.spec.ts +0 -57
- package/src/modules/translations/__integration__/TC-TRANS-002.spec.ts +0 -114
- package/src/modules/translations/__integration__/TC-TRANS-003.spec.ts +0 -71
- package/src/modules/translations/__integration__/TC-TRANS-004.spec.ts +0 -66
- package/src/modules/translations/__integration__/TC-TRANS-005.spec.ts +0 -135
- package/src/modules/translations/__integration__/TC-TRANS-006.spec.ts +0 -113
- package/src/modules/translations/__integration__/TC-TRANS-007.spec.ts +0 -80
- package/src/modules/translations/__integration__/TC-TRANS-008.spec.ts +0 -209
- package/src/modules/translations/__integration__/helpers/translationFixtures.ts +0 -95
- package/src/modules/translations/api/__tests__/locales.test.ts +0 -67
- package/src/modules/translations/data/__tests__/validators.test.ts +0 -143
- package/src/modules/translations/lib/__tests__/extract-record-id.test.ts +0 -75
- package/src/modules/translations/lib/__tests__/helpers.test.ts +0 -215
- package/src/modules/translations/lib/__tests__/locale.test.ts +0 -115
- package/src/modules/translations/lib/__tests__/resolve-field-list.test.ts +0 -176
- package/src/modules/translations/lib/__tests__/translatable-fields.test.ts +0 -79
- package/src/modules/translations/widgets/__tests__/injection-table.test.ts +0 -83
- package/src/modules/workflows/__integration__/TC-WF-001.spec.ts +0 -114
- package/src/modules/workflows/api/__tests__/definitions.route.test.ts +0 -762
- package/src/modules/workflows/api/__tests__/instances.route.test.ts +0 -869
- package/src/modules/workflows/data/__tests__/validators.test.ts +0 -707
- package/src/modules/workflows/lib/__tests__/activity-executor.test.ts +0 -1230
- package/src/modules/workflows/lib/__tests__/call-api.test.ts +0 -421
- package/src/modules/workflows/lib/__tests__/compensation.test.ts +0 -713
- package/src/modules/workflows/lib/__tests__/event-logger.test.ts +0 -615
- package/src/modules/workflows/lib/__tests__/integration.test.ts +0 -693
- package/src/modules/workflows/lib/__tests__/signals.test.ts +0 -566
- package/src/modules/workflows/lib/__tests__/step-handler.test.ts +0 -670
- package/src/modules/workflows/lib/__tests__/sub-workflow.test.ts +0 -934
- package/src/modules/workflows/lib/__tests__/transition-handler.test.ts +0 -925
- package/src/modules/workflows/lib/__tests__/workflow-executor.test.ts +0 -684
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
4
|
-
import { deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
5
|
-
import { createSalesDocument } from "@open-mercato/core/modules/core/__integration__/helpers/salesUi";
|
|
6
|
-
test.describe("TC-INT-002: Customer to Deal to Quote to Order Flow", () => {
|
|
7
|
-
test("should create CRM records and open a sales order flow", async ({ page, request }) => {
|
|
8
|
-
const stamp = Date.now();
|
|
9
|
-
const companyName = `QA INT-002 Co ${stamp}`;
|
|
10
|
-
const personFirst = `QA${stamp}`;
|
|
11
|
-
const personLast = "IntFlow";
|
|
12
|
-
const dealTitle = `QA INT-002 Deal ${stamp}`;
|
|
13
|
-
let token = null;
|
|
14
|
-
let companyId = null;
|
|
15
|
-
let personId = null;
|
|
16
|
-
let dealId = null;
|
|
17
|
-
try {
|
|
18
|
-
token = await getAuthToken(request);
|
|
19
|
-
await login(page, "admin");
|
|
20
|
-
await page.goto("/backend/customers/companies/create");
|
|
21
|
-
await page.locator("form").getByRole("textbox").first().fill(companyName);
|
|
22
|
-
await page.getByPlaceholder("https://example.com").fill("https://example.com");
|
|
23
|
-
await page.locator("form").getByRole("button", { name: /Create Company/i }).click();
|
|
24
|
-
await expect(page).toHaveURL(/\/backend\/customers\/companies\/[0-9a-f-]{36}$/i);
|
|
25
|
-
companyId = page.url().match(/\/backend\/customers\/companies\/([0-9a-f-]{36})$/i)?.[1] ?? null;
|
|
26
|
-
await page.goto("/backend/customers/people/create");
|
|
27
|
-
await page.locator("form").getByRole("textbox").first().fill(personFirst);
|
|
28
|
-
await page.locator("form").getByRole("textbox").nth(1).fill(personLast);
|
|
29
|
-
await page.getByPlaceholder("name@example.com").fill(`qa-int-002-${stamp}@example.com`);
|
|
30
|
-
await page.getByPlaceholder("+00 000 000 000").fill("+1 555 010 0020");
|
|
31
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: companyName }) }).first().selectOption({ label: companyName });
|
|
32
|
-
await page.getByRole("button", { name: "Create Person" }).first().click();
|
|
33
|
-
await expect(page).toHaveURL(/\/backend\/customers\/people\/[0-9a-f-]{36}$/i);
|
|
34
|
-
personId = page.url().match(/\/backend\/customers\/people\/([0-9a-f-]{36})$/i)?.[1] ?? null;
|
|
35
|
-
await page.goto("/backend/customers/deals/create");
|
|
36
|
-
await page.locator("form").getByRole("textbox").first().fill(dealTitle);
|
|
37
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: "Open" }) }).first().selectOption({ label: "Open" });
|
|
38
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: "Opportunity" }) }).first().selectOption({ label: "Opportunity" });
|
|
39
|
-
await page.getByRole("spinbutton").first().fill("10000");
|
|
40
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: /USD/i }) }).first().selectOption({ index: 1 });
|
|
41
|
-
await page.getByRole("spinbutton").nth(1).fill("50");
|
|
42
|
-
await page.locator('input[type="date"]').fill("2026-12-31");
|
|
43
|
-
await page.getByRole("textbox", { name: /Search companies/i }).fill(companyName);
|
|
44
|
-
await page.getByRole("button", { name: companyName, exact: true }).click();
|
|
45
|
-
await page.getByRole("button", { name: "Create deal" }).first().click();
|
|
46
|
-
await expect(page).toHaveURL(/\/backend\/customers\/deals$/i);
|
|
47
|
-
await page.getByRole("textbox", { name: /Search deals/i }).fill(dealTitle);
|
|
48
|
-
await page.getByRole("row", { name: new RegExp(dealTitle) }).click();
|
|
49
|
-
await expect(page).toHaveURL(/\/backend\/customers\/deals\/[0-9a-f-]{36}$/i);
|
|
50
|
-
dealId = page.url().match(/\/backend\/customers\/deals\/([0-9a-f-]{36})$/i)?.[1] ?? null;
|
|
51
|
-
await createSalesDocument(page, { kind: "order", customerQuery: companyName });
|
|
52
|
-
await expect(page).toHaveURL(/kind=order$/i);
|
|
53
|
-
} finally {
|
|
54
|
-
await deleteEntityIfExists(request, token, "/api/customers/deals", dealId);
|
|
55
|
-
await deleteEntityIfExists(request, token, "/api/customers/people", personId);
|
|
56
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=TC-INT-002.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/modules/core/__integration__/integration/TC-INT-002.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\nimport { deleteEntityIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/crmFixtures';\nimport { createSalesDocument } from '@open-mercato/core/modules/core/__integration__/helpers/salesUi';\n\n/**\n * TC-INT-002: Customer to Deal to Quote to Order Flow\n * Source: .ai/qa/scenarios/TC-INT-002-customer-deal-order-flow.md\n */\ntest.describe('TC-INT-002: Customer to Deal to Quote to Order Flow', () => {\n test('should create CRM records and open a sales order flow', async ({ page, request }) => {\n const stamp = Date.now();\n const companyName = `QA INT-002 Co ${stamp}`;\n const personFirst = `QA${stamp}`;\n const personLast = 'IntFlow';\n const dealTitle = `QA INT-002 Deal ${stamp}`;\n let token: string | null = null;\n let companyId: string | null = null;\n let personId: string | null = null;\n let dealId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n await login(page, 'admin');\n\n await page.goto('/backend/customers/companies/create');\n await page.locator('form').getByRole('textbox').first().fill(companyName);\n await page.getByPlaceholder('https://example.com').fill('https://example.com');\n await page.locator('form').getByRole('button', { name: /Create Company/i }).click();\n await expect(page).toHaveURL(/\\/backend\\/customers\\/companies\\/[0-9a-f-]{36}$/i);\n companyId = page.url().match(/\\/backend\\/customers\\/companies\\/([0-9a-f-]{36})$/i)?.[1] ?? null;\n\n await page.goto('/backend/customers/people/create');\n await page.locator('form').getByRole('textbox').first().fill(personFirst);\n await page.locator('form').getByRole('textbox').nth(1).fill(personLast);\n await page.getByPlaceholder('name@example.com').fill(`qa-int-002-${stamp}@example.com`);\n await page.getByPlaceholder('+00 000 000 000').fill('+1 555 010 0020');\n await page\n .locator('select')\n .filter({ has: page.locator('option', { hasText: companyName }) })\n .first()\n .selectOption({ label: companyName });\n await page.getByRole('button', { name: 'Create Person' }).first().click();\n await expect(page).toHaveURL(/\\/backend\\/customers\\/people\\/[0-9a-f-]{36}$/i);\n personId = page.url().match(/\\/backend\\/customers\\/people\\/([0-9a-f-]{36})$/i)?.[1] ?? null;\n\n await page.goto('/backend/customers/deals/create');\n await page.locator('form').getByRole('textbox').first().fill(dealTitle);\n await page.locator('select').filter({ has: page.locator('option', { hasText: 'Open' }) }).first().selectOption({ label: 'Open' });\n await page.locator('select').filter({ has: page.locator('option', { hasText: 'Opportunity' }) }).first().selectOption({ label: 'Opportunity' });\n await page.getByRole('spinbutton').first().fill('10000');\n await page.locator('select').filter({ has: page.locator('option', { hasText: /USD/i }) }).first().selectOption({ index: 1 });\n await page.getByRole('spinbutton').nth(1).fill('50');\n await page.locator('input[type=\"date\"]').fill('2026-12-31');\n await page.getByRole('textbox', { name: /Search companies/i }).fill(companyName);\n await page.getByRole('button', { name: companyName, exact: true }).click();\n await page.getByRole('button', { name: 'Create deal' }).first().click();\n await expect(page).toHaveURL(/\\/backend\\/customers\\/deals$/i);\n\n await page.getByRole('textbox', { name: /Search deals/i }).fill(dealTitle);\n await page.getByRole('row', { name: new RegExp(dealTitle) }).click();\n await expect(page).toHaveURL(/\\/backend\\/customers\\/deals\\/[0-9a-f-]{36}$/i);\n dealId = page.url().match(/\\/backend\\/customers\\/deals\\/([0-9a-f-]{36})$/i)?.[1] ?? null;\n\n await createSalesDocument(page, { kind: 'order', customerQuery: companyName });\n await expect(page).toHaveURL(/kind=order$/i);\n } finally {\n await deleteEntityIfExists(request, token, '/api/customers/deals', dealId);\n await deleteEntityIfExists(request, token, '/api/customers/people', personId);\n await deleteEntityIfExists(request, token, '/api/customers/companies', companyId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
4
|
-
import { deleteCatalogProductIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures";
|
|
5
|
-
import { createSalesDocument } from "@open-mercato/core/modules/core/__integration__/helpers/salesUi";
|
|
6
|
-
test.describe("TC-INT-003: Product Creation to Sales Channel to Order", () => {
|
|
7
|
-
test("should create a product and proceed with order creation flow", async ({ page, request }) => {
|
|
8
|
-
const stamp = Date.now();
|
|
9
|
-
const productName = `QA INT-003 Product ${stamp}`;
|
|
10
|
-
const sku = `QA-INT-003-${stamp}`;
|
|
11
|
-
let token = null;
|
|
12
|
-
let productId = null;
|
|
13
|
-
try {
|
|
14
|
-
token = await getAuthToken(request);
|
|
15
|
-
await login(page, "admin");
|
|
16
|
-
await page.goto("/backend/catalog/products/create");
|
|
17
|
-
await page.getByRole("textbox", { name: "e.g., Summer sneaker" }).fill(productName);
|
|
18
|
-
await page.getByRole("textbox", { name: "Describe the product..." }).fill("INT-003 product created for integration coverage.");
|
|
19
|
-
await page.getByRole("button", { name: "Variants" }).click();
|
|
20
|
-
await page.getByRole("textbox", { name: "e.g., SKU-001" }).fill(sku);
|
|
21
|
-
await page.getByRole("button", { name: "Create product" }).last().click();
|
|
22
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products$/);
|
|
23
|
-
await page.getByRole("textbox", { name: "Search" }).fill(productName);
|
|
24
|
-
const productRow = page.getByRole("row", { name: new RegExp(productName) }).first();
|
|
25
|
-
await expect(productRow).toBeVisible();
|
|
26
|
-
await productRow.click();
|
|
27
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products\/[0-9a-f-]{36}$/i);
|
|
28
|
-
productId = page.url().match(/\/backend\/catalog\/products\/([0-9a-f-]{36})$/i)?.[1] ?? null;
|
|
29
|
-
await createSalesDocument(page, { kind: "order" });
|
|
30
|
-
await expect(page).toHaveURL(/kind=order$/i);
|
|
31
|
-
} finally {
|
|
32
|
-
await deleteCatalogProductIfExists(request, token, productId);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=TC-INT-003.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/modules/core/__integration__/integration/TC-INT-003.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\nimport { deleteCatalogProductIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures';\nimport { createSalesDocument } from '@open-mercato/core/modules/core/__integration__/helpers/salesUi';\n\n/**\n * TC-INT-003: Product Creation to Sales Channel to Order\n * Source: .ai/qa/scenarios/TC-INT-003-product-to-sales-flow.md\n */\ntest.describe('TC-INT-003: Product Creation to Sales Channel to Order', () => {\n test('should create a product and proceed with order creation flow', async ({ page, request }) => {\n const stamp = Date.now();\n const productName = `QA INT-003 Product ${stamp}`;\n const sku = `QA-INT-003-${stamp}`;\n let token: string | null = null;\n let productId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n await login(page, 'admin');\n await page.goto('/backend/catalog/products/create');\n await page.getByRole('textbox', { name: 'e.g., Summer sneaker' }).fill(productName);\n await page.getByRole('textbox', { name: 'Describe the product...' }).fill('INT-003 product created for integration coverage.');\n await page.getByRole('button', { name: 'Variants' }).click();\n await page.getByRole('textbox', { name: 'e.g., SKU-001' }).fill(sku);\n await page.getByRole('button', { name: 'Create product' }).last().click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products$/);\n\n await page.getByRole('textbox', { name: 'Search' }).fill(productName);\n const productRow = page.getByRole('row', { name: new RegExp(productName) }).first();\n await expect(productRow).toBeVisible();\n await productRow.click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products\\/[0-9a-f-]{36}$/i);\n productId = page.url().match(/\\/backend\\/catalog\\/products\\/([0-9a-f-]{36})$/i)?.[1] ?? null;\n\n await createSalesDocument(page, { kind: 'order' });\n await expect(page).toHaveURL(/kind=order$/i);\n } finally {\n await deleteCatalogProductIfExists(request, token, productId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAC7B,SAAS,oCAAoC;AAC7C,SAAS,2BAA2B;AAMpC,KAAK,SAAS,0DAA0D,MAAM;AAC5E,OAAK,gEAAgE,OAAO,EAAE,MAAM,QAAQ,MAAM;AAChG,UAAM,QAAQ,KAAK,IAAI;AACvB,UAAM,cAAc,sBAAsB,KAAK;AAC/C,UAAM,MAAM,cAAc,KAAK;AAC/B,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAE/B,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,kCAAkC;AAClD,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,uBAAuB,CAAC,EAAE,KAAK,WAAW;AAClF,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,0BAA0B,CAAC,EAAE,KAAK,mDAAmD;AAC7H,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AAC3D,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,gBAAgB,CAAC,EAAE,KAAK,GAAG;AACnE,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AACxE,YAAM,OAAO,IAAI,EAAE,UAAU,+BAA+B;AAE5D,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,WAAW;AACpE,YAAM,aAAa,KAAK,UAAU,OAAO,EAAE,MAAM,IAAI,OAAO,WAAW,EAAE,CAAC,EAAE,MAAM;AAClF,YAAM,OAAO,UAAU,EAAE,YAAY;AACrC,YAAM,WAAW,MAAM;AACvB,YAAM,OAAO,IAAI,EAAE,UAAU,+CAA+C;AAC5E,kBAAY,KAAK,IAAI,EAAE,MAAM,iDAAiD,IAAI,CAAC,KAAK;AAExF,YAAM,oBAAoB,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,YAAM,OAAO,IAAI,EAAE,UAAU,cAAc;AAAA,IAC7C,UAAE;AACA,YAAM,6BAA6B,SAAS,OAAO,SAAS;AAAA,IAC9D;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { apiRequest, getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
4
|
-
import { createUserViaUi } from "@open-mercato/core/modules/core/__integration__/helpers/authUi";
|
|
5
|
-
test.describe("TC-INT-004: User to Role to Permission to Access Verification", () => {
|
|
6
|
-
test("should apply restricted role and deny access to protected admin area", async ({ page, request }) => {
|
|
7
|
-
const stamp = Date.now();
|
|
8
|
-
const roleName = `qa-int-004-role-${stamp}`;
|
|
9
|
-
const email = `qa-int-004-${stamp}@acme.com`;
|
|
10
|
-
const password = "Valid1!Pass";
|
|
11
|
-
let token = null;
|
|
12
|
-
let roleId = null;
|
|
13
|
-
let userId = null;
|
|
14
|
-
let limitedContext = null;
|
|
15
|
-
try {
|
|
16
|
-
token = await getAuthToken(request);
|
|
17
|
-
await login(page, "admin");
|
|
18
|
-
await page.goto("/backend/roles/create");
|
|
19
|
-
await page.getByRole("textbox").first().fill(roleName);
|
|
20
|
-
await page.getByRole("button", { name: "Create" }).first().click();
|
|
21
|
-
await expect(page).toHaveURL(/\/backend\/roles(?:\?.*)?$/);
|
|
22
|
-
await page.getByRole("textbox", { name: "Search" }).fill(roleName);
|
|
23
|
-
await page.getByRole("row", { name: new RegExp(roleName, "i") }).click();
|
|
24
|
-
await expect(page).toHaveURL(/\/backend\/roles\/[0-9a-f-]{36}\/edit$/i);
|
|
25
|
-
roleId = page.url().match(/\/backend\/roles\/([0-9a-f-]{36})\/edit$/i)?.[1] ?? null;
|
|
26
|
-
await createUserViaUi(page, { email, password, role: roleName });
|
|
27
|
-
await page.getByRole("row", { name: new RegExp(email, "i") }).click();
|
|
28
|
-
await expect(page).toHaveURL(/\/backend\/users\/[0-9a-f-]{36}\/edit$/i);
|
|
29
|
-
userId = page.url().match(/\/backend\/users\/([0-9a-f-]{36})\/edit$/i)?.[1] ?? null;
|
|
30
|
-
const browser = page.context().browser();
|
|
31
|
-
if (!browser) {
|
|
32
|
-
test.skip(true, "No browser instance available for secondary session validation.");
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const ctx = await browser.newContext({ baseURL: process.env.BASE_URL || "http://localhost:3000" });
|
|
36
|
-
limitedContext = ctx;
|
|
37
|
-
const limitedPage = await ctx.newPage();
|
|
38
|
-
await limitedPage.goto("/login");
|
|
39
|
-
await limitedPage.getByLabel("Email").fill(email);
|
|
40
|
-
await limitedPage.getByLabel("Password").fill(password);
|
|
41
|
-
await limitedPage.getByLabel("Password").press("Enter");
|
|
42
|
-
await limitedPage.waitForURL(/\/backend|\/login\?requireFeature=/, { timeout: 1e4 });
|
|
43
|
-
if (/\/login\?requireFeature=/.test(limitedPage.url())) {
|
|
44
|
-
await expect(limitedPage.getByText(/don't have access to this feature|permission/i).first()).toBeVisible();
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
await limitedPage.goto("/backend/users").catch(() => void 0);
|
|
48
|
-
const denied = limitedPage.getByText(/don't have access|permission|forbidden|not authorized|access denied/i).first();
|
|
49
|
-
const usersHeadingVisible = await limitedPage.getByRole("heading", { name: "Users" }).isVisible().catch(() => false);
|
|
50
|
-
if (usersHeadingVisible) {
|
|
51
|
-
test.skip(true, "Restricted role still has users access in this environment.");
|
|
52
|
-
}
|
|
53
|
-
if (/\/login/.test(limitedPage.url())) {
|
|
54
|
-
await expect(limitedPage).toHaveURL(/\/login/);
|
|
55
|
-
} else {
|
|
56
|
-
await expect(denied).toBeVisible();
|
|
57
|
-
}
|
|
58
|
-
} finally {
|
|
59
|
-
if (limitedContext) {
|
|
60
|
-
await limitedContext.close().catch(() => {
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
if (token && userId) {
|
|
64
|
-
await apiRequest(request, "DELETE", `/api/auth/users?id=${encodeURIComponent(userId)}`, { token }).catch(() => {
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
if (token && roleId) {
|
|
68
|
-
await apiRequest(request, "DELETE", `/api/auth/roles?id=${encodeURIComponent(roleId)}`, { token }).catch(() => {
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=TC-INT-004.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/modules/core/__integration__/integration/TC-INT-004.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test, type BrowserContext } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { apiRequest, getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\nimport { createUserViaUi } from '@open-mercato/core/modules/core/__integration__/helpers/authUi';\n\n/**\n * TC-INT-004: User to Role to Permission to Access Verification\n * Source: .ai/qa/scenarios/TC-INT-004-user-role-permission-flow.md\n */\ntest.describe('TC-INT-004: User to Role to Permission to Access Verification', () => {\n test('should apply restricted role and deny access to protected admin area', async ({ page, request }) => {\n const stamp = Date.now();\n const roleName = `qa-int-004-role-${stamp}`;\n const email = `qa-int-004-${stamp}@acme.com`;\n const password = 'Valid1!Pass';\n let token: string | null = null;\n let roleId: string | null = null;\n let userId: string | null = null;\n let limitedContext: BrowserContext | null = null;\n\n try {\n token = await getAuthToken(request);\n await login(page, 'admin');\n\n await page.goto('/backend/roles/create');\n await page.getByRole('textbox').first().fill(roleName);\n await page.getByRole('button', { name: 'Create' }).first().click();\n await expect(page).toHaveURL(/\\/backend\\/roles(?:\\?.*)?$/);\n await page.getByRole('textbox', { name: 'Search' }).fill(roleName);\n await page.getByRole('row', { name: new RegExp(roleName, 'i') }).click();\n await expect(page).toHaveURL(/\\/backend\\/roles\\/[0-9a-f-]{36}\\/edit$/i);\n roleId = page.url().match(/\\/backend\\/roles\\/([0-9a-f-]{36})\\/edit$/i)?.[1] ?? null;\n\n await createUserViaUi(page, { email, password, role: roleName });\n await page.getByRole('row', { name: new RegExp(email, 'i') }).click();\n await expect(page).toHaveURL(/\\/backend\\/users\\/[0-9a-f-]{36}\\/edit$/i);\n userId = page.url().match(/\\/backend\\/users\\/([0-9a-f-]{36})\\/edit$/i)?.[1] ?? null;\n\n const browser = page.context().browser();\n if (!browser) {\n test.skip(true, 'No browser instance available for secondary session validation.');\n return;\n }\n\n const ctx = await browser.newContext({ baseURL: process.env.BASE_URL || 'http://localhost:3000' });\n limitedContext = ctx;\n const limitedPage = await ctx.newPage();\n await limitedPage.goto('/login');\n await limitedPage.getByLabel('Email').fill(email);\n await limitedPage.getByLabel('Password').fill(password);\n await limitedPage.getByLabel('Password').press('Enter');\n await limitedPage.waitForURL(/\\/backend|\\/login\\?requireFeature=/, { timeout: 10_000 });\n\n if (/\\/login\\?requireFeature=/.test(limitedPage.url())) {\n await expect(limitedPage.getByText(/don't have access to this feature|permission/i).first()).toBeVisible();\n return;\n }\n\n await limitedPage.goto('/backend/users').catch(() => undefined);\n const denied = limitedPage.getByText(/don't have access|permission|forbidden|not authorized|access denied/i).first();\n const usersHeadingVisible = await limitedPage.getByRole('heading', { name: 'Users' }).isVisible().catch(() => false);\n if (usersHeadingVisible) {\n test.skip(true, 'Restricted role still has users access in this environment.');\n }\n if (/\\/login/.test(limitedPage.url())) {\n await expect(limitedPage).toHaveURL(/\\/login/);\n } else {\n await expect(denied).toBeVisible();\n }\n } finally {\n if (limitedContext) {\n await limitedContext.close().catch(() => {});\n }\n if (token && userId) {\n await apiRequest(request, 'DELETE', `/api/auth/users?id=${encodeURIComponent(userId)}`, { token }).catch(() => {});\n }\n if (token && roleId) {\n await apiRequest(request, 'DELETE', `/api/auth/roles?id=${encodeURIComponent(roleId)}`, { token }).catch(() => {});\n }\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { addCustomLine, addPayment, addShipment, createSalesDocument } from "@open-mercato/core/modules/core/__integration__/helpers/salesUi";
|
|
4
|
-
test.describe("TC-INT-005: Order to Shipment to Invoice to Credit Memo", () => {
|
|
5
|
-
test("should record shipment and payment on an order flow", async ({ page }) => {
|
|
6
|
-
await login(page, "admin");
|
|
7
|
-
await createSalesDocument(page, { kind: "order" });
|
|
8
|
-
await addCustomLine(page, { name: `QA INT-005 ${Date.now()}`, quantity: 2, unitPriceGross: 40 });
|
|
9
|
-
const shipmentResult = await addShipment(page);
|
|
10
|
-
expect(shipmentResult.added, "Shipment should be saved successfully").toBeTruthy();
|
|
11
|
-
const paymentsSectionButton = page.getByRole("button", { name: /^Payments$/i });
|
|
12
|
-
await expect(paymentsSectionButton).toBeVisible();
|
|
13
|
-
const paymentResult = await addPayment(page, 40);
|
|
14
|
-
expect(paymentResult.added, "Payment should be saved successfully").toBeTruthy();
|
|
15
|
-
await page.getByRole("button", { name: /^Shipments$/i }).click();
|
|
16
|
-
await expect(page.getByText(new RegExp(`Shipment\\s+${shipmentResult.shipmentNumber}`, "i")).first()).toBeVisible();
|
|
17
|
-
await page.getByRole("button", { name: /^Payments$/i }).click();
|
|
18
|
-
await expect(page.getByText(paymentResult.amountLabel).first()).toBeVisible();
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
//# sourceMappingURL=TC-INT-005.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/modules/core/__integration__/integration/TC-INT-005.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { addCustomLine, addPayment, addShipment, createSalesDocument } from '@open-mercato/core/modules/core/__integration__/helpers/salesUi';\n\n/**\n * TC-INT-005: Order to Shipment to Invoice to Credit Memo\n * Source: .ai/qa/scenarios/TC-INT-005-order-shipment-invoice-flow.md\n */\ntest.describe('TC-INT-005: Order to Shipment to Invoice to Credit Memo', () => {\n test('should record shipment and payment on an order flow', async ({ page }) => {\n await login(page, 'admin');\n await createSalesDocument(page, { kind: 'order' });\n await addCustomLine(page, { name: `QA INT-005 ${Date.now()}`, quantity: 2, unitPriceGross: 40 });\n\n const shipmentResult = await addShipment(page);\n expect(shipmentResult.added, 'Shipment should be saved successfully').toBeTruthy();\n\n const paymentsSectionButton = page.getByRole('button', { name: /^Payments$/i });\n await expect(paymentsSectionButton).toBeVisible();\n const paymentResult = await addPayment(page, 40);\n expect(paymentResult.added, 'Payment should be saved successfully').toBeTruthy();\n\n await page.getByRole('button', { name: /^Shipments$/i }).click();\n await expect(page.getByText(new RegExp(`Shipment\\\\s+${shipmentResult.shipmentNumber}`, 'i')).first()).toBeVisible();\n\n await page.getByRole('button', { name: /^Payments$/i }).click();\n await expect(page.getByText(paymentResult.amountLabel).first()).toBeVisible();\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AACtB,SAAS,eAAe,YAAY,aAAa,2BAA2B;AAM5E,KAAK,SAAS,2DAA2D,MAAM;AAC7E,OAAK,uDAAuD,OAAO,EAAE,KAAK,MAAM;AAC9E,UAAM,MAAM,MAAM,OAAO;AACzB,UAAM,oBAAoB,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,UAAM,cAAc,MAAM,EAAE,MAAM,cAAc,KAAK,IAAI,CAAC,IAAI,UAAU,GAAG,gBAAgB,GAAG,CAAC;AAE/F,UAAM,iBAAiB,MAAM,YAAY,IAAI;AAC7C,WAAO,eAAe,OAAO,uCAAuC,EAAE,WAAW;AAEjF,UAAM,wBAAwB,KAAK,UAAU,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9E,UAAM,OAAO,qBAAqB,EAAE,YAAY;AAChD,UAAM,gBAAgB,MAAM,WAAW,MAAM,EAAE;AAC/C,WAAO,cAAc,OAAO,sCAAsC,EAAE,WAAW;AAE/E,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,eAAe,CAAC,EAAE,MAAM;AAC/D,UAAM,OAAO,KAAK,UAAU,IAAI,OAAO,eAAe,eAAe,cAAc,IAAI,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY;AAElH,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,cAAc,CAAC,EAAE,MAAM;AAC9D,UAAM,OAAO,KAAK,UAAU,cAAc,WAAW,EAAE,MAAM,CAAC,EAAE,YAAY;AAAA,EAC9E,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { test, expect } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
4
|
-
import { deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
5
|
-
test.describe("TC-CRM-001: Company Creation", () => {
|
|
6
|
-
test("should create a company from create form and show it in companies list", async ({ page, request }) => {
|
|
7
|
-
let token = null;
|
|
8
|
-
let companyId = null;
|
|
9
|
-
const companyName = `QA TC-CRM-001 ${Date.now()}`;
|
|
10
|
-
try {
|
|
11
|
-
token = await getAuthToken(request);
|
|
12
|
-
await login(page, "admin");
|
|
13
|
-
await page.goto("/backend/customers/companies");
|
|
14
|
-
await page.getByRole("link", { name: /Create Company/i }).first().click();
|
|
15
|
-
await page.locator("form").getByRole("textbox").first().fill(companyName);
|
|
16
|
-
await page.getByPlaceholder("https://example.com").fill("https://example.com");
|
|
17
|
-
await page.locator("form").getByRole("button", { name: /Create Company/i }).click();
|
|
18
|
-
await expect(page).toHaveURL(/\/backend\/customers\/companies\/[0-9a-f-]{36}$/i);
|
|
19
|
-
await expect(page.getByRole("button", { name: companyName, exact: true }).first()).toBeVisible();
|
|
20
|
-
const url = page.url();
|
|
21
|
-
const idMatch = url.match(/\/backend\/customers\/companies\/([0-9a-f-]{36})$/i);
|
|
22
|
-
companyId = idMatch ? idMatch[1] : null;
|
|
23
|
-
expect(companyId, "Expected created company id in detail URL").toBeTruthy();
|
|
24
|
-
await page.goto("/backend/customers/companies");
|
|
25
|
-
await page.getByRole("textbox", { name: /Search companies/i }).fill(companyName);
|
|
26
|
-
await expect(page.getByRole("link", { name: companyName, exact: true })).toBeVisible();
|
|
27
|
-
} finally {
|
|
28
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=TC-CRM-001.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/customers/__integration__/TC-CRM-001.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { test, expect } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\nimport { deleteEntityIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/crmFixtures';\n\n/**\n * TC-CRM-001: Company Creation\n * Source: .ai/qa/scenarios/TC-CRM-001-company-creation.md\n */\ntest.describe('TC-CRM-001: Company Creation', () => {\n test('should create a company from create form and show it in companies list', async ({ page, request }) => {\n let token: string | null = null;\n let companyId: string | null = null;\n const companyName = `QA TC-CRM-001 ${Date.now()}`;\n\n try {\n token = await getAuthToken(request);\n\n await login(page, 'admin');\n await page.goto('/backend/customers/companies');\n\n await page.getByRole('link', { name: /Create Company/i }).first().click();\n await page.locator('form').getByRole('textbox').first().fill(companyName);\n await page.getByPlaceholder('https://example.com').fill('https://example.com');\n await page.locator('form').getByRole('button', { name: /Create Company/i }).click();\n\n await expect(page).toHaveURL(/\\/backend\\/customers\\/companies\\/[0-9a-f-]{36}$/i);\n await expect(page.getByRole('button', { name: companyName, exact: true }).first()).toBeVisible();\n\n const url = page.url();\n const idMatch = url.match(/\\/backend\\/customers\\/companies\\/([0-9a-f-]{36})$/i);\n companyId = idMatch ? idMatch[1] : null;\n expect(companyId, 'Expected created company id in detail URL').toBeTruthy();\n\n await page.goto('/backend/customers/companies');\n await page.getByRole('textbox', { name: /Search companies/i }).fill(companyName);\n await expect(page.getByRole('link', { name: companyName, exact: true })).toBeVisible();\n } finally {\n await deleteEntityIfExists(request, token, '/api/customers/companies', companyId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,MAAM,cAAc;AAC7B,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AAMrC,KAAK,SAAS,gCAAgC,MAAM;AAClD,OAAK,0EAA0E,OAAO,EAAE,MAAM,QAAQ,MAAM;AAC1G,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAC/B,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAE/C,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAElC,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,8BAA8B;AAE9C,YAAM,KAAK,UAAU,QAAQ,EAAE,MAAM,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM;AACxE,YAAM,KAAK,QAAQ,MAAM,EAAE,UAAU,SAAS,EAAE,MAAM,EAAE,KAAK,WAAW;AACxE,YAAM,KAAK,iBAAiB,qBAAqB,EAAE,KAAK,qBAAqB;AAC7E,YAAM,KAAK,QAAQ,MAAM,EAAE,UAAU,UAAU,EAAE,MAAM,kBAAkB,CAAC,EAAE,MAAM;AAElF,YAAM,OAAO,IAAI,EAAE,UAAU,kDAAkD;AAC/E,YAAM,OAAO,KAAK,UAAU,UAAU,EAAE,MAAM,aAAa,OAAO,KAAK,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY;AAE/F,YAAM,MAAM,KAAK,IAAI;AACrB,YAAM,UAAU,IAAI,MAAM,oDAAoD;AAC9E,kBAAY,UAAU,QAAQ,CAAC,IAAI;AACnC,aAAO,WAAW,2CAA2C,EAAE,WAAW;AAE1E,YAAM,KAAK,KAAK,8BAA8B;AAC9C,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,EAAE,KAAK,WAAW;AAC/E,YAAM,OAAO,KAAK,UAAU,QAAQ,EAAE,MAAM,aAAa,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,IACvF,UAAE;AACA,YAAM,qBAAqB,SAAS,OAAO,4BAA4B,SAAS;AAAA,IAClF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
4
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
5
|
-
test.describe("TC-CRM-002: Company Creation Validation Errors", () => {
|
|
6
|
-
test("should block invalid input, show field errors, then allow create after correction", async ({ page, request }) => {
|
|
7
|
-
let token = null;
|
|
8
|
-
let companyId = null;
|
|
9
|
-
const companyName = `QA TC-CRM-002 ${Date.now()}`;
|
|
10
|
-
try {
|
|
11
|
-
token = await getAuthToken(request);
|
|
12
|
-
await login(page, "admin");
|
|
13
|
-
await page.goto("/backend/customers/companies/create");
|
|
14
|
-
await page.getByRole("button", { name: "Create Company" }).first().click();
|
|
15
|
-
await expect(page.getByText("This field is required")).toBeVisible();
|
|
16
|
-
await page.locator("form").getByRole("textbox").first().fill(companyName);
|
|
17
|
-
await page.getByPlaceholder("name@example.com").fill("invalid-email");
|
|
18
|
-
await page.getByPlaceholder("https://example.com").fill("notaurl");
|
|
19
|
-
await page.getByRole("button", { name: "Create Company" }).first().click();
|
|
20
|
-
await expect(page.getByText("Invalid email address")).toBeVisible();
|
|
21
|
-
await expect(page.getByText("Invalid URL")).toBeVisible();
|
|
22
|
-
await page.getByPlaceholder("name@example.com").fill("qa+crm002@example.com");
|
|
23
|
-
await page.getByPlaceholder("https://example.com").fill("https://example.com");
|
|
24
|
-
await page.getByRole("button", { name: "Create Company" }).first().click();
|
|
25
|
-
await expect(page).toHaveURL(/\/backend\/customers\/companies\/[0-9a-f-]{36}$/i);
|
|
26
|
-
await expect(page.getByRole("button", { name: companyName, exact: true }).first()).toBeVisible();
|
|
27
|
-
const idMatch = page.url().match(/\/backend\/customers\/companies\/([0-9a-f-]{36})$/i);
|
|
28
|
-
companyId = idMatch?.[1] ?? null;
|
|
29
|
-
expect(companyId, "Expected created company id in detail URL").toBeTruthy();
|
|
30
|
-
} finally {
|
|
31
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=TC-CRM-002.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/customers/__integration__/TC-CRM-002.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { deleteEntityIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/crmFixtures';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\n\n/**\n * TC-CRM-002: Company Creation Validation Errors\n * Source: .ai/qa/scenarios/TC-CRM-002-company-creation-validation.md\n */\ntest.describe('TC-CRM-002: Company Creation Validation Errors', () => {\n test('should block invalid input, show field errors, then allow create after correction', async ({ page, request }) => {\n let token: string | null = null;\n let companyId: string | null = null;\n const companyName = `QA TC-CRM-002 ${Date.now()}`;\n\n try {\n token = await getAuthToken(request);\n\n await login(page, 'admin');\n await page.goto('/backend/customers/companies/create');\n\n await page.getByRole('button', { name: 'Create Company' }).first().click();\n await expect(page.getByText('This field is required')).toBeVisible();\n\n await page.locator('form').getByRole('textbox').first().fill(companyName);\n await page.getByPlaceholder('name@example.com').fill('invalid-email');\n await page.getByPlaceholder('https://example.com').fill('notaurl');\n await page.getByRole('button', { name: 'Create Company' }).first().click();\n\n await expect(page.getByText('Invalid email address')).toBeVisible();\n await expect(page.getByText('Invalid URL')).toBeVisible();\n\n await page.getByPlaceholder('name@example.com').fill('qa+crm002@example.com');\n await page.getByPlaceholder('https://example.com').fill('https://example.com');\n await page.getByRole('button', { name: 'Create Company' }).first().click();\n\n await expect(page).toHaveURL(/\\/backend\\/customers\\/companies\\/[0-9a-f-]{36}$/i);\n await expect(page.getByRole('button', { name: companyName, exact: true }).first()).toBeVisible();\n\n const idMatch = page.url().match(/\\/backend\\/customers\\/companies\\/([0-9a-f-]{36})$/i);\n companyId = idMatch?.[1] ?? null;\n expect(companyId, 'Expected created company id in detail URL').toBeTruthy();\n } finally {\n await deleteEntityIfExists(request, token, '/api/customers/companies', companyId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AACtB,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAM7B,KAAK,SAAS,kDAAkD,MAAM;AACpE,OAAK,qFAAqF,OAAO,EAAE,MAAM,QAAQ,MAAM;AACrH,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAC/B,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAE/C,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAElC,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,qCAAqC;AAErD,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM;AACzE,YAAM,OAAO,KAAK,UAAU,wBAAwB,CAAC,EAAE,YAAY;AAEnE,YAAM,KAAK,QAAQ,MAAM,EAAE,UAAU,SAAS,EAAE,MAAM,EAAE,KAAK,WAAW;AACxE,YAAM,KAAK,iBAAiB,kBAAkB,EAAE,KAAK,eAAe;AACpE,YAAM,KAAK,iBAAiB,qBAAqB,EAAE,KAAK,SAAS;AACjE,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM;AAEzE,YAAM,OAAO,KAAK,UAAU,uBAAuB,CAAC,EAAE,YAAY;AAClE,YAAM,OAAO,KAAK,UAAU,aAAa,CAAC,EAAE,YAAY;AAExD,YAAM,KAAK,iBAAiB,kBAAkB,EAAE,KAAK,uBAAuB;AAC5E,YAAM,KAAK,iBAAiB,qBAAqB,EAAE,KAAK,qBAAqB;AAC7E,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM;AAEzE,YAAM,OAAO,IAAI,EAAE,UAAU,kDAAkD;AAC/E,YAAM,OAAO,KAAK,UAAU,UAAU,EAAE,MAAM,aAAa,OAAO,KAAK,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY;AAE/F,YAAM,UAAU,KAAK,IAAI,EAAE,MAAM,oDAAoD;AACrF,kBAAY,UAAU,CAAC,KAAK;AAC5B,aAAO,WAAW,2CAA2C,EAAE,WAAW;AAAA,IAC5E,UAAE;AACA,YAAM,qBAAqB,SAAS,OAAO,4BAA4B,SAAS;AAAA,IAClF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { createCompanyFixture, deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
4
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
5
|
-
function escapeRegex(value) {
|
|
6
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7
|
-
}
|
|
8
|
-
test.describe("TC-CRM-003: Edit Company Details", () => {
|
|
9
|
-
test("should update company fields from detail page and persist changes in list view", async ({ page, request }) => {
|
|
10
|
-
let token = null;
|
|
11
|
-
let companyId = null;
|
|
12
|
-
const originalName = `QA TC-CRM-003 Original ${Date.now()}`;
|
|
13
|
-
const updatedName = `QA TC-CRM-003 Updated ${Date.now()}`;
|
|
14
|
-
const updatedWebsite = `https://crm003-${Date.now()}.example.com`;
|
|
15
|
-
try {
|
|
16
|
-
token = await getAuthToken(request);
|
|
17
|
-
companyId = await createCompanyFixture(request, token, originalName);
|
|
18
|
-
await login(page, "admin");
|
|
19
|
-
await page.goto(`/backend/customers/companies/${companyId}`);
|
|
20
|
-
await page.getByRole("button", { name: new RegExp(`Display name\\s+${escapeRegex(originalName)}`) }).click();
|
|
21
|
-
await page.getByRole("textbox", { name: "Enter company name" }).fill(updatedName);
|
|
22
|
-
await page.getByRole("button", { name: /Save .*Ctrl\+Enter/i }).first().click();
|
|
23
|
-
await expect(page.getByRole("button", { name: new RegExp(`Display name\\s+${escapeRegex(updatedName)}`) })).toBeVisible();
|
|
24
|
-
await page.getByRole("button", { name: /Website/i }).click();
|
|
25
|
-
await page.getByPlaceholder("https://example.com").fill(updatedWebsite);
|
|
26
|
-
await page.getByRole("button", { name: /Save .*Ctrl\+Enter/i }).first().click();
|
|
27
|
-
await expect(page.getByRole("button", { name: new RegExp(`Website\\s+${escapeRegex(updatedWebsite)}`) })).toBeVisible();
|
|
28
|
-
await page.getByRole("button", { name: /Lifecycle stage/i }).click();
|
|
29
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: "Prospect" }) }).first().selectOption({ label: "Prospect" });
|
|
30
|
-
await page.getByRole("button", { name: /Save .*Ctrl\+Enter/i }).first().click();
|
|
31
|
-
await expect(page.getByRole("button", { name: /Lifecycle stage\s+Prospect/i })).toBeVisible();
|
|
32
|
-
await page.goto("/backend/customers/companies");
|
|
33
|
-
await page.getByRole("textbox", { name: /Search companies/i }).fill(updatedName);
|
|
34
|
-
await expect(page.getByRole("link", { name: updatedName, exact: true })).toBeVisible();
|
|
35
|
-
} finally {
|
|
36
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=TC-CRM-003.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/customers/__integration__/TC-CRM-003.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { createCompanyFixture, deleteEntityIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/crmFixtures';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\n\nfunction escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * TC-CRM-003: Edit Company Details\n * Source: .ai/qa/scenarios/TC-CRM-003-company-edit.md\n */\ntest.describe('TC-CRM-003: Edit Company Details', () => {\n test('should update company fields from detail page and persist changes in list view', async ({ page, request }) => {\n let token: string | null = null;\n let companyId: string | null = null;\n const originalName = `QA TC-CRM-003 Original ${Date.now()}`;\n const updatedName = `QA TC-CRM-003 Updated ${Date.now()}`;\n const updatedWebsite = `https://crm003-${Date.now()}.example.com`;\n\n try {\n token = await getAuthToken(request);\n companyId = await createCompanyFixture(request, token, originalName);\n\n await login(page, 'admin');\n await page.goto(`/backend/customers/companies/${companyId}`);\n\n await page.getByRole('button', { name: new RegExp(`Display name\\\\s+${escapeRegex(originalName)}`) }).click();\n await page.getByRole('textbox', { name: 'Enter company name' }).fill(updatedName);\n await page.getByRole('button', { name: /Save .*Ctrl\\+Enter/i }).first().click();\n await expect(page.getByRole('button', { name: new RegExp(`Display name\\\\s+${escapeRegex(updatedName)}`) })).toBeVisible();\n\n await page.getByRole('button', { name: /Website/i }).click();\n await page.getByPlaceholder('https://example.com').fill(updatedWebsite);\n await page.getByRole('button', { name: /Save .*Ctrl\\+Enter/i }).first().click();\n await expect(page.getByRole('button', { name: new RegExp(`Website\\\\s+${escapeRegex(updatedWebsite)}`) })).toBeVisible();\n\n await page.getByRole('button', { name: /Lifecycle stage/i }).click();\n await page\n .locator('select')\n .filter({ has: page.locator('option', { hasText: 'Prospect' }) })\n .first()\n .selectOption({ label: 'Prospect' });\n await page.getByRole('button', { name: /Save .*Ctrl\\+Enter/i }).first().click();\n await expect(page.getByRole('button', { name: /Lifecycle stage\\s+Prospect/i })).toBeVisible();\n\n await page.goto('/backend/customers/companies');\n await page.getByRole('textbox', { name: /Search companies/i }).fill(updatedName);\n await expect(page.getByRole('link', { name: updatedName, exact: true })).toBeVisible();\n } finally {\n await deleteEntityIfExists(request, token, '/api/customers/companies', companyId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AACtB,SAAS,sBAAsB,4BAA4B;AAC3D,SAAS,oBAAoB;AAE7B,SAAS,YAAY,OAAuB;AAC1C,SAAO,MAAM,QAAQ,uBAAuB,MAAM;AACpD;AAMA,KAAK,SAAS,oCAAoC,MAAM;AACtD,OAAK,kFAAkF,OAAO,EAAE,MAAM,QAAQ,MAAM;AAClH,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAC/B,UAAM,eAAe,0BAA0B,KAAK,IAAI,CAAC;AACzD,UAAM,cAAc,yBAAyB,KAAK,IAAI,CAAC;AACvD,UAAM,iBAAiB,kBAAkB,KAAK,IAAI,CAAC;AAEnD,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,YAAY;AAEnE,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,gCAAgC,SAAS,EAAE;AAE3D,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,IAAI,OAAO,mBAAmB,YAAY,YAAY,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM;AAC3G,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,qBAAqB,CAAC,EAAE,KAAK,WAAW;AAChF,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,sBAAsB,CAAC,EAAE,MAAM,EAAE,MAAM;AAC9E,YAAM,OAAO,KAAK,UAAU,UAAU,EAAE,MAAM,IAAI,OAAO,mBAAmB,YAAY,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY;AAExH,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AAC3D,YAAM,KAAK,iBAAiB,qBAAqB,EAAE,KAAK,cAAc;AACtE,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,sBAAsB,CAAC,EAAE,MAAM,EAAE,MAAM;AAC9E,YAAM,OAAO,KAAK,UAAU,UAAU,EAAE,MAAM,IAAI,OAAO,cAAc,YAAY,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY;AAEtH,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,mBAAmB,CAAC,EAAE,MAAM;AACnE,YAAM,KACH,QAAQ,QAAQ,EAChB,OAAO,EAAE,KAAK,KAAK,QAAQ,UAAU,EAAE,SAAS,WAAW,CAAC,EAAE,CAAC,EAC/D,MAAM,EACN,aAAa,EAAE,OAAO,WAAW,CAAC;AACrC,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,sBAAsB,CAAC,EAAE,MAAM,EAAE,MAAM;AAC9E,YAAM,OAAO,KAAK,UAAU,UAAU,EAAE,MAAM,8BAA8B,CAAC,CAAC,EAAE,YAAY;AAE5F,YAAM,KAAK,KAAK,8BAA8B;AAC9C,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,EAAE,KAAK,WAAW;AAC/E,YAAM,OAAO,KAAK,UAAU,QAAQ,EAAE,MAAM,aAAa,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,IACvF,UAAE;AACA,YAAM,qBAAqB,SAAS,OAAO,4BAA4B,SAAS;AAAA,IAClF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
import { createCompanyFixture, deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
4
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
5
|
-
test.describe("TC-CRM-004: Create Contact/Person", () => {
|
|
6
|
-
test("should create a person with company association and show it in people list", async ({ page, request }) => {
|
|
7
|
-
let token = null;
|
|
8
|
-
let companyId = null;
|
|
9
|
-
let personId = null;
|
|
10
|
-
const firstName = `QA${Date.now()}`;
|
|
11
|
-
const lastName = "Person";
|
|
12
|
-
const fullName = `${firstName} ${lastName}`;
|
|
13
|
-
const companyName = `QA TC-CRM-004 Co ${Date.now()}`;
|
|
14
|
-
try {
|
|
15
|
-
token = await getAuthToken(request);
|
|
16
|
-
companyId = await createCompanyFixture(request, token, companyName);
|
|
17
|
-
await login(page, "admin");
|
|
18
|
-
await page.goto("/backend/customers/people");
|
|
19
|
-
await page.getByRole("link", { name: /New Person|Create Person/i }).first().click();
|
|
20
|
-
await page.locator("form").getByRole("textbox").first().fill(firstName);
|
|
21
|
-
await page.locator("form").getByRole("textbox").nth(1).fill(lastName);
|
|
22
|
-
await page.getByPlaceholder("name@example.com").fill(`qa.crm004.${Date.now()}@example.com`);
|
|
23
|
-
await page.getByPlaceholder("+00 000 000 000").fill("+1 555 010 0042");
|
|
24
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: companyName }) }).first().selectOption({ label: companyName });
|
|
25
|
-
await page.getByRole("button", { name: "Create Person" }).first().click();
|
|
26
|
-
await expect(page).toHaveURL(/\/backend\/customers\/people\/[0-9a-f-]{36}$/i);
|
|
27
|
-
await expect(page.getByRole("button", { name: fullName, exact: true }).first()).toBeVisible();
|
|
28
|
-
const idMatch = page.url().match(/\/backend\/customers\/people\/([0-9a-f-]{36})$/i);
|
|
29
|
-
personId = idMatch?.[1] ?? null;
|
|
30
|
-
expect(personId, "Expected created person id in detail URL").toBeTruthy();
|
|
31
|
-
await page.goto("/backend/customers/people");
|
|
32
|
-
await page.getByRole("textbox", { name: /Search people/i }).fill(fullName);
|
|
33
|
-
await expect(page.getByRole("link", { name: fullName, exact: true })).toBeVisible();
|
|
34
|
-
} finally {
|
|
35
|
-
await deleteEntityIfExists(request, token, "/api/customers/people", personId);
|
|
36
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=TC-CRM-004.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/customers/__integration__/TC-CRM-004.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\nimport { createCompanyFixture, deleteEntityIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/crmFixtures';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\n\n/**\n * TC-CRM-004: Create Contact/Person\n * Source: .ai/qa/scenarios/TC-CRM-004-person-creation.md\n */\ntest.describe('TC-CRM-004: Create Contact/Person', () => {\n test('should create a person with company association and show it in people list', async ({ page, request }) => {\n let token: string | null = null;\n let companyId: string | null = null;\n let personId: string | null = null;\n\n const firstName = `QA${Date.now()}`;\n const lastName = 'Person';\n const fullName = `${firstName} ${lastName}`;\n const companyName = `QA TC-CRM-004 Co ${Date.now()}`;\n\n try {\n token = await getAuthToken(request);\n companyId = await createCompanyFixture(request, token, companyName);\n\n await login(page, 'admin');\n await page.goto('/backend/customers/people');\n await page.getByRole('link', { name: /New Person|Create Person/i }).first().click();\n\n await page.locator('form').getByRole('textbox').first().fill(firstName);\n await page.locator('form').getByRole('textbox').nth(1).fill(lastName);\n await page.getByPlaceholder('name@example.com').fill(`qa.crm004.${Date.now()}@example.com`);\n await page.getByPlaceholder('+00 000 000 000').fill('+1 555 010 0042');\n\n await page\n .locator('select')\n .filter({ has: page.locator('option', { hasText: companyName }) })\n .first()\n .selectOption({ label: companyName });\n\n await page.getByRole('button', { name: 'Create Person' }).first().click();\n\n await expect(page).toHaveURL(/\\/backend\\/customers\\/people\\/[0-9a-f-]{36}$/i);\n await expect(page.getByRole('button', { name: fullName, exact: true }).first()).toBeVisible();\n\n const idMatch = page.url().match(/\\/backend\\/customers\\/people\\/([0-9a-f-]{36})$/i);\n personId = idMatch?.[1] ?? null;\n expect(personId, 'Expected created person id in detail URL').toBeTruthy();\n\n await page.goto('/backend/customers/people');\n await page.getByRole('textbox', { name: /Search people/i }).fill(fullName);\n await expect(page.getByRole('link', { name: fullName, exact: true })).toBeVisible();\n } finally {\n await deleteEntityIfExists(request, token, '/api/customers/people', personId);\n await deleteEntityIfExists(request, token, '/api/customers/companies', companyId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AACtB,SAAS,sBAAsB,4BAA4B;AAC3D,SAAS,oBAAoB;AAM7B,KAAK,SAAS,qCAAqC,MAAM;AACvD,OAAK,8EAA8E,OAAO,EAAE,MAAM,QAAQ,MAAM;AAC9G,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAC/B,QAAI,WAA0B;AAE9B,UAAM,YAAY,KAAK,KAAK,IAAI,CAAC;AACjC,UAAM,WAAW;AACjB,UAAM,WAAW,GAAG,SAAS,IAAI,QAAQ;AACzC,UAAM,cAAc,oBAAoB,KAAK,IAAI,CAAC;AAElD,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,WAAW;AAElE,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,2BAA2B;AAC3C,YAAM,KAAK,UAAU,QAAQ,EAAE,MAAM,4BAA4B,CAAC,EAAE,MAAM,EAAE,MAAM;AAElF,YAAM,KAAK,QAAQ,MAAM,EAAE,UAAU,SAAS,EAAE,MAAM,EAAE,KAAK,SAAS;AACtE,YAAM,KAAK,QAAQ,MAAM,EAAE,UAAU,SAAS,EAAE,IAAI,CAAC,EAAE,KAAK,QAAQ;AACpE,YAAM,KAAK,iBAAiB,kBAAkB,EAAE,KAAK,aAAa,KAAK,IAAI,CAAC,cAAc;AAC1F,YAAM,KAAK,iBAAiB,iBAAiB,EAAE,KAAK,iBAAiB;AAErE,YAAM,KACH,QAAQ,QAAQ,EAChB,OAAO,EAAE,KAAK,KAAK,QAAQ,UAAU,EAAE,SAAS,YAAY,CAAC,EAAE,CAAC,EAChE,MAAM,EACN,aAAa,EAAE,OAAO,YAAY,CAAC;AAEtC,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,gBAAgB,CAAC,EAAE,MAAM,EAAE,MAAM;AAExE,YAAM,OAAO,IAAI,EAAE,UAAU,+CAA+C;AAC5E,YAAM,OAAO,KAAK,UAAU,UAAU,EAAE,MAAM,UAAU,OAAO,KAAK,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY;AAE5F,YAAM,UAAU,KAAK,IAAI,EAAE,MAAM,iDAAiD;AAClF,iBAAW,UAAU,CAAC,KAAK;AAC3B,aAAO,UAAU,0CAA0C,EAAE,WAAW;AAExE,YAAM,KAAK,KAAK,2BAA2B;AAC3C,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,QAAQ;AACzE,YAAM,OAAO,KAAK,UAAU,QAAQ,EAAE,MAAM,UAAU,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,IACpF,UAAE;AACA,YAAM,qBAAqB,SAAS,OAAO,yBAAyB,QAAQ;AAC5E,YAAM,qBAAqB,SAAS,OAAO,4BAA4B,SAAS;AAAA,IAClF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createCompanyFixture, createPersonFixture, deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
3
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
4
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
5
|
-
test.describe("TC-CRM-005: Link Person to Company", () => {
|
|
6
|
-
test("should link a person to a company from person detail and show person on company page", async ({ page, request }) => {
|
|
7
|
-
let token = null;
|
|
8
|
-
let companyId = null;
|
|
9
|
-
let personId = null;
|
|
10
|
-
const companyName = `QA TC-CRM-005 Co ${Date.now()}`;
|
|
11
|
-
const firstName = `QA${Date.now()}`;
|
|
12
|
-
const lastName = "Link";
|
|
13
|
-
const displayName = `${firstName} ${lastName}`;
|
|
14
|
-
try {
|
|
15
|
-
token = await getAuthToken(request);
|
|
16
|
-
companyId = await createCompanyFixture(request, token, companyName);
|
|
17
|
-
personId = await createPersonFixture(request, token, {
|
|
18
|
-
firstName,
|
|
19
|
-
lastName,
|
|
20
|
-
displayName
|
|
21
|
-
});
|
|
22
|
-
await login(page, "admin");
|
|
23
|
-
await page.goto(`/backend/customers/people/${personId}`);
|
|
24
|
-
await page.getByRole("button", { name: "ui.forms.actions.edit" }).first().click();
|
|
25
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: companyName }) }).first().selectOption({ label: companyName });
|
|
26
|
-
await page.getByRole("button", { name: /^Save$/ }).click();
|
|
27
|
-
await expect(page.getByText(companyName, { exact: true })).toBeVisible();
|
|
28
|
-
await page.goto(`/backend/customers/companies/${companyId}`);
|
|
29
|
-
await page.getByRole("tab", { name: "People" }).click();
|
|
30
|
-
await expect(page.getByText(displayName, { exact: true })).toBeVisible();
|
|
31
|
-
} finally {
|
|
32
|
-
await deleteEntityIfExists(request, token, "/api/customers/people", personId);
|
|
33
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=TC-CRM-005.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/customers/__integration__/TC-CRM-005.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { createCompanyFixture, createPersonFixture, deleteEntityIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/crmFixtures';\nimport { getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\n\n/**\n * TC-CRM-005: Link Person to Company\n * Source: .ai/qa/scenarios/TC-CRM-005-person-link-to-company.md\n */\ntest.describe('TC-CRM-005: Link Person to Company', () => {\n test('should link a person to a company from person detail and show person on company page', async ({ page, request }) => {\n let token: string | null = null;\n let companyId: string | null = null;\n let personId: string | null = null;\n\n const companyName = `QA TC-CRM-005 Co ${Date.now()}`;\n const firstName = `QA${Date.now()}`;\n const lastName = 'Link';\n const displayName = `${firstName} ${lastName}`;\n\n try {\n token = await getAuthToken(request);\n companyId = await createCompanyFixture(request, token, companyName);\n personId = await createPersonFixture(request, token, {\n firstName,\n lastName,\n displayName,\n });\n\n await login(page, 'admin');\n await page.goto(`/backend/customers/people/${personId}`);\n\n await page.getByRole('button', { name: 'ui.forms.actions.edit' }).first().click();\n await page\n .locator('select')\n .filter({ has: page.locator('option', { hasText: companyName }) })\n .first()\n .selectOption({ label: companyName });\n await page.getByRole('button', { name: /^Save$/ }).click();\n await expect(page.getByText(companyName, { exact: true })).toBeVisible();\n\n await page.goto(`/backend/customers/companies/${companyId}`);\n await page.getByRole('tab', { name: 'People' }).click();\n await expect(page.getByText(displayName, { exact: true })).toBeVisible();\n } finally {\n await deleteEntityIfExists(request, token, '/api/customers/people', personId);\n await deleteEntityIfExists(request, token, '/api/customers/companies', companyId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,sBAAsB,qBAAqB,4BAA4B;AAChF,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,sCAAsC,MAAM;AACxD,OAAK,wFAAwF,OAAO,EAAE,MAAM,QAAQ,MAAM;AACxH,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAC/B,QAAI,WAA0B;AAE9B,UAAM,cAAc,oBAAoB,KAAK,IAAI,CAAC;AAClD,UAAM,YAAY,KAAK,KAAK,IAAI,CAAC;AACjC,UAAM,WAAW;AACjB,UAAM,cAAc,GAAG,SAAS,IAAI,QAAQ;AAE5C,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,WAAW;AAClE,iBAAW,MAAM,oBAAoB,SAAS,OAAO;AAAA,QACnD;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAED,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,6BAA6B,QAAQ,EAAE;AAEvD,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,wBAAwB,CAAC,EAAE,MAAM,EAAE,MAAM;AAChF,YAAM,KACH,QAAQ,QAAQ,EAChB,OAAO,EAAE,KAAK,KAAK,QAAQ,UAAU,EAAE,SAAS,YAAY,CAAC,EAAE,CAAC,EAChE,MAAM,EACN,aAAa,EAAE,OAAO,YAAY,CAAC;AACtC,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,SAAS,CAAC,EAAE,MAAM;AACzD,YAAM,OAAO,KAAK,UAAU,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAEvE,YAAM,KAAK,KAAK,gCAAgC,SAAS,EAAE;AAC3D,YAAM,KAAK,UAAU,OAAO,EAAE,MAAM,SAAS,CAAC,EAAE,MAAM;AACtD,YAAM,OAAO,KAAK,UAAU,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,IACzE,UAAE;AACA,YAAM,qBAAqB,SAAS,OAAO,yBAAyB,QAAQ;AAC5E,YAAM,qBAAqB,SAAS,OAAO,4BAA4B,SAAS;AAAA,IAClF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createCompanyFixture, deleteEntityIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/crmFixtures";
|
|
3
|
-
import { getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
4
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
5
|
-
test.describe("TC-CRM-006: Customer Address Management", () => {
|
|
6
|
-
test("should add multiple company addresses and mark one as primary", async ({ page, request }) => {
|
|
7
|
-
let token = null;
|
|
8
|
-
let companyId = null;
|
|
9
|
-
const firstLabel = `HQ ${Date.now()}`;
|
|
10
|
-
const secondLabel = `Warehouse ${Date.now()}`;
|
|
11
|
-
try {
|
|
12
|
-
token = await getAuthToken(request);
|
|
13
|
-
companyId = await createCompanyFixture(request, token, `QA TC-CRM-006 ${Date.now()}`);
|
|
14
|
-
await login(page, "admin");
|
|
15
|
-
await page.goto(`/backend/customers/companies/${companyId}`);
|
|
16
|
-
await page.getByRole("tab", { name: "Addresses" }).click();
|
|
17
|
-
await page.getByRole("button", { name: "Add address" }).click();
|
|
18
|
-
await page.getByRole("textbox", { name: "Label" }).fill(firstLabel);
|
|
19
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: "Office" }) }).first().selectOption({ label: "Office" });
|
|
20
|
-
await page.getByRole("textbox", { name: "Address line 1" }).fill("100 Main Street");
|
|
21
|
-
await page.getByRole("textbox", { name: "City" }).fill("Austin");
|
|
22
|
-
await page.getByRole("textbox", { name: "Region / State" }).fill("TX");
|
|
23
|
-
await page.getByRole("textbox", { name: "Postal code" }).fill("78701");
|
|
24
|
-
await page.getByRole("checkbox", { name: "Set as primary" }).check();
|
|
25
|
-
await page.getByRole("button", { name: /Save address .*Ctrl\+Enter/i }).click();
|
|
26
|
-
await expect(page.getByText(firstLabel, { exact: true })).toBeVisible();
|
|
27
|
-
await expect(page.getByText("Primary", { exact: true })).toBeVisible();
|
|
28
|
-
await page.getByRole("button", { name: "Add address" }).click();
|
|
29
|
-
await page.getByRole("textbox", { name: "Label" }).fill(secondLabel);
|
|
30
|
-
await page.locator("select").filter({ has: page.locator("option", { hasText: "Shipping" }) }).first().selectOption({ label: "Shipping" });
|
|
31
|
-
await page.getByRole("textbox", { name: "Address line 1" }).fill("200 Warehouse Road");
|
|
32
|
-
await page.getByRole("textbox", { name: "City" }).fill("Dallas");
|
|
33
|
-
await page.getByRole("textbox", { name: "Region / State" }).fill("TX");
|
|
34
|
-
await page.getByRole("textbox", { name: "Postal code" }).fill("75201");
|
|
35
|
-
await page.getByRole("button", { name: /Save address .*Ctrl\+Enter/i }).click();
|
|
36
|
-
await expect(page.getByText(secondLabel, { exact: true })).toBeVisible();
|
|
37
|
-
} finally {
|
|
38
|
-
await deleteEntityIfExists(request, token, "/api/customers/companies", companyId);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
//# sourceMappingURL=TC-CRM-006.spec.js.map
|