@globisnv/cypress-core 0.0.1
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 +255 -0
- package/bin/create-customer-repo.mjs +89 -0
- package/biome.json +49 -0
- 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 +2315 -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 +58 -0
- package/scripts/check-unnecessary-waiting.mjs +119 -0
- package/template/CODEOWNERS +20 -0
- package/template/biome.json +7 -0
- package/template/cypress/e2e/__CUSTOMER__/template.cy.ts.example +18 -0
- package/template/cypress/support/e2e.ts +21 -0
- package/template/cypress/support/record.mjs +46 -0
- package/template/cypress.config.ts +3 -0
- package/template/cypress.env.json.example +24 -0
- package/template/package.json +20 -0
- package/template/tsconfig.json +11 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const GLO_warehouseMove = (obj) => {
|
|
2
|
+
const formName = 'ng$warehouse_move_dtl';
|
|
3
|
+
cy.GLO_popupWindow([formName, 'b_select_article'], obj.articleCode);
|
|
4
|
+
cy.GLO_addInput([formName, 'local_from_warehouse_id'], obj.fromWarehouseId);
|
|
5
|
+
cy.GLO_addInput([formName, 'local_from_warehouse_location_id'], obj.fromWarehouseLocationId);
|
|
6
|
+
cy.GLO_addInput([formName, 'local_from_container_id'], obj.fromContainerId);
|
|
7
|
+
cy.GLO_addInput([formName, 'local_to_warehouse_id'], obj.toWarehouseId);
|
|
8
|
+
cy.GLO_popupWindow([formName, 'to_warehouse_location_id'], obj.toWarehouseLocationId);
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { open } from '../tsHelper.js';
|
|
2
|
+
export const GLO_enterWarehouseOrderSubline$Terminal = (obj) => {
|
|
3
|
+
const formName = 'ng$pick_warehouse_ordersubline$open$terminal_dtl';
|
|
4
|
+
const formNameConsignmentContainer = 'ng$warehouse_ordersubline_dtl_consignment_container';
|
|
5
|
+
if (obj.consignmentContainerNr || obj.consignmentContainerType || obj.consignmentContainerSubtype) {
|
|
6
|
+
cy.GLO_selectTab([formName, 'tabs_70'], 'Consignment container', open);
|
|
7
|
+
cy.GLO_addInput([formNameConsignmentContainer, 'container_nr'], obj.consignmentContainerNr);
|
|
8
|
+
cy.GLO_addInput([formNameConsignmentContainer, 'consignment_container_type_id'], obj.consignmentContainerType);
|
|
9
|
+
cy.GLO_addInput([formNameConsignmentContainer, 'consignment_container_subtype_id'], obj.consignmentContainerSubtype);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CheckState } from '../tsHelper.js';
|
|
2
|
+
export type objWorkFlowLoggingTable = {
|
|
3
|
+
tableName?: string;
|
|
4
|
+
loggingType?: string;
|
|
5
|
+
field?: string;
|
|
6
|
+
workflowAction?: string;
|
|
7
|
+
wfProgram?: string;
|
|
8
|
+
flagManualApprovalNeeded?: CheckState;
|
|
9
|
+
firstApprovalUser?: string;
|
|
10
|
+
flagInsert?: CheckState;
|
|
11
|
+
flagDelete?: CheckState;
|
|
12
|
+
flagUpdate?: CheckState;
|
|
13
|
+
flagActive?: CheckState;
|
|
14
|
+
reasonCodeGroupValue?: string;
|
|
15
|
+
flagUniqueReason?: CheckState;
|
|
16
|
+
flagreasonDescription?: CheckState;
|
|
17
|
+
flagDelayedReasonCode?: CheckState;
|
|
18
|
+
flagPromptIfDelayed?: CheckState;
|
|
19
|
+
};
|
|
20
|
+
export declare const GLO_enterWorkflowLoggingTable: (obj: objWorkFlowLoggingTable) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const GLO_enterWorkflowLoggingTable = (obj) => {
|
|
2
|
+
const formName = 'ng$workflow_logging_table_dtl';
|
|
3
|
+
cy.GLO_addInput([formName, 'field_type'], obj.loggingType);
|
|
4
|
+
cy.GLO_addInput([formName, 'tablename'], obj.tableName);
|
|
5
|
+
cy.GLO_addInput([formName, 'field'], obj.field);
|
|
6
|
+
cy.GLO_addInput([formName, 'program_id'], obj.wfProgram);
|
|
7
|
+
cy.GLO_addInput([formName, 'workflow_step'], obj.workflowAction);
|
|
8
|
+
cy.GLO_addInput([formName, 'first_apporval_user'], obj.firstApprovalUser);
|
|
9
|
+
cy.GLO_checkbox([formName, 'flag_mannual_approval'], obj.flagManualApprovalNeeded);
|
|
10
|
+
cy.GLO_checkbox([formName, 'flag_is_active'], obj.flagActive);
|
|
11
|
+
cy.GLO_checkbox([formName, 'flag_is_active_insert'], obj.flagInsert);
|
|
12
|
+
cy.GLO_checkbox([formName, 'flag_is_active_delete'], obj.flagDelete);
|
|
13
|
+
cy.GLO_checkbox([formName, 'flag_is_active_update'], obj.flagUpdate);
|
|
14
|
+
cy.GLO_addInput([formName, 'reason_code_group'], obj.reasonCodeGroupValue);
|
|
15
|
+
cy.GLO_checkbox([formName, 'flag_unique_reason'], obj.flagUniqueReason);
|
|
16
|
+
cy.GLO_checkbox([formName, 'flag_reason_description'], obj.flagreasonDescription);
|
|
17
|
+
cy.GLO_checkbox([formName, 'flag_delayed_reason_code'], obj.flagDelayedReasonCode);
|
|
18
|
+
cy.GLO_checkbox([formName, 'flag_prompt_if_delayed'], obj.flagPromptIfDelayed);
|
|
19
|
+
cy.GLO_addInput([formName, 'program_id'], obj.wfProgram);
|
|
20
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CheckState } from '../tsHelper.js';
|
|
2
|
+
export type objWorkFlowVerification = {
|
|
3
|
+
workflowVerificationCode?: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
table?: string;
|
|
6
|
+
formula?: string;
|
|
7
|
+
flagIsError?: CheckState;
|
|
8
|
+
flagIsActive?: CheckState;
|
|
9
|
+
};
|
|
10
|
+
export declare const GLO_enterWorkFLowVerification: (obj: objWorkFlowVerification) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { close, open } from '../tsHelper.js';
|
|
2
|
+
const formName = 'ng$workflow_verification_dtl';
|
|
3
|
+
const formNameGeneral = 'ng$workflow_verification_dtl_general';
|
|
4
|
+
export const GLO_enterWorkFLowVerification = (obj) => {
|
|
5
|
+
cy.GLO_addInput([formName, 'workflow_verification_code'], obj.workflowVerificationCode);
|
|
6
|
+
cy.GLO_checkbox([formName, 'flag_is_active'], obj.flagIsActive);
|
|
7
|
+
// General tab
|
|
8
|
+
if (obj.table) {
|
|
9
|
+
generalTab(obj);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const generalTab = (obj) => {
|
|
13
|
+
cy.GLO_selectTab([formName, 'tabs_70'], 'General', open);
|
|
14
|
+
cy.GLO_addInput([formNameGeneral, 'program_tablename'], obj.table);
|
|
15
|
+
cy.GLO_addInput([formNameGeneral, 'wv_type'], obj.type);
|
|
16
|
+
cy.GLO_popupWindow([formNameGeneral, 'wv_formula'], obj.formula);
|
|
17
|
+
cy.GLO_checkbox([formNameGeneral, 'flag_is_error'], obj.flagIsError);
|
|
18
|
+
cy.GLO_selectTab([formName, 'tabs_70'], 'General', close);
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const formName = 'ng$zone_dtl';
|
|
2
|
+
export const GLO_enterZone = (obj) => {
|
|
3
|
+
cy.GLO_addInput([formName, 'zone_code'], obj.zoneCode);
|
|
4
|
+
cy.GLO_addInput([formName, 'description'], obj.description);
|
|
5
|
+
cy.GLO_addInput([formName, 'zone_type'], obj.zoneType);
|
|
6
|
+
cy.GLO_popupWindow([formName, 'relation_code'], obj.relationCode);
|
|
7
|
+
cy.GLO_popupWindow([formName, 'logistic_contract_code'], obj.logisticContractCode);
|
|
8
|
+
cy.GLO_popupWindow([formName, 'default_relation_address_id'], obj.defaultRelationAddressId);
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CheckState } from '../tsHelper.js';
|
|
2
|
+
export type PostalcodeType = 'Single postalcode' | 'Range postalcodes' | 'City' | 'Country';
|
|
3
|
+
export type objZonePostalcode = {
|
|
4
|
+
postalcodeType?: PostalcodeType;
|
|
5
|
+
countryId?: string;
|
|
6
|
+
postalcode?: string;
|
|
7
|
+
city?: string;
|
|
8
|
+
fromPostalcode?: string;
|
|
9
|
+
toPostalcode?: string;
|
|
10
|
+
flagExclude?: CheckState;
|
|
11
|
+
};
|
|
12
|
+
export declare const GLO_enterZonePostalcode: (obj: objZonePostalcode) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const GLO_enterZonePostalcode = (obj) => {
|
|
2
|
+
const formName = 'ng$zone_postalcode_dtl';
|
|
3
|
+
cy.GLO_addInput([formName, 'postalcode_type'], obj.postalcodeType);
|
|
4
|
+
cy.GLO_addInput([formName, 'country_id'], obj.countryId);
|
|
5
|
+
cy.GLO_addInput([formName, 'postalcode'], obj.postalcode);
|
|
6
|
+
cy.GLO_addInput([formName, 'city'], obj.city);
|
|
7
|
+
cy.GLO_addInput([formName, 'from_postalcode'], obj.fromPostalcode);
|
|
8
|
+
cy.GLO_addInput([formName, 'to_postalcode'], obj.toPostalcode);
|
|
9
|
+
cy.GLO_checkbox([formName, 'flag_exclude'], obj.flagExclude);
|
|
10
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CheckState } from '../tsHelper.js';
|
|
2
|
+
export type objZoneType = {
|
|
3
|
+
zoneTypeCode?: string;
|
|
4
|
+
flagAllowRelations?: CheckState;
|
|
5
|
+
flagAllowLogisticContracts?: CheckState;
|
|
6
|
+
flagAllowDefaultAddresses?: CheckState;
|
|
7
|
+
};
|
|
8
|
+
export declare const GLO_enterZoneType: (obj: objZoneType) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const GLO_enterZoneType = (obj) => {
|
|
2
|
+
const formName = 'ng$zone_type_dtl';
|
|
3
|
+
cy.GLO_addInput([formName, 'zone_type_code'], obj.zoneTypeCode);
|
|
4
|
+
cy.GLO_checkbox([formName, 'flag_allow_relation'], obj.flagAllowRelations);
|
|
5
|
+
cy.GLO_checkbox([formName, 'flag_allow_contract'], obj.flagAllowLogisticContracts);
|
|
6
|
+
cy.GLO_checkbox([formName, 'flag_allow_default_address'], obj.flagAllowDefaultAddresses);
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const GLT_enterGoods = (obj) => {
|
|
2
|
+
const formName = 'gt$unloading_goods_detail';
|
|
3
|
+
cy.GLO_addInput([formName, 'length_booked'], obj.length);
|
|
4
|
+
cy.GLO_addInput([formName, 'width_booked'], obj.width);
|
|
5
|
+
cy.GLO_addInput([formName, 'height_booked'], obj.height);
|
|
6
|
+
cy.GLO_addInput([formName, 'diameter_booked'], obj.diameter);
|
|
7
|
+
cy.GLO_addInput([formName, 'thickness_booked'], obj.thickness);
|
|
8
|
+
if (obj.warehouseLocation) {
|
|
9
|
+
cy.GLO_popupWindow([formName, 'sel_warehouse_location'], obj.warehouseLocation);
|
|
10
|
+
cy.GLO_checkLoadingIndicator();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Command to perform login using Okta authentication into a specific portal.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} [company] - Optional parameter representing the company name.
|
|
8
|
+
* @param {boolean} [formBuilderStandalone] - Optional check if test uses standalone formbuilder or not.
|
|
9
|
+
*/
|
|
10
|
+
FOB_login(company?: string, formBuilderStandalone?: boolean): void;
|
|
11
|
+
/**
|
|
12
|
+
* Command to perform a login using Servoy authentication.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} [company] - Optional parameter representing the company name.
|
|
15
|
+
* @param {boolean} [formBuilderStandalone] - Optional check if test uses standalone formbuilder or not.
|
|
16
|
+
* If provided, the specified company will be selected during login.
|
|
17
|
+
*/
|
|
18
|
+
POR_servoyLogin(company?: string, formBuilderStandalone?: boolean): void;
|
|
19
|
+
/**
|
|
20
|
+
* Command to perform login using Okta authentication into a specific portal.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} [company] - Optional parameter representing the company name.
|
|
23
|
+
* @param {boolean} [formBuilderStandalone] - Optional check if test uses standalone formbuilder or not.
|
|
24
|
+
*/
|
|
25
|
+
FOB_defaultLogin(company?: string, formBuilderStandalone?: boolean): void;
|
|
26
|
+
/**
|
|
27
|
+
* Command to perform login using Okta authentication into a specific portal.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} [company] - Optional parameter representing the company name.
|
|
30
|
+
* @param {boolean} [formBuilderStandalone] - Optional check if test uses standalone formbuilder or not.
|
|
31
|
+
*/
|
|
32
|
+
FOB_oktaLogin(company?: string, formBuilderStandalone?: boolean): void;
|
|
33
|
+
/**
|
|
34
|
+
* Command to add a new custom view.
|
|
35
|
+
*
|
|
36
|
+
* @param {customviewType} type - The type of the custom view (detail or list).
|
|
37
|
+
* @param {string} dataSource - The datasource of the custom view.
|
|
38
|
+
* @param {string} formName - The name of the form to be made a custom view of.
|
|
39
|
+
* @param {string} customViewName - The name of the newly added custom view.
|
|
40
|
+
* @param {boolean} [formBuilderStandalone] - Optional check if test uses standalone formbuilder or not.
|
|
41
|
+
*/
|
|
42
|
+
FOB_newCustomView(type: customviewType, dataSource: string, formName: string, customViewName: string, formBuilderStandalone?: boolean): void;
|
|
43
|
+
/**
|
|
44
|
+
* Command to click an item card.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} formNameDescription - The name of the form containing description element of the card.
|
|
47
|
+
* @param {string} elementNameDiscription - The name of the description element of the card..
|
|
48
|
+
* @param {string} name - The description of the item card.
|
|
49
|
+
*/
|
|
50
|
+
FOB_clickMenuItem(formNameDescription: string, elementNameDiscription: string, name: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Command to fill in fields of the add component dialog.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} parameterType - The parameter type consists of attribute, relation or dynamic attribute.
|
|
55
|
+
* @param {Array} relations - An array of all the relations leading to the attribute field.
|
|
56
|
+
* @param {string} attribute - The attribute of the component.
|
|
57
|
+
* @param {string} label - The label of the component.
|
|
58
|
+
*/
|
|
59
|
+
FOB_addFieldDialog(parameterType: string, relations: string | Array<string>, attribute: string, label?: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Command to delete an item in a custom view.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} name - The name of the label in item.
|
|
64
|
+
*/
|
|
65
|
+
FOB_deleteCustomViewItem(name: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Command to drag and drop an item in the custom view.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} dragLocation - The element that needs to be dragged.
|
|
70
|
+
* @param {string} dropLocation - The target location of the dragged element.
|
|
71
|
+
*/
|
|
72
|
+
FOB_dragComponentItem(dragLocation: string, dropLocation: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Command to add a column in a grid.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} parameterType - The parameter type consists of attribute, relation or dynamic attribute.
|
|
77
|
+
* @param {Array} relations - An array of all the relations leading to the attribute field.
|
|
78
|
+
* @param {string} attribute - The attribute of the component.
|
|
79
|
+
*/
|
|
80
|
+
FOB_addGridColumn(parameterType: string, relations: string | Array<string>, attribute: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Command to delete a column in a grid.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} name - The name of the placeholder label.
|
|
85
|
+
*/
|
|
86
|
+
FOB_deleteGridColumn(name: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* Command to save a custom view.
|
|
89
|
+
*
|
|
90
|
+
* @param {boolean} [formBuilderStandalone] - Optional check if test uses standalone formbuilder or not.
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
FOB_saveCustomView(formBuilderStandalone?: boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
* Command to close sidemenu.
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
FOB_closeSidemenu(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Show hide grid columns
|
|
101
|
+
*
|
|
102
|
+
* @param {string | number} column - The column to be retrieved.
|
|
103
|
+
* @param {boolean} visible - State of the column true/false.
|
|
104
|
+
*/
|
|
105
|
+
FOB_showGridColumn(column: string | number, visible: boolean): void;
|
|
106
|
+
/**
|
|
107
|
+
* Command to Open sidemenu.
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
FOB_openSideMenu(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Command to perform logout.
|
|
113
|
+
*/
|
|
114
|
+
FOB_logout(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Command to search and select a custom view in the formbuilder.
|
|
117
|
+
* @param {string} customViewName - The name of the customview to search for.
|
|
118
|
+
* @param {boolean} [autoSelect=true] - Bolean to select the customview or not.
|
|
119
|
+
*/
|
|
120
|
+
FOB_searchCustomView(customViewName: string, autoSelect?: boolean): void;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { span } from '../tsHelper.js';
|
|
2
|
+
Cypress.Commands.add('FOB_login', (company, formBuilderStandalone) => {
|
|
3
|
+
const loginType = String(Cypress.expose('loginType'));
|
|
4
|
+
if (!Cypress.expose('globisUrl')) {
|
|
5
|
+
throw new Error('No environment parameters found');
|
|
6
|
+
}
|
|
7
|
+
switch (loginType.toLocaleLowerCase()) {
|
|
8
|
+
case 'servoy':
|
|
9
|
+
cy.POR_servoyLogin(company, formBuilderStandalone);
|
|
10
|
+
break;
|
|
11
|
+
case 'okta':
|
|
12
|
+
cy.FOB_oktaLogin(company, formBuilderStandalone);
|
|
13
|
+
break;
|
|
14
|
+
case 'default':
|
|
15
|
+
cy.FOB_defaultLogin(company, formBuilderStandalone);
|
|
16
|
+
break;
|
|
17
|
+
default:
|
|
18
|
+
throw new Error('Incorrect type');
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
Cypress.Commands.add('POR_servoyLogin', (company, formBuilderStandalone) => {
|
|
22
|
+
cy.visit(Cypress.expose('formBuilderUrl'));
|
|
23
|
+
cy.GLO_checkLoadingIndicator();
|
|
24
|
+
cy.GLO_getElement(['ng2$svy_nav_login', 'txtUser'])
|
|
25
|
+
.find('input')
|
|
26
|
+
.eq(0)
|
|
27
|
+
.clear()
|
|
28
|
+
.type(Cypress.expose('username'));
|
|
29
|
+
cy.env(['password']).then(({ password }) => {
|
|
30
|
+
cy.GLO_getElement(['ng2$svy_nav_login', 'txtPass'])
|
|
31
|
+
.find('input')
|
|
32
|
+
.eq(0)
|
|
33
|
+
.clear()
|
|
34
|
+
.type(password, { log: false });
|
|
35
|
+
});
|
|
36
|
+
cy.GLO_addInput(['ng2$svy_nav_login', 'owner'], Cypress.expose('ownerName'));
|
|
37
|
+
cy.GLO_clickButton(['ng2$svy_nav_login', 'btnLogin'], undefined);
|
|
38
|
+
cy.GLO_checkLoadingIndicator();
|
|
39
|
+
if (company) {
|
|
40
|
+
cy.GLO_selectCompany(company);
|
|
41
|
+
}
|
|
42
|
+
cy.get(`[data-cy="formbuilder${formBuilderStandalone ? '_standalone' : ''}.navbar_top"]`, { timeout: 120000 }).should('exist');
|
|
43
|
+
});
|
|
44
|
+
Cypress.Commands.add('FOB_defaultLogin', (company, formBuilderStandalone) => {
|
|
45
|
+
// Change the Url if necessary
|
|
46
|
+
const url = Cypress.expose('formBuilderUrl');
|
|
47
|
+
cy.GLO_log(url);
|
|
48
|
+
cy.visit(url);
|
|
49
|
+
cy.GLO_checkLoadingIndicator();
|
|
50
|
+
cy.GLO_getElement(['ng2$svy_nav_login', 'txtUser'])
|
|
51
|
+
.find('input')
|
|
52
|
+
.eq(0)
|
|
53
|
+
.clear()
|
|
54
|
+
.type(Cypress.expose('username'));
|
|
55
|
+
cy.env(['password']).then(({ password }) => {
|
|
56
|
+
cy.GLO_getElement(['ng2$svy_nav_login', 'txtPass'])
|
|
57
|
+
.find('input')
|
|
58
|
+
.eq(0)
|
|
59
|
+
.clear()
|
|
60
|
+
.type(password, { log: false });
|
|
61
|
+
});
|
|
62
|
+
cy.get('[data-cy="ng2$svy_nav_login.btnLogin"]').click();
|
|
63
|
+
cy.GLO_checkLoadingIndicator();
|
|
64
|
+
if (company) {
|
|
65
|
+
cy.GLO_selectCompany(company);
|
|
66
|
+
}
|
|
67
|
+
cy.get(`[data-cy="formbuilder${formBuilderStandalone ? '_standalone' : ''}.navbar_top"]`, { timeout: 120000 }).should('exist');
|
|
68
|
+
});
|
|
69
|
+
Cypress.Commands.add('FOB_oktaLogin', (company, formBuilderStandalone) => {
|
|
70
|
+
// Change the Url if necessary
|
|
71
|
+
const url = Cypress.expose('formBuilderUrl');
|
|
72
|
+
cy.visit(url);
|
|
73
|
+
// biome-ignore plugin: wait for okta redirect page load
|
|
74
|
+
cy.wait(2000);
|
|
75
|
+
cy.task('log', 'Redirect to okta url');
|
|
76
|
+
cy.origin(Cypress.expose('oktaUrl'), () => {
|
|
77
|
+
cy.get('.o-form-input')
|
|
78
|
+
.find('[autocomplete="username"]')
|
|
79
|
+
.type(Cypress.expose('username'));
|
|
80
|
+
cy.task('log', 'Filled in username');
|
|
81
|
+
cy.get('[type="submit"]').click();
|
|
82
|
+
cy.env(['password']).then(({ password }) => {
|
|
83
|
+
cy.get('.o-form-input')
|
|
84
|
+
.find('[type="password"]', { timeout: 20000 })
|
|
85
|
+
.type(password, { log: false });
|
|
86
|
+
});
|
|
87
|
+
cy.task('log', 'Filled in password');
|
|
88
|
+
cy.get('[type="submit"]').click();
|
|
89
|
+
});
|
|
90
|
+
if (company) {
|
|
91
|
+
cy.GLO_selectCompany(company);
|
|
92
|
+
}
|
|
93
|
+
cy.task('log', 'Start navbar check');
|
|
94
|
+
cy.get(`[data-cy="formbuilder${formBuilderStandalone ? '_standalone' : ''}.navbar_top"]`, { timeout: 120000 }).should('exist');
|
|
95
|
+
cy.task('log', 'End navbar check');
|
|
96
|
+
});
|
|
97
|
+
Cypress.Commands.add('FOB_newCustomView', (type, dataSource, formName, customViewName, formBuilderStandalone) => {
|
|
98
|
+
cy.GLO_clickButton([`formbuilder${formBuilderStandalone ? '_standalone' : ''}`, 'btn_new'], '');
|
|
99
|
+
cy.FOB_clickMenuItem('formbuilder_wizard', 'list_form_form_types$containedForm$description', type);
|
|
100
|
+
cy.GLO_addInput(['formbuilder_wizard', 'filter'], dataSource);
|
|
101
|
+
cy.FOB_clickMenuItem('formbuilder_wizard', 'list_form_programs$containedForm$programname', dataSource);
|
|
102
|
+
cy.GLO_getElement(['formbuilder_wizard', 'info_lbl'])
|
|
103
|
+
.find(span)
|
|
104
|
+
.invoke('text')
|
|
105
|
+
.then((title) => {
|
|
106
|
+
cy.GLO_log(title);
|
|
107
|
+
if (title === 'Do you want to start this view based on a Form or an existing Custom view?') {
|
|
108
|
+
cy.FOB_clickMenuItem('formbuilder_wizard', 'list_form_baseform_types$containedForm$description', 'Form');
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
cy.FOB_clickMenuItem('formbuilder_wizard', 'list_form_forms$containedForm$programname', formName);
|
|
112
|
+
cy.GLO_getElement(['formbuilder_wizard', 'custom_view_name_txt']).find('.dx-texteditor-input').type(customViewName);
|
|
113
|
+
cy.GLO_clickButton(['formbuilder_wizard', 'save_btn'], undefined);
|
|
114
|
+
});
|
|
115
|
+
Cypress.Commands.add('FOB_clickMenuItem', (formName, elementNameDiscription, name) => {
|
|
116
|
+
cy.get(`[data-cy="${formName}.${elementNameDiscription}"`, { timeout: 10000 }).find(span, { timeout: 10000 }).contains(name).click();
|
|
117
|
+
cy.GLO_checkLoadingIndicator();
|
|
118
|
+
});
|
|
119
|
+
Cypress.Commands.add('FOB_addFieldDialog', (parameterType, relations, attribute, label) => {
|
|
120
|
+
cy.GLO_addInput(['ng$dataprovider_selection', 'parameter_type'], parameterType);
|
|
121
|
+
const relationsArray = Array.isArray(relations) ? relations : [relations];
|
|
122
|
+
relationsArray.forEach((relation) => {
|
|
123
|
+
cy.GLO_addInput(['ng$dataprovider_selection', 'parameter_relation'], relation);
|
|
124
|
+
});
|
|
125
|
+
cy.GLO_addInput(['ng$dataprovider_selection', 'parameter_attribute'], attribute);
|
|
126
|
+
cy.GLO_addInput(['formbuilder_dataprovider_dlg', 'i18n_txt'], label);
|
|
127
|
+
cy.GLO_clickButton(['formbuilder_dataprovider_dlg', 'submit_btn']);
|
|
128
|
+
});
|
|
129
|
+
Cypress.Commands.add('FOB_deleteCustomViewItem', (name) => {
|
|
130
|
+
cy.get('.formbuilder_field').find(span).contains(name).click();
|
|
131
|
+
cy.FOB_closeSidemenu();
|
|
132
|
+
cy.get('.formbuilder_field').find(span).contains(name).parent().get('.delete-field').click();
|
|
133
|
+
});
|
|
134
|
+
Cypress.Commands.add('FOB_dragComponentItem', (dragLocation, dropLocation) => {
|
|
135
|
+
cy.get(`[title="${dragLocation}"]`).realMouseDown({ button: 'left', position: 'center' }).realMouseMove(0, 10, { position: 'center' });
|
|
136
|
+
// biome-ignore plugin: wait for drag animation to settle before drop
|
|
137
|
+
cy.wait(200);
|
|
138
|
+
cy.get(span).contains(dropLocation).realMouseMove(0, 0, { position: 'center' }).realMouseUp();
|
|
139
|
+
cy.GLO_checkLoadingIndicator();
|
|
140
|
+
});
|
|
141
|
+
Cypress.Commands.add('FOB_deleteGridColumn', (name) => {
|
|
142
|
+
cy.get('.sidebar-right').find(`[placeholder="i18n:globis.label.${name}"]`).parent().find('[title="Remove column"]').click({ force: true });
|
|
143
|
+
});
|
|
144
|
+
Cypress.Commands.add('FOB_addGridColumn', (parameterType, relations, attribute) => {
|
|
145
|
+
cy.get('.sidebar-right').find('[title="Add new column"]').click({ force: true });
|
|
146
|
+
cy.FOB_addFieldDialog(parameterType, relations, attribute);
|
|
147
|
+
});
|
|
148
|
+
Cypress.Commands.add('FOB_saveCustomView', (formBuilderStandalone) => {
|
|
149
|
+
const formName = Cypress.expose('formBuilderStandalone') ? 'formbuilder_standalone' : 'formbuilder';
|
|
150
|
+
cy.GLO_clickButton([formName, 'btn_save']);
|
|
151
|
+
cy.GLO_checkLoadingIndicator();
|
|
152
|
+
if (!formBuilderStandalone) {
|
|
153
|
+
cy.GLO_clickButton(['formbuilder', 'close_btn']);
|
|
154
|
+
}
|
|
155
|
+
cy.get('.toast-container').find('.toast-title').contains('Succes').should('exist');
|
|
156
|
+
cy.contains('.toast-container .toast-title', 'Succes', { timeout: 10000 }).should('not.exist');
|
|
157
|
+
});
|
|
158
|
+
Cypress.Commands.add('FOB_openSideMenu', () => {
|
|
159
|
+
cy.get('.ag-side-bar-right').contains('Columns').click();
|
|
160
|
+
});
|
|
161
|
+
Cypress.Commands.add('FOB_showGridColumn', (column, shouldShow) => {
|
|
162
|
+
cy.get('.ag-side-bar-right').then(($sidebar) => {
|
|
163
|
+
let $checkbox;
|
|
164
|
+
if (typeof column === 'number') {
|
|
165
|
+
$checkbox = $sidebar.find(`.ag-virtual-list-item[aria-posinset="${column}"]`).find('input.ag-checkbox-input');
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
$checkbox = $sidebar
|
|
169
|
+
.find('.ag-column-select-column-label')
|
|
170
|
+
.filter((_, el) => new RegExp(`^${column}$`, 'i').test(el.innerText))
|
|
171
|
+
.closest('.ag-column-select-column')
|
|
172
|
+
.find('input.ag-checkbox-input');
|
|
173
|
+
}
|
|
174
|
+
cy.wrap($checkbox)
|
|
175
|
+
.should('have.length', 1)
|
|
176
|
+
.then(($cb) => {
|
|
177
|
+
if (shouldShow !== $cb.is(':checked')) {
|
|
178
|
+
cy.wrap($cb).click({ force: true });
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
Cypress.Commands.add('FOB_closeSidemenu', () => {
|
|
184
|
+
cy.get('.sidebar-right').get('i').get('.fa-chevron-right.fa-stack-1x').click();
|
|
185
|
+
});
|
|
186
|
+
Cypress.Commands.add('FOB_logout', () => {
|
|
187
|
+
cy.GLO_getElement(['ep$main', 'sidemenu']).find('.footer').find('.clickable').click();
|
|
188
|
+
cy.get('.window-footer').then(($dialog) => {
|
|
189
|
+
if ($dialog.find('.svy-btn-primary:contains("Yes")').length > 0) {
|
|
190
|
+
cy.wrap($dialog).contains('Yes').click();
|
|
191
|
+
}
|
|
192
|
+
else if ($dialog.find('.svy-btn-primary:contains("Ja")').length > 0) {
|
|
193
|
+
cy.wrap($dialog).contains('Ja').click();
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
throw new Error('Neither "Yes" nor "Ja" options found in the dialog box.');
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
cy.GLO_checkLoadingIndicator();
|
|
200
|
+
});
|
|
201
|
+
Cypress.Commands.add('FOB_searchCustomView', (customViewName, autoSelect = true) => {
|
|
202
|
+
const formName = Cypress.expose('formBuilderStandalone') ? 'formbuilder_standalone' : 'formbuilder';
|
|
203
|
+
cy.GLO_getElement([formName, 'Search_Menu']).find('[selection-box]').click();
|
|
204
|
+
cy.GLO_getElement([formName, 'Search_Menu']).within(() => {
|
|
205
|
+
cy.get('[search]').clear().type(`${customViewName}{enter}`);
|
|
206
|
+
});
|
|
207
|
+
if (autoSelect) {
|
|
208
|
+
cy.GLO_getElement([formName, 'Search_Menu']).get('[item]').contains(customViewName).parent().find('.fa-file-lines').click();
|
|
209
|
+
cy.GLO_checkLoadingIndicator();
|
|
210
|
+
}
|
|
211
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Command to switch to globjob in test and login with specified username.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} username - Defaults to PR998 if not provided.
|
|
8
|
+
*/
|
|
9
|
+
GLJ_login(username?: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Command to select a main navigation item in globjob.
|
|
12
|
+
* @param {string} value - The text visible on the button.
|
|
13
|
+
*/
|
|
14
|
+
GLJ_mainNavigation(value: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Command to search for a value using the globjob header search.
|
|
17
|
+
*
|
|
18
|
+
* @param {customValueType} searchValue - The value to search for.
|
|
19
|
+
*
|
|
20
|
+
* @example cy.GLJ_searchHeader('202600015')
|
|
21
|
+
*/
|
|
22
|
+
GLJ_searchHeader(searchValue: customValueType): void;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export type gljContainer = {
|
|
27
|
+
subtype: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Cypress.Commands.add('GLJ_login', (username = 'PR998') => {
|
|
2
|
+
const u = new URL(Cypress.expose('globisUrl'));
|
|
3
|
+
const ownerId = u.searchParams.get('o') ?? '';
|
|
4
|
+
if (!ownerId)
|
|
5
|
+
throw new Error('Owner ID (o) is missing in globisUrl, use complete url with solution and owner id.');
|
|
6
|
+
const path = u.pathname.replace(/\/$/, '');
|
|
7
|
+
if (path.includes('/solution/')) {
|
|
8
|
+
u.pathname = path.replace(/\/solution\/[^/?#]+/, '/solution/globjob');
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
u.pathname = `${path}/solution/globjob`;
|
|
12
|
+
}
|
|
13
|
+
u.searchParams.set('o', ownerId);
|
|
14
|
+
cy.visit(u.toString());
|
|
15
|
+
cy.GLO_getElement(['mobile$svy_nav_login', 'txt_login'], { timeout: 120000 });
|
|
16
|
+
cy.GLO_checkLoadingIndicator();
|
|
17
|
+
cy.GLO_getElement(['mobile$svy_nav_login', 'txt_login'], { timeout: 120000 }).find('input').eq(0).should('be.enabled').should('be.visible').clear().type(username);
|
|
18
|
+
cy.env(['password']).then(({ password }) => {
|
|
19
|
+
cy.GLO_getElement(['mobile$svy_nav_login', 'txt_password'])
|
|
20
|
+
.find('input')
|
|
21
|
+
.eq(0)
|
|
22
|
+
.clear()
|
|
23
|
+
.type(password, { log: false });
|
|
24
|
+
});
|
|
25
|
+
cy.get('[data-cy="mobile$svy_nav_login.btn_login"]').click();
|
|
26
|
+
cy.GLO_checkLoadingIndicator();
|
|
27
|
+
cy.GLO_getElement(['gj$sidebar', 'Logout_Button'], { timeout: 120000 }).should('exist');
|
|
28
|
+
});
|
|
29
|
+
Cypress.Commands.add('GLJ_mainNavigation', (value) => {
|
|
30
|
+
cy.GLO_getElement(['gj$main_menu', 'Main_Menu']).find('button').contains(value).click();
|
|
31
|
+
cy.GLO_checkLoadingIndicator();
|
|
32
|
+
});
|
|
33
|
+
Cypress.Commands.add('GLJ_searchHeader', (searchValue) => {
|
|
34
|
+
cy.get('.active-tab svy-form [name$="buttonbar"] [name="search_ean_code_txt"]')
|
|
35
|
+
.find('input.dx-texteditor-input')
|
|
36
|
+
.clear()
|
|
37
|
+
.type(`${searchValue}{enter}`);
|
|
38
|
+
cy.GLO_checkLoadingIndicator();
|
|
39
|
+
});
|
|
40
|
+
export {};
|