@capillarytech/cap-ui-utils 3.1.2 → 3.1.4-beta.fix-lockfile-sync.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.
- package/.github/workflows/publish.yml +52 -0
- package/e2e/README.md +1 -1
- package/e2e/index.js +1 -3
- package/package.json +19 -6
- package/e2e/utils/garudaDropdownUtil.js +0 -34
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# cap-ui-common-utils publisher — @capillarytech/cap-ui-utils (root publish)
|
|
3
|
+
#
|
|
4
|
+
# THIN CALLER. Owns only the workflow_dispatch dropdown + the concurrency queue;
|
|
5
|
+
# all real logic lives in the reusable workflow hosted in cap-ui-library.
|
|
6
|
+
#
|
|
7
|
+
# Register THIS file's name (publish.yml) as the package's npm Trusted Publisher
|
|
8
|
+
# on npmjs.com (Organization = `Capillary`, Repository = `cap-ui-common-utils`).
|
|
9
|
+
# NB: the repo is `cap-ui-common-utils`; the package is `@capillarytech/cap-ui-utils`.
|
|
10
|
+
#
|
|
11
|
+
# PRECONDITIONS (already satisfied for cap-ui-library):
|
|
12
|
+
# - the reusable workflow is on Capillary/cap-ui-library `master`;
|
|
13
|
+
# - cap-ui-library → Settings → Actions → Access = accessible to the org.
|
|
14
|
+
# =============================================================================
|
|
15
|
+
|
|
16
|
+
name: Publish package
|
|
17
|
+
|
|
18
|
+
on:
|
|
19
|
+
workflow_dispatch:
|
|
20
|
+
inputs:
|
|
21
|
+
releaseType:
|
|
22
|
+
description: "master => patch/minor/major, other branch => alpha/beta"
|
|
23
|
+
type: choice
|
|
24
|
+
required: true
|
|
25
|
+
options: [patch, minor, major, alpha, beta]
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: publish-${{ github.repository }}
|
|
29
|
+
cancel-in-progress: false # queue, never race the stable bump
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
publish:
|
|
33
|
+
permissions:
|
|
34
|
+
contents: write # push bump commit + tag (stable only) — passed through
|
|
35
|
+
id-token: write # OIDC publish — passed through
|
|
36
|
+
uses: Capillary/cap-ui-library/.github/workflows/publish-package.yml@master
|
|
37
|
+
with:
|
|
38
|
+
releaseType: ${{ inputs.releaseType }}
|
|
39
|
+
package-name: "@capillarytech/cap-ui-utils" # logging only
|
|
40
|
+
# Root publish — no publish-directory / library-command overrides needed.
|
|
41
|
+
# This package is PUBLIC (publishConfig.access = public); set npm-access
|
|
42
|
+
# explicitly so a publish can never silently narrow it. No @capillarytech
|
|
43
|
+
# deps, so `npm ci` needs no registry auth.
|
|
44
|
+
npm-access: public
|
|
45
|
+
# Pass ONLY the two secrets the reusable needs (least privilege — not
|
|
46
|
+
# `secrets: inherit`): NPM_PUBLISH_TOKEN (npm token fallback when OIDC isn't
|
|
47
|
+
# set up) + RELEASE_PAT (commit-back to protected master). When either is
|
|
48
|
+
# unset it resolves to empty -> publish uses OIDC, commit-back uses GITHUB_TOKEN.
|
|
49
|
+
# See docs/02 §2.4, docs/04 §4.3.
|
|
50
|
+
secrets:
|
|
51
|
+
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
|
52
|
+
RELEASE_PAT: ${{ secrets.RELEASE_PAT }}
|
package/e2e/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Only helpers that are **self-contained and free of per-repo test data**:
|
|
|
33
33
|
| Login flow | `pages/common/login.page`, `pages/common/base.page` |
|
|
34
34
|
| Reporting / recording | `utils/reportUploader`, `utils/logCollectorUtil`, `utils/requestRecorderUtil`, `utils/screenshotRecorderUtil` |
|
|
35
35
|
| Mocking | `utils/setupMock`, `utils/mockResponse` |
|
|
36
|
-
| Misc infra | `utils/debugModeUtil`, `utils/featureFlagUtil`, `utils/automationBypassUtil`, `utils/deletionRegistry`, `utils/
|
|
36
|
+
| Misc infra | `utils/debugModeUtil`, `utils/featureFlagUtil`, `utils/automationBypassUtil`, `utils/deletionRegistry`, `utils/htmlEditorUtil`, `utils/virtualListUtil`, `utils/unmatchedBracesUtil`, `utils/uploaders/*` |
|
|
37
37
|
| Services | `services/lockService`, `services/locks/*` |
|
|
38
38
|
| Config | `constants/common` (waits, log markers, `maxLoginAttempts`) |
|
|
39
39
|
|
package/e2e/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.loginPage = exports.BasePage = exports.lockService = exports.setupMock = exports.screenshotRecorderUtil = exports.requestRecorderUtil = exports.reportUploader = exports.logCollectorUtil = exports.
|
|
20
|
+
exports.loginPage = exports.BasePage = exports.lockService = exports.setupMock = exports.screenshotRecorderUtil = exports.requestRecorderUtil = exports.reportUploader = exports.logCollectorUtil = exports.deletionRegistry = exports.debugMode = exports.automationBypass = exports.expectUtil = exports.antdVersion = exports.elementUtil = void 0;
|
|
21
21
|
/**
|
|
22
22
|
* Shared WDIO E2E toolkit — the framework-agnostic, data-free helpers that were
|
|
23
23
|
* duplicated byte-for-byte across the product repos (wdio-ui-automation,
|
|
@@ -44,8 +44,6 @@ var debugModeUtil_1 = require("./utils/debugModeUtil");
|
|
|
44
44
|
Object.defineProperty(exports, "debugMode", { enumerable: true, get: function () { return __importDefault(debugModeUtil_1).default; } });
|
|
45
45
|
var deletionRegistry_1 = require("./utils/deletionRegistry");
|
|
46
46
|
Object.defineProperty(exports, "deletionRegistry", { enumerable: true, get: function () { return __importDefault(deletionRegistry_1).default; } });
|
|
47
|
-
var garudaDropdownUtil_1 = require("./utils/garudaDropdownUtil");
|
|
48
|
-
Object.defineProperty(exports, "dropdownUtil", { enumerable: true, get: function () { return __importDefault(garudaDropdownUtil_1).default; } });
|
|
49
47
|
var logCollectorUtil_1 = require("./utils/logCollectorUtil");
|
|
50
48
|
Object.defineProperty(exports, "logCollectorUtil", { enumerable: true, get: function () { return __importDefault(logCollectorUtil_1).default; } });
|
|
51
49
|
var reportUploader_1 = require("./utils/reportUploader");
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/cap-ui-utils",
|
|
3
|
-
"version": "3.1.2",
|
|
3
|
+
"version": "3.1.4-beta.fix-lockfile-sync.2",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
4
7
|
"description": "Utility functions shared accross all the modules",
|
|
5
8
|
"main": "index.js",
|
|
6
9
|
"scripts": {
|
|
@@ -27,10 +30,20 @@
|
|
|
27
30
|
"nanoid": ">=3"
|
|
28
31
|
},
|
|
29
32
|
"peerDependenciesMeta": {
|
|
30
|
-
"webdriverio": {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
33
|
+
"webdriverio": {
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
"@rpii/wdio-commands": {
|
|
37
|
+
"optional": true
|
|
38
|
+
},
|
|
39
|
+
"axios": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"supertest": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"nanoid": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class GarudaDropdownUtil {
|
|
4
|
-
treeOptionByText(text, index = 1, altText) {
|
|
5
|
-
const textMatch = altText
|
|
6
|
-
? `normalize-space()="${text}" or normalize-space()="${altText}"`
|
|
7
|
-
: `normalize-space()="${text}"`;
|
|
8
|
-
const position = index === 'last' ? 'last()' : index;
|
|
9
|
-
return $(`(//span[contains(@class,"ant-select-tree-node-content-wrapper")][.//div[${textMatch}]])[${position}]`);
|
|
10
|
-
}
|
|
11
|
-
unifiedOptionByText(text) {
|
|
12
|
-
return $(`//div[contains(@class,"cap-unified-select-popup")]//div[.//div[text()="${text}"] and @role="treeitem"]`);
|
|
13
|
-
}
|
|
14
|
-
listOptionByLabel(label, index = 1) {
|
|
15
|
-
return $(`(//ul[@role="listbox"]//li[@role="option" and @label="${label}"])[${index}]`);
|
|
16
|
-
}
|
|
17
|
-
selectOptionByText(text, index = 1) {
|
|
18
|
-
return $(`(//div[contains(@class,"ant-select-item-option")][.//div[contains(@class,"ant-select-item-option-content")][normalize-space()="${text}"]])[${index}]`);
|
|
19
|
-
}
|
|
20
|
-
treeOption(index = 1) {
|
|
21
|
-
const position = index === 'last' ? 'last()' : index;
|
|
22
|
-
return $(`(//span[contains(@class,"ant-select-tree-node-content-wrapper")][normalize-space(.)])[${position}]`);
|
|
23
|
-
}
|
|
24
|
-
listOptionByLabelInPopup(ariaControlId, label) {
|
|
25
|
-
return $(`//div[contains(@id,"${ariaControlId}")]//ul//li[@role="option" and @label="${label}"]`);
|
|
26
|
-
}
|
|
27
|
-
menuItemByText(text, index = 1) {
|
|
28
|
-
return $(`(//li[contains(@class,"ant-dropdown-menu-item")][.//span[normalize-space()="${text}"]])[${index}]`);
|
|
29
|
-
}
|
|
30
|
-
unifiedSelectConfirmButton() {
|
|
31
|
-
return $(`//button[contains(@class,"cap-unified-select-confirm-button")]`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.default = new GarudaDropdownUtil();
|