@nova-ui/bits 20.0.11 → 20.0.12

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.
Files changed (34) hide show
  1. package/fesm2022/nova-ui-bits.mjs +250 -38
  2. package/fesm2022/nova-ui-bits.mjs.map +1 -1
  3. package/index.d.ts +50 -13
  4. package/package.json +1 -1
  5. package/sdk/atoms-playwright/components/chips/chips.atom.js +10 -5
  6. package/sdk/atoms-playwright/components/chips/chips.atom.js.map +1 -1
  7. package/sdk/atoms-playwright/components/convenience/time-frame-bar/time-frame-bar.atom.d.ts +21 -0
  8. package/sdk/atoms-playwright/components/convenience/time-frame-bar/time-frame-bar.atom.js +68 -0
  9. package/sdk/atoms-playwright/components/convenience/time-frame-bar/time-frame-bar.atom.js.map +1 -0
  10. package/sdk/atoms-playwright/components/progress/progress.atom.d.ts +6 -0
  11. package/sdk/atoms-playwright/components/progress/progress.atom.js +17 -0
  12. package/sdk/atoms-playwright/components/progress/progress.atom.js.map +1 -1
  13. package/sdk/atoms-playwright/components/public_api.d.ts +1 -0
  14. package/sdk/atoms-playwright/components/public_api.js +1 -0
  15. package/sdk/atoms-playwright/components/public_api.js.map +1 -1
  16. package/sdk/atoms-playwright/components/spinner/spinner.atom.d.ts +1 -0
  17. package/sdk/atoms-playwright/components/spinner/spinner.atom.js +17 -0
  18. package/sdk/atoms-playwright/components/spinner/spinner.atom.js.map +1 -1
  19. package/sdk/atoms-playwright/components/time-frame-picker/quick-picker.atom.d.ts +8 -0
  20. package/sdk/atoms-playwright/components/time-frame-picker/quick-picker.atom.js +45 -0
  21. package/sdk/atoms-playwright/components/time-frame-picker/quick-picker.atom.js.map +1 -0
  22. package/sdk/atoms-playwright/components/time-frame-picker/time-frame-picker.atom.d.ts +9 -0
  23. package/sdk/atoms-playwright/components/time-frame-picker/time-frame-picker.atom.js +34 -0
  24. package/sdk/atoms-playwright/components/time-frame-picker/time-frame-picker.atom.js.map +1 -0
  25. package/sdk/atoms-playwright/setup.d.ts +1 -1
  26. package/sdk/atoms-playwright/setup.js +5 -2
  27. package/sdk/atoms-playwright/setup.js.map +1 -1
  28. package/sdk/atoms-playwright/virtual-camera/Camera.d.ts +1 -0
  29. package/sdk/atoms-playwright/virtual-camera/Camera.js +28 -0
  30. package/sdk/atoms-playwright/virtual-camera/Camera.js.map +1 -1
  31. package/sdk/atoms-playwright/virtual-camera/camera-engine.js +1 -0
  32. package/sdk/atoms-playwright/virtual-camera/camera-engine.js.map +1 -1
  33. package/sdk/atoms-playwright/virtual-camera/eyes-lens.js +11 -2
  34. package/sdk/atoms-playwright/virtual-camera/eyes-lens.js.map +1 -1
