@globisnv/cypress-core 0.0.2 → 0.0.4
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/README.md +12 -7
- package/dist/apiMethods/IGS_request.d.ts +98 -0
- package/dist/apiMethods/IGS_request.js +161 -0
- package/dist/apiMethods/IGS_response.d.ts +47 -0
- package/dist/apiMethods/IGS_response.js +1 -0
- package/dist/blueprints/GLO_addressPopup.d.ts +45 -0
- package/dist/blueprints/GLO_addressPopup.js +96 -0
- package/dist/blueprints/GLO_article.d.ts +45 -0
- package/dist/blueprints/GLO_article.js +110 -0
- package/dist/blueprints/GLO_articleLot.d.ts +12 -0
- package/dist/blueprints/GLO_articleLot.js +23 -0
- package/dist/blueprints/GLO_articleVersion.d.ts +4 -0
- package/dist/blueprints/GLO_articleVersion.js +4 -0
- package/dist/blueprints/GLO_attachmentPopup.d.ts +9 -0
- package/dist/blueprints/GLO_attachmentPopup.js +10 -0
- package/dist/blueprints/GLO_bankAccount.d.ts +7 -0
- package/dist/blueprints/GLO_bankAccount.js +7 -0
- package/dist/blueprints/GLO_billingProcess.d.ts +4 -0
- package/dist/blueprints/GLO_billingProcess.js +4 -0
- package/dist/blueprints/GLO_billingProposal.d.ts +9 -0
- package/dist/blueprints/GLO_billingProposal.js +9 -0
- package/dist/blueprints/GLO_cancel.d.ts +7 -0
- package/dist/blueprints/GLO_cancel.js +7 -0
- package/dist/blueprints/GLO_commandlist.d.ts +10 -0
- package/dist/blueprints/GLO_commandlist.js +10 -0
- package/dist/blueprints/GLO_complaint.d.ts +27 -0
- package/dist/blueprints/GLO_complaint.js +51 -0
- package/dist/blueprints/GLO_composition.d.ts +14 -0
- package/dist/blueprints/GLO_composition.js +20 -0
- package/dist/blueprints/GLO_consignment.d.ts +61 -0
- package/dist/blueprints/GLO_consignment.js +104 -0
- package/dist/blueprints/GLO_consignmentContainerGroup.d.ts +6 -0
- package/dist/blueprints/GLO_consignmentContainerGroup.js +6 -0
- package/dist/blueprints/GLO_consignmentGoods.d.ts +40 -0
- package/dist/blueprints/GLO_consignmentGoods.js +62 -0
- package/dist/blueprints/GLO_consignmentHandling.d.ts +4 -0
- package/dist/blueprints/GLO_consignmentHandling.js +4 -0
- package/dist/blueprints/GLO_consignmentOrder.d.ts +31 -0
- package/dist/blueprints/GLO_consignmentOrder.js +37 -0
- package/dist/blueprints/GLO_consignmentPart.d.ts +13 -0
- package/dist/blueprints/GLO_consignmentPart.js +13 -0
- package/dist/blueprints/GLO_consignmentParts.d.ts +5 -0
- package/dist/blueprints/GLO_consignmentParts.js +12 -0
- package/dist/blueprints/GLO_consignmentPrice.d.ts +11 -0
- package/dist/blueprints/GLO_consignmentPrice.js +19 -0
- package/dist/blueprints/GLO_consignmentSupplier.d.ts +6 -0
- package/dist/blueprints/GLO_consignmentSupplier.js +11 -0
- package/dist/blueprints/GLO_contacts.d.ts +10 -0
- package/dist/blueprints/GLO_contacts.js +14 -0
- package/dist/blueprints/GLO_container.d.ts +6 -0
- package/dist/blueprints/GLO_container.js +4 -0
- package/dist/blueprints/GLO_contract.d.ts +22 -0
- package/dist/blueprints/GLO_contract.js +30 -0
- package/dist/blueprints/GLO_contractArticle.d.ts +17 -0
- package/dist/blueprints/GLO_contractArticle.js +35 -0
- package/dist/blueprints/GLO_contractArticleCost.d.ts +5 -0
- package/dist/blueprints/GLO_contractArticleCost.js +8 -0
- package/dist/blueprints/GLO_countryVatZone.d.ts +8 -0
- package/dist/blueprints/GLO_countryVatZone.js +9 -0
- package/dist/blueprints/GLO_currencyDeviation.d.ts +14 -0
- package/dist/blueprints/GLO_currencyDeviation.js +15 -0
- package/dist/blueprints/GLO_customerArticle.d.ts +12 -0
- package/dist/blueprints/GLO_customerArticle.js +15 -0
- package/dist/blueprints/GLO_customsFlow.d.ts +8 -0
- package/dist/blueprints/GLO_customsFlow.js +19 -0
- package/dist/blueprints/GLO_customsFlowDefinition.d.ts +15 -0
- package/dist/blueprints/GLO_customsFlowDefinition.js +14 -0
- package/dist/blueprints/GLO_customsUnion.d.ts +4 -0
- package/dist/blueprints/GLO_customsUnion.js +4 -0
- package/dist/blueprints/GLO_deliveryReceipt.d.ts +10 -0
- package/dist/blueprints/GLO_deliveryReceipt.js +22 -0
- package/dist/blueprints/GLO_departureSchedule.d.ts +27 -0
- package/dist/blueprints/GLO_departureSchedule.js +57 -0
- package/dist/blueprints/GLO_departureScheduleTimes.d.ts +49 -0
- package/dist/blueprints/GLO_departureScheduleTimes.js +61 -0
- package/dist/blueprints/GLO_document.d.ts +7 -0
- package/dist/blueprints/GLO_document.js +7 -0
- package/dist/blueprints/GLO_documentAttachment.d.ts +4 -0
- package/dist/blueprints/GLO_documentAttachment.js +4 -0
- package/dist/blueprints/GLO_documentDefinitionEntity.d.ts +5 -0
- package/dist/blueprints/GLO_documentDefinitionEntity.js +5 -0
- package/dist/blueprints/GLO_documentGroup.d.ts +4 -0
- package/dist/blueprints/GLO_documentGroup.js +4 -0
- package/dist/blueprints/GLO_documentType.d.ts +12 -0
- package/dist/blueprints/GLO_documentType.js +11 -0
- package/dist/blueprints/GLO_enterCountry.d.ts +21 -0
- package/dist/blueprints/GLO_enterCountry.js +47 -0
- package/dist/blueprints/GLO_enterDiscount.d.ts +8 -0
- package/dist/blueprints/GLO_enterDiscount.js +9 -0
- package/dist/blueprints/GLO_equipment.d.ts +34 -0
- package/dist/blueprints/GLO_equipment.js +55 -0
- package/dist/blueprints/GLO_equipmentCategory.d.ts +15 -0
- package/dist/blueprints/GLO_equipmentCategory.js +14 -0
- package/dist/blueprints/GLO_equipmentEntity.d.ts +5 -0
- package/dist/blueprints/GLO_equipmentEntity.js +5 -0
- package/dist/blueprints/GLO_equipmentServiceCategory.d.ts +13 -0
- package/dist/blueprints/GLO_equipmentServiceCategory.js +13 -0
- package/dist/blueprints/GLO_equipmentType.d.ts +21 -0
- package/dist/blueprints/GLO_equipmentType.js +20 -0
- package/dist/blueprints/GLO_equipmentTypeServiceCategory.d.ts +13 -0
- package/dist/blueprints/GLO_equipmentTypeServiceCategory.js +12 -0
- package/dist/blueprints/GLO_fieldInputValidation.d.ts +46 -0
- package/dist/blueprints/GLO_fieldInputValidation.js +73 -0
- package/dist/blueprints/GLO_formula.d.ts +9 -0
- package/dist/blueprints/GLO_formula.js +9 -0
- package/dist/blueprints/GLO_gang.d.ts +12 -0
- package/dist/blueprints/GLO_gang.js +12 -0
- package/dist/blueprints/GLO_holiday.d.ts +7 -0
- package/dist/blueprints/GLO_holiday.js +8 -0
- package/dist/blueprints/GLO_journey.d.ts +18 -0
- package/dist/blueprints/GLO_journey.js +24 -0
- package/dist/blueprints/GLO_journeyStop.d.ts +32 -0
- package/dist/blueprints/GLO_journeyStop.js +44 -0
- package/dist/blueprints/GLO_layout.d.ts +6 -0
- package/dist/blueprints/GLO_layout.js +6 -0
- package/dist/blueprints/GLO_logging.d.ts +9 -0
- package/dist/blueprints/GLO_logging.js +12 -0
- package/dist/blueprints/GLO_logisticConnection.d.ts +10 -0
- package/dist/blueprints/GLO_logisticConnection.js +11 -0
- package/dist/blueprints/GLO_logisticConnectionType.d.ts +5 -0
- package/dist/blueprints/GLO_logisticConnectionType.js +5 -0
- package/dist/blueprints/GLO_logisticContract.d.ts +28 -0
- package/dist/blueprints/GLO_logisticContract.js +80 -0
- package/dist/blueprints/GLO_logisticContractDetail.d.ts +42 -0
- package/dist/blueprints/GLO_logisticContractDetail.js +122 -0
- package/dist/blueprints/GLO_logisticContractDetailHandling.d.ts +11 -0
- package/dist/blueprints/GLO_logisticContractDetailHandling.js +14 -0
- package/dist/blueprints/GLO_logisticContractDetailItem.d.ts +5 -0
- package/dist/blueprints/GLO_logisticContractDetailItem.js +8 -0
- package/dist/blueprints/GLO_logisticContractItem.d.ts +14 -0
- package/dist/blueprints/GLO_logisticContractItem.js +40 -0
- package/dist/blueprints/GLO_logisticContractItemActivity.d.ts +4 -0
- package/dist/blueprints/GLO_logisticContractItemActivity.js +4 -0
- package/dist/blueprints/GLO_logisticContractItemSurcharge.d.ts +7 -0
- package/dist/blueprints/GLO_logisticContractItemSurcharge.js +7 -0
- package/dist/blueprints/GLO_logisticContractItemSurchargeItem.d.ts +4 -0
- package/dist/blueprints/GLO_logisticContractItemSurchargeItem.js +4 -0
- package/dist/blueprints/GLO_logisticContractReference.d.ts +4 -0
- package/dist/blueprints/GLO_logisticContractReference.js +4 -0
- package/dist/blueprints/GLO_logisticContractVolumeConstraint.d.ts +9 -0
- package/dist/blueprints/GLO_logisticContractVolumeConstraint.js +8 -0
- package/dist/blueprints/GLO_logisticLocation.d.ts +7 -0
- package/dist/blueprints/GLO_logisticLocation.js +7 -0
- package/dist/blueprints/GLO_logisticPriceRequestDetailExternalPrice.d.ts +19 -0
- package/dist/blueprints/GLO_logisticPriceRequestDetailExternalPrice.js +30 -0
- package/dist/blueprints/GLO_logisticPurchaseOrder.d.ts +4 -0
- package/dist/blueprints/GLO_logisticPurchaseOrder.js +4 -0
- package/dist/blueprints/GLO_logistic_waiting_hours.d.ts +6 -0
- package/dist/blueprints/GLO_logistic_waiting_hours.js +6 -0
- package/dist/blueprints/GLO_operationalDefault.d.ts +23 -0
- package/dist/blueprints/GLO_operationalDefault.js +25 -0
- package/dist/blueprints/GLO_outputDetailMail.d.ts +14 -0
- package/dist/blueprints/GLO_outputDetailMail.js +13 -0
- package/dist/blueprints/GLO_postalcode.d.ts +6 -0
- package/dist/blueprints/GLO_postalcode.js +6 -0
- package/dist/blueprints/GLO_priceDependency.d.ts +5 -0
- package/dist/blueprints/GLO_priceDependency.js +4 -0
- package/dist/blueprints/GLO_priceEntry.d.ts +17 -0
- package/dist/blueprints/GLO_priceEntry.js +17 -0
- package/dist/blueprints/GLO_priceRequest.d.ts +8 -0
- package/dist/blueprints/GLO_priceRequest.js +20 -0
- package/dist/blueprints/GLO_priceRequestLine.d.ts +12 -0
- package/dist/blueprints/GLO_priceRequestLine.js +17 -0
- package/dist/blueprints/GLO_principal.d.ts +9 -0
- package/dist/blueprints/GLO_principal.js +13 -0
- package/dist/blueprints/GLO_printPopup.d.ts +10 -0
- package/dist/blueprints/GLO_printPopup.js +62 -0
- package/dist/blueprints/GLO_production.d.ts +9 -0
- package/dist/blueprints/GLO_production.js +9 -0
- package/dist/blueprints/GLO_productionLineMaterial.d.ts +8 -0
- package/dist/blueprints/GLO_productionLineMaterial.js +13 -0
- package/dist/blueprints/GLO_productionMaterial.d.ts +5 -0
- package/dist/blueprints/GLO_productionMaterial.js +5 -0
- package/dist/blueprints/GLO_purchaseCosts.d.ts +6 -0
- package/dist/blueprints/GLO_purchaseCosts.js +9 -0
- package/dist/blueprints/GLO_purchaseInvoice.d.ts +12 -0
- package/dist/blueprints/GLO_purchaseInvoice.js +25 -0
- package/dist/blueprints/GLO_purchaseInvoiceLine.d.ts +8 -0
- package/dist/blueprints/GLO_purchaseInvoiceLine.js +13 -0
- package/dist/blueprints/GLO_purchaseOrder.d.ts +14 -0
- package/dist/blueprints/GLO_purchaseOrder.js +25 -0
- package/dist/blueprints/GLO_purchaseOrderLine.d.ts +10 -0
- package/dist/blueprints/GLO_purchaseOrderLine.js +24 -0
- package/dist/blueprints/GLO_purchasePrices.d.ts +10 -0
- package/dist/blueprints/GLO_purchasePrices.js +10 -0
- package/dist/blueprints/GLO_quotation.d.ts +12 -0
- package/dist/blueprints/GLO_quotation.js +32 -0
- package/dist/blueprints/GLO_quotationLine.d.ts +12 -0
- package/dist/blueprints/GLO_quotationLine.js +28 -0
- package/dist/blueprints/GLO_receipt.d.ts +13 -0
- package/dist/blueprints/GLO_receipt.js +17 -0
- package/dist/blueprints/GLO_receiptFromTempReceipt.d.ts +8 -0
- package/dist/blueprints/GLO_receiptFromTempReceipt.js +8 -0
- package/dist/blueprints/GLO_receiptLine.d.ts +22 -0
- package/dist/blueprints/GLO_receiptLine.js +28 -0
- package/dist/blueprints/GLO_relationAddress.d.ts +26 -0
- package/dist/blueprints/GLO_relationAddress.js +58 -0
- package/dist/blueprints/GLO_relationBankAccount.d.ts +9 -0
- package/dist/blueprints/GLO_relationBankAccount.js +9 -0
- package/dist/blueprints/GLO_relationContact.d.ts +23 -0
- package/dist/blueprints/GLO_relationContact.js +45 -0
- package/dist/blueprints/GLO_relationGroupType.d.ts +7 -0
- package/dist/blueprints/GLO_relationGroupType.js +6 -0
- package/dist/blueprints/GLO_relations.d.ts +67 -0
- package/dist/blueprints/GLO_relations.js +186 -0
- package/dist/blueprints/GLO_relationtype.d.ts +15 -0
- package/dist/blueprints/GLO_relationtype.js +31 -0
- package/dist/blueprints/GLO_remarkType.d.ts +10 -0
- package/dist/blueprints/GLO_remarkType.js +9 -0
- package/dist/blueprints/GLO_remarkTypeDefaultValue.d.ts +4 -0
- package/dist/blueprints/GLO_remarkTypeDefaultValue.js +14 -0
- package/dist/blueprints/GLO_remarkTypeEntityType.d.ts +10 -0
- package/dist/blueprints/GLO_remarkTypeEntityType.js +9 -0
- package/dist/blueprints/GLO_representative.d.ts +7 -0
- package/dist/blueprints/GLO_representative.js +6 -0
- package/dist/blueprints/GLO_salesInvoice.d.ts +9 -0
- package/dist/blueprints/GLO_salesInvoice.js +15 -0
- package/dist/blueprints/GLO_salesInvoiceLine.d.ts +9 -0
- package/dist/blueprints/GLO_salesInvoiceLine.js +13 -0
- package/dist/blueprints/GLO_salesOrder.d.ts +13 -0
- package/dist/blueprints/GLO_salesOrder.js +25 -0
- package/dist/blueprints/GLO_salesOrderLine.d.ts +13 -0
- package/dist/blueprints/GLO_salesOrderLine.js +34 -0
- package/dist/blueprints/GLO_stockCorrection.d.ts +14 -0
- package/dist/blueprints/GLO_stockCorrection.js +24 -0
- package/dist/blueprints/GLO_stopSchedule.d.ts +4 -0
- package/dist/blueprints/GLO_stopSchedule.js +4 -0
- package/dist/blueprints/GLO_supplierArticle.d.ts +8 -0
- package/dist/blueprints/GLO_supplierArticle.js +8 -0
- package/dist/blueprints/GLO_tclSetting.d.ts +6 -0
- package/dist/blueprints/GLO_tclSetting.js +6 -0
- package/dist/blueprints/GLO_todo.d.ts +10 -0
- package/dist/blueprints/GLO_todo.js +21 -0
- package/dist/blueprints/GLO_todoSchedule.d.ts +23 -0
- package/dist/blueprints/GLO_todoSchedule.js +79 -0
- package/dist/blueprints/GLO_tractionDistance.d.ts +6 -0
- package/dist/blueprints/GLO_tractionDistance.js +6 -0
- package/dist/blueprints/GLO_transportOrder.d.ts +4 -0
- package/dist/blueprints/GLO_transportOrder.js +4 -0
- package/dist/blueprints/GLO_transportPrice.d.ts +18 -0
- package/dist/blueprints/GLO_transportPrice.js +34 -0
- package/dist/blueprints/GLO_transportRequirement.d.ts +18 -0
- package/dist/blueprints/GLO_transportRequirement.js +32 -0
- package/dist/blueprints/GLO_transportRequirementContainer.d.ts +8 -0
- package/dist/blueprints/GLO_transportRequirementContainer.js +8 -0
- package/dist/blueprints/GLO_transportRequirementGoods.d.ts +33 -0
- package/dist/blueprints/GLO_transportRequirementGoods.js +51 -0
- package/dist/blueprints/GLO_transportScenarioExecutionLeg.d.ts +6 -0
- package/dist/blueprints/GLO_transportScenarioExecutionLeg.js +6 -0
- package/dist/blueprints/GLO_transportStock.d.ts +4 -0
- package/dist/blueprints/GLO_transportStock.js +4 -0
- package/dist/blueprints/GLO_visit.d.ts +9 -0
- package/dist/blueprints/GLO_visit.js +10 -0
- package/dist/blueprints/GLO_warehouseMove.d.ts +9 -0
- package/dist/blueprints/GLO_warehouseMove.js +9 -0
- package/dist/blueprints/GLO_warehouseOrderSubline.d.ts +6 -0
- package/dist/blueprints/GLO_warehouseOrderSubline.js +11 -0
- package/dist/blueprints/GLO_workflowLoggingTable.d.ts +20 -0
- package/dist/blueprints/GLO_workflowLoggingTable.js +20 -0
- package/dist/blueprints/GLO_workflowVerification.d.ts +10 -0
- package/dist/blueprints/GLO_workflowVerification.js +19 -0
- package/dist/blueprints/GLO_zone.d.ts +9 -0
- package/dist/blueprints/GLO_zone.js +9 -0
- package/dist/blueprints/GLO_zone_postalcode.d.ts +12 -0
- package/dist/blueprints/GLO_zone_postalcode.js +10 -0
- package/dist/blueprints/GLO_zone_type.d.ts +8 -0
- package/dist/blueprints/GLO_zone_type.js +7 -0
- package/dist/blueprints/GLT_goods.d.ts +2 -0
- package/dist/blueprints/GLT_goods.js +12 -0
- package/dist/commands/FOB_commands.d.ts +124 -0
- package/dist/commands/FOB_commands.js +211 -0
- package/dist/commands/GLJ_commands.d.ts +28 -0
- package/dist/commands/GLJ_commands.js +40 -0
- package/dist/commands/GLO_commands.d.ts +685 -0
- package/dist/commands/GLO_commands.js +2319 -0
- package/dist/commands/GLS_commands.d.ts +63 -0
- package/dist/commands/GLS_commands.js +103 -0
- package/dist/commands/GLT_commands.d.ts +78 -0
- package/dist/commands/GLT_commands.js +148 -0
- package/dist/commands/POR_commands.d.ts +85 -0
- package/dist/commands/POR_commands.js +122 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.js +115 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15 -0
- package/dist/plugins/prometheusWriter.d.ts +15 -0
- package/dist/plugins/prometheusWriter.js +111 -0
- package/dist/register.d.ts +8 -0
- package/dist/register.js +23 -0
- package/dist/tsHelper.d.ts +161 -0
- package/dist/tsHelper.js +294 -0
- package/dist/types.d.ts +363 -0
- package/dist/types.js +4 -0
- package/dist/websocketDetector.d.ts +71 -0
- package/dist/websocketDetector.js +1593 -0
- package/package.json +10 -2
- package/template/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,12 +12,7 @@ This package holds everything that is *not* customer-specific: the shared Cypres
|
|
|
12
12
|
npm install @globisnv/cypress-core
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Peer dependencies (must be installed in the consumer repo)
|
|
16
|
-
|
|
17
|
-
| Package | Range |
|
|
18
|
-
| --- | --- |
|
|
19
|
-
| `cypress` | `^15.19.0` |
|
|
20
|
-
| `cypress-real-events` | `^1.15.0` |
|
|
15
|
+
Peer dependencies (must be installed in the consumer repo) — see `peerDependencies` in [package.json](package.json) for the exact supported ranges.
|
|
21
16
|
|
|
22
17
|
---
|
|
23
18
|
|
|
@@ -27,9 +22,19 @@ Core's own version is plain semver, deliberately **not** tied to globis-online's
|
|
|
27
22
|
|
|
28
23
|
Instead, each core release declares the **minimum** globis-online version it requires — a floor, not a pin. Blueprints and commands are written against a given release's Servoy DOM/behavior; they keep working on every later globis-online release *until* one of them actually changes something a blueprint depends on, at which point core needs a new version anyway, with its floor bumped to that release. There's no meaningful upper bound to declare in advance — you only find out a version broke something by running against it.
|
|
29
24
|
|
|
25
|
+
What each part of the version bump means:
|
|
26
|
+
|
|
27
|
+
| Bump | When |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| major | A globis-online release broke this package's support floor — bump `globisOnline.minVersion` (and this table) too |
|
|
30
|
+
| minor | A new command / blueprint / API surface, backwards compatible |
|
|
31
|
+
| patch | Bugfixes only |
|
|
32
|
+
|
|
33
|
+
Releases are cut via the [Create Release](.github/workflows/release.yml) GitHub Action (Actions → Create Release → Run workflow), which bumps the version, tags, publishes to npm, and creates the GitHub Release.
|
|
34
|
+
|
|
30
35
|
| Core version | Minimum globis-online version |
|
|
31
36
|
| --- | --- |
|
|
32
|
-
| `
|
|
37
|
+
| `0.0.1` | `11.0.2` |
|
|
33
38
|
|
|
34
39
|
The floor is recorded in `package.json` under `globisOnline.minVersion` (machine-readable, in case tooling wants to check it later) and here in this table (human-readable, updated on every release alongside `CHANGELOG.md`). `globis-cypress` stays pinned to the latest core version — since it's Globis's own suite, it's the first thing to catch a globis-online release breaking something, before any customer repo would.
|
|
35
40
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the type of the body object for HTTP requests.
|
|
3
|
+
* @template T - Type of the body.
|
|
4
|
+
*/
|
|
5
|
+
interface BodyType<T> {
|
|
6
|
+
[key: string]: T;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Represents the type for the primary key object.
|
|
10
|
+
*/
|
|
11
|
+
type primaryKeyType = {
|
|
12
|
+
pkName: string;
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Creates request variables object for HTTP request.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
19
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
20
|
+
* @param {object} [body] - The body of the request.
|
|
21
|
+
* @param {number} [timeout] - A custom timeout to override the default
|
|
22
|
+
* @param {string} [api_key_overide] - An api key to use instead of the `api_key` environment variable.
|
|
23
|
+
* @returns {object} The request variables object.
|
|
24
|
+
*/
|
|
25
|
+
export declare const createRequestVariables: (apiUrl: string, method: apiMethodType, body?: object, timeout?: number, api_key_overide?: string) => Cypress.Chainable<{
|
|
26
|
+
url: string;
|
|
27
|
+
method: string;
|
|
28
|
+
headers: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
};
|
|
31
|
+
body?: object;
|
|
32
|
+
timeout?: number;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Sends a HTTP request and verifies the response status.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
38
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
39
|
+
* @param {object} [body] - The body of the request.
|
|
40
|
+
* @param {number} [status=200] - The expected status code of the response.
|
|
41
|
+
* @param {number} [timeout] - A custom timeout, overriding the default.
|
|
42
|
+
* @param
|
|
43
|
+
* @returns {void}
|
|
44
|
+
*/
|
|
45
|
+
export declare const requestWithResponse: (apiUrl: string, method: apiMethodType, body?: object, status?: number, timeout?: number) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Represents the primary key object.
|
|
48
|
+
* @type {primaryKeyType}
|
|
49
|
+
*/
|
|
50
|
+
export declare const primaryKeyObject: primaryKeyType;
|
|
51
|
+
/**
|
|
52
|
+
* Sends a PATCH request with response verification.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
55
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
56
|
+
* @param {BodyType<string | number | object>} body - The body of the request.
|
|
57
|
+
* @param {number} [status=200] - The expected status code of the response.
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
export declare const requestWithResponsePatch: (apiUrl: string, method: apiMethodType, body: BodyType<string | number | object>, status?: number) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Sends a HTTP request, verifies the response status, and returns the ID field.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
65
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
66
|
+
* @param {object} body - The body of the request.
|
|
67
|
+
* @param {string} idField - The ID field to be returned from the response.
|
|
68
|
+
* @returns {Promise<string>} The ID field from the response.
|
|
69
|
+
*/
|
|
70
|
+
export declare const requestWithResponseAndReturnId: (apiUrl: string, method: apiMethodType, body: object, idField: string) => Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Sends a GET request, verifies the response status, and returns the specified field.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
75
|
+
* @param {string} nrField - The field to be returned from the response.
|
|
76
|
+
* @returns {Promise<string>} The specified field from the response.
|
|
77
|
+
*/
|
|
78
|
+
export declare const getRequestAndReturnNr: (apiUrl: string, nrField: string) => Promise<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Sends a GET request, verifies the response status, and returns the response body.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
83
|
+
* @returns {Promise<object>} The response body.
|
|
84
|
+
*/
|
|
85
|
+
export declare const getRequestAndReturnBody: (apiUrl: string) => Promise<object>;
|
|
86
|
+
/**
|
|
87
|
+
* Sends an HTTP request with custom headers and returns the response body.
|
|
88
|
+
* This is a universal function that supports any HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)
|
|
89
|
+
*
|
|
90
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
91
|
+
* @param {apiMethodType} method - The HTTP method for the request (GET, POST, PUT, PATCH, DELETE, etc.).
|
|
92
|
+
* @param {object} [body] - The body of the request (optional, not used for GET requests).
|
|
93
|
+
* @param {number} [status=200] - The expected status code of the response.
|
|
94
|
+
* @param {string} [api_key_overide] - An api key to use instead of the `api_key` environment variable.
|
|
95
|
+
* @returns {Promise<object>} The response body.
|
|
96
|
+
*/
|
|
97
|
+
export declare const requestAndReturnBody: (apiUrl: string, method: apiMethodType, body?: object, status?: number, api_key_overide?: string) => Promise<object>;
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates request variables object for HTTP request.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
5
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
6
|
+
* @param {object} [body] - The body of the request.
|
|
7
|
+
* @param {number} [timeout] - A custom timeout to override the default
|
|
8
|
+
* @param {string} [api_key_overide] - An api key to use instead of the `api_key` environment variable.
|
|
9
|
+
* @returns {object} The request variables object.
|
|
10
|
+
*/
|
|
11
|
+
export const createRequestVariables = (apiUrl, method, body, timeout, api_key_overide) => {
|
|
12
|
+
return cy.env(['api_key']).then(({ api_key }) => {
|
|
13
|
+
const url = new URL(apiUrl);
|
|
14
|
+
const executionToken = url.searchParams.get('X-Execution-Token');
|
|
15
|
+
if (executionToken) {
|
|
16
|
+
url.searchParams.delete('X-Execution-Token');
|
|
17
|
+
}
|
|
18
|
+
const headers = {
|
|
19
|
+
authorization: (api_key_overide ?? api_key),
|
|
20
|
+
'Content-Type': 'application/json',
|
|
21
|
+
...(executionToken && { 'X-Execution-Token': executionToken })
|
|
22
|
+
};
|
|
23
|
+
const requestOptions = {
|
|
24
|
+
url: url.toString(),
|
|
25
|
+
method: method,
|
|
26
|
+
headers: headers,
|
|
27
|
+
body: body
|
|
28
|
+
};
|
|
29
|
+
if (timeout !== undefined) {
|
|
30
|
+
requestOptions.timeout = timeout;
|
|
31
|
+
}
|
|
32
|
+
return requestOptions;
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Sends a HTTP request and verifies the response status.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
39
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
40
|
+
* @param {object} [body] - The body of the request.
|
|
41
|
+
* @param {number} [status=200] - The expected status code of the response.
|
|
42
|
+
* @param {number} [timeout] - A custom timeout, overriding the default.
|
|
43
|
+
* @param
|
|
44
|
+
* @returns {void}
|
|
45
|
+
*/
|
|
46
|
+
export const requestWithResponse = (apiUrl, method, body, status = 200, timeout) => {
|
|
47
|
+
createRequestVariables(apiUrl, method, body, timeout).then((opts) => {
|
|
48
|
+
cy.request(opts).then((response) => {
|
|
49
|
+
expect(response.status).to.eq(status);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Represents the primary key object.
|
|
55
|
+
* @type {primaryKeyType}
|
|
56
|
+
*/
|
|
57
|
+
export const primaryKeyObject = {
|
|
58
|
+
pkName: 'somePK',
|
|
59
|
+
value: 'SomeValue'
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Sends a PATCH request with response verification.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
65
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
66
|
+
* @param {BodyType<string | number | object>} body - The body of the request.
|
|
67
|
+
* @param {number} [status=200] - The expected status code of the response.
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
export const requestWithResponsePatch = (apiUrl, method, body, status = 200) => {
|
|
71
|
+
// Add primary key to the body
|
|
72
|
+
body[primaryKeyObject.pkName] = primaryKeyObject.value;
|
|
73
|
+
cy.GLO_log(`method: ${method} -- body: ${JSON.stringify(body)}`);
|
|
74
|
+
// Send the request with response verification
|
|
75
|
+
requestWithResponse(apiUrl, method, body, status);
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Sends a HTTP request, verifies the response status, and returns the ID field.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
81
|
+
* @param {apiMethodType} method - The HTTP method for the request.
|
|
82
|
+
* @param {object} body - The body of the request.
|
|
83
|
+
* @param {string} idField - The ID field to be returned from the response.
|
|
84
|
+
* @returns {Promise<string>} The ID field from the response.
|
|
85
|
+
*/
|
|
86
|
+
export const requestWithResponseAndReturnId = (apiUrl, method, body, idField) => {
|
|
87
|
+
cy.GLO_log(`method: ${method} -- body: ${JSON.stringify(body)}`);
|
|
88
|
+
return new Cypress.Promise((resolve) => {
|
|
89
|
+
createRequestVariables(apiUrl, method, body).then((opts) => {
|
|
90
|
+
cy.request(opts).then((response) => {
|
|
91
|
+
expect(response.status).to.eq(200);
|
|
92
|
+
const responsePost = response.body;
|
|
93
|
+
const responsePostBodyCreate = responsePost.create;
|
|
94
|
+
resolve(responsePostBodyCreate[0][idField]);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Sends a GET request, verifies the response status, and returns the specified field.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
103
|
+
* @param {string} nrField - The field to be returned from the response.
|
|
104
|
+
* @returns {Promise<string>} The specified field from the response.
|
|
105
|
+
*/
|
|
106
|
+
export const getRequestAndReturnNr = (apiUrl, nrField) => {
|
|
107
|
+
cy.GLO_log(`method: GET -- requested field: ${nrField}`);
|
|
108
|
+
return new Cypress.Promise((resolve) => {
|
|
109
|
+
createRequestVariables(apiUrl, 'GET').then((opts) => {
|
|
110
|
+
cy.request(opts).then((response) => {
|
|
111
|
+
expect(response.status).to.eq(200);
|
|
112
|
+
const responseBody = response.body;
|
|
113
|
+
const responseElement = responseBody[0];
|
|
114
|
+
expect(responseElement).to.have.property(nrField);
|
|
115
|
+
resolve(responseElement[nrField]);
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Sends a GET request, verifies the response status, and returns the response body.
|
|
122
|
+
*
|
|
123
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
124
|
+
* @returns {Promise<object>} The response body.
|
|
125
|
+
*/
|
|
126
|
+
export const getRequestAndReturnBody = (apiUrl) => {
|
|
127
|
+
cy.GLO_log('method: GET');
|
|
128
|
+
return new Cypress.Promise((resolve) => {
|
|
129
|
+
createRequestVariables(apiUrl, 'GET').then((opts) => {
|
|
130
|
+
cy.request(opts).then((response) => {
|
|
131
|
+
expect(response.status).to.eq(200);
|
|
132
|
+
const responseBody = response.body;
|
|
133
|
+
const responseElement = responseBody[0];
|
|
134
|
+
resolve(responseElement);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Sends an HTTP request with custom headers and returns the response body.
|
|
141
|
+
* This is a universal function that supports any HTTP method (GET, POST, PUT, PATCH, DELETE, etc.)
|
|
142
|
+
*
|
|
143
|
+
* @param {string} apiUrl - The URL of the API endpoint.
|
|
144
|
+
* @param {apiMethodType} method - The HTTP method for the request (GET, POST, PUT, PATCH, DELETE, etc.).
|
|
145
|
+
* @param {object} [body] - The body of the request (optional, not used for GET requests).
|
|
146
|
+
* @param {number} [status=200] - The expected status code of the response.
|
|
147
|
+
* @param {string} [api_key_overide] - An api key to use instead of the `api_key` environment variable.
|
|
148
|
+
* @returns {Promise<object>} The response body.
|
|
149
|
+
*/
|
|
150
|
+
export const requestAndReturnBody = (apiUrl, method, body, status = 200, api_key_overide) => {
|
|
151
|
+
const bodyLog = body ? ` -- body: ${JSON.stringify(body)}` : '';
|
|
152
|
+
cy.GLO_log(`method: ${method}${bodyLog}`);
|
|
153
|
+
return new Cypress.Promise((resolve) => {
|
|
154
|
+
createRequestVariables(apiUrl, method, body, undefined, api_key_overide).then((opts) => {
|
|
155
|
+
cy.request(opts).then((response) => {
|
|
156
|
+
expect(response.status).to.eq(status);
|
|
157
|
+
resolve(response.body);
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an object containing key-value pairs with string values.
|
|
3
|
+
* @typedef {Object.<string, string>} responseUUIDObject
|
|
4
|
+
*/
|
|
5
|
+
type responseUUIDObject = {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Represents the default structure of a response object.
|
|
10
|
+
* @typedef {Object} responseDefault
|
|
11
|
+
* @property {number} status - The status code of the response.
|
|
12
|
+
*/
|
|
13
|
+
export type responseDefault = {
|
|
14
|
+
status: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Represents the structure of a response object for create operations.
|
|
18
|
+
* @typedef {responseDefault} responseCreate
|
|
19
|
+
* @property {Object} body - The body of the response.
|
|
20
|
+
* @property {Array<responseUUIDObject>} body.create - An array of objects containing created UUIDs.
|
|
21
|
+
*/
|
|
22
|
+
export type responseCreate = responseDefault & {
|
|
23
|
+
body: {
|
|
24
|
+
create: Array<responseUUIDObject>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Represents the structure of a response object for patch operations.
|
|
29
|
+
* @typedef {responseDefault} responsePatch
|
|
30
|
+
* @property {Object} body - The body of the response.
|
|
31
|
+
* @property {Array<responseUUIDObject>} body.patch - An array of objects containing patched UUIDs.
|
|
32
|
+
*/
|
|
33
|
+
export type responsePatch = responseDefault & {
|
|
34
|
+
body: {
|
|
35
|
+
patch: Array<responseUUIDObject>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Represents the structure of a response object for read operations.
|
|
40
|
+
* @typedef {responseDefault} responseRead
|
|
41
|
+
* @template T - Type of the body of the response.
|
|
42
|
+
* @property {T} body - The body of the response.
|
|
43
|
+
*/
|
|
44
|
+
export type responseRead<T> = responseDefault & {
|
|
45
|
+
body: T;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type CheckState } from '../tsHelper.js';
|
|
2
|
+
export type ObjAddressPopupBase = {
|
|
3
|
+
type?: 'search' | 'create';
|
|
4
|
+
addressCode?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
country?: string;
|
|
7
|
+
state?: string;
|
|
8
|
+
county?: string;
|
|
9
|
+
PC?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
streetName?: string;
|
|
12
|
+
number?: string | number;
|
|
13
|
+
latitude?: string;
|
|
14
|
+
longitude?: string;
|
|
15
|
+
flagUseSelectedAddress?: CheckState;
|
|
16
|
+
rowToSelect?: string | number;
|
|
17
|
+
flag_postaddress?: CheckState;
|
|
18
|
+
flag_deliveryaddress?: CheckState;
|
|
19
|
+
flag_invoiceaddress?: CheckState;
|
|
20
|
+
flag_legaladdress?: CheckState;
|
|
21
|
+
flag_visitaddress?: CheckState;
|
|
22
|
+
flag_manual_coordinates?: CheckState;
|
|
23
|
+
btn_validate_address?: boolean;
|
|
24
|
+
close_popup?: boolean;
|
|
25
|
+
btn_use_entered_address?: boolean;
|
|
26
|
+
btn_use_selected_address?: boolean;
|
|
27
|
+
btn_save_address?: boolean;
|
|
28
|
+
autoSelect?: boolean;
|
|
29
|
+
btn_accept_double_address?: boolean;
|
|
30
|
+
};
|
|
31
|
+
type OnlyOneTrue<T, K extends keyof T = keyof T> = (K extends keyof T ? {
|
|
32
|
+
[P in K]-?: true;
|
|
33
|
+
} & {
|
|
34
|
+
[P in Exclude<keyof T, K>]?: false | undefined;
|
|
35
|
+
} : never) | {
|
|
36
|
+
[P in keyof T]?: false | undefined;
|
|
37
|
+
};
|
|
38
|
+
type MutuallyExclusiveButtons = OnlyOneTrue<{
|
|
39
|
+
btn_save_address?: boolean;
|
|
40
|
+
btn_use_entered_address?: boolean;
|
|
41
|
+
btn_use_selected_address?: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
export type objAddressPopup = ObjAddressPopupBase & MutuallyExclusiveButtons;
|
|
44
|
+
export declare const GLO_enterAddressPopup: (obj: objAddressPopup) => void;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { equalBool, row, skipCheck, span } from '../tsHelper.js';
|
|
2
|
+
const addresFormName = 'ng$address_search_creation_sel';
|
|
3
|
+
export const GLO_enterAddressPopup = (obj) => {
|
|
4
|
+
// Set the default value to true
|
|
5
|
+
obj = { autoSelect: true, ...obj };
|
|
6
|
+
if (obj.type === 'search') {
|
|
7
|
+
searchAddress(obj);
|
|
8
|
+
}
|
|
9
|
+
else if (obj.type === 'create') {
|
|
10
|
+
createAddress(obj);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
throw new Error('Invalid type for address popup. Use "search" or "create".');
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const fillInBasicAddressFields = (obj) => {
|
|
17
|
+
cy.GLO_addInput([addresFormName, 'address_name'], obj.name);
|
|
18
|
+
if (obj.country) {
|
|
19
|
+
cy.GLO_getElement(['ng$address_search_creation_sel', 'country']).then(($country) => {
|
|
20
|
+
if ($country.find('.fa-search').length > 0) {
|
|
21
|
+
cy.GLO_popupWindow([addresFormName, 'country'], obj.country);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
cy.GLO_addInput([addresFormName, 'country'], obj.country);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (obj.state)
|
|
29
|
+
cy.GLO_checkLoadingIndicator();
|
|
30
|
+
cy.GLO_addInput([addresFormName, 'local_state_id'], obj.state);
|
|
31
|
+
if (obj.county)
|
|
32
|
+
cy.GLO_checkLoadingIndicator();
|
|
33
|
+
cy.GLO_popupWindow([addresFormName, 'local_county_id'], obj.county, 'branch_code', equalBool);
|
|
34
|
+
cy.GLO_addInput([addresFormName, 'postal_code'], obj.PC);
|
|
35
|
+
if (obj.PC)
|
|
36
|
+
cy.GLO_checkLoadingIndicator();
|
|
37
|
+
cy.GLO_addInput([addresFormName, 'city'], obj.city);
|
|
38
|
+
if (obj.city)
|
|
39
|
+
cy.GLO_checkLoadingIndicator();
|
|
40
|
+
if (obj.type === 'search') {
|
|
41
|
+
cy.GLO_popupWindow([addresFormName, 'btn_select_street'], obj.streetName, 'streetname');
|
|
42
|
+
}
|
|
43
|
+
else if (obj.type === 'create' && obj.streetName) {
|
|
44
|
+
// If the type is create, we should use the streetName directly
|
|
45
|
+
cy.get('body').then(($body) => {
|
|
46
|
+
if ($body.find(`[data-cy$="${addresFormName}.streetname_validation"]`).length > 0) {
|
|
47
|
+
cy.GLO_getElement([addresFormName, 'streetname_validation']).find('.dx-texteditor-input').filter(':enabled').clear().type(obj.streetName);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
cy.GLO_addInput([addresFormName, 'streetname'], obj.streetName);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
cy.GLO_addInput([addresFormName, 'house_number'], obj.number);
|
|
55
|
+
};
|
|
56
|
+
// Seperate functions for cognitive complexity sonar warning
|
|
57
|
+
const searchAddress = (obj) => {
|
|
58
|
+
cy.GLO_addInput([addresFormName, 'address_code'], obj.addressCode);
|
|
59
|
+
fillInBasicAddressFields(obj);
|
|
60
|
+
cy.GLO_clickButton([addresFormName, 'button_search']);
|
|
61
|
+
if (obj.addressCode && obj.autoSelect) {
|
|
62
|
+
// If you have the address code then you can select it based on the span else you need to take the first one for now
|
|
63
|
+
cy.GLO_dblClickRowInGrid(span, [addresFormName, 'grid'], obj.addressCode, undefined, skipCheck);
|
|
64
|
+
}
|
|
65
|
+
else if (obj.autoSelect) {
|
|
66
|
+
cy.GLO_dblClickRowInGrid(typeof obj.rowToSelect === 'string' ? span : row, [addresFormName, 'grid'], obj.rowToSelect ?? 0, undefined, skipCheck, equalBool);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const createAddress = (obj) => {
|
|
70
|
+
const formNameCreateGrid = 'ng$relations_dtl_add_address_dlg_lower';
|
|
71
|
+
cy.GLO_getElement([addresFormName, 'mode_create_or_select']).find('.dx-radiobutton-icon').last().click();
|
|
72
|
+
cy.GLO_checkLoadingIndicator();
|
|
73
|
+
fillInBasicAddressFields(obj);
|
|
74
|
+
cy.GLO_checkbox([addresFormName, 'flag_postaddress'], obj.flag_postaddress);
|
|
75
|
+
cy.GLO_checkbox([addresFormName, 'flag_deliveryaddress'], obj.flag_deliveryaddress);
|
|
76
|
+
cy.GLO_checkbox([addresFormName, 'flag_invoiceaddress'], obj.flag_invoiceaddress);
|
|
77
|
+
cy.GLO_checkbox([addresFormName, 'flag_legaladdress'], obj.flag_legaladdress);
|
|
78
|
+
cy.GLO_checkbox([addresFormName, 'flag_visitaddress'], obj.flag_visitaddress);
|
|
79
|
+
if (obj.btn_validate_address) {
|
|
80
|
+
cy.GLO_clickButton([addresFormName, 'btn_validate_address']);
|
|
81
|
+
}
|
|
82
|
+
cy.GLO_checkbox([addresFormName, 'flag_manual_coordinates'], obj.flag_manual_coordinates);
|
|
83
|
+
cy.GLO_addInput([addresFormName, 'local_geo_latitude'], obj.latitude);
|
|
84
|
+
cy.GLO_addInput([addresFormName, 'local_geo_longitude'], obj.longitude);
|
|
85
|
+
if (obj.btn_save_address !== true)
|
|
86
|
+
cy.GLO_dblClickRowInGrid(typeof obj.rowToSelect === 'string' ? span : row, [formNameCreateGrid, 'grid'], obj.rowToSelect ?? 0, undefined, skipCheck, equalBool);
|
|
87
|
+
const buttonToClick = ['btn_use_entered_address', 'btn_use_selected_address', 'btn_save_address'].find((key) => obj[key]);
|
|
88
|
+
if (buttonToClick) {
|
|
89
|
+
cy.get(`[data-cy="${addresFormName}.${buttonToClick}"]`, { timeout: 10000 }).filter(':visible').should('exist');
|
|
90
|
+
cy.GLO_clickButton([addresFormName, buttonToClick]);
|
|
91
|
+
if (obj.btn_accept_double_address) {
|
|
92
|
+
cy.GLO_dialogChoice('Accept');
|
|
93
|
+
}
|
|
94
|
+
cy.get('.svy-dialog', { timeout: 20000 }).should('not.exist');
|
|
95
|
+
}
|
|
96
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type CheckState } from '../tsHelper.js';
|
|
2
|
+
export type objArticle = {
|
|
3
|
+
articleCode?: string;
|
|
4
|
+
articleMainGroup?: string;
|
|
5
|
+
articleSubGroup?: string;
|
|
6
|
+
articleType?: string;
|
|
7
|
+
articleDefaultSupplier?: string;
|
|
8
|
+
attention?: string;
|
|
9
|
+
articleStatus?: string;
|
|
10
|
+
extraSearchCode?: string;
|
|
11
|
+
articleUnit?: string;
|
|
12
|
+
articleSalesPriceUnit?: string;
|
|
13
|
+
articlePurchasePriceUnit?: string;
|
|
14
|
+
articleSalesPriceQuantity?: number;
|
|
15
|
+
articlePurchasePriceQuantity?: number;
|
|
16
|
+
articleGrossWeight?: string | number;
|
|
17
|
+
articleNetWeight?: string | number;
|
|
18
|
+
articlePackagingType?: string;
|
|
19
|
+
articlePackagingPerAmount?: number;
|
|
20
|
+
articlePackagingGrossWeight?: string | number;
|
|
21
|
+
articlePackagesPerLayer?: number;
|
|
22
|
+
articleLayersPerPallet?: number;
|
|
23
|
+
articleUnitsPerPallet?: number;
|
|
24
|
+
articlePalletType?: string;
|
|
25
|
+
articleVATCode?: string;
|
|
26
|
+
pricePerUnit?: string;
|
|
27
|
+
layerHeight?: string | number;
|
|
28
|
+
purchaseProduction?: string;
|
|
29
|
+
productionRouting?: string;
|
|
30
|
+
translationStandard0?: string;
|
|
31
|
+
translationStandard1?: string;
|
|
32
|
+
translationStandard2?: string;
|
|
33
|
+
articleUnitLength?: string | number;
|
|
34
|
+
articleUnitWidth?: string;
|
|
35
|
+
articleUnitHeight?: string;
|
|
36
|
+
weightContents?: number;
|
|
37
|
+
weightContentsUnit?: string;
|
|
38
|
+
financialCostaccount?: string;
|
|
39
|
+
financialTurnoveraccount?: string;
|
|
40
|
+
financialStockaccount?: string;
|
|
41
|
+
financialFlagIncludeCostImportDutyCalc?: CheckState;
|
|
42
|
+
useLotType?: string;
|
|
43
|
+
minimumStock?: number;
|
|
44
|
+
};
|
|
45
|
+
export declare const GLO_enterArticle: (obj: objArticle) => void;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { close, open } from '../tsHelper.js';
|
|
2
|
+
const articleUnitsForm = 'ng$article_dtl_units';
|
|
3
|
+
const articleFinancialForm = 'ng$article_dtl_financial';
|
|
4
|
+
const articleWarehouseForm = 'ng$article_dtl_warehousemgt';
|
|
5
|
+
const articleProductionForm = 'ng$article_dtl_production';
|
|
6
|
+
const articleMainForm = 'ng$article_dtl';
|
|
7
|
+
export const GLO_enterArticle = (obj) => {
|
|
8
|
+
cy.GLO_addInput([articleMainForm, 'article_code'], obj.articleCode);
|
|
9
|
+
cy.GLO_addInput([articleMainForm, 'articlemaingroup_id'], obj.articleMainGroup);
|
|
10
|
+
if (obj.articleMainGroup && obj.articleSubGroup)
|
|
11
|
+
cy.GLO_checkLoadingIndicator();
|
|
12
|
+
cy.GLO_addInput([articleMainForm, 'articlesubgroup_id'], obj.articleSubGroup);
|
|
13
|
+
if (obj.articleMainGroup || obj.articleSubGroup)
|
|
14
|
+
cy.GLO_checkLoadingIndicator();
|
|
15
|
+
cy.GLO_addInput([articleMainForm, 'extra_search_code'], obj.extraSearchCode);
|
|
16
|
+
cy.GLO_addInput([articleMainForm, 'articlestatus_id'], obj.articleStatus);
|
|
17
|
+
cy.GLO_addInput([articleMainForm, 'articletype_id'], obj.articleType);
|
|
18
|
+
cy.GLO_popupWindow([articleMainForm, 'supplier'], obj.articleDefaultSupplier);
|
|
19
|
+
cy.GLO_addInput([articleMainForm, 'attentionline'], obj.attention);
|
|
20
|
+
if (obj.articleUnit ||
|
|
21
|
+
obj.articleSalesPriceUnit ||
|
|
22
|
+
obj.articlePurchasePriceUnit ||
|
|
23
|
+
obj.articleSalesPriceQuantity ||
|
|
24
|
+
obj.articlePurchasePriceQuantity ||
|
|
25
|
+
obj.articleGrossWeight ||
|
|
26
|
+
obj.articleNetWeight ||
|
|
27
|
+
obj.articlePackagingType ||
|
|
28
|
+
obj.articlePackagingPerAmount ||
|
|
29
|
+
obj.articlePackagingGrossWeight ||
|
|
30
|
+
obj.articlePackagesPerLayer ||
|
|
31
|
+
obj.articleLayersPerPallet ||
|
|
32
|
+
obj.articleUnitsPerPallet ||
|
|
33
|
+
obj.articlePalletType ||
|
|
34
|
+
obj.weightContents ||
|
|
35
|
+
obj.weightContentsUnit ||
|
|
36
|
+
obj.layerHeight) {
|
|
37
|
+
GLO_enterArticleUnits(obj);
|
|
38
|
+
}
|
|
39
|
+
if (obj.articleVATCode || obj.financialCostaccount || obj.financialTurnoveraccount || obj.financialStockaccount || obj.financialFlagIncludeCostImportDutyCalc) {
|
|
40
|
+
GLO_enterArticleFinancial(obj);
|
|
41
|
+
}
|
|
42
|
+
if (obj.purchaseProduction || obj.useLotType || obj.minimumStock)
|
|
43
|
+
GLO_enterWarehouseManagement(obj);
|
|
44
|
+
if (obj.productionRouting)
|
|
45
|
+
GLO_enterProduction(obj);
|
|
46
|
+
if (obj.translationStandard0 || obj.translationStandard1 || obj.translationStandard2) {
|
|
47
|
+
GLO_enterTranslations(obj);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const GLO_enterArticleUnits = (obj) => {
|
|
51
|
+
// Tab 'Units'
|
|
52
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Units', open);
|
|
53
|
+
cy.GLO_addInput([articleUnitsForm, 'content_articleunit_id'], obj.articleUnit);
|
|
54
|
+
cy.GLO_addInput([articleUnitsForm, 'weight'], obj.weightContents);
|
|
55
|
+
cy.GLO_addInput([articleUnitsForm, 'weight_articleunit_id'], obj.weightContentsUnit);
|
|
56
|
+
cy.GLO_addInput([articleUnitsForm, 'length_in_unit'], obj.articleUnitLength);
|
|
57
|
+
cy.GLO_addInput([articleUnitsForm, 'width_in_unit'], obj.articleUnitWidth);
|
|
58
|
+
cy.GLO_addInput([articleUnitsForm, 'height_in_unit'], obj.articleUnitHeight);
|
|
59
|
+
cy.GLO_addInput([articleUnitsForm, 'price_per_unit_id'], obj.articleSalesPriceUnit);
|
|
60
|
+
cy.GLO_addInput([articleUnitsForm, 'purchase_price_per_unit_id'], obj.articlePurchasePriceUnit);
|
|
61
|
+
cy.GLO_addInput([articleUnitsForm, 'price_per'], obj.articleSalesPriceQuantity);
|
|
62
|
+
if (obj.articleSalesPriceQuantity && obj.articlePurchasePriceQuantity)
|
|
63
|
+
cy.GLO_checkLoadingIndicator();
|
|
64
|
+
cy.GLO_addInput([articleUnitsForm, 'purchase_price_per'], obj.articlePurchasePriceQuantity);
|
|
65
|
+
cy.GLO_addInput([articleUnitsForm, 'gross_weight_in_kg'], obj.articleGrossWeight);
|
|
66
|
+
cy.GLO_addInput([articleUnitsForm, 'net_weight_in_kg'], obj.articleNetWeight);
|
|
67
|
+
cy.GLO_addInput([articleUnitsForm, 'colli_articleunit_id'], obj.articlePackagingType);
|
|
68
|
+
cy.GLO_addInput([articleUnitsForm, 'number_of_content'], obj.articlePackagingPerAmount);
|
|
69
|
+
cy.GLO_addInput([articleUnitsForm, 'colli_weight_in_kg'], obj.articlePackagingGrossWeight);
|
|
70
|
+
cy.GLO_addInput([articleUnitsForm, 'packages_per_pallet_layer'], obj.articlePackagesPerLayer);
|
|
71
|
+
cy.GLO_addInput([articleUnitsForm, 'layer_height'], obj.layerHeight);
|
|
72
|
+
cy.GLO_addInput([articleUnitsForm, 'layers_per_pallet'], obj.articleLayersPerPallet);
|
|
73
|
+
if (obj.articleLayersPerPallet && obj.articleUnitsPerPallet)
|
|
74
|
+
cy.GLO_checkLoadingIndicator();
|
|
75
|
+
cy.GLO_addInput([articleUnitsForm, 'units_per_pallet'], obj.articleUnitsPerPallet);
|
|
76
|
+
cy.GLO_addInput([articleUnitsForm, 'container_subtype_id'], obj.articlePalletType);
|
|
77
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Units', close);
|
|
78
|
+
};
|
|
79
|
+
const GLO_enterArticleFinancial = (obj) => {
|
|
80
|
+
// Tab 'Financial'
|
|
81
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Financial', open);
|
|
82
|
+
cy.GLO_addInput([articleFinancialForm, 'vat_id'], obj.articleVATCode);
|
|
83
|
+
cy.GLO_addInput([articleFinancialForm, 'gl_account_id_costs'], obj.financialCostaccount);
|
|
84
|
+
cy.GLO_addInput([articleFinancialForm, 'gl_account_id_turnover'], obj.financialTurnoveraccount);
|
|
85
|
+
cy.GLO_addInput([articleFinancialForm, 'goods_costs_gl_account_id'], obj.financialStockaccount);
|
|
86
|
+
cy.GLO_checkbox([articleFinancialForm, 'Check_Box'], obj.financialFlagIncludeCostImportDutyCalc);
|
|
87
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Financial', close);
|
|
88
|
+
};
|
|
89
|
+
const GLO_enterWarehouseManagement = (obj) => {
|
|
90
|
+
// Tab 'Warehouse management'
|
|
91
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Warehouse management', open);
|
|
92
|
+
cy.GLO_addInput([articleWarehouseForm, 'purchase_production'], obj.purchaseProduction);
|
|
93
|
+
cy.GLO_addInput([articleWarehouseForm, 'use_lot_type'], obj.useLotType);
|
|
94
|
+
cy.GLO_addInput([articleWarehouseForm, 'minimum_stock'], obj.minimumStock);
|
|
95
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Warehouse management', close);
|
|
96
|
+
};
|
|
97
|
+
const GLO_enterProduction = (obj) => {
|
|
98
|
+
// Tab 'Financial'
|
|
99
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Production', open);
|
|
100
|
+
cy.GLO_addInput([articleProductionForm, 'production_routing'], obj.productionRouting);
|
|
101
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Production', close);
|
|
102
|
+
};
|
|
103
|
+
const GLO_enterTranslations = (obj) => {
|
|
104
|
+
// Tab 'Translations'
|
|
105
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Translations', open);
|
|
106
|
+
cy.GLO_fillInfieldInGrid(['ng$articletranslations_lst_tab', 'grid'], 0, 'descr', obj.translationStandard0);
|
|
107
|
+
cy.GLO_fillInfieldInGrid(['ng$articletranslations_lst_tab', 'grid'], 1, 'descr', obj.translationStandard1);
|
|
108
|
+
cy.GLO_fillInfieldInGrid(['ng$articletranslations_lst_tab', 'grid'], 2, 'descr', obj.translationStandard2);
|
|
109
|
+
cy.GLO_selectTab([articleMainForm, 'tabs_70'], 'Translations', close);
|
|
110
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type objArticleLot = {
|
|
2
|
+
articleCode?: number | string;
|
|
3
|
+
articleVersionCode?: string;
|
|
4
|
+
purchasedQuantity?: number;
|
|
5
|
+
purchasedPriceInEUR?: number;
|
|
6
|
+
localWarehouseId?: string;
|
|
7
|
+
localWarehouseLocationId?: string;
|
|
8
|
+
customsStatus?: string;
|
|
9
|
+
dialogRecalculatePriceIn?: 'Yes' | 'No';
|
|
10
|
+
principalCode?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const GLO_enterArticleLot: (obj: objArticleLot) => void;
|