@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,76 +0,0 @@
|
|
|
1
|
-
import { test, expect } from "@playwright/test";
|
|
2
|
-
import { postForm } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
3
|
-
import { DEFAULT_CREDENTIALS } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
4
|
-
test.describe("TC-AUTH-016: Rate Limiting on Authentication Endpoints", () => {
|
|
5
|
-
const rateLimitHeaders = { "x-om-test-rate-limit": "on" };
|
|
6
|
-
test("login rate limit \u2014 returns 429 after exceeding compound limit", async ({ request }) => {
|
|
7
|
-
const email = `ratelimit-login-${Date.now()}@test.invalid`;
|
|
8
|
-
const attempts = 6;
|
|
9
|
-
let lastResponse;
|
|
10
|
-
for (let i = 0; i < attempts; i++) {
|
|
11
|
-
lastResponse = await postForm(request, "/api/auth/login", {
|
|
12
|
-
email,
|
|
13
|
-
password: "wrong-password"
|
|
14
|
-
}, { headers: rateLimitHeaders });
|
|
15
|
-
}
|
|
16
|
-
expect(lastResponse.status()).toBe(429);
|
|
17
|
-
const headers = lastResponse.headers();
|
|
18
|
-
expect(headers["retry-after"]).toBeDefined();
|
|
19
|
-
expect(headers["x-ratelimit-limit"]).toBe("5");
|
|
20
|
-
expect(headers["x-ratelimit-remaining"]).toBe("0");
|
|
21
|
-
const body = await lastResponse.json();
|
|
22
|
-
expect(body).toHaveProperty("error");
|
|
23
|
-
});
|
|
24
|
-
test("login rate limit \u2014 different emails get independent limits", async ({ request }) => {
|
|
25
|
-
const emailA = `ratelimit-indep-a-${Date.now()}@test.invalid`;
|
|
26
|
-
const emailB = `ratelimit-indep-b-${Date.now()}@test.invalid`;
|
|
27
|
-
for (let i = 0; i < 5; i++) {
|
|
28
|
-
await postForm(request, "/api/auth/login", {
|
|
29
|
-
email: emailA,
|
|
30
|
-
password: "wrong-password"
|
|
31
|
-
}, { headers: rateLimitHeaders });
|
|
32
|
-
}
|
|
33
|
-
const responseB = await postForm(request, "/api/auth/login", {
|
|
34
|
-
email: emailB,
|
|
35
|
-
password: "wrong-password"
|
|
36
|
-
}, { headers: rateLimitHeaders });
|
|
37
|
-
expect(responseB.status()).not.toBe(429);
|
|
38
|
-
});
|
|
39
|
-
test("password reset rate limit \u2014 returns 429 after exceeding compound limit", async ({ request }) => {
|
|
40
|
-
const email = `ratelimit-reset-${Date.now()}@test.invalid`;
|
|
41
|
-
const attempts = 4;
|
|
42
|
-
let lastResponse;
|
|
43
|
-
for (let i = 0; i < attempts; i++) {
|
|
44
|
-
lastResponse = await postForm(request, "/api/auth/reset", {
|
|
45
|
-
email
|
|
46
|
-
}, { headers: rateLimitHeaders });
|
|
47
|
-
}
|
|
48
|
-
expect(lastResponse.status()).toBe(429);
|
|
49
|
-
const headers = lastResponse.headers();
|
|
50
|
-
expect(headers["retry-after"]).toBeDefined();
|
|
51
|
-
expect(headers["x-ratelimit-limit"]).toBe("3");
|
|
52
|
-
expect(headers["x-ratelimit-remaining"]).toBe("0");
|
|
53
|
-
const body = await lastResponse.json();
|
|
54
|
-
expect(body).toHaveProperty("error");
|
|
55
|
-
});
|
|
56
|
-
test("login \u2014 successful login resets compound counter", async ({ request }) => {
|
|
57
|
-
const { email, password } = DEFAULT_CREDENTIALS.admin;
|
|
58
|
-
for (let i = 0; i < 4; i++) {
|
|
59
|
-
await postForm(request, "/api/auth/login", {
|
|
60
|
-
email,
|
|
61
|
-
password: "wrong-password"
|
|
62
|
-
}, { headers: rateLimitHeaders });
|
|
63
|
-
}
|
|
64
|
-
const successResponse = await postForm(request, "/api/auth/login", {
|
|
65
|
-
email,
|
|
66
|
-
password
|
|
67
|
-
}, { headers: rateLimitHeaders });
|
|
68
|
-
expect(successResponse.status()).toBe(200);
|
|
69
|
-
const postResetResponse = await postForm(request, "/api/auth/login", {
|
|
70
|
-
email,
|
|
71
|
-
password: "wrong-password"
|
|
72
|
-
}, { headers: rateLimitHeaders });
|
|
73
|
-
expect(postResetResponse.status()).not.toBe(429);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=TC-AUTH-016.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/auth/__integration__/TC-AUTH-016.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { test, expect } from '@playwright/test';\nimport { postForm } from '@open-mercato/core/modules/core/__integration__/helpers/api';\nimport { DEFAULT_CREDENTIALS } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\n\n/**\n * TC-AUTH-016: Rate Limiting on Authentication Endpoints\n *\n * API tests verifying that auth endpoints enforce rate limits and return\n * proper 429 responses with rate-limit headers when limits are exceeded.\n *\n * Default compound limits: login = 5 pts/60s, reset = 3 pts/60s.\n * Each test uses a unique email to avoid cross-test compound key pollution.\n */\ntest.describe('TC-AUTH-016: Rate Limiting on Authentication Endpoints', () => {\n const rateLimitHeaders = { 'x-om-test-rate-limit': 'on' };\n\n test('login rate limit \u2014 returns 429 after exceeding compound limit', async ({ request }) => {\n const email = `ratelimit-login-${Date.now()}@test.invalid`;\n const attempts = 6; // compound limit is 5\n let lastResponse;\n\n for (let i = 0; i < attempts; i++) {\n lastResponse = await postForm(request, '/api/auth/login', {\n email,\n password: 'wrong-password',\n }, { headers: rateLimitHeaders });\n }\n\n expect(lastResponse!.status()).toBe(429);\n\n const headers = lastResponse!.headers();\n expect(headers['retry-after']).toBeDefined();\n expect(headers['x-ratelimit-limit']).toBe('5');\n expect(headers['x-ratelimit-remaining']).toBe('0');\n\n const body = await lastResponse!.json();\n expect(body).toHaveProperty('error');\n });\n\n test('login rate limit \u2014 different emails get independent limits', async ({ request }) => {\n const emailA = `ratelimit-indep-a-${Date.now()}@test.invalid`;\n const emailB = `ratelimit-indep-b-${Date.now()}@test.invalid`;\n\n // Exhaust 5 attempts for email-A (at the compound limit)\n for (let i = 0; i < 5; i++) {\n await postForm(request, '/api/auth/login', {\n email: emailA,\n password: 'wrong-password',\n }, { headers: rateLimitHeaders });\n }\n\n // email-B should still be allowed (its own compound bucket is fresh)\n const responseB = await postForm(request, '/api/auth/login', {\n email: emailB,\n password: 'wrong-password',\n }, { headers: rateLimitHeaders });\n\n // email-B should get 401 (invalid credentials), not 429\n expect(responseB.status()).not.toBe(429);\n });\n\n test('password reset rate limit \u2014 returns 429 after exceeding compound limit', async ({ request }) => {\n const email = `ratelimit-reset-${Date.now()}@test.invalid`;\n const attempts = 4; // compound limit is 3\n let lastResponse;\n\n for (let i = 0; i < attempts; i++) {\n lastResponse = await postForm(request, '/api/auth/reset', {\n email,\n }, { headers: rateLimitHeaders });\n }\n\n expect(lastResponse!.status()).toBe(429);\n\n const headers = lastResponse!.headers();\n expect(headers['retry-after']).toBeDefined();\n expect(headers['x-ratelimit-limit']).toBe('3');\n expect(headers['x-ratelimit-remaining']).toBe('0');\n\n const body = await lastResponse!.json();\n expect(body).toHaveProperty('error');\n });\n\n test('login \u2014 successful login resets compound counter', async ({ request }) => {\n const { email, password } = DEFAULT_CREDENTIALS.admin;\n\n // Send 4 failed attempts (under the compound limit of 5)\n for (let i = 0; i < 4; i++) {\n await postForm(request, '/api/auth/login', {\n email,\n password: 'wrong-password',\n }, { headers: rateLimitHeaders });\n }\n\n // Successful login should reset the compound counter\n const successResponse = await postForm(request, '/api/auth/login', {\n email,\n password,\n }, { headers: rateLimitHeaders });\n expect(successResponse.status()).toBe(200);\n\n // After reset, another failed attempt should NOT be 429\n const postResetResponse = await postForm(request, '/api/auth/login', {\n email,\n password: 'wrong-password',\n }, { headers: rateLimitHeaders });\n expect(postResetResponse.status()).not.toBe(429);\n });\n});\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
test.describe("TC-CAT-001: Create New Product", () => {
|
|
4
|
-
test("should create a product from catalog create form", async ({ page }) => {
|
|
5
|
-
const productName = `QA TC-CAT-001 ${Date.now()}`;
|
|
6
|
-
const sku = `QA-CAT-001-${Date.now()}`;
|
|
7
|
-
await login(page, "admin");
|
|
8
|
-
await page.goto("/backend/catalog/products/create");
|
|
9
|
-
await page.getByRole("textbox", { name: "e.g., Summer sneaker" }).fill(productName);
|
|
10
|
-
await page.getByRole("textbox", { name: "Describe the product..." }).fill("This is a catalog QA description long enough to satisfy SEO validation checks in create flow.");
|
|
11
|
-
await page.getByRole("button", { name: "Variants" }).click();
|
|
12
|
-
await page.getByRole("textbox", { name: "e.g., SKU-001" }).fill(sku);
|
|
13
|
-
await page.getByRole("button", { name: "Create product" }).last().click();
|
|
14
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products$/);
|
|
15
|
-
const search = page.getByRole("textbox", { name: "Search" });
|
|
16
|
-
await search.fill(productName);
|
|
17
|
-
await expect(page.getByText(productName, { exact: true })).toBeVisible();
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=TC-CAT-001.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-001.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\n\n/**\n * TC-CAT-001: Create New Product\n * Source: .ai/qa/scenarios/TC-CAT-001-product-creation.md\n */\ntest.describe('TC-CAT-001: Create New Product', () => {\n test('should create a product from catalog create form', async ({ page }) => {\n const productName = `QA TC-CAT-001 ${Date.now()}`;\n const sku = `QA-CAT-001-${Date.now()}`;\n\n await login(page, 'admin');\n await page.goto('/backend/catalog/products/create');\n\n await page.getByRole('textbox', { name: 'e.g., Summer sneaker' }).fill(productName);\n await page\n .getByRole('textbox', { name: 'Describe the product...' })\n .fill('This is a catalog QA description long enough to satisfy SEO validation checks in create flow.');\n\n await page.getByRole('button', { name: 'Variants' }).click();\n await page.getByRole('textbox', { name: 'e.g., SKU-001' }).fill(sku);\n\n await page.getByRole('button', { name: 'Create product' }).last().click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products$/);\n\n const search = page.getByRole('textbox', { name: 'Search' });\n await search.fill(productName);\n await expect(page.getByText(productName, { exact: true })).toBeVisible();\n });\n});\n\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,kCAAkC,MAAM;AACpD,OAAK,oDAAoD,OAAO,EAAE,KAAK,MAAM;AAC3E,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAC/C,UAAM,MAAM,cAAc,KAAK,IAAI,CAAC;AAEpC,UAAM,MAAM,MAAM,OAAO;AACzB,UAAM,KAAK,KAAK,kCAAkC;AAElD,UAAM,KAAK,UAAU,WAAW,EAAE,MAAM,uBAAuB,CAAC,EAAE,KAAK,WAAW;AAClF,UAAM,KACH,UAAU,WAAW,EAAE,MAAM,0BAA0B,CAAC,EACxD,KAAK,+FAA+F;AAEvG,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AAC3D,UAAM,KAAK,UAAU,WAAW,EAAE,MAAM,gBAAgB,CAAC,EAAE,KAAK,GAAG;AAEnE,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AACxE,UAAM,OAAO,IAAI,EAAE,UAAU,+BAA+B;AAE5D,UAAM,SAAS,KAAK,UAAU,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3D,UAAM,OAAO,KAAK,WAAW;AAC7B,UAAM,OAAO,KAAK,UAAU,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,EACzE,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
test.describe("TC-CAT-002: Product Creation Validation Errors", () => {
|
|
4
|
-
test("should block save when required title is missing", async ({ page }) => {
|
|
5
|
-
await login(page, "admin");
|
|
6
|
-
await page.goto("/backend/catalog/products/create");
|
|
7
|
-
await page.getByRole("button", { name: "Create product" }).last().click();
|
|
8
|
-
await expect(page.getByText(/required/i)).toBeVisible();
|
|
9
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products\/create$/);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=TC-CAT-002.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-002.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\n\n/**\n * TC-CAT-002: Product Creation Validation Errors\n * Source: .ai/qa/scenarios/TC-CAT-002-product-creation-validation.md\n */\ntest.describe('TC-CAT-002: Product Creation Validation Errors', () => {\n test('should block save when required title is missing', async ({ page }) => {\n await login(page, 'admin');\n await page.goto('/backend/catalog/products/create');\n\n await page.getByRole('button', { name: 'Create product' }).last().click();\n\n await expect(page.getByText(/required/i)).toBeVisible();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products\\/create$/);\n });\n});\n\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,kDAAkD,MAAM;AACpE,OAAK,oDAAoD,OAAO,EAAE,KAAK,MAAM;AAC3E,UAAM,MAAM,MAAM,OAAO;AACzB,UAAM,KAAK,KAAK,kCAAkC;AAElD,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AAExE,UAAM,OAAO,KAAK,UAAU,WAAW,CAAC,EAAE,YAAY;AACtD,UAAM,OAAO,IAAI,EAAE,UAAU,uCAAuC;AAAA,EACtE,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { login } from "@open-mercato/core/modules/core/__integration__/helpers/auth";
|
|
3
|
-
test.describe("TC-CAT-003: Edit Existing Product", () => {
|
|
4
|
-
test("should edit product title and persist it", async ({ page }) => {
|
|
5
|
-
const productName = `QA TC-CAT-003 ${Date.now()}`;
|
|
6
|
-
const updatedName = `${productName} Updated`;
|
|
7
|
-
const sku = `QA-CAT-003-${Date.now()}`;
|
|
8
|
-
await login(page, "admin");
|
|
9
|
-
await page.goto("/backend/catalog/products/create");
|
|
10
|
-
await page.getByRole("textbox", { name: "e.g., Summer sneaker" }).fill(productName);
|
|
11
|
-
await page.getByRole("textbox", { name: "Describe the product..." }).fill("This is a catalog QA description long enough to satisfy SEO validation checks in create flow.");
|
|
12
|
-
await page.getByRole("button", { name: "Variants" }).click();
|
|
13
|
-
await page.getByRole("textbox", { name: "e.g., SKU-001" }).fill(sku);
|
|
14
|
-
await page.getByRole("button", { name: "Create product" }).last().click();
|
|
15
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products$/);
|
|
16
|
-
const search = page.getByRole("textbox", { name: "Search" });
|
|
17
|
-
await search.fill(productName);
|
|
18
|
-
await page.getByText(productName, { exact: true }).first().click();
|
|
19
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products\/[0-9a-f-]{36}$/i);
|
|
20
|
-
const titleField = page.getByRole("textbox", { name: "e.g., Summer sneaker" });
|
|
21
|
-
await titleField.fill(updatedName);
|
|
22
|
-
await page.getByRole("button", { name: "Save changes" }).last().click();
|
|
23
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products$/);
|
|
24
|
-
await search.fill(updatedName);
|
|
25
|
-
await expect(page.getByText(updatedName, { exact: true })).toBeVisible();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=TC-CAT-003.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-003.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { login } from '@open-mercato/core/modules/core/__integration__/helpers/auth';\n\n/**\n * TC-CAT-003: Edit Existing Product\n * Source: .ai/qa/scenarios/TC-CAT-003-product-edit.md\n */\ntest.describe('TC-CAT-003: Edit Existing Product', () => {\n test('should edit product title and persist it', async ({ page }) => {\n const productName = `QA TC-CAT-003 ${Date.now()}`;\n const updatedName = `${productName} Updated`;\n const sku = `QA-CAT-003-${Date.now()}`;\n\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\n .getByRole('textbox', { name: 'Describe the product...' })\n .fill('This is a catalog QA description long enough to satisfy SEO validation checks in create flow.');\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\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products$/);\n const search = page.getByRole('textbox', { name: 'Search' });\n await search.fill(productName);\n await page.getByText(productName, { exact: true }).first().click();\n\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products\\/[0-9a-f-]{36}$/i);\n const titleField = page.getByRole('textbox', { name: 'e.g., Summer sneaker' });\n await titleField.fill(updatedName);\n await page.getByRole('button', { name: 'Save changes' }).last().click();\n\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products$/);\n await search.fill(updatedName);\n await expect(page.getByText(updatedName, { exact: true })).toBeVisible();\n });\n});\n\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,qCAAqC,MAAM;AACvD,OAAK,4CAA4C,OAAO,EAAE,KAAK,MAAM;AACnE,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAC/C,UAAM,cAAc,GAAG,WAAW;AAClC,UAAM,MAAM,cAAc,KAAK,IAAI,CAAC;AAEpC,UAAM,MAAM,MAAM,OAAO;AACzB,UAAM,KAAK,KAAK,kCAAkC;AAClD,UAAM,KAAK,UAAU,WAAW,EAAE,MAAM,uBAAuB,CAAC,EAAE,KAAK,WAAW;AAClF,UAAM,KACH,UAAU,WAAW,EAAE,MAAM,0BAA0B,CAAC,EACxD,KAAK,+FAA+F;AACvG,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,WAAW,CAAC,EAAE,MAAM;AAC3D,UAAM,KAAK,UAAU,WAAW,EAAE,MAAM,gBAAgB,CAAC,EAAE,KAAK,GAAG;AACnE,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AAExE,UAAM,OAAO,IAAI,EAAE,UAAU,+BAA+B;AAC5D,UAAM,SAAS,KAAK,UAAU,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3D,UAAM,OAAO,KAAK,WAAW;AAC7B,UAAM,KAAK,UAAU,aAAa,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM;AAEjE,UAAM,OAAO,IAAI,EAAE,UAAU,+CAA+C;AAC5E,UAAM,aAAa,KAAK,UAAU,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,UAAM,WAAW,KAAK,WAAW;AACjC,UAAM,KAAK,UAAU,UAAU,EAAE,MAAM,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM;AAEtE,UAAM,OAAO,IAAI,EAAE,UAAU,+BAA+B;AAC5D,UAAM,OAAO,KAAK,WAAW;AAC7B,UAAM,OAAO,KAAK,UAAU,aAAa,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,EACzE,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createProductFixture, deleteCatalogProductIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures";
|
|
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-CAT-004: Delete Product", () => {
|
|
6
|
-
test("should open delete confirmation for the default variant", async ({ page, request }) => {
|
|
7
|
-
const productName = `QA TC-CAT-004 ${Date.now()}`;
|
|
8
|
-
const sku = `QA-CAT-004-BASE-${Date.now()}`;
|
|
9
|
-
let token = null;
|
|
10
|
-
let productId = null;
|
|
11
|
-
try {
|
|
12
|
-
token = await getAuthToken(request);
|
|
13
|
-
productId = await createProductFixture(request, token, { title: productName, sku });
|
|
14
|
-
await login(page, "admin");
|
|
15
|
-
await page.goto(`/backend/catalog/products/${productId}`);
|
|
16
|
-
await page.getByRole("link", { name: "Add variant" }).click();
|
|
17
|
-
await expect(page).toHaveURL(/\/variants\/create$/);
|
|
18
|
-
await page.getByRole("textbox", { name: "e.g., Blue / Small" }).fill("Delete Me Variant");
|
|
19
|
-
await page.getByRole("textbox", { name: "Unique identifier" }).fill(`QA-CAT-004-VAR-${Date.now()}`);
|
|
20
|
-
await page.getByRole("button", { name: "Create variant" }).last().click();
|
|
21
|
-
await expect(page).toHaveURL(/\/variants\/[0-9a-f-]{36}$/i);
|
|
22
|
-
await page.goto(`/backend/catalog/products/${productId}`);
|
|
23
|
-
await page.getByRole("button", { name: /^Delete$/i }).first().click();
|
|
24
|
-
const confirmDialog = page.getByRole("alertdialog");
|
|
25
|
-
await expect(confirmDialog).toBeVisible();
|
|
26
|
-
await expect(confirmDialog.getByRole("heading", { name: /Delete variant/i })).toBeVisible();
|
|
27
|
-
await expect(confirmDialog.getByRole("button", { name: "Confirm" })).toBeVisible();
|
|
28
|
-
} finally {
|
|
29
|
-
await deleteCatalogProductIfExists(request, token, productId);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=TC-CAT-004.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-004.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { createProductFixture, deleteCatalogProductIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures';\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-CAT-004: Delete Product\n * Source: .ai/qa/scenarios/TC-CAT-004-product-delete.md\n */\ntest.describe('TC-CAT-004: Delete Product', () => {\n test('should open delete confirmation for the default variant', async ({ page, request }) => {\n const productName = `QA TC-CAT-004 ${Date.now()}`;\n const sku = `QA-CAT-004-BASE-${Date.now()}`;\n let token: string | null = null;\n let productId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n productId = await createProductFixture(request, token, { title: productName, sku });\n\n await login(page, 'admin');\n await page.goto(`/backend/catalog/products/${productId}`);\n\n await page.getByRole('link', { name: 'Add variant' }).click();\n await expect(page).toHaveURL(/\\/variants\\/create$/);\n await page.getByRole('textbox', { name: 'e.g., Blue / Small' }).fill('Delete Me Variant');\n await page.getByRole('textbox', { name: 'Unique identifier' }).fill(`QA-CAT-004-VAR-${Date.now()}`);\n await page.getByRole('button', { name: 'Create variant' }).last().click();\n await expect(page).toHaveURL(/\\/variants\\/[0-9a-f-]{36}$/i);\n\n await page.goto(`/backend/catalog/products/${productId}`);\n await page.getByRole('button', { name: /^Delete$/i }).first().click();\n const confirmDialog = page.getByRole('alertdialog');\n await expect(confirmDialog).toBeVisible();\n await expect(confirmDialog.getByRole('heading', { name: /Delete variant/i })).toBeVisible();\n await expect(confirmDialog.getByRole('button', { name: 'Confirm' })).toBeVisible();\n } finally {\n await deleteCatalogProductIfExists(request, token, productId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,sBAAsB,oCAAoC;AACnE,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,8BAA8B,MAAM;AAChD,OAAK,2DAA2D,OAAO,EAAE,MAAM,QAAQ,MAAM;AAC3F,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAC/C,UAAM,MAAM,mBAAmB,KAAK,IAAI,CAAC;AACzC,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAE/B,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,EAAE,OAAO,aAAa,IAAI,CAAC;AAElF,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,6BAA6B,SAAS,EAAE;AAExD,YAAM,KAAK,UAAU,QAAQ,EAAE,MAAM,cAAc,CAAC,EAAE,MAAM;AAC5D,YAAM,OAAO,IAAI,EAAE,UAAU,qBAAqB;AAClD,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,qBAAqB,CAAC,EAAE,KAAK,mBAAmB;AACxF,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,EAAE,KAAK,kBAAkB,KAAK,IAAI,CAAC,EAAE;AAClG,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AACxE,YAAM,OAAO,IAAI,EAAE,UAAU,6BAA6B;AAE1D,YAAM,KAAK,KAAK,6BAA6B,SAAS,EAAE;AACxD,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM;AACpE,YAAM,gBAAgB,KAAK,UAAU,aAAa;AAClD,YAAM,OAAO,aAAa,EAAE,YAAY;AACxC,YAAM,OAAO,cAAc,UAAU,WAAW,EAAE,MAAM,kBAAkB,CAAC,CAAC,EAAE,YAAY;AAC1F,YAAM,OAAO,cAAc,UAAU,UAAU,EAAE,MAAM,UAAU,CAAC,CAAC,EAAE,YAAY;AAAA,IACnF,UAAE;AACA,YAAM,6BAA6B,SAAS,OAAO,SAAS;AAAA,IAC9D;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createProductFixture, deleteCatalogProductIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures";
|
|
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-CAT-005: Create Product Variant", () => {
|
|
6
|
-
test("should create an additional variant for a product", async ({ page, request }) => {
|
|
7
|
-
const productName = `QA TC-CAT-005 ${Date.now()}`;
|
|
8
|
-
const baseSku = `QA-CAT-005-BASE-${Date.now()}`;
|
|
9
|
-
const variantName = `Blue / 42 ${Date.now()}`;
|
|
10
|
-
const variantSku = `QA-CAT-005-VAR-${Date.now()}`;
|
|
11
|
-
let token = null;
|
|
12
|
-
let productId = null;
|
|
13
|
-
try {
|
|
14
|
-
token = await getAuthToken(request);
|
|
15
|
-
productId = await createProductFixture(request, token, { title: productName, sku: baseSku });
|
|
16
|
-
await login(page, "admin");
|
|
17
|
-
await page.goto(`/backend/catalog/products/${productId}/variants/create`);
|
|
18
|
-
await expect(page).toHaveURL(/\/variants\/create$/);
|
|
19
|
-
await page.getByRole("textbox", { name: "e.g., Blue / Small" }).fill(variantName);
|
|
20
|
-
await page.getByRole("textbox", { name: "Unique identifier" }).fill(variantSku);
|
|
21
|
-
await page.getByRole("button", { name: "Create variant" }).last().click();
|
|
22
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products\/[0-9a-f-]{36}\/variants\/[0-9a-f-]{36}$/i);
|
|
23
|
-
await expect(page.getByRole("textbox", { name: "e.g., Blue / Small" })).toHaveValue(variantName);
|
|
24
|
-
await expect(page.getByRole("textbox", { name: "Unique identifier" })).toHaveValue(variantSku);
|
|
25
|
-
} finally {
|
|
26
|
-
await deleteCatalogProductIfExists(request, token, productId);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=TC-CAT-005.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-005.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { createProductFixture, deleteCatalogProductIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures';\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-CAT-005: Create Product Variant\n * Source: .ai/qa/scenarios/TC-CAT-005-product-variant-creation.md\n */\ntest.describe('TC-CAT-005: Create Product Variant', () => {\n test('should create an additional variant for a product', async ({ page, request }) => {\n const productName = `QA TC-CAT-005 ${Date.now()}`;\n const baseSku = `QA-CAT-005-BASE-${Date.now()}`;\n const variantName = `Blue / 42 ${Date.now()}`;\n const variantSku = `QA-CAT-005-VAR-${Date.now()}`;\n let token: string | null = null;\n let productId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n productId = await createProductFixture(request, token, { title: productName, sku: baseSku });\n\n await login(page, 'admin');\n await page.goto(`/backend/catalog/products/${productId}/variants/create`);\n await expect(page).toHaveURL(/\\/variants\\/create$/);\n await page.getByRole('textbox', { name: 'e.g., Blue / Small' }).fill(variantName);\n await page.getByRole('textbox', { name: 'Unique identifier' }).fill(variantSku);\n await page.getByRole('button', { name: 'Create variant' }).last().click();\n\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/products\\/[0-9a-f-]{36}\\/variants\\/[0-9a-f-]{36}$/i);\n await expect(page.getByRole('textbox', { name: 'e.g., Blue / Small' })).toHaveValue(variantName);\n await expect(page.getByRole('textbox', { name: 'Unique identifier' })).toHaveValue(variantSku);\n } finally {\n await deleteCatalogProductIfExists(request, token, productId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,sBAAsB,oCAAoC;AACnE,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,sCAAsC,MAAM;AACxD,OAAK,qDAAqD,OAAO,EAAE,MAAM,QAAQ,MAAM;AACrF,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAC/C,UAAM,UAAU,mBAAmB,KAAK,IAAI,CAAC;AAC7C,UAAM,cAAc,aAAa,KAAK,IAAI,CAAC;AAC3C,UAAM,aAAa,kBAAkB,KAAK,IAAI,CAAC;AAC/C,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAE/B,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,EAAE,OAAO,aAAa,KAAK,QAAQ,CAAC;AAE3F,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,6BAA6B,SAAS,kBAAkB;AACxE,YAAM,OAAO,IAAI,EAAE,UAAU,qBAAqB;AAClD,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,qBAAqB,CAAC,EAAE,KAAK,WAAW;AAChF,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,EAAE,KAAK,UAAU;AAC9E,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AAExE,YAAM,OAAO,IAAI,EAAE,UAAU,wEAAwE;AACrG,YAAM,OAAO,KAAK,UAAU,WAAW,EAAE,MAAM,qBAAqB,CAAC,CAAC,EAAE,YAAY,WAAW;AAC/F,YAAM,OAAO,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,CAAC,EAAE,YAAY,UAAU;AAAA,IAC/F,UAAE;AACA,YAAM,6BAA6B,SAAS,OAAO,SAAS;AAAA,IAC9D;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createProductFixture, deleteCatalogProductIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures";
|
|
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-CAT-006: Edit Product Variant", () => {
|
|
6
|
-
test("should edit default variant SKU and persist change", async ({ page, request }) => {
|
|
7
|
-
const productName = `QA TC-CAT-006 ${Date.now()}`;
|
|
8
|
-
const baseSku = `QA-CAT-006-BASE-${Date.now()}`;
|
|
9
|
-
const updatedSku = `QA-CAT-006-UPD-${Date.now()}`;
|
|
10
|
-
let token = null;
|
|
11
|
-
let productId = null;
|
|
12
|
-
try {
|
|
13
|
-
token = await getAuthToken(request);
|
|
14
|
-
productId = await createProductFixture(request, token, { title: productName, sku: baseSku });
|
|
15
|
-
await login(page, "admin");
|
|
16
|
-
await page.goto(`/backend/catalog/products/${productId}`);
|
|
17
|
-
await page.getByRole("link", { name: "Add variant" }).click();
|
|
18
|
-
await expect(page).toHaveURL(/\/variants\/create$/);
|
|
19
|
-
await page.getByRole("textbox", { name: "e.g., Blue / Small" }).fill("Editable Variant");
|
|
20
|
-
await page.getByRole("textbox", { name: "Unique identifier" }).fill(baseSku);
|
|
21
|
-
await page.getByRole("button", { name: "Create variant" }).last().click();
|
|
22
|
-
await expect(page).toHaveURL(/\/variants\/[0-9a-f-]{36}$/i);
|
|
23
|
-
await page.getByRole("textbox", { name: "Unique identifier" }).fill(updatedSku);
|
|
24
|
-
await page.getByRole("button", { name: "Save changes" }).last().click();
|
|
25
|
-
await expect(page.getByText(updatedSku, { exact: true })).toBeVisible();
|
|
26
|
-
} finally {
|
|
27
|
-
await deleteCatalogProductIfExists(request, token, productId);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=TC-CAT-006.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-006.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { createProductFixture, deleteCatalogProductIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures';\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-CAT-006: Edit Product Variant\n * Source: .ai/qa/scenarios/TC-CAT-006-product-variant-edit.md\n */\ntest.describe('TC-CAT-006: Edit Product Variant', () => {\n test('should edit default variant SKU and persist change', async ({ page, request }) => {\n const productName = `QA TC-CAT-006 ${Date.now()}`;\n const baseSku = `QA-CAT-006-BASE-${Date.now()}`;\n const updatedSku = `QA-CAT-006-UPD-${Date.now()}`;\n let token: string | null = null;\n let productId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n productId = await createProductFixture(request, token, { title: productName, sku: baseSku });\n\n await login(page, 'admin');\n await page.goto(`/backend/catalog/products/${productId}`);\n\n await page.getByRole('link', { name: 'Add variant' }).click();\n await expect(page).toHaveURL(/\\/variants\\/create$/);\n await page.getByRole('textbox', { name: 'e.g., Blue / Small' }).fill('Editable Variant');\n await page.getByRole('textbox', { name: 'Unique identifier' }).fill(baseSku);\n await page.getByRole('button', { name: 'Create variant' }).last().click();\n await expect(page).toHaveURL(/\\/variants\\/[0-9a-f-]{36}$/i);\n\n await page.getByRole('textbox', { name: 'Unique identifier' }).fill(updatedSku);\n await page.getByRole('button', { name: 'Save changes' }).last().click();\n\n await expect(page.getByText(updatedSku, { exact: true })).toBeVisible();\n } finally {\n await deleteCatalogProductIfExists(request, token, productId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,sBAAsB,oCAAoC;AACnE,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,oCAAoC,MAAM;AACtD,OAAK,sDAAsD,OAAO,EAAE,MAAM,QAAQ,MAAM;AACtF,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAC/C,UAAM,UAAU,mBAAmB,KAAK,IAAI,CAAC;AAC7C,UAAM,aAAa,kBAAkB,KAAK,IAAI,CAAC;AAC/C,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAE/B,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,EAAE,OAAO,aAAa,KAAK,QAAQ,CAAC;AAE3F,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,6BAA6B,SAAS,EAAE;AAExD,YAAM,KAAK,UAAU,QAAQ,EAAE,MAAM,cAAc,CAAC,EAAE,MAAM;AAC5D,YAAM,OAAO,IAAI,EAAE,UAAU,qBAAqB;AAClD,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,qBAAqB,CAAC,EAAE,KAAK,kBAAkB;AACvF,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,EAAE,KAAK,OAAO;AAC3E,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM;AACxE,YAAM,OAAO,IAAI,EAAE,UAAU,6BAA6B;AAE1D,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC,EAAE,KAAK,UAAU;AAC9E,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM;AAEtE,YAAM,OAAO,KAAK,UAAU,YAAY,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,IACxE,UAAE;AACA,YAAM,6BAA6B,SAAS,OAAO,SAAS;AAAA,IAC9D;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,31 +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
|
-
test.describe("TC-CAT-007: Create Product Category", () => {
|
|
5
|
-
test("should create a root category and show it in categories list", async ({ page, request }) => {
|
|
6
|
-
const categoryName = `QA TC-CAT-007 ${Date.now()}`;
|
|
7
|
-
let token = null;
|
|
8
|
-
let categoryId = null;
|
|
9
|
-
try {
|
|
10
|
-
token = await getAuthToken(request);
|
|
11
|
-
await login(page, "admin");
|
|
12
|
-
await page.goto("/backend/catalog/categories/create");
|
|
13
|
-
await page.getByRole("textbox", { name: "e.g., Footwear" }).fill(categoryName);
|
|
14
|
-
await page.getByRole("button", { name: "Create" }).last().click();
|
|
15
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/categories$/);
|
|
16
|
-
const search = page.getByRole("textbox", { name: "Search categories" });
|
|
17
|
-
await search.fill(categoryName);
|
|
18
|
-
const categoryLink = page.getByText(categoryName, { exact: true }).first();
|
|
19
|
-
await expect(categoryLink).toBeVisible();
|
|
20
|
-
await categoryLink.click();
|
|
21
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/categories\/[0-9a-f-]{36}\/edit$/i);
|
|
22
|
-
categoryId = page.url().match(/\/backend\/catalog\/categories\/([0-9a-f-]{36})\/edit$/i)?.[1] ?? null;
|
|
23
|
-
} finally {
|
|
24
|
-
if (token && categoryId) {
|
|
25
|
-
await apiRequest(request, "DELETE", `/api/catalog/categories?id=${encodeURIComponent(categoryId)}`, { token }).catch(() => {
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=TC-CAT-007.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-007.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } 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';\n\n/**\n * TC-CAT-007: Create Product Category\n * Source: .ai/qa/scenarios/TC-CAT-007-category-creation.md\n */\ntest.describe('TC-CAT-007: Create Product Category', () => {\n test('should create a root category and show it in categories list', async ({ page, request }) => {\n const categoryName = `QA TC-CAT-007 ${Date.now()}`;\n let token: string | null = null;\n let categoryId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n await login(page, 'admin');\n await page.goto('/backend/catalog/categories/create');\n\n await page.getByRole('textbox', { name: 'e.g., Footwear' }).fill(categoryName);\n await page.getByRole('button', { name: 'Create' }).last().click();\n\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/categories$/);\n const search = page.getByRole('textbox', { name: 'Search categories' });\n await search.fill(categoryName);\n const categoryLink = page.getByText(categoryName, { exact: true }).first();\n await expect(categoryLink).toBeVisible();\n await categoryLink.click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/categories\\/[0-9a-f-]{36}\\/edit$/i);\n categoryId = page.url().match(/\\/backend\\/catalog\\/categories\\/([0-9a-f-]{36})\\/edit$/i)?.[1] ?? null;\n } finally {\n if (token && categoryId) {\n await apiRequest(request, 'DELETE', `/api/catalog/categories?id=${encodeURIComponent(categoryId)}`, { token }).catch(() => {});\n }\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,aAAa;AACtB,SAAS,YAAY,oBAAoB;AAMzC,KAAK,SAAS,uCAAuC,MAAM;AACzD,OAAK,gEAAgE,OAAO,EAAE,MAAM,QAAQ,MAAM;AAChG,UAAM,eAAe,iBAAiB,KAAK,IAAI,CAAC;AAChD,QAAI,QAAuB;AAC3B,QAAI,aAA4B;AAEhC,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,oCAAoC;AAEpD,YAAM,KAAK,UAAU,WAAW,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,YAAY;AAC7E,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM;AAEhE,YAAM,OAAO,IAAI,EAAE,UAAU,iCAAiC;AAC9D,YAAM,SAAS,KAAK,UAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtE,YAAM,OAAO,KAAK,YAAY;AAC9B,YAAM,eAAe,KAAK,UAAU,cAAc,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM;AACzE,YAAM,OAAO,YAAY,EAAE,YAAY;AACvC,YAAM,aAAa,MAAM;AACzB,YAAM,OAAO,IAAI,EAAE,UAAU,uDAAuD;AACpF,mBAAa,KAAK,IAAI,EAAE,MAAM,yDAAyD,IAAI,CAAC,KAAK;AAAA,IACnG,UAAE;AACA,UAAI,SAAS,YAAY;AACvB,cAAM,WAAW,SAAS,UAAU,8BAA8B,mBAAmB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,MAAM,MAAM;AAAA,QAAC,CAAC;AAAA,MAC/H;AAAA,IACF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,65 +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
|
-
test.describe("TC-CAT-008: Create Nested Category Hierarchy", () => {
|
|
5
|
-
test("should create child category under an existing parent", async ({ page, request }) => {
|
|
6
|
-
const stamp = Date.now();
|
|
7
|
-
const parentName = `QA TC-CAT-008 Parent ${stamp}`;
|
|
8
|
-
const childName = `QA TC-CAT-008 Child ${stamp}`;
|
|
9
|
-
let token = null;
|
|
10
|
-
let parentCategoryId = null;
|
|
11
|
-
let childCategoryId = null;
|
|
12
|
-
const waitForList = async () => {
|
|
13
|
-
await page.getByText("Loading data...").waitFor({ state: "hidden", timeout: 1e4 }).catch(() => {
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
const selectParent = async () => {
|
|
17
|
-
const select = page.locator("select#parentId");
|
|
18
|
-
await expect(select).toBeVisible({ timeout: 1e4 });
|
|
19
|
-
await expect(select.locator(`option[value="${parentCategoryId}"]`)).toBeAttached({ timeout: 1e4 });
|
|
20
|
-
await select.selectOption(parentCategoryId);
|
|
21
|
-
};
|
|
22
|
-
try {
|
|
23
|
-
token = await getAuthToken(request);
|
|
24
|
-
await login(page, "admin");
|
|
25
|
-
await page.goto("/backend/catalog/categories/create");
|
|
26
|
-
await page.getByRole("textbox", { name: "e.g., Footwear" }).fill(parentName);
|
|
27
|
-
await page.getByRole("button", { name: "Create" }).last().click();
|
|
28
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/categories$/);
|
|
29
|
-
await waitForList();
|
|
30
|
-
await page.getByRole("textbox", { name: "Search categories" }).fill(parentName);
|
|
31
|
-
const parentRow = page.getByRole("row", { name: new RegExp(parentName) });
|
|
32
|
-
await expect(parentRow).toBeVisible();
|
|
33
|
-
await parentRow.getByText(parentName, { exact: true }).first().click();
|
|
34
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/categories\/[0-9a-f-]{36}\/edit$/i);
|
|
35
|
-
parentCategoryId = page.url().match(/\/backend\/catalog\/categories\/([0-9a-f-]{36})\/edit$/i)?.[1] ?? null;
|
|
36
|
-
await page.goto("/backend/catalog/categories/create");
|
|
37
|
-
await page.getByRole("textbox", { name: "e.g., Footwear" }).fill(childName);
|
|
38
|
-
await selectParent();
|
|
39
|
-
await page.getByRole("button", { name: "Create" }).last().click();
|
|
40
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/categories$/);
|
|
41
|
-
await waitForList();
|
|
42
|
-
await page.getByRole("textbox", { name: "Search categories" }).fill(childName);
|
|
43
|
-
const childRow = page.getByRole("row", { name: new RegExp(childName) }).first();
|
|
44
|
-
await expect(childRow).toBeVisible();
|
|
45
|
-
await childRow.click();
|
|
46
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/categories\/[0-9a-f-]{36}\/edit$/i);
|
|
47
|
-
childCategoryId = page.url().match(/\/backend\/catalog\/categories\/([0-9a-f-]{36})\/edit$/i)?.[1] ?? null;
|
|
48
|
-
if (parentCategoryId) {
|
|
49
|
-
const select = page.locator("select#parentId");
|
|
50
|
-
await expect(select).toBeVisible({ timeout: 1e4 });
|
|
51
|
-
await expect(select).toHaveValue(parentCategoryId, { timeout: 1e4 });
|
|
52
|
-
}
|
|
53
|
-
} finally {
|
|
54
|
-
if (token && childCategoryId) {
|
|
55
|
-
await apiRequest(request, "DELETE", `/api/catalog/categories?id=${encodeURIComponent(childCategoryId)}`, { token }).catch(() => {
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
if (token && parentCategoryId) {
|
|
59
|
-
await apiRequest(request, "DELETE", `/api/catalog/categories?id=${encodeURIComponent(parentCategoryId)}`, { token }).catch(() => {
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=TC-CAT-008.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-008.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } 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';\n\n/**\n * TC-CAT-008: Create Nested Category Hierarchy\n * Source: .ai/qa/scenarios/TC-CAT-008-category-hierarchy.md\n */\ntest.describe('TC-CAT-008: Create Nested Category Hierarchy', () => {\n test('should create child category under an existing parent', async ({ page, request }) => {\n const stamp = Date.now();\n const parentName = `QA TC-CAT-008 Parent ${stamp}`;\n const childName = `QA TC-CAT-008 Child ${stamp}`;\n let token: string | null = null;\n let parentCategoryId: string | null = null;\n let childCategoryId: string | null = null;\n\n const waitForList = async (): Promise<void> => {\n await page.getByText('Loading data...').waitFor({ state: 'hidden', timeout: 10_000 }).catch(() => {});\n };\n\n const selectParent = async (): Promise<void> => {\n const select = page.locator('select#parentId');\n await expect(select).toBeVisible({ timeout: 10_000 });\n // Wait for CategorySelect to finish loading options from API\n await expect(select.locator(`option[value=\"${parentCategoryId}\"]`))\n .toBeAttached({ timeout: 10_000 });\n await select.selectOption(parentCategoryId!);\n };\n\n try {\n token = await getAuthToken(request);\n await login(page, 'admin');\n\n await page.goto('/backend/catalog/categories/create');\n await page.getByRole('textbox', { name: 'e.g., Footwear' }).fill(parentName);\n await page.getByRole('button', { name: 'Create' }).last().click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/categories$/);\n await waitForList();\n\n await page.getByRole('textbox', { name: 'Search categories' }).fill(parentName);\n const parentRow = page.getByRole('row', { name: new RegExp(parentName) });\n await expect(parentRow).toBeVisible();\n await parentRow.getByText(parentName, { exact: true }).first().click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/categories\\/[0-9a-f-]{36}\\/edit$/i);\n parentCategoryId = page.url().match(/\\/backend\\/catalog\\/categories\\/([0-9a-f-]{36})\\/edit$/i)?.[1] ?? null;\n\n await page.goto('/backend/catalog/categories/create');\n await page.getByRole('textbox', { name: 'e.g., Footwear' }).fill(childName);\n await selectParent();\n await page.getByRole('button', { name: 'Create' }).last().click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/categories$/);\n await waitForList();\n\n await page.getByRole('textbox', { name: 'Search categories' }).fill(childName);\n const childRow = page.getByRole('row', { name: new RegExp(childName) }).first();\n await expect(childRow).toBeVisible();\n await childRow.click();\n await expect(page).toHaveURL(/\\/backend\\/catalog\\/categories\\/[0-9a-f-]{36}\\/edit$/i);\n childCategoryId = page.url().match(/\\/backend\\/catalog\\/categories\\/([0-9a-f-]{36})\\/edit$/i)?.[1] ?? null;\n if (parentCategoryId) {\n const select = page.locator('select#parentId');\n await expect(select).toBeVisible({ timeout: 10_000 });\n // Wait for CategorySelect to load and reflect the saved parent value\n await expect(select).toHaveValue(parentCategoryId, { timeout: 10_000 });\n }\n } finally {\n if (token && childCategoryId) {\n await apiRequest(request, 'DELETE', `/api/catalog/categories?id=${encodeURIComponent(childCategoryId)}`, { token }).catch(() => {});\n }\n if (token && parentCategoryId) {\n await apiRequest(request, 'DELETE', `/api/catalog/categories?id=${encodeURIComponent(parentCategoryId)}`, { token }).catch(() => {});\n }\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createProductFixture, deleteCatalogProductIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures";
|
|
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-CAT-009: Product Tag Management", () => {
|
|
6
|
-
test("should add tags to product and keep them after save", async ({ page, request }) => {
|
|
7
|
-
const productName = `QA TC-CAT-009 ${Date.now()}`;
|
|
8
|
-
const sku = `QA-CAT-009-${Date.now()}`;
|
|
9
|
-
const tagOne = `qa-tag-${Date.now()}`;
|
|
10
|
-
const tagTwo = `qa-segment-${Date.now()}`;
|
|
11
|
-
let token = null;
|
|
12
|
-
let productId = null;
|
|
13
|
-
try {
|
|
14
|
-
token = await getAuthToken(request);
|
|
15
|
-
productId = await createProductFixture(request, token, { title: productName, sku });
|
|
16
|
-
await login(page, "admin");
|
|
17
|
-
await page.goto(`/backend/catalog/products/${productId}`);
|
|
18
|
-
const tagsInput = page.getByRole("textbox", { name: "Add tag and press Enter" });
|
|
19
|
-
await tagsInput.fill(tagOne);
|
|
20
|
-
await tagsInput.press("Enter");
|
|
21
|
-
await tagsInput.fill(tagTwo);
|
|
22
|
-
await tagsInput.press("Enter");
|
|
23
|
-
await page.getByRole("button", { name: "Save changes" }).last().click();
|
|
24
|
-
await expect(page.getByText(tagOne, { exact: true })).toBeVisible();
|
|
25
|
-
await expect(page.getByText(tagTwo, { exact: true })).toBeVisible();
|
|
26
|
-
} finally {
|
|
27
|
-
await deleteCatalogProductIfExists(request, token, productId);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=TC-CAT-009.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-009.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { createProductFixture, deleteCatalogProductIfExists } from '@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures';\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-CAT-009: Product Tag Management\n * Source: .ai/qa/scenarios/TC-CAT-009-tag-management.md\n */\ntest.describe('TC-CAT-009: Product Tag Management', () => {\n test('should add tags to product and keep them after save', async ({ page, request }) => {\n const productName = `QA TC-CAT-009 ${Date.now()}`;\n const sku = `QA-CAT-009-${Date.now()}`;\n const tagOne = `qa-tag-${Date.now()}`;\n const tagTwo = `qa-segment-${Date.now()}`;\n let token: string | null = null;\n let productId: string | null = null;\n\n try {\n token = await getAuthToken(request);\n productId = await createProductFixture(request, token, { title: productName, sku });\n\n await login(page, 'admin');\n await page.goto(`/backend/catalog/products/${productId}`);\n\n const tagsInput = page.getByRole('textbox', { name: 'Add tag and press Enter' });\n await tagsInput.fill(tagOne);\n await tagsInput.press('Enter');\n await tagsInput.fill(tagTwo);\n await tagsInput.press('Enter');\n await page.getByRole('button', { name: 'Save changes' }).last().click();\n\n await expect(page.getByText(tagOne, { exact: true })).toBeVisible();\n await expect(page.getByText(tagTwo, { exact: true })).toBeVisible();\n } finally {\n await deleteCatalogProductIfExists(request, token, productId);\n }\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,sBAAsB,oCAAoC;AACnE,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAMtB,KAAK,SAAS,sCAAsC,MAAM;AACxD,OAAK,uDAAuD,OAAO,EAAE,MAAM,QAAQ,MAAM;AACvF,UAAM,cAAc,iBAAiB,KAAK,IAAI,CAAC;AAC/C,UAAM,MAAM,cAAc,KAAK,IAAI,CAAC;AACpC,UAAM,SAAS,UAAU,KAAK,IAAI,CAAC;AACnC,UAAM,SAAS,cAAc,KAAK,IAAI,CAAC;AACvC,QAAI,QAAuB;AAC3B,QAAI,YAA2B;AAE/B,QAAI;AACF,cAAQ,MAAM,aAAa,OAAO;AAClC,kBAAY,MAAM,qBAAqB,SAAS,OAAO,EAAE,OAAO,aAAa,IAAI,CAAC;AAElF,YAAM,MAAM,MAAM,OAAO;AACzB,YAAM,KAAK,KAAK,6BAA6B,SAAS,EAAE;AAExD,YAAM,YAAY,KAAK,UAAU,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC/E,YAAM,UAAU,KAAK,MAAM;AAC3B,YAAM,UAAU,MAAM,OAAO;AAC7B,YAAM,UAAU,KAAK,MAAM;AAC3B,YAAM,UAAU,MAAM,OAAO;AAC7B,YAAM,KAAK,UAAU,UAAU,EAAE,MAAM,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM;AAEtE,YAAM,OAAO,KAAK,UAAU,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAClE,YAAM,OAAO,KAAK,UAAU,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC,EAAE,YAAY;AAAA,IACpE,UAAE;AACA,YAAM,6BAA6B,SAAS,OAAO,SAAS;AAAA,IAC9D;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { apiRequest, getAuthToken } from "@open-mercato/core/modules/core/__integration__/helpers/api";
|
|
3
|
-
test.describe("TC-CAT-010: Create Price Kind Configuration", () => {
|
|
4
|
-
test("should create and delete a catalog price kind via API", async ({ request }) => {
|
|
5
|
-
const token = await getAuthToken(request);
|
|
6
|
-
const code = `qa_cat_010_${Date.now()}`;
|
|
7
|
-
const title = `QA TC-CAT-010 ${Date.now()}`;
|
|
8
|
-
const createResponse = await apiRequest(request, "POST", "/api/catalog/price-kinds", {
|
|
9
|
-
token,
|
|
10
|
-
data: {
|
|
11
|
-
code,
|
|
12
|
-
title,
|
|
13
|
-
displayMode: "excluding-tax"
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
expect(createResponse.ok()).toBeTruthy();
|
|
17
|
-
const createBody = await createResponse.json();
|
|
18
|
-
expect(typeof createBody.id === "string" && createBody.id.length > 0).toBeTruthy();
|
|
19
|
-
const deleteResponse = await apiRequest(
|
|
20
|
-
request,
|
|
21
|
-
"DELETE",
|
|
22
|
-
`/api/catalog/price-kinds?id=${encodeURIComponent(createBody.id)}`,
|
|
23
|
-
{ token }
|
|
24
|
-
);
|
|
25
|
-
expect(deleteResponse.ok()).toBeTruthy();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=TC-CAT-010.spec.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/modules/catalog/__integration__/TC-CAT-010.spec.ts"],
|
|
4
|
-
"sourcesContent": ["import { expect, test } from '@playwright/test';\nimport { apiRequest, getAuthToken } from '@open-mercato/core/modules/core/__integration__/helpers/api';\n\n/**\n * TC-CAT-010: Create Price Kind Configuration\n * Source: .ai/qa/scenarios/TC-CAT-010-price-kind-creation.md\n */\ntest.describe('TC-CAT-010: Create Price Kind Configuration', () => {\n test('should create and delete a catalog price kind via API', async ({ request }) => {\n const token = await getAuthToken(request);\n const code = `qa_cat_010_${Date.now()}`;\n const title = `QA TC-CAT-010 ${Date.now()}`;\n\n const createResponse = await apiRequest(request, 'POST', '/api/catalog/price-kinds', {\n token,\n data: {\n code,\n title,\n displayMode: 'excluding-tax',\n },\n });\n expect(createResponse.ok()).toBeTruthy();\n\n const createBody = (await createResponse.json()) as { id?: string };\n expect(typeof createBody.id === 'string' && createBody.id.length > 0).toBeTruthy();\n\n const deleteResponse = await apiRequest(\n request,\n 'DELETE',\n `/api/catalog/price-kinds?id=${encodeURIComponent(createBody.id as string)}`,\n { token },\n );\n expect(deleteResponse.ok()).toBeTruthy();\n });\n});\n\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,QAAQ,YAAY;AAC7B,SAAS,YAAY,oBAAoB;AAMzC,KAAK,SAAS,+CAA+C,MAAM;AACjE,OAAK,yDAAyD,OAAO,EAAE,QAAQ,MAAM;AACnF,UAAM,QAAQ,MAAM,aAAa,OAAO;AACxC,UAAM,OAAO,cAAc,KAAK,IAAI,CAAC;AACrC,UAAM,QAAQ,iBAAiB,KAAK,IAAI,CAAC;AAEzC,UAAM,iBAAiB,MAAM,WAAW,SAAS,QAAQ,4BAA4B;AAAA,MACnF;AAAA,MACA,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA,aAAa;AAAA,MACf;AAAA,IACF,CAAC;AACD,WAAO,eAAe,GAAG,CAAC,EAAE,WAAW;AAEvC,UAAM,aAAc,MAAM,eAAe,KAAK;AAC9C,WAAO,OAAO,WAAW,OAAO,YAAY,WAAW,GAAG,SAAS,CAAC,EAAE,WAAW;AAEjF,UAAM,iBAAiB,MAAM;AAAA,MAC3B;AAAA,MACA;AAAA,MACA,+BAA+B,mBAAmB,WAAW,EAAY,CAAC;AAAA,MAC1E,EAAE,MAAM;AAAA,IACV;AACA,WAAO,eAAe,GAAG,CAAC,EAAE,WAAW;AAAA,EACzC,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@playwright/test";
|
|
2
|
-
import { createProductFixture, deleteCatalogProductIfExists } from "@open-mercato/core/modules/core/__integration__/helpers/catalogFixtures";
|
|
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-CAT-011: Configure Product Pricing", () => {
|
|
6
|
-
test("should set variant sale and regular prices during variant creation", async ({ page, request }) => {
|
|
7
|
-
const productName = `QA TC-CAT-011 ${Date.now()}`;
|
|
8
|
-
const baseSku = `QA-CAT-011-BASE-${Date.now()}`;
|
|
9
|
-
const variantName = `Priced Variant ${Date.now()}`;
|
|
10
|
-
const variantSku = `QA-CAT-011-VAR-${Date.now()}`;
|
|
11
|
-
let token = null;
|
|
12
|
-
let productId = null;
|
|
13
|
-
try {
|
|
14
|
-
token = await getAuthToken(request);
|
|
15
|
-
productId = await createProductFixture(request, token, { title: productName, sku: baseSku });
|
|
16
|
-
await login(page, "admin");
|
|
17
|
-
await page.goto(`/backend/catalog/products/${productId}`);
|
|
18
|
-
await page.getByRole("link", { name: "Add variant" }).click();
|
|
19
|
-
await expect(page).toHaveURL(/\/variants\/create$/);
|
|
20
|
-
await page.getByRole("textbox", { name: "e.g., Blue / Small" }).fill(variantName);
|
|
21
|
-
await page.getByRole("textbox", { name: "Unique identifier" }).fill(variantSku);
|
|
22
|
-
const priceInputs = page.getByRole("textbox", { name: "0.00" });
|
|
23
|
-
await priceInputs.nth(0).fill("19.99");
|
|
24
|
-
await priceInputs.nth(1).fill("24.99");
|
|
25
|
-
await page.getByRole("button", { name: "Create variant" }).last().click();
|
|
26
|
-
await expect(page).toHaveURL(/\/backend\/catalog\/products\/[0-9a-f-]{36}\/variants\/[0-9a-f-]{36}$/i);
|
|
27
|
-
await expect(priceInputs.nth(0)).toHaveValue("19.9900");
|
|
28
|
-
await expect(priceInputs.nth(1)).toHaveValue("24.9900");
|
|
29
|
-
} finally {
|
|
30
|
-
await deleteCatalogProductIfExists(request, token, productId);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=TC-CAT-011.spec.js.map
|