@axinom/mosaic-e2e-ui-selectors 0.16.6-rc.2 → 0.16.6-rc.3

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.
@@ -0,0 +1,18 @@
1
+ import { TypedFilter } from './filter';
2
+ /**
3
+ * A model for a Filter component with a Searchable Options.
4
+ */
5
+ export declare class SearcheableOptionsFilter extends TypedFilter {
6
+ /** @inheritdoc */
7
+ protected get filterTypeValidator(): string;
8
+ /**
9
+ * This method performs actions:
10
+ * - Verify the filter type
11
+ * - Activate the filter
12
+ * - Wait for options to load
13
+ * - Type the option
14
+ * - Find a filter option by value, and select it
15
+ */
16
+ setValue(value: string): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=searcheable-options-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searcheable-options-filter.d.ts","sourceRoot":"","sources":["../../../src/component-models/filters/searcheable-options-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,WAAW;IACvD,kBAAkB;IAClB,cAAuB,mBAAmB,IAAI,MAAM,CAEnD;IAED;;;;;;;OAOG;IACG,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAe7C"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearcheableOptionsFilter = void 0;
4
+ const filter_1 = require("./filter");
5
+ /**
6
+ * A model for a Filter component with a Searchable Options.
7
+ */
8
+ class SearcheableOptionsFilter extends filter_1.TypedFilter {
9
+ /** @inheritdoc */
10
+ get filterTypeValidator() {
11
+ return '[@data-test-type="SearcheableOptions"]';
12
+ }
13
+ /**
14
+ * This method performs actions:
15
+ * - Verify the filter type
16
+ * - Activate the filter
17
+ * - Wait for options to load
18
+ * - Type the option
19
+ * - Find a filter option by value, and select it
20
+ */
21
+ async setValue(value) {
22
+ await this.verifyFilterType();
23
+ await this.activate();
24
+ await this.getLocator(`//*[@role="radiogroup"]`).waitFor({
25
+ state: 'visible',
26
+ });
27
+ const input = this.getLocator('//input');
28
+ await input.fill(value);
29
+ const option = this.getLocator(`//*[@data-test-value="${value.toString()}"]`);
30
+ await option.waitFor({ state: 'visible' });
31
+ await option.click();
32
+ }
33
+ }
34
+ exports.SearcheableOptionsFilter = SearcheableOptionsFilter;
35
+ //# sourceMappingURL=searcheable-options-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"searcheable-options-filter.js","sourceRoot":"","sources":["../../../src/component-models/filters/searcheable-options-filter.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AAEvC;;GAEG;AACH,MAAa,wBAAyB,SAAQ,oBAAW;IACvD,kBAAkB;IAClB,IAAuB,mBAAmB;QACxC,OAAO,wCAAwC,CAAC;IAClD,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,CAAC,KAAa;QAC1B,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC9B,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC;YACvD,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QACzC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAC5B,yBAAyB,KAAK,CAAC,QAAQ,EAAE,IAAI,CAC9C,CAAC;QACF,MAAM,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3C,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF;AA7BD,4DA6BC"}
@@ -5,6 +5,7 @@ import { Filter, TypedFilter } from './filter';
5
5
  import { FreeTextFilter } from './free-text-filter';
6
6
  import { NumericFilter } from './numeric-filter';
7
7
  import { OptionsFilter } from './options-filter';
8
+ import { SearcheableOptionsFilter } from './searcheable-options-filter';
8
9
  /** Interface for a filter constructor */
9
10
  export interface FilterConstructor<TFilter> {
10
11
  new (parent: Page | FrameLocator, xpath: string): TFilter;
@@ -25,5 +26,7 @@ export declare class UntypedFilter extends Filter {
25
26
  asNumericFilter: () => NumericFilter;
26
27
  /** This method applies an OptionsFilter model to this filter. */
27
28
  asOptionsFilter: () => OptionsFilter;
29
+ /** This method applies a SearcheableOptionsFilter model to this filter. */
30
+ asSearcheableOptionsFilter: () => SearcheableOptionsFilter;
28
31
  }
29
32
  //# sourceMappingURL=untyped-filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"untyped-filter.d.ts","sourceRoot":"","sources":["../../../src/component-models/filters/untyped-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,yCAAyC;AACzC,MAAM,WAAW,iBAAiB,CAAC,OAAO;IACxC,KAAK,MAAM,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3D;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,kDAAkD;IAClD,EAAE,6EAE4C;IAE9C,6DAA6D;IAC7D,YAAY,QAAO,UAAU,CAAwB;IAErD,iEAAiE;IACjE,gBAAgB,QAAO,cAAc,CAA4B;IAEjE,iEAAiE;IACjE,gBAAgB,QAAO,cAAc,CAA4B;IAEjE,gEAAgE;IAChE,eAAe,QAAO,aAAa,CAA2B;IAE9D,iEAAiE;IACjE,eAAe,QAAO,aAAa,CAA2B;CAC/D"}
1
+ {"version":3,"file":"untyped-filter.d.ts","sourceRoot":"","sources":["../../../src/component-models/filters/untyped-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,yCAAyC;AACzC,MAAM,WAAW,iBAAiB,CAAC,OAAO;IACxC,KAAK,MAAM,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3D;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,kDAAkD;IAClD,EAAE,6EAE4C;IAE9C,6DAA6D;IAC7D,YAAY,QAAO,UAAU,CAAwB;IAErD,iEAAiE;IACjE,gBAAgB,QAAO,cAAc,CAA4B;IAEjE,iEAAiE;IACjE,gBAAgB,QAAO,cAAc,CAA4B;IAEjE,gEAAgE;IAChE,eAAe,QAAO,aAAa,CAA2B;IAE9D,iEAAiE;IACjE,eAAe,QAAO,aAAa,CAA2B;IAE9D,2EAA2E;IAC3E,0BAA0B,QAAO,wBAAwB,CACrB;CACrC"}
@@ -7,6 +7,7 @@ const filter_1 = require("./filter");
7
7
  const free_text_filter_1 = require("./free-text-filter");
8
8
  const numeric_filter_1 = require("./numeric-filter");
9
9
  const options_filter_1 = require("./options-filter");
10
+ const searcheable_options_filter_1 = require("./searcheable-options-filter");
10
11
  /**
11
12
  * A model for a Filter component with methods to apply a model of a specific filter type.
12
13
  */
@@ -25,6 +26,8 @@ class UntypedFilter extends filter_1.Filter {
25
26
  this.asNumericFilter = () => this.as(numeric_filter_1.NumericFilter);
26
27
  /** This method applies an OptionsFilter model to this filter. */
27
28
  this.asOptionsFilter = () => this.as(options_filter_1.OptionsFilter);
29
+ /** This method applies a SearcheableOptionsFilter model to this filter. */
30
+ this.asSearcheableOptionsFilter = () => this.as(searcheable_options_filter_1.SearcheableOptionsFilter);
28
31
  }
29
32
  }
30
33
  exports.UntypedFilter = UntypedFilter;
@@ -1 +1 @@
1
- {"version":3,"file":"untyped-filter.js","sourceRoot":"","sources":["../../../src/component-models/filters/untyped-filter.ts"],"names":[],"mappings":";;;AACA,+CAA2C;AAC3C,yDAAoD;AACpD,qCAA+C;AAC/C,yDAAoD;AACpD,qDAAiD;AACjD,qDAAiD;AAOjD;;GAEG;AACH,MAAa,aAAc,SAAQ,eAAM;IAAzC;;QACE,kDAAkD;QAClD,OAAE,GAAG,CACH,IAAgC,EACvB,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAE9C,6DAA6D;QAC7D,iBAAY,GAAG,GAAe,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC,CAAC;QAErD,iEAAiE;QACjE,qBAAgB,GAAG,GAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,iCAAc,CAAC,CAAC;QAEjE,iEAAiE;QACjE,qBAAgB,GAAG,GAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,iCAAc,CAAC,CAAC;QAEjE,gEAAgE;QAChE,oBAAe,GAAG,GAAkB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC,CAAC;QAE9D,iEAAiE;QACjE,oBAAe,GAAG,GAAkB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC,CAAC;IAChE,CAAC;CAAA;AApBD,sCAoBC"}
1
+ {"version":3,"file":"untyped-filter.js","sourceRoot":"","sources":["../../../src/component-models/filters/untyped-filter.ts"],"names":[],"mappings":";;;AACA,+CAA2C;AAC3C,yDAAoD;AACpD,qCAA+C;AAC/C,yDAAoD;AACpD,qDAAiD;AACjD,qDAAiD;AACjD,6EAAwE;AAOxE;;GAEG;AACH,MAAa,aAAc,SAAQ,eAAM;IAAzC;;QACE,kDAAkD;QAClD,OAAE,GAAG,CACH,IAAgC,EACvB,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAE9C,6DAA6D;QAC7D,iBAAY,GAAG,GAAe,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,wBAAU,CAAC,CAAC;QAErD,iEAAiE;QACjE,qBAAgB,GAAG,GAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,iCAAc,CAAC,CAAC;QAEjE,iEAAiE;QACjE,qBAAgB,GAAG,GAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,iCAAc,CAAC,CAAC;QAEjE,gEAAgE;QAChE,oBAAe,GAAG,GAAkB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC,CAAC;QAE9D,iEAAiE;QACjE,oBAAe,GAAG,GAAkB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC,CAAC;QAE9D,2EAA2E;QAC3E,+BAA0B,GAAG,GAA6B,EAAE,CAC1D,IAAI,CAAC,EAAE,CAAC,qDAAwB,CAAC,CAAC;IACtC,CAAC;CAAA;AAxBD,sCAwBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-e2e-ui-selectors",
3
- "version": "0.16.6-rc.2",
3
+ "version": "0.16.6-rc.3",
4
4
  "description": "Component models for testing Axinom Mosaic applications with Playwright.",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "e94ea31ebd141f0112014ce25d130b2e10930bbd"
36
+ "gitHead": "b4b40d6d2c1379b90558605eb3d53869d6c5388a"
37
37
  }
@@ -0,0 +1,35 @@
1
+ import { TypedFilter } from './filter';
2
+
3
+ /**
4
+ * A model for a Filter component with a Searchable Options.
5
+ */
6
+ export class SearcheableOptionsFilter extends TypedFilter {
7
+ /** @inheritdoc */
8
+ protected override get filterTypeValidator(): string {
9
+ return '[@data-test-type="SearcheableOptions"]';
10
+ }
11
+
12
+ /**
13
+ * This method performs actions:
14
+ * - Verify the filter type
15
+ * - Activate the filter
16
+ * - Wait for options to load
17
+ * - Type the option
18
+ * - Find a filter option by value, and select it
19
+ */
20
+ async setValue(value: string): Promise<void> {
21
+ await this.verifyFilterType();
22
+ await this.activate();
23
+ await this.getLocator(`//*[@role="radiogroup"]`).waitFor({
24
+ state: 'visible',
25
+ });
26
+
27
+ const input = this.getLocator('//input');
28
+ await input.fill(value);
29
+ const option = this.getLocator(
30
+ `//*[@data-test-value="${value.toString()}"]`,
31
+ );
32
+ await option.waitFor({ state: 'visible' });
33
+ await option.click();
34
+ }
35
+ }
@@ -5,6 +5,7 @@ import { Filter, TypedFilter } from './filter';
5
5
  import { FreeTextFilter } from './free-text-filter';
6
6
  import { NumericFilter } from './numeric-filter';
7
7
  import { OptionsFilter } from './options-filter';
8
+ import { SearcheableOptionsFilter } from './searcheable-options-filter';
8
9
 
9
10
  /** Interface for a filter constructor */
10
11
  export interface FilterConstructor<TFilter> {
@@ -34,4 +35,8 @@ export class UntypedFilter extends Filter {
34
35
 
35
36
  /** This method applies an OptionsFilter model to this filter. */
36
37
  asOptionsFilter = (): OptionsFilter => this.as(OptionsFilter);
38
+
39
+ /** This method applies a SearcheableOptionsFilter model to this filter. */
40
+ asSearcheableOptionsFilter = (): SearcheableOptionsFilter =>
41
+ this.as(SearcheableOptionsFilter);
37
42
  }