@globisnv/cypress-core 1.1.3 → 1.1.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/dist/blueprints/GLO_commandlist.js +1 -1
- package/dist/blueprints/GLO_consignment.d.ts +2 -0
- package/dist/blueprints/GLO_consignment.js +13 -4
- package/dist/blueprints/GLO_quotationLine.js +5 -0
- package/dist/commands/GLO_commands.js +2 -1
- package/dist/commands/GLS_commands.js +7 -23
- package/package.json +1 -1
|
@@ -5,6 +5,6 @@ export const GLO_enterCommandlist = (obj) => {
|
|
|
5
5
|
cy.GLO_addDate(input, [formName, 'valid_from'], obj.validFrom);
|
|
6
6
|
cy.GLO_addDate(input, [formName, 'valid_till'], obj.validTo);
|
|
7
7
|
cy.GLO_checkbox([formName, 'allow_automatic_update'], obj.allowAutomaticUpdate);
|
|
8
|
-
cy.GLO_popupWindow([formName, '
|
|
8
|
+
cy.GLO_popupWindow([formName, 'relation_id'], obj.customerRelation);
|
|
9
9
|
cy.GLO_addInput([formName, 'commandlist_code'], obj.commandlistCode);
|
|
10
10
|
};
|
|
@@ -56,6 +56,8 @@ export type objConsignment = {
|
|
|
56
56
|
etd?: string;
|
|
57
57
|
eta?: string;
|
|
58
58
|
fileReference?: string;
|
|
59
|
+
loadStartRequested?: string;
|
|
60
|
+
unloadStartRequested?: string;
|
|
59
61
|
};
|
|
60
62
|
export declare const GLO_enterConsignment: (obj: objConsignment, formName?: string, formNameGeneral?: string, formNameSea?: string, formNameWarehouse?: string) => void;
|
|
61
63
|
export declare const GLO_enterConsignment$Terminal: (obj: objConsignment) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { close, equal, input, open } from '../tsHelper.js';
|
|
1
|
+
import { close, equal, equalBool, input, open, typeSearch } from '../tsHelper.js';
|
|
2
2
|
import { GLO_enterAddressPopup } from './GLO_addressPopup.js';
|
|
3
3
|
const defaultFormName = 'ng$consignment_dtl';
|
|
4
4
|
const defaultFormNameGeneral = 'ng$consignment_dtl_general';
|
|
@@ -25,7 +25,14 @@ export const GLO_enterConsignment = (obj, formName = defaultFormName, formNameGe
|
|
|
25
25
|
cy.GLO_validateCheckbox([formName, 'flag_spot'], obj.flagSpotOrder);
|
|
26
26
|
cy.GLO_addInput([formName, 'plan_bloc'], obj.planBloc);
|
|
27
27
|
cy.GLO_addInput([formName, 'file_reference_txt'], obj.fileReference);
|
|
28
|
-
if (obj.collectionAddress ||
|
|
28
|
+
if (obj.collectionAddress ||
|
|
29
|
+
obj.deliveryAddress ||
|
|
30
|
+
obj.loadStartBooked ||
|
|
31
|
+
obj.loadEndBooked ||
|
|
32
|
+
obj.loadStartBookedTime ||
|
|
33
|
+
obj.loadEndBookedTime ||
|
|
34
|
+
obj.loadStartRequested ||
|
|
35
|
+
obj.unloadStartRequested) {
|
|
29
36
|
cy.GLO_selectTab([formName, 'tabs_70'], 'General', open);
|
|
30
37
|
if (obj.collectionAddress) {
|
|
31
38
|
cy.GLO_clickButton([formNameGeneral, 'btn_select_from_address'], 'fa-search-plus');
|
|
@@ -39,6 +46,8 @@ export const GLO_enterConsignment = (obj, formName = defaultFormName, formNameGe
|
|
|
39
46
|
obj.deliveryAddress.type ??= 'search';
|
|
40
47
|
GLO_enterAddressPopup(obj.deliveryAddress);
|
|
41
48
|
}
|
|
49
|
+
cy.GLO_addDate(input, [formNameGeneral, 'load_start_requested'], obj.loadStartRequested);
|
|
50
|
+
cy.GLO_addDate(input, [formNameGeneral, 'unload_start_requested'], obj.unloadStartRequested);
|
|
42
51
|
cy.GLO_addDate(input, [formNameGeneral, 'load_start_booked'], obj.loadStartBooked);
|
|
43
52
|
cy.GLO_addDate(input, [formNameGeneral, 'load_start_booked_time'], obj.loadStartBookedTime);
|
|
44
53
|
cy.GLO_addDate(input, [formNameGeneral, 'load_end_booked'], obj.loadEndBooked);
|
|
@@ -83,8 +92,8 @@ const seaTab = (obj, formName, formNameSea) => {
|
|
|
83
92
|
cy.GLO_addInput([formNameSea, 'txt_shipper_reference'], obj.shipperRef);
|
|
84
93
|
cy.GLO_addInput([formNameSea, 'supplier_incoterm'], obj.shipperIncoTerm);
|
|
85
94
|
cy.GLO_addInput([formNameSea, 'quay_code'], obj.quayCode);
|
|
86
|
-
cy.
|
|
87
|
-
cy.
|
|
95
|
+
cy.GLO_popupWindow([formNameSea, 'from_logistic_location'], obj.POL, undefined, equalBool, typeSearch);
|
|
96
|
+
cy.GLO_popupWindow([formNameSea, 'to_logistic_location'], obj.POD, undefined, equalBool, typeSearch);
|
|
88
97
|
cy.GLO_addInput([formNameSea, 'transport_method'], obj.transportMethod);
|
|
89
98
|
cy.GLO_addDate(input, [formNameSea, 'atd'], obj.atd);
|
|
90
99
|
cy.GLO_addDate(input, [formNameSea, 'goods_closing'], obj.goodsClosing);
|
|
@@ -11,6 +11,11 @@ const enterQuotationLine = (useNew, obj) => {
|
|
|
11
11
|
const formNameInnerBreak = 'ng$quotationlines_dtl_quantity';
|
|
12
12
|
const articleSelector = useNew ? 'article_code' : 'btn_select_article';
|
|
13
13
|
cy.GLO_popupWindow([formName, articleSelector], obj.articleCode);
|
|
14
|
+
// The article selection triggers a double load, so wait until the field really holds the article
|
|
15
|
+
// A falsy article code leaves the current article untouched, so there is nothing to wait for
|
|
16
|
+
if (obj.articleCode) {
|
|
17
|
+
cy.GLO_checkField([formName, 'article_code'], obj.articleCode, undefined, 300000);
|
|
18
|
+
}
|
|
14
19
|
if (obj.quantityBreaks && obj.quantityBreaks.length > 0) {
|
|
15
20
|
cy.GLO_selectTab([formName, 'tabs_470'], 'Quantity breaks', open);
|
|
16
21
|
obj.quantityBreaks.forEach((qtyBreak, index) => {
|
|
@@ -1336,7 +1336,8 @@ Cypress.Commands.add('GLO_popupWindow', (selector, value, columnId, equals = noE
|
|
|
1336
1336
|
selectFromPopupWindow(value, columnId, equals);
|
|
1337
1337
|
}
|
|
1338
1338
|
else {
|
|
1339
|
-
|
|
1339
|
+
// Type search with an exact match must stay exact: a contains check would accept LOC1 for LOC10.
|
|
1340
|
+
cy.GLO_checkField(selector, value, equals ? (useMagnifierFlag ? contains : equal) : undefined);
|
|
1340
1341
|
}
|
|
1341
1342
|
});
|
|
1342
1343
|
});
|
|
@@ -14,29 +14,13 @@ Cypress.Commands.add('GLS_login', (username = 'PR001', company) => {
|
|
|
14
14
|
cy.GLO_checkLoadingIndicator();
|
|
15
15
|
});
|
|
16
16
|
Cypress.Commands.add('GLS_mainNavigation', (value) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
.then(($viewport) => {
|
|
25
|
-
const $label = $viewport.find('label').filter((_i, el) => el.innerText.trim() === value);
|
|
26
|
-
if ($label.length > 0 && $label.is(':visible')) {
|
|
27
|
-
return cy.contains('.ag-body-viewport label', value).click();
|
|
28
|
-
}
|
|
29
|
-
return cy
|
|
30
|
-
.get('.ag-center-cols-container [role="row"][tabindex="0"]')
|
|
31
|
-
.first()
|
|
32
|
-
.focus()
|
|
33
|
-
.realPress('ArrowDown')
|
|
34
|
-
.then(() => scrollAndSearch(attempts + 1));
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
scrollAndSearch().then(() => {
|
|
38
|
-
cy.GLO_checkLoadingIndicator();
|
|
39
|
-
});
|
|
17
|
+
// Exact match, so 'Wegzetten' does not open 'Wegzetten drager'. A menu level that is still mounted but hidden is skipped
|
|
18
|
+
// through its [hidden] container instead of :visible, which also drops items scrolled out of the list (see isInOpenContainer)
|
|
19
|
+
const exactText = new RegExp(`^\\s*${Cypress._.escapeRegExp(value)}\\s*$`);
|
|
20
|
+
cy.get('.svy-listformcomponent label.clickable')
|
|
21
|
+
.filter((_i, el) => !el.closest('[hidden]') && exactText.test(el.innerText))
|
|
22
|
+
.click();
|
|
23
|
+
cy.GLO_checkLoadingIndicator();
|
|
40
24
|
});
|
|
41
25
|
Cypress.Commands.add('GLS_selectStock', (formName, elementName, index) => {
|
|
42
26
|
cy.GLO_getElement([formName, elementName]).find(`.item-container#${index}`).click();
|