@globisnv/cypress-core 0.0.7 → 0.0.9
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 +16 -1
- package/dist/blueprints/GLO_logisticContractVolumeConstraint.d.ts +1 -1
- package/dist/blueprints/GLO_logisticContractVolumeConstraint.js +1 -1
- package/dist/blueprints/GLO_relations.js +1 -4
- package/dist/commands/GLO_commands.js +8 -3
- package/dist/commands/GLS_commands.d.ts +1 -1
- package/dist/commands/GLS_commands.js +3 -1
- package/dist/commands/POR_commands.js +3 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ What each part of the version bump means:
|
|
|
30
30
|
| minor | A new command / blueprint / API surface, backwards compatible |
|
|
31
31
|
| patch | Bugfixes only |
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
See [Cutting a release](#cutting-a-release) for how a bump actually gets published.
|
|
34
34
|
|
|
35
35
|
| Core version | Minimum globis-online version |
|
|
36
36
|
| --- | --- |
|
|
@@ -38,6 +38,21 @@ Releases are cut via the [Create Release](.github/workflows/release.yml) GitHub
|
|
|
38
38
|
|
|
39
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.
|
|
40
40
|
|
|
41
|
+
## Cutting a release
|
|
42
|
+
|
|
43
|
+
A release is two phases, because the `develop` ruleset requires a reviewed PR — so the version bump takes the same route as every other change instead of CI trying to push past the ruleset.
|
|
44
|
+
|
|
45
|
+
1. **Actions → [Prepare Release](.github/workflows/release-pr.yml) → Run workflow**, pick `patch` / `minor` / `major`. It bumps `package.json`, renames the `## Unreleased` heading in `CHANGELOG.md` to `## X.Y.Z` and opens a fresh empty `## Unreleased` above it, and opens a `chore(release): vX.Y.Z` PR. Nothing is published yet.
|
|
46
|
+
2. **Check the changelog section on that PR** (it becomes the GitHub Release notes) and **merge it yourself**. [Publish](.github/workflows/publish.yml) then builds, lints, publishes to npm, and creates the tag and GitHub Release.
|
|
47
|
+
|
|
48
|
+
Release PRs are deliberately left out of the auto-merge that every other PR gets. A merge performed by `GITHUB_TOKEN` creates no workflow run, so an auto-merged release PR would land the version in git and never publish it. If that ever happens anyway, run **Actions → Publish → Run workflow** and give it the release PR's number to finish the release. It publishes that PR's merge commit — not whatever the run was started from — so a recovery still ships exactly the tree that was reviewed, and it refuses a PR that is not a merged `release/*` into `develop`.
|
|
49
|
+
|
|
50
|
+
Write changelog entries under the `## Unreleased` heading as you merge work, rather than at release time — the release just renames that heading and opens a new one, so there is always a section at the top to write into and the file never needs reorganising by hand. If there is no `## Unreleased` section when you cut a release, the workflow adds an empty `## X.Y.Z` stub and warns, and you fill it in on the PR.
|
|
51
|
+
|
|
52
|
+
Publishing uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) over OIDC, so there is no `NPM_TOKEN` and no PAT anywhere in the release path — the publish job's only write scope is the tag and release it creates. The trusted publisher on npm must name **`publish.yml`** as the workflow. npm provenance stays off: it isn't supported from a private repository.
|
|
53
|
+
|
|
54
|
+
Because the bump lands in git *before* anything reaches npm, a failed publish never leaves the registry ahead of the repository — re-running the workflow after a fix picks up where it left off, and a version already on npm is skipped rather than retried.
|
|
55
|
+
|
|
41
56
|
---
|
|
42
57
|
|
|
43
58
|
## Setting up a new customer repo
|
|
@@ -3,7 +3,7 @@ export type objLogisticContractVolumeConstraint = {
|
|
|
3
3
|
fromCountry?: string;
|
|
4
4
|
toCountry?: string;
|
|
5
5
|
period?: string;
|
|
6
|
-
|
|
6
|
+
maxOrders?: string;
|
|
7
7
|
flagActive?: CheckState;
|
|
8
8
|
};
|
|
9
9
|
export declare const GLO_enterLogisticContractVolumeConstraint: (obj: objLogisticContractVolumeConstraint) => void;
|
|
@@ -3,6 +3,6 @@ export const GLO_enterLogisticContractVolumeConstraint = (obj) => {
|
|
|
3
3
|
cy.GLO_popupWindow([formName, 'from_country_id'], obj.fromCountry);
|
|
4
4
|
cy.GLO_popupWindow([formName, 'to_country_id'], obj.toCountry);
|
|
5
5
|
cy.GLO_addInput([formName, 'period'], obj.period);
|
|
6
|
-
cy.GLO_addInput([formName, '
|
|
6
|
+
cy.GLO_addInput([formName, 'max_orders'], obj.maxOrders);
|
|
7
7
|
cy.GLO_checkbox([formName, 'flag_active'], obj.flagActive);
|
|
8
8
|
};
|
|
@@ -131,10 +131,7 @@ const enterCustomerTab = (obj, formName = 'ng$relations_dtl') => {
|
|
|
131
131
|
cy.GLO_checkbox([formNameCustomer, 'flag_ready_for_invoicing'], obj.flagReadyForInvoicing);
|
|
132
132
|
cy.GLO_addInput([formNameCustomer, 'responsible_user_id'], obj.responsible);
|
|
133
133
|
cy.GLO_addInput([formNameCustomer, 'vat_regime_id'], obj.vatRegimeCustomerTab);
|
|
134
|
-
|
|
135
|
-
cy.GLO_addInput([formNameCustomer, 'invoice_customer_code'], obj.invoiceCustomerCode);
|
|
136
|
-
cy.GLO_checkLoadingIndicator();
|
|
137
|
-
}
|
|
134
|
+
cy.GLO_popupWindow([formNameCustomer, 'invoice_customer_code'], obj.invoiceCustomerCode);
|
|
138
135
|
cy.GLO_addInput([formNameCustomer, 'debtorcode_accountancy'], obj.debtorCode);
|
|
139
136
|
cy.GLO_addInput([formNameCustomer, 'office'], obj.office);
|
|
140
137
|
cy.GLO_addInput([formNameCustomer, 'new_service_level'], obj.newServiceLevel);
|
|
@@ -527,10 +527,11 @@ const GLO_inputValuelist = (selector, rawValue) => {
|
|
|
527
527
|
if (newId)
|
|
528
528
|
dropDownId = newId;
|
|
529
529
|
const query = dropdownSelector ? `[id="${dropDownId}"] ${dropdownSelector}` : `[id="${dropDownId}"]`;
|
|
530
|
+
// The timeout has to go on the find(), the retrying query. Cypress does not inherit it from cy.document().
|
|
530
531
|
return cy
|
|
531
|
-
.document({
|
|
532
|
+
.document({ log: false })
|
|
532
533
|
.its('body', { log: false })
|
|
533
|
-
.find(query, { log: false });
|
|
534
|
+
.find(query, { timeout: timeout ?? defaultTimeout, log: false });
|
|
534
535
|
});
|
|
535
536
|
};
|
|
536
537
|
cy.GLO_getElement(vlEffectiveSelector).find('.dx-texteditor-input:enabled', { log: false }).eq(vlEffectiveIndex).click();
|
|
@@ -623,7 +624,9 @@ const GLO_inputValuelist = (selector, rawValue) => {
|
|
|
623
624
|
const currentTexts = [...$current].map((el) => el.innerText.trim());
|
|
624
625
|
const hasChanged = !Cypress._.isEqual(currentTexts, initialTexts);
|
|
625
626
|
const anyIncludes = currentTexts.every((text) => text.includes(dropdownValue));
|
|
626
|
-
|
|
627
|
+
// An empty list is the transitional state while the filtered valuelist is still loading, never a valid result.
|
|
628
|
+
// Without this guard an emptied list counts as 'changed' (and every() is vacuously true), so we stop waiting too soon.
|
|
629
|
+
return expect(currentTexts.length > 0 && (hasChanged || anyIncludes), `Dropdown updated or contains "${dropdownValue}" already`).to.be.true;
|
|
627
630
|
});
|
|
628
631
|
})
|
|
629
632
|
.then(() => {
|
|
@@ -1768,12 +1771,14 @@ Cypress.Commands.add('GLO_fillInfieldInGrid', (selector, rowFilter, columnId, va
|
|
|
1768
1771
|
return;
|
|
1769
1772
|
if (typeof rowFilter === 'string') {
|
|
1770
1773
|
cy.GLO_getAllRowsInGrid().filter(`:contains("${rowFilter}")`).find(`[col-id="${columnId}"]`).click();
|
|
1774
|
+
cy.wait(500); // Else both click and dblclick fire too fast
|
|
1771
1775
|
cy.GLO_getAllRowsInGrid().filter(`:contains("${rowFilter}")`).find(`[col-id="${columnId}"]`).dblclick();
|
|
1772
1776
|
}
|
|
1773
1777
|
else {
|
|
1774
1778
|
cy.GLO_getElement(selector).within(() => {
|
|
1775
1779
|
cy.GLO_clickRowInGrid(rowFilter, columnId);
|
|
1776
1780
|
});
|
|
1781
|
+
cy.wait(500); // Else both click and dblclick fire too fast
|
|
1777
1782
|
cy.GLO_dblClickRowInGrid(row, selector, rowFilter, columnId, skipCheck);
|
|
1778
1783
|
}
|
|
1779
1784
|
cy.get(gridInputType === 'aggrid-texteditor-without-enter' ? gridInput : gridInputType, { timeout: 1000 }).should('exist');
|
|
@@ -56,7 +56,7 @@ declare global {
|
|
|
56
56
|
* @param {string} elementName - Name of the element within the form
|
|
57
57
|
* @param {string} label - The label text to search for (e.g. 'TO location:')
|
|
58
58
|
*/
|
|
59
|
-
GLS_getLabelValue(formName: string, elementName: string, label: string): Cypress.Chainable<
|
|
59
|
+
GLS_getLabelValue(formName: string, elementName: string, label: string): Cypress.Chainable<string>;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -99,5 +99,7 @@ Cypress.Commands.add('GLS_navigation', (position, formName, value) => {
|
|
|
99
99
|
cy.GLO_checkLoadingIndicator();
|
|
100
100
|
});
|
|
101
101
|
Cypress.Commands.add('GLS_getLabelValue', (formName, elementName, label) => {
|
|
102
|
-
return getLabelValue(formName, elementName, label)
|
|
102
|
+
return getLabelValue(formName, elementName, label)
|
|
103
|
+
.invoke('text')
|
|
104
|
+
.then((text) => text.trim());
|
|
103
105
|
});
|
|
@@ -88,17 +88,9 @@ Cypress.Commands.add('POR_logout', (company) => {
|
|
|
88
88
|
else {
|
|
89
89
|
cy.GLO_getElement(['ep$main', 'sidemenu']).find('.footer').find('.clickable').click();
|
|
90
90
|
}
|
|
91
|
-
cy.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
else if ($dialog.find('.svy-btn-primary:contains("Ja")').length > 0) {
|
|
96
|
-
cy.wrap($dialog).contains('Ja').click();
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
throw new Error('Neither "Yes" nor "Ja" options found in the dialog box.');
|
|
100
|
-
}
|
|
101
|
-
});
|
|
91
|
+
cy.GLO_getVisible('.window-footer button.svy-btn-primary', 30000)
|
|
92
|
+
.contains(/^(Yes|Ja)$/)
|
|
93
|
+
.click();
|
|
102
94
|
cy.GLO_checkLoadingIndicator();
|
|
103
95
|
});
|
|
104
96
|
Cypress.Commands.add('POR_checklistCData', (formName, elementName, checkboxName) => {
|