@nova-ui/bits 20.0.4 → 21.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/bundles/css/styles-css-variables.css +1 -1
- package/bundles/css/styles.css +1 -1
- package/fesm2022/nova-ui-bits.mjs +7315 -6599
- package/fesm2022/nova-ui-bits.mjs.map +1 -1
- package/package.json +15 -22
- package/sdk/atoms-playwright/atom.js +5 -3
- package/sdk/atoms-playwright/atom.js.map +1 -1
- package/sdk/atoms-playwright/components/checkbox/checkbox.atom.d.ts +0 -1
- package/sdk/atoms-playwright/components/checkbox/checkbox.atom.js +9 -6
- package/sdk/atoms-playwright/components/checkbox/checkbox.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/chips/chips.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/dialog/dialog.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/menu/menu.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/menu-popup/menu-popup.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/paginator/paginator.atom.d.ts +1 -0
- package/sdk/atoms-playwright/components/paginator/paginator.atom.js +14 -17
- package/sdk/atoms-playwright/components/paginator/paginator.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/popover/popover.atom.js +4 -1
- package/sdk/atoms-playwright/components/popover/popover.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/public_api.d.ts +1 -0
- package/sdk/atoms-playwright/components/public_api.js +1 -0
- package/sdk/atoms-playwright/components/public_api.js.map +1 -1
- package/sdk/atoms-playwright/components/range-filter/range-filter.atom.d.ts +20 -0
- package/sdk/atoms-playwright/components/range-filter/range-filter.atom.js +70 -0
- package/sdk/atoms-playwright/components/range-filter/range-filter.atom.js.map +1 -0
- package/sdk/atoms-playwright/components/select/basic-select.atom.js +4 -2
- package/sdk/atoms-playwright/components/select/basic-select.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/select/select.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/table/table.atom.js +10 -6
- package/sdk/atoms-playwright/components/table/table.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/timepicker/timepicker.atom.js +3 -1
- package/sdk/atoms-playwright/components/timepicker/timepicker.atom.js.map +1 -1
- package/sdk/atoms-playwright/setup.js +3 -1
- package/sdk/atoms-playwright/setup.js.map +1 -1
- package/sdk/atoms-playwright/virtual-camera/camera-engine.js +3 -1
- package/sdk/atoms-playwright/virtual-camera/camera-engine.js.map +1 -1
- package/sdk/less/nui-framework-colors-dark.less +1 -1
- package/sdk/less/nui-framework-colors.less +15 -15
- package/sdk/schematics/filter-group/index.spec.js +1 -1
- package/sdk/schematics/filter-group/index.spec.js.map +1 -1
- package/sdk/schematics/ng-add/index.spec.js +1 -1
- package/sdk/schematics/ng-add/index.spec.js.map +1 -1
- package/{index.d.ts → types/nova-ui-bits.d.ts} +285 -150
- package/sdk/atoms/atom.d.ts +0 -48
- package/sdk/atoms/atom.js +0 -179
- package/sdk/atoms/atom.js.map +0 -1
- package/sdk/atoms/atoms/base-select-v2.atom.d.ts +0 -30
- package/sdk/atoms/atoms/base-select-v2.atom.js +0 -125
- package/sdk/atoms/atoms/base-select-v2.atom.js.map +0 -1
- package/sdk/atoms/atoms/basic-select.atom.d.ts +0 -21
- package/sdk/atoms/atoms/basic-select.atom.js +0 -56
- package/sdk/atoms/atoms/basic-select.atom.js.map +0 -1
- package/sdk/atoms/atoms/breadcrumb.atom.d.ts +0 -11
- package/sdk/atoms/atoms/breadcrumb.atom.js +0 -46
- package/sdk/atoms/atoms/breadcrumb.atom.js.map +0 -1
- package/sdk/atoms/atoms/busy.atom.d.ts +0 -12
- package/sdk/atoms/atoms/busy.atom.js +0 -41
- package/sdk/atoms/atoms/busy.atom.js.map +0 -1
- package/sdk/atoms/atoms/button.atom.d.ts +0 -19
- package/sdk/atoms/atoms/button.atom.js +0 -63
- package/sdk/atoms/atoms/button.atom.js.map +0 -1
- package/sdk/atoms/atoms/cdk-drop-item.atom.d.ts +0 -10
- package/sdk/atoms/atoms/cdk-drop-item.atom.js +0 -58
- package/sdk/atoms/atoms/cdk-drop-item.atom.js.map +0 -1
- package/sdk/atoms/atoms/cdk-drop-list.atom.d.ts +0 -8
- package/sdk/atoms/atoms/cdk-drop-list.atom.js +0 -42
- package/sdk/atoms/atoms/cdk-drop-list.atom.js.map +0 -1
- package/sdk/atoms/atoms/checkbox-group.atom.d.ts +0 -11
- package/sdk/atoms/atoms/checkbox-group.atom.js +0 -69
- package/sdk/atoms/atoms/checkbox-group.atom.js.map +0 -1
- package/sdk/atoms/atoms/checkbox.atom.d.ts +0 -30
- package/sdk/atoms/atoms/checkbox.atom.js +0 -94
- package/sdk/atoms/atoms/checkbox.atom.js.map +0 -1
- package/sdk/atoms/atoms/chips.atom.d.ts +0 -32
- package/sdk/atoms/atoms/chips.atom.js +0 -93
- package/sdk/atoms/atoms/chips.atom.js.map +0 -1
- package/sdk/atoms/atoms/combobox-v2.atom.d.ts +0 -22
- package/sdk/atoms/atoms/combobox-v2.atom.js +0 -100
- package/sdk/atoms/atoms/combobox-v2.atom.js.map +0 -1
- package/sdk/atoms/atoms/combobox.atom.d.ts +0 -29
- package/sdk/atoms/atoms/combobox.atom.js +0 -67
- package/sdk/atoms/atoms/combobox.atom.js.map +0 -1
- package/sdk/atoms/atoms/content.atom.d.ts +0 -6
- package/sdk/atoms/atoms/content.atom.js +0 -40
- package/sdk/atoms/atoms/content.atom.js.map +0 -1
- package/sdk/atoms/atoms/datepicker.atom.d.ts +0 -57
- package/sdk/atoms/atoms/datepicker.atom.js +0 -204
- package/sdk/atoms/atoms/datepicker.atom.js.map +0 -1
- package/sdk/atoms/atoms/datetimepicker.atom.d.ts +0 -9
- package/sdk/atoms/atoms/datetimepicker.atom.js +0 -43
- package/sdk/atoms/atoms/datetimepicker.atom.js.map +0 -1
- package/sdk/atoms/atoms/dialog.atom.d.ts +0 -18
- package/sdk/atoms/atoms/dialog.atom.js +0 -77
- package/sdk/atoms/atoms/dialog.atom.js.map +0 -1
- package/sdk/atoms/atoms/divider.atom.d.ts +0 -6
- package/sdk/atoms/atoms/divider.atom.js +0 -45
- package/sdk/atoms/atoms/divider.atom.js.map +0 -1
- package/sdk/atoms/atoms/expander.atom.d.ts +0 -19
- package/sdk/atoms/atoms/expander.atom.js +0 -90
- package/sdk/atoms/atoms/expander.atom.js.map +0 -1
- package/sdk/atoms/atoms/form-field.atom.d.ts +0 -12
- package/sdk/atoms/atoms/form-field.atom.js +0 -73
- package/sdk/atoms/atoms/form-field.atom.js.map +0 -1
- package/sdk/atoms/atoms/freetype-query-builder.atom.d.ts +0 -9
- package/sdk/atoms/atoms/freetype-query-builder.atom.js +0 -51
- package/sdk/atoms/atoms/freetype-query-builder.atom.js.map +0 -1
- package/sdk/atoms/atoms/icon.atom.d.ts +0 -21
- package/sdk/atoms/atoms/icon.atom.js +0 -91
- package/sdk/atoms/atoms/icon.atom.js.map +0 -1
- package/sdk/atoms/atoms/image.atom.d.ts +0 -8
- package/sdk/atoms/atoms/image.atom.js +0 -61
- package/sdk/atoms/atoms/image.atom.js.map +0 -1
- package/sdk/atoms/atoms/layout-sheet-group.atom.d.ts +0 -14
- package/sdk/atoms/atoms/layout-sheet-group.atom.js +0 -91
- package/sdk/atoms/atoms/layout-sheet-group.atom.js.map +0 -1
- package/sdk/atoms/atoms/layout-sheet.atom.d.ts +0 -6
- package/sdk/atoms/atoms/layout-sheet.atom.js +0 -45
- package/sdk/atoms/atoms/layout-sheet.atom.js.map +0 -1
- package/sdk/atoms/atoms/menu-item.atom.d.ts +0 -13
- package/sdk/atoms/atoms/menu-item.atom.js +0 -117
- package/sdk/atoms/atoms/menu-item.atom.js.map +0 -1
- package/sdk/atoms/atoms/menu-popup.atom.d.ts +0 -11
- package/sdk/atoms/atoms/menu-popup.atom.js +0 -57
- package/sdk/atoms/atoms/menu-popup.atom.js.map +0 -1
- package/sdk/atoms/atoms/menu.atom.d.ts +0 -43
- package/sdk/atoms/atoms/menu.atom.js +0 -116
- package/sdk/atoms/atoms/menu.atom.js.map +0 -1
- package/sdk/atoms/atoms/message.atom.d.ts +0 -16
- package/sdk/atoms/atoms/message.atom.js +0 -51
- package/sdk/atoms/atoms/message.atom.js.map +0 -1
- package/sdk/atoms/atoms/overlay-content.atom.d.ts +0 -7
- package/sdk/atoms/atoms/overlay-content.atom.js +0 -35
- package/sdk/atoms/atoms/overlay-content.atom.js.map +0 -1
- package/sdk/atoms/atoms/overlay.atom.d.ts +0 -11
- package/sdk/atoms/atoms/overlay.atom.js +0 -41
- package/sdk/atoms/atoms/overlay.atom.js.map +0 -1
- package/sdk/atoms/atoms/paginator.atom.d.ts +0 -29
- package/sdk/atoms/atoms/paginator.atom.js +0 -199
- package/sdk/atoms/atoms/paginator.atom.js.map +0 -1
- package/sdk/atoms/atoms/panel.atom.d.ts +0 -29
- package/sdk/atoms/atoms/panel.atom.js +0 -120
- package/sdk/atoms/atoms/panel.atom.js.map +0 -1
- package/sdk/atoms/atoms/popover.atom.d.ts +0 -28
- package/sdk/atoms/atoms/popover.atom.js +0 -94
- package/sdk/atoms/atoms/popover.atom.js.map +0 -1
- package/sdk/atoms/atoms/popup.atom.d.ts +0 -16
- package/sdk/atoms/atoms/popup.atom.js +0 -68
- package/sdk/atoms/atoms/popup.atom.js.map +0 -1
- package/sdk/atoms/atoms/progress.atom.d.ts +0 -14
- package/sdk/atoms/atoms/progress.atom.js +0 -65
- package/sdk/atoms/atoms/progress.atom.js.map +0 -1
- package/sdk/atoms/atoms/public_api.d.ts +0 -65
- package/sdk/atoms/atoms/public_api.js +0 -69
- package/sdk/atoms/atoms/public_api.js.map +0 -1
- package/sdk/atoms/atoms/quick-picker.atom.d.ts +0 -8
- package/sdk/atoms/atoms/quick-picker.atom.js +0 -49
- package/sdk/atoms/atoms/quick-picker.atom.js.map +0 -1
- package/sdk/atoms/atoms/radio-group.atom.d.ts +0 -13
- package/sdk/atoms/atoms/radio-group.atom.js +0 -76
- package/sdk/atoms/atoms/radio-group.atom.js.map +0 -1
- package/sdk/atoms/atoms/repeat.atom.d.ts +0 -27
- package/sdk/atoms/atoms/repeat.atom.js +0 -123
- package/sdk/atoms/atoms/repeat.atom.js.map +0 -1
- package/sdk/atoms/atoms/resizer.atom.d.ts +0 -12
- package/sdk/atoms/atoms/resizer.atom.js +0 -52
- package/sdk/atoms/atoms/resizer.atom.js.map +0 -1
- package/sdk/atoms/atoms/search.atom.d.ts +0 -12
- package/sdk/atoms/atoms/search.atom.js +0 -81
- package/sdk/atoms/atoms/search.atom.js.map +0 -1
- package/sdk/atoms/atoms/select-v2-option.atom.d.ts +0 -7
- package/sdk/atoms/atoms/select-v2-option.atom.js +0 -44
- package/sdk/atoms/atoms/select-v2-option.atom.js.map +0 -1
- package/sdk/atoms/atoms/select-v2.atom.d.ts +0 -5
- package/sdk/atoms/atoms/select-v2.atom.js +0 -34
- package/sdk/atoms/atoms/select-v2.atom.js.map +0 -1
- package/sdk/atoms/atoms/select.atom.d.ts +0 -10
- package/sdk/atoms/atoms/select.atom.js +0 -37
- package/sdk/atoms/atoms/select.atom.js.map +0 -1
- package/sdk/atoms/atoms/selector.atom.d.ts +0 -22
- package/sdk/atoms/atoms/selector.atom.js +0 -90
- package/sdk/atoms/atoms/selector.atom.js.map +0 -1
- package/sdk/atoms/atoms/sorter.atom.d.ts +0 -33
- package/sdk/atoms/atoms/sorter.atom.js +0 -123
- package/sdk/atoms/atoms/sorter.atom.js.map +0 -1
- package/sdk/atoms/atoms/spinner.atom.d.ts +0 -12
- package/sdk/atoms/atoms/spinner.atom.js +0 -45
- package/sdk/atoms/atoms/spinner.atom.js.map +0 -1
- package/sdk/atoms/atoms/switch.atom.d.ts +0 -14
- package/sdk/atoms/atoms/switch.atom.js +0 -73
- package/sdk/atoms/atoms/switch.atom.js.map +0 -1
- package/sdk/atoms/atoms/tab-heading-group.atom.d.ts +0 -16
- package/sdk/atoms/atoms/tab-heading-group.atom.js +0 -108
- package/sdk/atoms/atoms/tab-heading-group.atom.js.map +0 -1
- package/sdk/atoms/atoms/tab-heading.atom.d.ts +0 -8
- package/sdk/atoms/atoms/tab-heading.atom.js +0 -52
- package/sdk/atoms/atoms/tab-heading.atom.js.map +0 -1
- package/sdk/atoms/atoms/table.atom.d.ts +0 -73
- package/sdk/atoms/atoms/table.atom.js +0 -210
- package/sdk/atoms/atoms/table.atom.js.map +0 -1
- package/sdk/atoms/atoms/textbox-number.atom.d.ts +0 -18
- package/sdk/atoms/atoms/textbox-number.atom.js +0 -53
- package/sdk/atoms/atoms/textbox-number.atom.js.map +0 -1
- package/sdk/atoms/atoms/textbox.atom.d.ts +0 -22
- package/sdk/atoms/atoms/textbox.atom.js +0 -59
- package/sdk/atoms/atoms/textbox.atom.js.map +0 -1
- package/sdk/atoms/atoms/time-frame-bar.atom.d.ts +0 -22
- package/sdk/atoms/atoms/time-frame-bar.atom.js +0 -84
- package/sdk/atoms/atoms/time-frame-bar.atom.js.map +0 -1
- package/sdk/atoms/atoms/time-frame-picker.atom.d.ts +0 -7
- package/sdk/atoms/atoms/time-frame-picker.atom.js +0 -36
- package/sdk/atoms/atoms/time-frame-picker.atom.js.map +0 -1
- package/sdk/atoms/atoms/timepicker.atom.d.ts +0 -18
- package/sdk/atoms/atoms/timepicker.atom.js +0 -64
- package/sdk/atoms/atoms/timepicker.atom.js.map +0 -1
- package/sdk/atoms/atoms/toast.atom.d.ts +0 -28
- package/sdk/atoms/atoms/toast.atom.js +0 -67
- package/sdk/atoms/atoms/toast.atom.js.map +0 -1
- package/sdk/atoms/atoms/toolbar.atom.d.ts +0 -18
- package/sdk/atoms/atoms/toolbar.atom.js +0 -87
- package/sdk/atoms/atoms/toolbar.atom.js.map +0 -1
- package/sdk/atoms/atoms/tooltip.atom.d.ts +0 -9
- package/sdk/atoms/atoms/tooltip.atom.js +0 -38
- package/sdk/atoms/atoms/tooltip.atom.js.map +0 -1
- package/sdk/atoms/atoms/tree.atom.d.ts +0 -17
- package/sdk/atoms/atoms/tree.atom.js +0 -87
- package/sdk/atoms/atoms/tree.atom.js.map +0 -1
- package/sdk/atoms/atoms/wizard-step.atom.d.ts +0 -11
- package/sdk/atoms/atoms/wizard-step.atom.js +0 -52
- package/sdk/atoms/atoms/wizard-step.atom.js.map +0 -1
- package/sdk/atoms/atoms/wizard-v2-footer.atom.d.ts +0 -7
- package/sdk/atoms/atoms/wizard-v2-footer.atom.js +0 -36
- package/sdk/atoms/atoms/wizard-v2-footer.atom.js.map +0 -1
- package/sdk/atoms/atoms/wizard-v2-step-header.atom.d.ts +0 -7
- package/sdk/atoms/atoms/wizard-v2-step-header.atom.js +0 -41
- package/sdk/atoms/atoms/wizard-v2-step-header.atom.js.map +0 -1
- package/sdk/atoms/atoms/wizard-v2-step.atom.d.ts +0 -5
- package/sdk/atoms/atoms/wizard-v2-step.atom.js +0 -32
- package/sdk/atoms/atoms/wizard-v2-step.atom.js.map +0 -1
- package/sdk/atoms/atoms/wizard-v2.atom.d.ts +0 -18
- package/sdk/atoms/atoms/wizard-v2.atom.js +0 -85
- package/sdk/atoms/atoms/wizard-v2.atom.js.map +0 -1
- package/sdk/atoms/atoms/wizard.atom.d.ts +0 -22
- package/sdk/atoms/atoms/wizard.atom.js +0 -91
- package/sdk/atoms/atoms/wizard.atom.js.map +0 -1
- package/sdk/atoms/helpers.d.ts +0 -39
- package/sdk/atoms/helpers.js +0 -234
- package/sdk/atoms/helpers.js.map +0 -1
- package/sdk/atoms/index.d.ts +0 -4
- package/sdk/atoms/index.js +0 -30
- package/sdk/atoms/index.js.map +0 -1
- package/sdk/atoms/virtual-camera/Camera.d.ts +0 -21
- package/sdk/atoms/virtual-camera/Camera.js +0 -54
- package/sdk/atoms/virtual-camera/Camera.js.map +0 -1
- package/sdk/atoms/virtual-camera/camera-engine.d.ts +0 -13
- package/sdk/atoms/virtual-camera/camera-engine.js +0 -81
- package/sdk/atoms/virtual-camera/camera-engine.js.map +0 -1
- package/sdk/atoms/virtual-camera/camera-settings.d.ts +0 -10
- package/sdk/atoms/virtual-camera/camera-settings.js +0 -59
- package/sdk/atoms/virtual-camera/camera-settings.js.map +0 -1
- package/sdk/atoms/virtual-camera/camera-toggle.d.ts +0 -7
- package/sdk/atoms/virtual-camera/camera-toggle.js +0 -40
- package/sdk/atoms/virtual-camera/camera-toggle.js.map +0 -1
- package/sdk/atoms/virtual-camera/percy-lens.d.ts +0 -17
- package/sdk/atoms/virtual-camera/percy-lens.js +0 -84
- package/sdk/atoms/virtual-camera/percy-lens.js.map +0 -1
- package/sdk/atoms/virtual-camera/public_api.d.ts +0 -2
- package/sdk/atoms/virtual-camera/public_api.js +0 -25
- package/sdk/atoms/virtual-camera/public_api.js.map +0 -1
- package/sdk/atoms/virtual-camera/types.d.ts +0 -35
- package/sdk/atoms/virtual-camera/types.js +0 -50
- package/sdk/atoms/virtual-camera/types.js.map +0 -1
package/sdk/atoms/helpers.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ElementFinder, ProtractorBrowser } from "protractor";
|
|
2
|
-
import { WebElementPromise } from "selenium-webdriver";
|
|
3
|
-
import { Atom, IAtomClass } from "./atom";
|
|
4
|
-
import { Camera } from "./virtual-camera/Camera";
|
|
5
|
-
export declare enum Animations {
|
|
6
|
-
ALL = 0,
|
|
7
|
-
TRANSITIONS = 1,
|
|
8
|
-
TRANSFORMS = 2,
|
|
9
|
-
ANIMATIONS = 3,
|
|
10
|
-
TRANSFORMS_AND_ANIMATIONS = 4,
|
|
11
|
-
TRANSITIONS_AND_ANIMATIONS = 5,
|
|
12
|
-
TRANSITIONS_AND_TRANSFORMS = 6
|
|
13
|
-
}
|
|
14
|
-
export declare function getCurrentBranchName(potentialGitRoot?: string): string | undefined;
|
|
15
|
-
export declare function assertA11y<T extends Atom>(browser: ProtractorBrowser, atomClassOrSelector: IAtomClass<T> | string, disabledRules?: string[]): Promise<void>;
|
|
16
|
-
export declare class Helpers {
|
|
17
|
-
static prepareBrowser(pageName?: string): Promise<void>;
|
|
18
|
-
static prepareCamera(testName: string, suiteName?: string): Camera;
|
|
19
|
-
static getElementByXpath(elementXpath: string): WebElementPromise;
|
|
20
|
-
static getElementByCSS(elementCSS: string): WebElementPromise;
|
|
21
|
-
static setCustomWidth(size: string, id: string): Promise<any>;
|
|
22
|
-
static browserZoom(percent: number): Promise<unknown>;
|
|
23
|
-
static pressKey(key: string, times?: number): Promise<void>;
|
|
24
|
-
static clickOnEmptySpace(x?: number, y?: number): Promise<void>;
|
|
25
|
-
static switchDarkTheme(mode: "on" | "off"): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* TODO: make this method configurable, so that we would be able to partly disable
|
|
28
|
-
* or enable the animations:
|
|
29
|
-
*
|
|
30
|
-
* https://jira.solarwinds.com/browse/NUI-2034
|
|
31
|
-
*/
|
|
32
|
-
static disableCSSAnimations(type: Animations): Promise<any>;
|
|
33
|
-
static saveScreenShot(filename: string): Promise<void>;
|
|
34
|
-
static setLocation(url: string): Promise<void>;
|
|
35
|
-
static delayPromise(timeout: number): Promise<void>;
|
|
36
|
-
static timed<T>(fn: (() => Promise<T>) | (() => T), name?: string): Promise<T>;
|
|
37
|
-
static waitElementVisible(el: ElementFinder): Promise<void>;
|
|
38
|
-
static waitElementToBeClickable(el: ElementFinder): Promise<void>;
|
|
39
|
-
}
|
package/sdk/atoms/helpers.js
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Helpers = exports.Animations = void 0;
|
|
23
|
-
exports.getCurrentBranchName = getCurrentBranchName;
|
|
24
|
-
exports.assertA11y = assertA11y;
|
|
25
|
-
const tslib_1 = require("tslib");
|
|
26
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
27
|
-
const path = tslib_1.__importStar(require("path"));
|
|
28
|
-
const perf_hooks_1 = require("perf_hooks");
|
|
29
|
-
const protractor_1 = require("protractor");
|
|
30
|
-
const atom_1 = require("./atom");
|
|
31
|
-
const Camera_1 = require("./virtual-camera/Camera");
|
|
32
|
-
var Animations;
|
|
33
|
-
(function (Animations) {
|
|
34
|
-
Animations[Animations["ALL"] = 0] = "ALL";
|
|
35
|
-
Animations[Animations["TRANSITIONS"] = 1] = "TRANSITIONS";
|
|
36
|
-
Animations[Animations["TRANSFORMS"] = 2] = "TRANSFORMS";
|
|
37
|
-
Animations[Animations["ANIMATIONS"] = 3] = "ANIMATIONS";
|
|
38
|
-
Animations[Animations["TRANSFORMS_AND_ANIMATIONS"] = 4] = "TRANSFORMS_AND_ANIMATIONS";
|
|
39
|
-
Animations[Animations["TRANSITIONS_AND_ANIMATIONS"] = 5] = "TRANSITIONS_AND_ANIMATIONS";
|
|
40
|
-
Animations[Animations["TRANSITIONS_AND_TRANSFORMS"] = 6] = "TRANSITIONS_AND_TRANSFORMS";
|
|
41
|
-
})(Animations || (exports.Animations = Animations = {}));
|
|
42
|
-
function getCurrentBranchName(potentialGitRoot = process.cwd()) {
|
|
43
|
-
const gitHeadPath = `${potentialGitRoot}/.git/HEAD`;
|
|
44
|
-
if (!fs.existsSync(potentialGitRoot)) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
if (fs.existsSync(gitHeadPath)) {
|
|
48
|
-
// Taking last two fragments of branch name, usually it is formatted like branch_type/branch_name
|
|
49
|
-
return fs
|
|
50
|
-
.readFileSync(gitHeadPath, "utf-8")
|
|
51
|
-
.trim()
|
|
52
|
-
.split("/")
|
|
53
|
-
.slice(2)
|
|
54
|
-
.join("/");
|
|
55
|
-
}
|
|
56
|
-
// Recursively looking for git folder
|
|
57
|
-
return getCurrentBranchName(path.resolve(potentialGitRoot, ".."));
|
|
58
|
-
}
|
|
59
|
-
function assertA11y(browser, atomClassOrSelector, disabledRules) {
|
|
60
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
62
|
-
const AxeBuilder = require("@axe-core/webdriverjs");
|
|
63
|
-
const selector = typeof atomClassOrSelector === "string"
|
|
64
|
-
? atomClassOrSelector
|
|
65
|
-
: atom_1.Atom.getSelector(atomClassOrSelector);
|
|
66
|
-
const accessibilityScanResults = yield new AxeBuilder(browser.driver)
|
|
67
|
-
.include(selector)
|
|
68
|
-
.disableRules(disabledRules || [])
|
|
69
|
-
.analyze();
|
|
70
|
-
expect(accessibilityScanResults.violations).toEqual([]);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
class Helpers {
|
|
74
|
-
static prepareBrowser(pageName) {
|
|
75
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
let url = "";
|
|
77
|
-
if (pageName) {
|
|
78
|
-
url += "#/" + pageName;
|
|
79
|
-
}
|
|
80
|
-
yield protractor_1.browser.angularAppRoot("app");
|
|
81
|
-
yield protractor_1.browser.get(url);
|
|
82
|
-
yield protractor_1.browser.waitForAngular();
|
|
83
|
-
protractor_1.browser.clearMockModules();
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
static prepareCamera(testName, suiteName) {
|
|
87
|
-
return new Camera_1.Camera().loadFilm(protractor_1.browser, testName, suiteName);
|
|
88
|
-
}
|
|
89
|
-
static getElementByXpath(elementXpath) {
|
|
90
|
-
return protractor_1.browser.driver.findElement(protractor_1.by.xpath(elementXpath));
|
|
91
|
-
}
|
|
92
|
-
static getElementByCSS(elementCSS) {
|
|
93
|
-
return protractor_1.browser.driver.findElement(protractor_1.by.css(elementCSS));
|
|
94
|
-
}
|
|
95
|
-
static setCustomWidth(size, id) {
|
|
96
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
return protractor_1.browser.executeScript(`document.getElementById("${id}").style.width = "${size}"`);
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
static browserZoom(percent) {
|
|
101
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
return protractor_1.browser.executeScript(`document.body.style.zoom='${percent}%'`);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
static pressKey(key_1) {
|
|
106
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (key, times = 1) {
|
|
107
|
-
while (times > 0) {
|
|
108
|
-
yield protractor_1.browser.actions().sendKeys(key).perform();
|
|
109
|
-
times--;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
static clickOnEmptySpace() {
|
|
114
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (x = 0, y = 0) {
|
|
115
|
-
return protractor_1.browser.executeScript("document.elementFromPoint(arguments[0],arguments[1]).click()", x, y);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
static switchDarkTheme(mode) {
|
|
119
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
const htmlClassList = `document.getElementsByTagName("html")[0].classList`;
|
|
121
|
-
const script = mode === "on"
|
|
122
|
-
? `${htmlClassList}.add("dark-nova-theme")`
|
|
123
|
-
: `${htmlClassList}.remove("dark-nova-theme")`;
|
|
124
|
-
yield protractor_1.browser.executeScript(script);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* TODO: make this method configurable, so that we would be able to partly disable
|
|
129
|
-
* or enable the animations:
|
|
130
|
-
*
|
|
131
|
-
* https://jira.solarwinds.com/browse/NUI-2034
|
|
132
|
-
*/
|
|
133
|
-
static disableCSSAnimations(type) {
|
|
134
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
135
|
-
let disableTransitions = "-o-transition-property: none !important;" +
|
|
136
|
-
"-moz-transition-property: none !important;" +
|
|
137
|
-
"-ms-transition-property: none !important;" +
|
|
138
|
-
"-webkit-transition-property: none !important;" +
|
|
139
|
-
"transition-property: none !important;";
|
|
140
|
-
let disableTransforms = "-o-transform: none !important;" +
|
|
141
|
-
"-moz-transform: none !important;" +
|
|
142
|
-
"-ms-transform: none !important;" +
|
|
143
|
-
"-webkit-transform: none !important;" +
|
|
144
|
-
"transform: none !important;";
|
|
145
|
-
let disableAnimations = "-webkit-animation: none !important;" +
|
|
146
|
-
"-moz-animation: none !important;" +
|
|
147
|
-
"-o-animation: none !important;" +
|
|
148
|
-
"-ms-animation: none !important;" +
|
|
149
|
-
"animation: none !important;";
|
|
150
|
-
switch (type) {
|
|
151
|
-
case Animations.ALL:
|
|
152
|
-
break;
|
|
153
|
-
case Animations.TRANSITIONS:
|
|
154
|
-
disableTransforms = "";
|
|
155
|
-
disableAnimations = "";
|
|
156
|
-
break;
|
|
157
|
-
case Animations.TRANSFORMS:
|
|
158
|
-
disableAnimations = "";
|
|
159
|
-
disableTransitions = "";
|
|
160
|
-
break;
|
|
161
|
-
case Animations.ANIMATIONS:
|
|
162
|
-
disableTransforms = "";
|
|
163
|
-
disableTransitions = "";
|
|
164
|
-
break;
|
|
165
|
-
case Animations.TRANSFORMS_AND_ANIMATIONS:
|
|
166
|
-
disableTransitions = "";
|
|
167
|
-
break;
|
|
168
|
-
case Animations.TRANSITIONS_AND_ANIMATIONS:
|
|
169
|
-
disableTransforms = "";
|
|
170
|
-
break;
|
|
171
|
-
case Animations.TRANSITIONS_AND_TRANSFORMS:
|
|
172
|
-
disableAnimations = "";
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
const css = "*, *:before, *:after {" +
|
|
176
|
-
disableTransitions +
|
|
177
|
-
disableTransforms +
|
|
178
|
-
disableAnimations +
|
|
179
|
-
"}";
|
|
180
|
-
return protractor_1.browser.executeScript(`
|
|
181
|
-
var head = document.head || document.getElementsByTagName("head")[0];
|
|
182
|
-
var style = document.createElement("style");
|
|
183
|
-
style.type = "text/css";
|
|
184
|
-
style.appendChild(document.createTextNode("${css}"));
|
|
185
|
-
head.appendChild(style);
|
|
186
|
-
`);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
static saveScreenShot(filename) {
|
|
190
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
191
|
-
return protractor_1.browser.takeScreenshot().then((data) => {
|
|
192
|
-
const stream = fs.createWriteStream(filename);
|
|
193
|
-
stream.write(Buffer.from(data, "base64"));
|
|
194
|
-
stream.end();
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
static setLocation(url) {
|
|
199
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
200
|
-
return protractor_1.browser.executeScript((pUrl) => (window.location.href = `/#/${pUrl}`), url);
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
static delayPromise(timeout) {
|
|
204
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
205
|
-
return new Promise((resolve) => {
|
|
206
|
-
setTimeout(() => resolve(), timeout);
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
static timed(fn_1) {
|
|
211
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (fn, name = fn.name) {
|
|
212
|
-
const start = perf_hooks_1.performance.now();
|
|
213
|
-
try {
|
|
214
|
-
return yield fn();
|
|
215
|
-
}
|
|
216
|
-
finally {
|
|
217
|
-
const stop = perf_hooks_1.performance.now();
|
|
218
|
-
console.log(`timed [${name}] took ${stop - start} ms`);
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
static waitElementVisible(el) {
|
|
223
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
yield protractor_1.browser.wait(protractor_1.protractor.ExpectedConditions.visibilityOf(el), 5000, "Element is not visible");
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
static waitElementToBeClickable(el) {
|
|
228
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
229
|
-
yield protractor_1.browser.wait(protractor_1.protractor.ExpectedConditions.elementToBeClickable(el), 5000, "Element is not visible");
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
exports.Helpers = Helpers;
|
|
234
|
-
//# sourceMappingURL=helpers.js.map
|
package/sdk/atoms/helpers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../spec/helpers.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6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
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Helpers = exports.Atom = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
var atom_1 = require("./atom");
|
|
25
|
-
Object.defineProperty(exports, "Atom", { enumerable: true, get: function () { return atom_1.Atom; } });
|
|
26
|
-
tslib_1.__exportStar(require("./virtual-camera/public_api"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("./atoms/public_api"), exports);
|
|
28
|
-
var helpers_1 = require("./helpers");
|
|
29
|
-
Object.defineProperty(exports, "Helpers", { enumerable: true, get: function () { return helpers_1.Helpers; } });
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
package/sdk/atoms/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../spec/index.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAEjB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AAEb,sEAA4C;AAC5C,6DAAmC;AAEnC,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ProtractorBrowser } from "protractor";
|
|
2
|
-
import { CameraToggle } from "./camera-toggle";
|
|
3
|
-
import { ICameraSettings, ICameraSettingsActions } from "./types";
|
|
4
|
-
export declare class Camera {
|
|
5
|
-
private currentBrowser;
|
|
6
|
-
private cameraSettings;
|
|
7
|
-
private engine;
|
|
8
|
-
turn: CameraToggle;
|
|
9
|
-
info: ICameraSettings;
|
|
10
|
-
say: {
|
|
11
|
-
cheese: (label: string, timeout?: number) => Promise<void>;
|
|
12
|
-
};
|
|
13
|
-
be: ICameraSettingsActions;
|
|
14
|
-
lens: {
|
|
15
|
-
configure: () => any;
|
|
16
|
-
};
|
|
17
|
-
constructor();
|
|
18
|
-
loadFilm(browser: ProtractorBrowser, testName: string, suiteName?: string): this;
|
|
19
|
-
private cheese;
|
|
20
|
-
private configure;
|
|
21
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.Camera = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
const camera_engine_1 = require("./camera-engine");
|
|
25
|
-
const camera_settings_1 = require("./camera-settings");
|
|
26
|
-
const camera_toggle_1 = require("./camera-toggle");
|
|
27
|
-
class Camera {
|
|
28
|
-
constructor() {
|
|
29
|
-
this.say = { cheese: this.cheese.bind(this) };
|
|
30
|
-
this.lens = { configure: this.configure.bind(this) };
|
|
31
|
-
}
|
|
32
|
-
loadFilm(browser, testName, suiteName = "NUI") {
|
|
33
|
-
this.currentBrowser = browser;
|
|
34
|
-
this.cameraSettings = new camera_settings_1.CameraSettings();
|
|
35
|
-
this.cameraSettings.currentSettings.currentTestName = testName;
|
|
36
|
-
this.cameraSettings.currentSettings.currentSuiteName = suiteName;
|
|
37
|
-
this.be = Object.assign({}, this.cameraSettings.actions);
|
|
38
|
-
this.info = this.cameraSettings.currentSettings;
|
|
39
|
-
this.engine = new camera_engine_1.CameraEngine(this.currentBrowser, this.cameraSettings.currentSettings);
|
|
40
|
-
this.turn = new camera_toggle_1.CameraToggle(this.engine);
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
cheese(label_1) {
|
|
44
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (label, timeout = 700) {
|
|
45
|
-
yield this.currentBrowser.sleep(timeout);
|
|
46
|
-
yield this.engine.takePhoto(label);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
configure() {
|
|
50
|
-
return this.engine.getToolConfig();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.Camera = Camera;
|
|
54
|
-
//# sourceMappingURL=Camera.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../spec/virtual-camera/Camera.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAIjB,mDAA+C;AAC/C,uDAAmD;AACnD,mDAA+C;AAG/C,MAAa,MAAM;IAWf;QAJO,QAAG,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAEzC,SAAI,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAExC,CAAC;IAET,QAAQ,CACX,OAA0B,EAC1B,QAAgB,EAChB,YAAoB,KAAK;QAEzB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAE9B,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,eAAe,GAAG,QAAQ,CAAC;QAC/D,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACjE,IAAI,CAAC,EAAE,qBAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,CAAE,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC;QAEhD,IAAI,CAAC,MAAM,GAAG,IAAI,4BAAY,CAC1B,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,cAAc,CAAC,eAAe,CACtC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,4BAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE1C,OAAO,IAAI,CAAC;IAChB,CAAC;IAEa,MAAM;qEAAC,KAAa,EAAE,UAAkB,GAAG;YACrD,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACzC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;KAAA;IAEO,SAAS;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;IACvC,CAAC;CACJ;AA3CD,wBA2CC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ProtractorBrowser } from "protractor";
|
|
2
|
-
import { ICameraSettings, ILens } from "./types";
|
|
3
|
-
export declare class CameraEngine {
|
|
4
|
-
private browser;
|
|
5
|
-
private settings;
|
|
6
|
-
currentLensInstance: ILens;
|
|
7
|
-
private snapshotsFolderName;
|
|
8
|
-
constructor(browser: ProtractorBrowser, settings: ICameraSettings);
|
|
9
|
-
private useLens;
|
|
10
|
-
takePhoto(label: string): Promise<void>;
|
|
11
|
-
getToolConfig(): ReturnType<ILens["toolConfig"]>;
|
|
12
|
-
private cleanFileName;
|
|
13
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CameraEngine = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
25
|
-
const percy_lens_1 = require("./percy-lens");
|
|
26
|
-
const types_1 = require("./types");
|
|
27
|
-
const helpers_1 = require("../helpers");
|
|
28
|
-
class CameraEngine {
|
|
29
|
-
constructor(browser, settings) {
|
|
30
|
-
this.browser = browser;
|
|
31
|
-
this.settings = settings;
|
|
32
|
-
this.snapshotsFolderName = "_snapshots";
|
|
33
|
-
this.useLens();
|
|
34
|
-
}
|
|
35
|
-
useLens() {
|
|
36
|
-
if (!this.browser) {
|
|
37
|
-
throw new Error("Protractor's 'browser' instance is required! Please pass one as an argument to the 'loadFilm()' method");
|
|
38
|
-
}
|
|
39
|
-
this.settings.globalLens = this.browser.params["visual"];
|
|
40
|
-
if (this.settings.globalLens &&
|
|
41
|
-
types_1.LENSES.includes(this.settings.globalLens)) {
|
|
42
|
-
switch (this.settings.globalLens) {
|
|
43
|
-
case types_1.LensType.Percy:
|
|
44
|
-
this.currentLensInstance = new percy_lens_1.PercyLens(this.browser, this.settings);
|
|
45
|
-
break;
|
|
46
|
-
case types_1.LensType.Eyes:
|
|
47
|
-
throw new Error(`Eyes lens is not supported any more. Please use Percy lens instead.`);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
throw new Error("No suitable lenses found! Check the global lens name in your 'protractor.conf.js' file");
|
|
53
|
-
}
|
|
54
|
-
return this;
|
|
55
|
-
}
|
|
56
|
-
takePhoto(label) {
|
|
57
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
if (this.browser.params["snapshotsUpload"] === "manual") {
|
|
59
|
-
if (!fs.existsSync(this.snapshotsFolderName)) {
|
|
60
|
-
fs.mkdirSync(this.snapshotsFolderName);
|
|
61
|
-
}
|
|
62
|
-
yield helpers_1.Helpers.saveScreenShot(`${this.snapshotsFolderName}/${this.cleanFileName(this.settings.currentTestName)}_${this.cleanFileName(label)}.png`);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (!this.settings.fullframe) {
|
|
66
|
-
return yield this.currentLensInstance.takeSnapshot(label);
|
|
67
|
-
}
|
|
68
|
-
if (this.settings.fullframe) {
|
|
69
|
-
return yield this.currentLensInstance.takeFullScreenSnapshot(label);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
getToolConfig() {
|
|
74
|
-
return this.currentLensInstance.toolConfig();
|
|
75
|
-
}
|
|
76
|
-
cleanFileName(name) {
|
|
77
|
-
return name.replace(/[\\\/\s]/g, "_");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.CameraEngine = CameraEngine;
|
|
81
|
-
//# sourceMappingURL=camera-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"camera-engine.js","sourceRoot":"","sources":["../../../../spec/virtual-camera/camera-engine.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAEjB,+CAAyB;AAIzB,6CAAyC;AACzC,mCAAmE;AACnE,wCAAqC;AAErC,MAAa,YAAY;IAIrB,YACY,OAA0B,EAC1B,QAAyB;QADzB,YAAO,GAAP,OAAO,CAAmB;QAC1B,aAAQ,GAAR,QAAQ,CAAiB;QAJ7B,wBAAmB,GAAW,YAAY,CAAC;QAM/C,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAEO,OAAO;QACX,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAChB,MAAM,IA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C,SAAS,EAAE,CAAC;gBAC3B,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAC9D,CAAC;YAED,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;gBAC1B,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;YACxE,CAAC;QACL,CAAC;KAAA;IAEM,aAAa;QAChB,OAAO,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC;IACjD,CAAC;IAEO,aAAa,CAAC,IAAY;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAC1C,CAAC;CACJ;AA3ED,oCA2EC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ICameraSettings, ICameraSettingsActions } from "./types";
|
|
2
|
-
export declare class CameraSettings {
|
|
3
|
-
currentSettings: ICameraSettings;
|
|
4
|
-
constructor();
|
|
5
|
-
actions: ICameraSettingsActions;
|
|
6
|
-
private fullframe;
|
|
7
|
-
private crop;
|
|
8
|
-
private responsive;
|
|
9
|
-
private defaultResponsive;
|
|
10
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CameraSettings = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
const types_1 = require("./types");
|
|
25
|
-
class CameraSettings {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.actions = {
|
|
28
|
-
fullframe: this.fullframe.bind(this),
|
|
29
|
-
crop: this.crop.bind(this),
|
|
30
|
-
responsive: this.responsive.bind(this),
|
|
31
|
-
defaultResponsive: this.defaultResponsive.bind(this),
|
|
32
|
-
};
|
|
33
|
-
this.currentSettings = Object.assign({}, types_1.CAMERA_DEFAULT_SETTINGS);
|
|
34
|
-
}
|
|
35
|
-
fullframe() {
|
|
36
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
this.currentSettings.fullframe = true;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
crop() {
|
|
41
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
this.currentSettings.fullframe = false;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
responsive(values, callback) {
|
|
46
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
this.currentSettings.responsiveWidths = [...values];
|
|
48
|
-
this.currentSettings.responsivityCallback = callback;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
defaultResponsive() {
|
|
52
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
this.currentSettings.responsiveWidths =
|
|
54
|
-
types_1.CAMERA_DEFAULT_SETTINGS.responsiveWidths;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.CameraSettings = CameraSettings;
|
|
59
|
-
//# sourceMappingURL=camera-settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"camera-settings.js","sourceRoot":"","sources":["../../../../spec/virtual-camera/camera-settings.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAEjB,mCAIiB;AAEjB,MAAa,cAAc;IAGvB;QAIO,YAAO,GAA2B;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1B,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YACtC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;SACvD,CAAC;QARE,IAAI,CAAC,eAAe,qBAAQ,+BAAuB,CAAE,CAAC;IAC1D,CAAC;IASa,SAAS;;YACnB,IAAI,CAAC,eAAe,CAAC,SAAS,GAAG,IAAI,CAAC;QAC1C,CAAC;KAAA;IAEa,IAAI;;YACd,IAAI,CAAC,eAAe,CAAC,SAAS,GAAG,KAAK,CAAC;QAC3C,CAAC;KAAA;IAEa,UAAU,CACpB,MAAqB,EACrB,QAAmB;;YAEnB,IAAI,CAAC,eAAe,CAAC,gBAAgB,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;YACpD,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,QAAQ,CAAC;QACzD,CAAC;KAAA;IAEa,iBAAiB;;YAC3B,IAAI,CAAC,eAAe,CAAC,gBAAgB;gBACjC,+BAAuB,CAAC,gBAAgB,CAAC;QACjD,CAAC;KAAA;CACJ;AAlCD,wCAkCC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CameraToggle = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
class CameraToggle {
|
|
25
|
-
constructor(cameraEngine) {
|
|
26
|
-
this.cameraEngine = cameraEngine;
|
|
27
|
-
}
|
|
28
|
-
on() {
|
|
29
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
yield this.cameraEngine.currentLensInstance.cameraON();
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
off() {
|
|
34
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
yield this.cameraEngine.currentLensInstance.cameraOFF();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.CameraToggle = CameraToggle;
|
|
40
|
-
//# sourceMappingURL=camera-toggle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"camera-toggle.js","sourceRoot":"","sources":["../../../../spec/virtual-camera/camera-toggle.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAIjB,MAAa,YAAY;IACrB,YAAoB,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAErC,EAAE;;YACX,MAAM,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAC3D,CAAC;KAAA;IAEY,GAAG;;YACZ,MAAM,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC;QAC5D,CAAC;KAAA;CACJ;AAVD,oCAUC"}
|