@globisnv/cypress-core 1.1.1 → 1.1.2
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.
|
@@ -12,6 +12,8 @@ export const GLO_enterPriceRequestLine$Terminal = (obj) => {
|
|
|
12
12
|
cy.GLO_addInput([qtFormName, 'gross_price'], obj.grossPriceTwo);
|
|
13
13
|
cy.GLO_addInput([qtFormName, 'purchase_costs_euro'], obj.purchaseCostTwo);
|
|
14
14
|
cy.GLO_addInput([qtFormName, 'discount_amount'], obj.discountTwoValue);
|
|
15
|
+
if (obj.discountTwoValue)
|
|
16
|
+
cy.GLO_checkLoadingIndicator();
|
|
15
17
|
cy.GLO_addInput([qtFormName, 'discount_percentage'], obj.discountTwoPercentage);
|
|
16
18
|
});
|
|
17
19
|
};
|
|
@@ -966,21 +966,43 @@ Cypress.Commands.add('GLO_filterGrid', (colId, selector, text, exactMatch = noEq
|
|
|
966
966
|
}
|
|
967
967
|
});
|
|
968
968
|
if (filterType) {
|
|
969
|
+
// The typed value needs to sync into the grid's filter model before the operator
|
|
970
|
+
// menu opens, or the menu's own value field still reads empty and the operator
|
|
971
|
+
// picker starts from a stale/default state (reproduced manually: opening the menu
|
|
972
|
+
// too soon after typing shows the filter value field blank).
|
|
973
|
+
cy.GLO_checkLoadingIndicator();
|
|
969
974
|
cy.get('@filterHeaderCell').find('button').click();
|
|
970
|
-
|
|
971
|
-
//
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
975
|
+
// Selecting the operator in this popup is occasionally flaky in Cypress (the click
|
|
976
|
+
// registers but the picker display doesn't update to the new operator - reproduced
|
|
977
|
+
// manually in the live app and ruled out as a wrong-popup/stale-aria-controls issue;
|
|
978
|
+
// the open+select sequence itself is correct). Self-heal by reopening and reselecting
|
|
979
|
+
// instead of guessing at the exact cause of the dropped click.
|
|
980
|
+
// A compound AND/OR filter always has a second condition row scaffolded in (even
|
|
981
|
+
// when unused), each with its own operator picker - scope to .first() throughout so
|
|
982
|
+
// this always targets the primary condition's picker instead of matching 2 elements.
|
|
983
|
+
const selectFilterType = (attemptsLeft) => {
|
|
984
|
+
cy.get('.ag-filter-menu .ag-filter-select .ag-picker-field-display').first().click();
|
|
985
|
+
cy.wait(250); // Special dropdown for filter, doesn't work without small wait..
|
|
986
|
+
cy.get('.ag-filter-menu .ag-picker-expanded')
|
|
987
|
+
.invoke('attr', 'aria-controls')
|
|
988
|
+
.then((dropDownId) => {
|
|
989
|
+
cy.get(`[id="${dropDownId}"]`)
|
|
990
|
+
.should('be.visible')
|
|
991
|
+
.within(() => {
|
|
992
|
+
cy.get('.ag-list-item').contains(filterType).should('be.visible').parent().click();
|
|
993
|
+
});
|
|
980
994
|
});
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
995
|
+
cy.GLO_checkAGLoader();
|
|
996
|
+
cy.get('.ag-filter-menu .ag-filter-select .ag-picker-field-display')
|
|
997
|
+
.first()
|
|
998
|
+
.then(($el) => {
|
|
999
|
+
if ($el.text().trim() !== filterType && attemptsLeft > 0) {
|
|
1000
|
+
selectFilterType(attemptsLeft - 1);
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
selectFilterType(2);
|
|
1005
|
+
cy.get('.ag-filter-menu .ag-filter-select .ag-picker-field-display').first().should('contain.text', filterType);
|
|
984
1006
|
cy.press(Cypress.Keyboard.Keys.ESC); // Close the filter menu
|
|
985
1007
|
}
|
|
986
1008
|
cy.GLO_checkLoadingIndicator();
|
|
@@ -1813,6 +1835,9 @@ Cypress.Commands.add('GLO_fillInfieldInGrid', (selector, rowFilter, columnId, va
|
|
|
1813
1835
|
cy.GLO_getElement(selector).within(() => {
|
|
1814
1836
|
cy.GLO_clickRowInGrid(rowFilter, columnId);
|
|
1815
1837
|
});
|
|
1838
|
+
// Re-check outside the .within(): loading-indicator renders at page level, so the check
|
|
1839
|
+
// inside GLO_clickRowInGrid (scoped to the grid element above) can't see it and resolves early.
|
|
1840
|
+
cy.GLO_checkLoadingIndicator();
|
|
1816
1841
|
cy.wait(500); // Else both click and dblclick fire too fast
|
|
1817
1842
|
cy.GLO_dblClickRowInGrid(row, selector, rowFilter, columnId, skipCheck);
|
|
1818
1843
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globisnv/cypress-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Core building blocks for Globis Cypress E2E tests",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"url": "git+https://github.com/globisnv/globis-cypress-core.git"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
15
|
+
"access": "public",
|
|
16
|
+
"tag": "release-1.x"
|
|
16
17
|
},
|
|
17
18
|
"globisOnline": {
|
|
18
19
|
"minVersion": "11.0.2"
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@biomejs/biome": "^2.5.7",
|
|
61
62
|
"@types/node": "^26.1.2",
|
|
62
|
-
"cypress": "^16.1.
|
|
63
|
+
"cypress": "^16.1.1",
|
|
63
64
|
"cypress-real-events": "^1.15.1",
|
|
64
65
|
"typescript": "^7.0.2"
|
|
65
66
|
},
|