package/index.d.ts CHANGED
@@ -5010,10 +5010,14 @@ declare class SwitchComponent implements OnInit, ControlValueAccessor {
5010
5010
  ariaLabel?: string;
5011
5011
  /** Unique id for the control. */
5012
5012
  id: string;
5013
+ private switchLabel;
5013
5014
  /**
5014
5015
  * Label element id used to dynamically compute accessible name.
5015
5016
  */
5016
5017
  readonly labelId: string;
5018
+ private readonly defaultAriaLabel;
5019
+ get accessibleLabel(): string | null;
5020
+ get labelIdIfProjected(): string | null;
5017
5021
  valueChange: EventEmitter<boolean>;
5018
5022
  toggle(): void;
5019
5023
  onChange(value: any): void;
@@ -5023,6 +5027,7 @@ declare class SwitchComponent implements OnInit, ControlValueAccessor {
5023
5027
  registerOnTouched(fn: () => void): void;
5024
5028
  setDisabledState(isDisabled: boolean): void;
5025
5029
  ngOnInit(): void;
5030
+ private get hasProjectedLabel();
5026
5031
  static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, never>;
5027
5032
  static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "nui-switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], false, never>;
5028
5033
  }
@@ -5828,7 +5833,7 @@ declare class TabHeadingCustomTemplateRefDirective {
5828
5833
  }
5829
5834
 
5830
5835
  /** @ignore */
5831
- declare class TabGroupComponent implements OnDestroy, AfterViewInit {
5836
+ declare class TabGroupComponent implements OnDestroy, AfterViewInit, AfterContentInit {
5832
5837
  private el;
5833
5838
  private changeDetectorRef;
5834
5839
  /** If true tabs will be placed vertically */
@@ -5844,13 +5849,17 @@ declare class TabGroupComponent implements OnDestroy, AfterViewInit {
5844
5849
  protected _vertical: boolean;
5845
5850
  constructor(el: ElementRef, changeDetectorRef: ChangeDetectorRef);
5846
5851
  ngAfterViewInit(): void;
5852
+ ngAfterContentInit(): void;
5853
+ private setInitialActiveTab;
5847
5854
  checkTraverse(): void;
5848
5855
  addTab(tab: TabComponent): void;
5849
5856
  selectTab(selectedTab: TabComponent): void;
5857
+ onKeyDown(event: KeyboardEvent): void;
5850
5858
  allowTraverse(): boolean;
5851
5859
  traverseRight(): void;
5852
5860
  traverseLeft(): void;
5853
5861
  private isTraverseLeftAllowed;
5862
+ private findEnabledTabIndex;
5854
5863
  private isTraverseRightAllowed;
5855
5864
  private getElementSize;
5856
5865
  private getNumberFromPixels;
@@ -5865,10 +5874,10 @@ declare class TabGroupComponent implements OnDestroy, AfterViewInit {
5865
5874
  /** @ignore */
5866
5875
  declare class TabComponent {
5867
5876
  private tabGroup;
5868
- private static nextId;
5869
- /** Unique id for the tab and its panel. */
5870
- readonly tabId: string;
5871
- readonly panelId: string;
5877
+ /** Unique identifier for the tab and its panel. Can be supplied by a consumer or generated automatically. */
5878
+ tabId: string;
5879
+ get tabControlId(): string;
5880
+ get panelId(): string;
5872
5881
  /** Tab header text */
5873
5882
  heading: string;
5874
5883
  /** If true tab can not be activated */
@@ -5883,13 +5892,14 @@ declare class TabComponent {
5883
5892
  deselected: EventEmitter<TabComponent>;
5884
5893
  addClass: boolean;
5885
5894
  role: string;
5895
+ get tabIndex(): 0 | -1;
5886
5896
  get idAttr(): string;
5887
5897
  get ariaLabelledbyAttr(): string;
5888
5898
  headingRef: TemplateRef<any>;
5889
5899
  protected _active: boolean;
5890
5900
  constructor(tabGroup: TabGroupComponent);
5891
5901
  static ɵfac: i0.ɵɵFactoryDeclaration<TabComponent, never>;
5892
- static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "nui-tab", never, { "heading": { "alias": "heading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "templateRef": { "alias": "templateRef"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, { "selected": "selected"; "deselected": "deselected"; }, never, ["*"], false, never>;
5902
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabComponent, "nui-tab", never, { "tabId": { "alias": "tabId"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "templateRef": { "alias": "templateRef"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, { "selected": "selected"; "deselected": "deselected"; }, never, ["*"], false, never>;
5893
5903
  }
5894
5904
 
5895
5905
  /** Should be used to mark <ng-template> element as a template for tab heading */
@@ -5912,19 +5922,30 @@ declare class TabHeadingComponent {
5912
5922
  /** Tab active state toggle */
5913
5923
  set active(isActive: boolean);
5914
5924
  get active(): boolean;
5915
- /** Tab id */
5916
- tabId: string;
5925
+ /**
5926
+ * Identifier used to associate this tab with its consumer-owned panel.
5927
+ * Can be supplied by a consumer or generated automatically.
5928
+ */
5929
+ set tabId(tabId: string);
5930
+ get tabId(): string;
5931
+ /** ID of the panel controlled by this tab, when a consumer-owned panel exists. */
5932
+ ariaControls: string | null;
5933
+ /** Accessible name for tabs whose projected content is not sufficient. */
5934
+ ariaLabel: string | null;
5935
+ get tabControlId(): string;
5936
+ get panelId(): string;
5917
5937
  /** Event is fired when tab became active, $event:Tab equals to selected instance of Tab component */
5918
5938
  selected: EventEmitter<TabHeadingComponent>;
5919
5939
  protected _active: boolean;
5940
+ private _tabId;
5920
5941
  constructor(changeDetector: ChangeDetectorRef, elementRef: ElementRef);
5921
5942
  selectTab(): void;
5922
5943
  onKeyDown(event: KeyboardEvent): void;
5923
5944
  static ɵfac: i0.ɵɵFactoryDeclaration<TabHeadingComponent, never>;
5924
- static ɵcmp: i0.ɵɵComponentDeclaration<TabHeadingComponent, "nui-tab-heading", never, { "disabled": { "alias": "disabled"; "required": false; }; "active": { "alias": "active"; "required": false; }; "tabId": { "alias": "tabId"; "required": false; }; }, { "selected": "selected"; }, never, ["*"], false, never>;
5945
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabHeadingComponent, "nui-tab-heading", never, { "disabled": { "alias": "disabled"; "required": false; }; "active": { "alias": "active"; "required": false; }; "tabId": { "alias": "tabId"; "required": false; }; "ariaControls": { "alias": "ariaControls"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, { "selected": "selected"; }, never, ["*"], false, never>;
5925
5946
  }
5926
5947
 
5927
- declare class TabHeadingGroupComponent implements OnDestroy, AfterViewInit {
5948
+ declare class TabHeadingGroupComponent implements OnDestroy, AfterViewInit, AfterContentInit {
5928
5949
  private el;
5929
5950
  private changeDetectorRef;
5930
5951
  private ngZone;
@@ -5947,14 +5968,17 @@ declare class TabHeadingGroupComponent implements OnDestroy, AfterViewInit {
5947
5968
  private _changesSubscription;
5948
5969
  constructor(el: ElementRef, changeDetectorRef: ChangeDetectorRef, ngZone: NgZone);
5949
5970
  ngAfterViewInit(): void;
5971
+ ngAfterContentInit(): void;
5950
5972
  setActiveTab(): void;
5951
5973
  getActiveTab(): TabHeadingComponent;
5974
+ onKeyDown(event: KeyboardEvent): void;
5952
5975
  checkTraverse(): void;
5953
5976
  allowTraverse(): boolean;
5954
5977
  traverseRight(): void;
5955
5978
  traverseLeft(): void;
5956
5979
  private subscribeToSelection;
5957
5980
  private isTraverseLeftAllowed;
5981
+ private findEnabledTabIndex;
5958
5982
  private isTraverseRightAllowed;
5959
5983
  private getElementSize;
5960
5984
  private getNumberFromPixels;
@@ -6958,6 +6982,7 @@ declare class NuiDialogModule {
6958
6982
  declare class ExpanderComponent implements AfterContentInit {
6959
6983
  private cdRef;
6960
6984
  private static nextUniqueId;
6985
+ private readonly instanceId;
6961
6986
  /**
6962
6987
  * Adds "disabled" attribute to expander
6963
6988
  */
@@ -6975,16 +7000,26 @@ declare class ExpanderComponent implements AfterContentInit {
6975
7000
  */
6976
7001
  hideLeftBorder: boolean;
6977
7002
  /**
6978
- * Accessible name used when `header` is not set, so the header button and body region always have a valid label.
6979
- * Defaults to a localized fallback.
7003
+ * Accessible name of the toggle for a header without visible text, i.e. when neither
7004
+ * `header` nor projected header content exist. Visible header text always names the
7005
+ * toggle itself (WCAG 2.5.3 Label in Name). A localized default is used when empty.
6980
7006
  */
6981
7007
  ariaLabel: string;
6982
7008
  readonly defaultAriaLabel: string;
7009
+ /**
7010
+ * Exposes the expander body as a `region` landmark, labelled by the header,
7011
+ * only while the expander is open.
7012
+ * Opt-in, because several expanders on one page would otherwise flood
7013
+ * screen reader landmark navigation with near-identical regions.
7014
+ * @see https://www.w3.org/WAI/ARIA/apg/patterns/accordion/
7015
+ */
7016
+ useRegionLandmark: boolean;
6983
7017
  /**
6984
7018
  * Use this to have expander opened by default.
6985
7019
  */
6986
7020
  set open(value: boolean);
6987
7021
  get open(): boolean;
7022
+ get expanderToggleAriaLabel(): string | null;
6988
7023
  /**
6989
7024
  * Is emitted when expander is expanded/collapsed
6990
7025
  */
@@ -6993,6 +7028,8 @@ declare class ExpanderComponent implements AfterContentInit {
6993
7028
  state: "expanded" | "collapsed";
6994
7029
  isCustomHeaderContentEmpty: boolean;
6995
7030
  uniqueId: string;
7031
+ /** Unique id for the expander header. */
7032
+ readonly headerId: string;
6996
7033
  /** Unique id for the expander body. */
6997
7034
  readonly bodyId: string;
6998
7035
  private actionKeys;
@@ -7002,7 +7039,7 @@ declare class ExpanderComponent implements AfterContentInit {
7002
7039
  getIconColor(): string;
7003
7040
  onKeyDown(event: KeyboardEvent): void;
7004
7041
  static ɵfac: i0.ɵɵFactoryDeclaration<ExpanderComponent, never>;
7005
- static ɵcmp: i0.ɵɵComponentDeclaration<ExpanderComponent, "nui-expander", never, { "disabled": { "alias": "disabled"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "header": { "alias": "header"; "required": false; }; "hideLeftBorder": { "alias": "hideLeftBorder"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, never, ["[nuiExpanderHeader]", "*"], false, never>;
7042
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExpanderComponent, "nui-expander", never, { "disabled": { "alias": "disabled"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "header": { "alias": "header"; "required": false; }; "hideLeftBorder": { "alias": "hideLeftBorder"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "useRegionLandmark": { "alias": "useRegionLandmark"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, never, ["[nuiExpanderHeader]", "*"], false, never>;
7006
7043
  }
7007
7044
 
7008
7045
  /**
package/package.json CHANGED
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "schematics": "./sdk/schematics/collection.json",
69
69
  "typings": "index.d.ts",
70
- "version": "20.0.11",
70
+ "version": "20.0.12",
71
71
  "module": "fesm2022/nova-ui-bits.mjs",
72
72
  "sideEffects": false,
73
73
  "dependencies": {
@@ -1,12 +1,17 @@
1
1
  import { Atom } from "../../atom";
2
- import { Helpers } from "../../setup";
2
+ import { expect, Helpers } from "../../setup";
3
3
  export class ChipsAtom extends Atom {
4
4
  constructor() {
5
5
  super(...arguments);
6
- this.removeItem = async (index) => this.getLocator()
7
- .locator(Helpers.page.locator(`.${ChipsAtom.itemRemoveIconClass}`))
8
- .nth(index)
9
- .click();
6
+ this.removeItem = async (index) => {
7
+ const count = await this.getChipElements.count();
8
+ await this.getLocator()
9
+ .locator(Helpers.page.locator(`.${ChipsAtom.itemRemoveIconClass}`))
10
+ .nth(index)
11
+ .click();
12
+ // wait for re-render so a following index-based call targets the updated list
13
+ await expect(this.getChipElements).toHaveCount(count - 1);
14
+ };
10
15
  this.clearAll = async () => {
11
16
  await this.getLocator()
12
17
  .locator(`.${ChipsAtom.clearAllLinkClass}`)
@@ -1 +1 @@
1
- {"version":3,"file":"chips.atom.js","sourceRoot":"","sources":["../../../../../e2e/components/chips/chips.atom.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,OAAO,SAAU,SAAQ,IAAI;IAAnC;;QAuBW,eAAU,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE,CACvD,IAAI,CAAC,UAAU,EAAE;aACZ,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC;aAClE,GAAG,CAAC,KAAK,CAAC;aACV,KAAK,EAAE,CAAC;QAEV,aAAQ,GAAG,KAAK,IAAmB,EAAE;YACxC,MAAM,IAAI,CAAC,UAAU,EAAE;iBAClB,OAAO,CAAC,IAAI,SAAS,CAAC,iBAAiB,EAAE,CAAC;iBAC1C,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC;QAaK,UAAK,GAAG,KAAK,IAAmB,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;IAWxE,CAAC;aAxDiB,cAAS,GAAG,WAAW,AAAd,CAAe;aACxB,kBAAa,GAAG,kBAAkB,AAArB,CAAsB;aACnC,cAAS,GAAG,iBAAiB,AAApB,CAAqB;aAC9B,wBAAmB,GAAG,wBAAwB,AAA3B,CAA4B;aAC/C,mBAAc,GAAG,uBAAuB,AAA1B,CAA2B;aACzC,sBAAiB,GAAG,kBAAkB,AAArB,CAAsB;aACvC,yBAAoB,GAAG,+BAA+B,AAAlC,CAAmC;IAErE,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAC5B,OAAO,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,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;IAChE,CAAC;IAEM,cAAc,CAAC,KAAa;QAC/B,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3E,CAAC;IAkBM,KAAK,CAAC,yBAAyB;QAClC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE;aAC5B,OAAO,CAAC,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;aACtC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,CAAC,EAAE,CAAC;YACL,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAID,IAAW,gBAAgB;QACvB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAC5B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,oBAAoB,EAAE,CAAC,CAC7D,CAAC;IACN,CAAC;IAED,IAAW,KAAK;QACZ,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;IACnE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { Moment } from "moment/moment";
2
+ import { Atom } from "../../../atom";
3
+ import { ButtonAtom } from "../../button/button.atom";
4
+ import { PopoverAtom } from "../../popover/popover.atom";
5
+ import { QuickPickerAtom } from "../../time-frame-picker/quick-picker.atom";
6
+ import { TimeFramePickerAtom } from "../../time-frame-picker/time-frame-picker.atom";
7
+ export declare class TimeFrameBarAtom extends Atom {
8
+ static CSS_CLASS: string;
9
+ readonly prevButton: ButtonAtom;
10
+ readonly nextButton: ButtonAtom;
11
+ readonly undoButton: ButtonAtom;
12
+ readonly clearButton: ButtonAtom;
13
+ readonly popover: PopoverAtom;
14
+ quickPicker: QuickPickerAtom;
15
+ timeFramePicker: TimeFramePickerAtom;
16
+ timeFramePickerCancelButton: ButtonAtom;
17
+ timeFramePickerUseButton: ButtonAtom;
18
+ constructor(rootElement?: import("playwright-core").Locator);
19
+ quickPickPreset(presetTitle: string): Promise<void>;
20
+ pickTimeFrame(start: Moment, end: Moment): Promise<void>;
21
+ }
@@ -0,0 +1,68 @@
1
+ // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to
5
+ // deal in the Software without restriction, including without limitation the
6
+ // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ // sell copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ import { Atom } from "../../../atom";
21
+ import { ButtonAtom } from "../../button/button.atom";
22
+ import { PopoverAtom } from "../../popover/popover.atom";
23
+ import { QuickPickerAtom } from "../../time-frame-picker/quick-picker.atom";
24
+ import { TimeFramePickerAtom } from "../../time-frame-picker/time-frame-picker.atom";
25
+ import { TimepickerAtom } from "../../timepicker/timepicker.atom";
26
+ export class TimeFrameBarAtom extends Atom {
27
+ static { this.CSS_CLASS = "nui-time-frame-bar"; }
28
+ constructor(rootElement = Atom.getFromRoot(`.${TimeFrameBarAtom.CSS_CLASS}`)) {
29
+ super(rootElement);
30
+ // ButtonAtom/PopoverAtom have their own CSS selectors, so we pass the button element itself
31
+ this.prevButton = new ButtonAtom(rootElement.locator(".prev button"));
32
+ this.nextButton = new ButtonAtom(rootElement.locator(".next button"));
33
+ this.undoButton = new ButtonAtom(rootElement.locator("button.undo"));
34
+ this.clearButton = new ButtonAtom(rootElement.locator("button.clear"));
35
+ // `PopoverAtom` root should be the trigger element
36
+ this.popover = new PopoverAtom(rootElement.locator(".picker-label"));
37
+ const popoverBody = this.popover.getPopoverBody();
38
+ this.quickPicker = Atom.findIn(QuickPickerAtom, popoverBody);
39
+ this.timeFramePicker = Atom.findIn(TimeFramePickerAtom, popoverBody);
40
+ this.timeFramePickerCancelButton = new ButtonAtom(popoverBody.locator(".cancel"));
41
+ this.timeFramePickerUseButton = new ButtonAtom(popoverBody.locator(".use"));
42
+ }
43
+ async quickPickPreset(presetTitle) {
44
+ await this.popover.open();
45
+ await this.quickPicker.selectPresetByTitle(presetTitle);
46
+ await this.popover.waitForClosed();
47
+ }
48
+ // TODO: 1. Move this to TimeFramePickerAtom
49
+ // TODO: 2. Improve DatePickerAtom, TimePickerAtom and DateTimePickerAtom with easy to use `select(m: Moment)` methods
50
+ async pickTimeFrame(start, end) {
51
+ const date = "MM/DD/YYYY";
52
+ const time = TimepickerAtom.defaultFormat;
53
+ await this.popover.open();
54
+ const startDate = this.timeFramePicker.getStartDatetimePicker().datePicker;
55
+ const startTime = this.timeFramePicker.getStartDatetimePicker().timePicker;
56
+ const endDate = this.timeFramePicker.getEndDatetimePicker().datePicker;
57
+ const endTime = this.timeFramePicker.getEndDatetimePicker().timePicker;
58
+ await startDate.textbox.clearText();
59
+ await startDate.textbox.acceptText(start.format(date));
60
+ await startTime.selectTime(start.format(time));
61
+ await endDate.textbox.clearText();
62
+ await endDate.textbox.acceptText(end.format(date));
63
+ await endTime.selectTime(end.format(time));
64
+ await this.timeFramePickerUseButton.click();
65
+ await this.popover.waitForClosed();
66
+ }
67
+ }
68
+ //# sourceMappingURL=time-frame-bar.atom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-frame-bar.atom.js","sourceRoot":"","sources":["../../../../../../e2e/components/convenience/time-frame-bar/time-frame-bar.atom.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,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,MAAM,OAAO,gBAAiB,SAAQ,IAAI;aACxB,cAAS,GAAG,oBAAoB,CAAC;IAY/C,YACI,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,gBAAgB,CAAC,SAAS,EAAE,CAAC;QAEhE,KAAK,CAAC,WAAW,CAAC,CAAC;QAEnB,4FAA4F;QAC5F,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QACtE,IAA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E1C,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAE1B,MAAM,SAAS,GACX,IAAI,CAAC,eAAe,CAAC,sBAAsB,EAAE,CAAC,UAAU,CAAC;QAC7D,MAAM,SAAS,GACX,IAAI,CAAC,eAAe,CAAC,sBAAsB,EAAE,CAAC,UAAU,CAAC;QAC7D,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,oBAAoB,EAAE,CAAC,UAAU,CAAC;QACvE,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,oBAAoB,EAAE,CAAC,UAAU,CAAC;QAEvE,MAAM,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACpC,MAAM,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAEvD,MAAM,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAE/C,MAAM,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAClC,MAAM,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAEnD,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3C,MAAM,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAC;QAC5C,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACvC,CAAC"}
@@ -10,6 +10,12 @@ export declare class ProgressAtom extends Atom {
10
10
  getLabel(): Promise<string>;
11
11
  getPercent(): Promise<string>;
12
12
  getOptionalDescription(): Promise<string>;
13
+ toBeProgressBarDisplayed(): Promise<void>;
14
+ toBeIndeterminateAnimated(): Promise<void>;
15
+ /**
16
+ * @Deprecated: use ProgressAtom.toBeProgressBarDisplayed.
17
+ * see ../../ASSERTING_VALUE.md
18
+ */
13
19
  isProgressBarDisplayed(): Promise<boolean>;
14
20
  waitForDisplayed(timeout?: number): Promise<void>;
15
21
  isIndeterminate(): Promise<boolean>;
@@ -20,6 +20,7 @@
20
20
  import { expect } from "@playwright/test";
21
21
  import { Atom } from "../../atom";
22
22
  import { ButtonAtom } from "../button/button.atom";
23
+ const readStyle = async (locator, property) => locator.evaluate((el, prop) => getComputedStyle(el).getPropertyValue(prop), property);
23
24
  export class ProgressAtom extends Atom {
24
25
  static { this.CSS_CLASS = "nui-progress"; }
25
26
  get root() {
@@ -48,6 +49,22 @@ export class ProgressAtom extends Atom {
48
49
  async getOptionalDescription() {
49
50
  return await this.root.locator(".nui-progress__hint").innerText();
50
51
  }
52
+ async toBeProgressBarDisplayed() {
53
+ await expect(this.root.locator(".nui-progress__bar")).toBeVisible();
54
+ }
55
+ async toBeIndeterminateAnimated() {
56
+ const barValue = this.root.locator(".nui-progress--indeterminate .nui-progress__bar-value");
57
+ await expect(barValue).toHaveCSS("animation-name", "indeterminate-progress");
58
+ await expect(barValue).toHaveCSS("animation-play-state", "running");
59
+ const initialMarginLeft = await readStyle(barValue, "margin-left");
60
+ await expect
61
+ .poll(async () => readStyle(barValue, "margin-left"))
62
+ .not.toBe(initialMarginLeft);
63
+ }
64
+ /**
65
+ * @Deprecated: use ProgressAtom.toBeProgressBarDisplayed.
66
+ * see ../../ASSERTING_VALUE.md
67
+ */
51
68
  async isProgressBarDisplayed() {
52
69
  const bar = this.root.locator(".nui-progress__bar");
53
70
  return await bar.isVisible();
@@ -1 +1 @@
1
- {"version":3,"file":"progress.atom.js","sourceRoot":"","sources":["../../../../../e2e/components/progress/progress.atom.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,6EAA6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oBAAoB,CAAC,CAAC;QACpD,OAAO,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAO,GAAG,IAAI;QACxC,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,eAAe;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QACpD,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO,SAAS,EAAE,QAAQ,CAAC,6BAA6B,CAAC,IAAI,KAAK,CAAC;IACvE,CAAC"}
@@ -4,6 +4,7 @@ export * from "./button/button.atom";
4
4
  export * from "./checkbox/checkbox.atom";
5
5
  export * from "./checkbox-group/checkbox-group.atom";
6
6
  export * from "./chips/chips.atom";
7
+ export * from "./convenience/time-frame-bar/time-frame-bar.atom";
7
8
  export * from "./datepicker/datepicker.atom";
8
9
  export * from "./datetimepicker/datetimepicker.atom";
9
10
  export * from "./dialog/dialog.atom";
@@ -23,6 +23,7 @@ export * from "./button/button.atom";
23
23
  export * from "./checkbox/checkbox.atom";
24
24
  export * from "./checkbox-group/checkbox-group.atom";
25
25
  export * from "./chips/chips.atom";
26
+ export * from "./convenience/time-frame-bar/time-frame-bar.atom";
26
27
  export * from "./datepicker/datepicker.atom";
27
28
  export * from "./datetimepicker/datetimepicker.atom";
28
29
  export * from "./dialog/dialog.atom";
@@ -1 +1 @@
1
- {"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../../../e2e/components/public_api.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,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"public_api.js","sourceRoot":"","sources":["../../../../e2e/components/public_api.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,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sCAAsC,CAAC;AACrD,cAAc,oBAAoB,CAAC;AACnC,cAAc,kDAAkD,CAAC;AACjE,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC"}
@@ -10,5 +10,6 @@ export declare class SpinnerAtom extends Atom {
10
10
  waitForDisplayed(timeout?: number): Promise<void>;
11
11
  waitForHidden(timeout?: number): Promise<void>;
12
12
  getLabel(): Promise<string>;
13
+ toBeAnimated(): Promise<void>;
13
14
  cancel(): Promise<void>;
14
15
  }
@@ -19,6 +19,7 @@
19
19
  // THE SOFTWARE.
20
20
  import { expect } from "@playwright/test";
21
21
  import { Atom } from "../../atom";
22
+ const readStyle = async (locator, property) => locator.evaluate((el, prop) => getComputedStyle(el).getPropertyValue(prop), property);
22
23
  export class SpinnerAtom extends Atom {
23
24
  static { this.CSS_CLASS = "nui-spinner"; }
24
25
  static { this.defaultDelay = 250; }
@@ -38,6 +39,22 @@ export class SpinnerAtom extends Atom {
38
39
  async getLabel() {
39
40
  return await this.root.locator(".nui-spinner__message").innerText();
40
41
  }
42
+ async toBeAnimated() {
43
+ const circular = this.root.locator(".nui-spinner__circular");
44
+ const path = this.root.locator(".nui-spinner__path");
45
+ await expect(circular).toHaveCSS("animation-name", "rotate");
46
+ await expect(circular).toHaveCSS("animation-play-state", "running");
47
+ await expect(path).toHaveCSS("animation-name", "dash");
48
+ await expect(path).toHaveCSS("animation-play-state", "running");
49
+ const initialTransform = await readStyle(circular, "transform");
50
+ await expect
51
+ .poll(async () => readStyle(circular, "transform"))
52
+ .not.toBe(initialTransform);
53
+ const initialDashOffset = await readStyle(path, "stroke-dashoffset");
54
+ await expect
55
+ .poll(async () => readStyle(path, "stroke-dashoffset"))
56
+ .not.toBe(initialDashOffset);
57
+ }
41
58
  async cancel() {
42
59
  const cancelButton = this.root.locator("button");
43
60
  if (await cancelButton.isVisible()) {
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.atom.js","sourceRoot":"","sources":["../../../../../e2e/components/spinner/spinner.atom.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,OAAO,EAAW,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEnD,O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Y,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,MAAM,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC;YACjC,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;QAC/B,CAAC;IACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Atom } from "../../atom";
2
+ export declare class QuickPickerAtom extends Atom {
3
+ static CSS_CLASS: string;
4
+ selectPresetByTitle: (title: string) => Promise<void>;
5
+ hoverPresetByTitle: (title: string) => Promise<void>;
6
+ getSelectedPreset(): Promise<string | null>;
7
+ private getPresetByName;
8
+ }
@@ -0,0 +1,45 @@
1
+ // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to
5
+ // deal in the Software without restriction, including without limitation the
6
+ // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ // sell copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ import { Atom } from "../../atom";
21
+ export class QuickPickerAtom extends Atom {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.selectPresetByTitle = async (title) => {
25
+ await this.getPresetByName(title).click();
26
+ };
27
+ this.hoverPresetByTitle = async (title) => {
28
+ await this.getPresetByName(title).hover();
29
+ };
30
+ }
31
+ static { this.CSS_CLASS = "nui-quick-picker"; }
32
+ async getSelectedPreset() {
33
+ const selectedElement = this.getLocator().locator(".nui-quick-picker__preset--selected");
34
+ return (await selectedElement.isVisible())
35
+ ? await selectedElement.innerText()
36
+ : null;
37
+ }
38
+ getPresetByName(title) {
39
+ return this.getLocator()
40
+ .locator(".nui-quick-picker__preset")
41
+ .filter({ hasText: title })
42
+ .first();
43
+ }
44
+ }
45
+ //# sourceMappingURL=quick-picker.atom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quick-picker.atom.js","sourceRoot":"","sources":["../../../../../e2e/components/time-frame-picker/quick-picker.atom.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,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,OAAO,eAAgB,SAAQ,IAAI;IAAzC;;QAGW,wBAAmB,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;YAChE,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9C,CAAC,CAAC;QAEK,uBAAkB,GAAG,KAAK,EAAE,KAAa,EAAiB,EAAE;YAC/D,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9C,CAAC,CAAC;IAiBN,CAAC;aAzBiB,cAAS,GAAG,kBAAkB,AAArB,CAAsB;IAUtC,KAAK,CAAC,iBAAiB;QAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAC7C,qCAAqC,CACxC,CAAC;QACF,OAAO,CAAC,MAAM,eAAe,CAAC,SAAS,EAAE,CAAC;YACtC,CAAC,CAAC,MAAM,eAAe,CAAC,SAAS,EAAE;YACnC,CAAC,CAAC,IAAI,CAAC;IACf,CAAC;IAEO,eAAe,CAAC,KAAa;QACjC,OAAO,IAAI,CAAC,UAAU,EAAE;aACnB,OAAO,CAAC,2BAA2B,CAAC;aACpC,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;aAC1B,KAAK,EAAE,CAAC;IACjB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Locator } from "playwright-core";
2
+ import { Atom, IAtomClass } from "../../atom";
3
+ import { DateTimepickerAtom } from "../datetimepicker/datetimepicker.atom";
4
+ export declare class TimeFramePickerAtom extends Atom {
5
+ static CSS_CLASS: string;
6
+ static findIn<T extends Atom>(atomClass: IAtomClass<T>, parentLocator: Locator, root?: boolean): T;
7
+ getStartDatetimePicker(): DateTimepickerAtom;
8
+ getEndDatetimePicker(): DateTimepickerAtom;
9
+ }
@@ -0,0 +1,34 @@
1
+ // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to
5
+ // deal in the Software without restriction, including without limitation the
6
+ // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ // sell copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ import { Atom } from "../../atom";
21
+ import { DateTimepickerAtom } from "../datetimepicker/datetimepicker.atom";
22
+ export class TimeFramePickerAtom extends Atom {
23
+ static { this.CSS_CLASS = "nui-time-frame-picker"; }
24
+ static findIn(atomClass, parentLocator, root = true) {
25
+ return Atom.findIn(atomClass, parentLocator, root);
26
+ }
27
+ getStartDatetimePicker() {
28
+ return new DateTimepickerAtom(this.getLocator().locator(".nui-time-frame-picker__date-time_start"));
29
+ }
30
+ getEndDatetimePicker() {
31
+ return new DateTimepickerAtom(this.getLocator().locator(".nui-time-frame-picker__date-time_end"));
32
+ }
33
+ }
34
+ //# sourceMappingURL=time-frame-picker.atom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-frame-picker.atom.js","sourceRoot":"","sources":["../../../../../e2e/components/time-frame-picker/time-frame-picker.atom.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,OAAO,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,OAAO,mBAAoB,SAAQ,IAAI;aAC3B,cAAS,GAAG,uBAAuB,CAAC;IAE3C,MAAM,CAAC,MAAM,CAChB,SAAwB,EACxB,aAAsB,EACtB,IAAI,GAAG,IAAI;QAEX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAEM,sBAAsB;QACzB,OAAO,IAAI,kBAAkB,CACzB,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,yCAAyC,CAAC,CACvE,CAAC;IACN,CAAC;IAEM,oBAAoB;QACvB,OAAO,IAAI,kBAAkB,CACzB,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,uCAAuC,CAAC,CACrE,CAAC;IACN,CAAC"}
@@ -9,7 +9,7 @@ export declare enum Animations {
9
9
  TRANSITIONS_AND_TRANSFORMS = 6
10
10
  }
11
11
  interface AxeFixture {
12
- runA11yScan: (context?: string | any, disabledRules?: string[]) => Promise<void>;
12
+ runA11yScan: (context?: string | any, disabledRules?: string[], additionalTags?: string[]) => Promise<void>;
13
13
  }
14
14
  export { expect } from "@playwright/test";
15
15
  export declare const test: import("playwright/test").TestType<import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & AxeFixture, import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions>;
@@ -14,13 +14,14 @@ export var Animations;
14
14
  export { expect } from "@playwright/test";
15
15
  export const test = base.extend({
16
16
  runA11yScan: async ({ page }, use) => {
17
- await use(async (context, disabledRules = []) => {
17
+ await use(async (context, disabledRules = [], additionalTags = []) => {
18
18
  const builder = new AxeBuilder({ page }).withTags([
19
19
  "wcag2a",
20
20
  "wcag21a",
21
21
  "wcag21aa",
22
22
  "wcag22a",
23
23
  "wcag22aa",
24
+ ...additionalTags,
24
25
  ]);
25
26
  if (context) {
26
27
  const locator = typeof context === "string"
@@ -31,7 +32,9 @@ export const test = base.extend({
31
32
  }
32
33
  builder.include(locator ?? "");
33
34
  }
34
- const results = await builder.disableRules(disabledRules).analyze();
35
+ const results = await builder
36
+ .disableRules(disabledRules)
37
+ .analyze();
35
38
  expect(results.violations).toEqual([]);
36
39
  });
37
40
  },