@o3r/testing 11.3.0-prerelease.4 → 11.3.0-prerelease.40

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 (58) hide show
  1. package/core/page-fixture.js +1 -1
  2. package/core/page-fixture.js.map +1 -1
  3. package/core/protractor/angular-materials/autocomplete-material.d.ts +1 -0
  4. package/core/protractor/angular-materials/autocomplete-material.d.ts.map +1 -1
  5. package/core/protractor/angular-materials/autocomplete-material.js +1 -0
  6. package/core/protractor/angular-materials/autocomplete-material.js.map +1 -1
  7. package/core/protractor/angular-materials/select-material.d.ts +1 -0
  8. package/core/protractor/angular-materials/select-material.d.ts.map +1 -1
  9. package/core/protractor/angular-materials/select-material.js +1 -0
  10. package/core/protractor/angular-materials/select-material.js.map +1 -1
  11. package/core/protractor/component-fixture.d.ts +4 -0
  12. package/core/protractor/component-fixture.d.ts.map +1 -1
  13. package/core/protractor/component-fixture.js +1 -0
  14. package/core/protractor/component-fixture.js.map +1 -1
  15. package/core/protractor/element.d.ts +2 -0
  16. package/core/protractor/element.d.ts.map +1 -1
  17. package/core/protractor/element.js +1 -0
  18. package/core/protractor/element.js.map +1 -1
  19. package/core/protractor/elements/checkbox-element.d.ts +1 -0
  20. package/core/protractor/elements/checkbox-element.d.ts.map +1 -1
  21. package/core/protractor/elements/checkbox-element.js +1 -0
  22. package/core/protractor/elements/checkbox-element.js.map +1 -1
  23. package/core/protractor/elements/radio-element.d.ts +1 -0
  24. package/core/protractor/elements/radio-element.d.ts.map +1 -1
  25. package/core/protractor/elements/radio-element.js +1 -0
  26. package/core/protractor/elements/radio-element.js.map +1 -1
  27. package/core/protractor/elements/select-element.d.ts +1 -0
  28. package/core/protractor/elements/select-element.d.ts.map +1 -1
  29. package/core/protractor/elements/select-element.js +1 -0
  30. package/core/protractor/elements/select-element.js.map +1 -1
  31. package/core/protractor/group.d.ts +2 -0
  32. package/core/protractor/group.d.ts.map +1 -1
  33. package/core/protractor/group.js +1 -0
  34. package/core/protractor/group.js.map +1 -1
  35. package/core/protractor/groups/radio-group.d.ts +1 -0
  36. package/core/protractor/groups/radio-group.d.ts.map +1 -1
  37. package/core/protractor/groups/radio-group.js +1 -0
  38. package/core/protractor/groups/radio-group.js.map +1 -1
  39. package/core/protractor/page-fixture.d.ts +1 -0
  40. package/core/protractor/page-fixture.d.ts.map +1 -1
  41. package/core/protractor/page-fixture.js +1 -0
  42. package/core/protractor/page-fixture.js.map +1 -1
  43. package/core/protractor/utils.d.ts +1 -0
  44. package/core/protractor/utils.d.ts.map +1 -1
  45. package/core/protractor/utils.js +1 -0
  46. package/core/protractor/utils.js.map +1 -1
  47. package/package.json +12 -12
  48. package/tools/protractor/fetch-manager/utils.d.ts +3 -0
  49. package/tools/protractor/fetch-manager/utils.d.ts.map +1 -1
  50. package/tools/protractor/fetch-manager/utils.js +3 -0
  51. package/tools/protractor/fetch-manager/utils.js.map +1 -1
  52. package/tools/protractor/post-message-interceptor/core.d.ts +7 -1
  53. package/tools/protractor/post-message-interceptor/core.d.ts.map +1 -1
  54. package/tools/protractor/post-message-interceptor/core.js.map +1 -1
  55. package/tools/protractor/post-message-interceptor/post-message-interceptor.d.ts +1 -0
  56. package/tools/protractor/post-message-interceptor/post-message-interceptor.d.ts.map +1 -1
  57. package/tools/protractor/post-message-interceptor/post-message-interceptor.js +1 -0
  58. package/tools/protractor/post-message-interceptor/post-message-interceptor.js.map +1 -1
@@ -19,7 +19,7 @@ var O3rPageFixture = /** @class */ (function (_super) {
19
19
  return _super.call(this) || this;
20
20
  }
21
21
  O3rPageFixture.prototype.getTitle = function () {
22
- throw new index_1.TranspilationPurposeOnlyError('Should target Protractor implementation');
22
+ throw new index_1.TranspilationPurposeOnlyError('Should target Playwright implementation');
23
23
  };
24
24
  return O3rPageFixture;
25
25
  }(component_fixture_1.O3rComponentFixture));
@@ -1 +1 @@
1
- {"version":3,"file":"page-fixture.js","sourceRoot":"","sources":["../../src/core/page-fixture.ts"],"names":[],"mappings":";;;;AAAA,yCAAgE;AAChE,yDAAmF;AAanF;;;GAGG;AACH;IAAuE,0CAAsB;IAC3F;;;;OAIG;IACH,wBAAY,YAAgB;QAC1B,OAAA,MAAK,WAAE,SAAC;IACV,CAAC;IAEM,iCAAQ,GAAf;QACE,MAAM,IAAI,qCAA6B,CAAC,yCAAyC,CAAC,CAAC;IACrF,CAAC;IACH,qBAAC;AAAD,CAAC,AAbD,CAAuE,uCAAmB,GAazF;AAbY,wCAAc","sourcesContent":["import { TranspilationPurposeOnlyError } from '../errors/index';\nimport { ComponentFixtureProfile, O3rComponentFixture } from './component-fixture';\nimport { ElementProfile, O3rElement } from './element';\n\n/**\n * Interface to describe a page fixture.\n */\nexport interface PageFixtureProfile<V extends ElementProfile> extends ComponentFixtureProfile<V> {\n /**\n * Returns the title of the page\n */\n getTitle(): Promise<string>;\n}\n\n/**\n * Mock for page fixture class.\n * This class is used for fixture compilation purpose.\n */\nexport class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {\n /**\n * Root element of this fixture. Optional in a Protractor.\n * All further queries will be applied to the element tree if any, otherwise they will be applied to the whole DOM.\n * @param _rootElement\n */\n constructor(_rootElement?: V) {\n super();\n }\n\n public getTitle(): Promise<string> {\n throw new TranspilationPurposeOnlyError('Should target Protractor implementation');\n }\n}\n"]}
1
+ {"version":3,"file":"page-fixture.js","sourceRoot":"","sources":["../../src/core/page-fixture.ts"],"names":[],"mappings":";;;;AAAA,yCAAgE;AAChE,yDAAmF;AAanF;;;GAGG;AACH;IAAuE,0CAAsB;IAC3F;;;;OAIG;IACH,wBAAY,YAAgB;QAC1B,OAAA,MAAK,WAAE,SAAC;IACV,CAAC;IAEM,iCAAQ,GAAf;QACE,MAAM,IAAI,qCAA6B,CAAC,yCAAyC,CAAC,CAAC;IACrF,CAAC;IACH,qBAAC;AAAD,CAAC,AAbD,CAAuE,uCAAmB,GAazF;AAbY,wCAAc","sourcesContent":["import { TranspilationPurposeOnlyError } from '../errors/index';\nimport { ComponentFixtureProfile, O3rComponentFixture } from './component-fixture';\nimport { ElementProfile, O3rElement } from './element';\n\n/**\n * Interface to describe a page fixture.\n */\nexport interface PageFixtureProfile<V extends ElementProfile> extends ComponentFixtureProfile<V> {\n /**\n * Returns the title of the page\n */\n getTitle(): Promise<string>;\n}\n\n/**\n * Mock for page fixture class.\n * This class is used for fixture compilation purpose.\n */\nexport class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {\n /**\n * Root element of this fixture. Optional in a Protractor.\n * All further queries will be applied to the element tree if any, otherwise they will be applied to the whole DOM.\n * @param _rootElement\n */\n constructor(_rootElement?: V) {\n super();\n }\n\n public getTitle(): Promise<string> {\n throw new TranspilationPurposeOnlyError('Should target Playwright implementation');\n }\n}\n"]}
@@ -4,6 +4,7 @@ import { O3rElement } from '../element';
4
4
  export { SelectElementProfile } from '../../elements';
5
5
  /**
6
6
  * Implementation dedicated to Protractor.
7
+ * @deprecated Will be removed in v13, please use Playwright instead
7
8
  */
8
9
  export declare class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {
9
10
  constructor(sourceElement: ElementFinder | O3rElement);
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-material.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/autocomplete-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,UAAW,YAAW,sBAAsB;gBACnE,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAM5D"}
1
+ {"version":3,"file":"autocomplete-material.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/autocomplete-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,sBAAsB,EAAC,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,UAAW,YAAW,sBAAsB;gBACnE,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAM5D"}
@@ -6,6 +6,7 @@ var protractor_1 = require("protractor");
6
6
  var element_1 = require("../element");
7
7
  /**
8
8
  * Implementation dedicated to Protractor.
9
+ * @deprecated Will be removed in v13, please use Playwright instead
9
10
  */
10
11
  var MatAutocomplete = /** @class */ (function (_super) {
11
12
  tslib_1.__extends(MatAutocomplete, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-material.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/autocomplete-material.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AAEtD,sCAAsC;AAItC;;GAEG;AACH;IAAqC,2CAAU;IAC7C,yBAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,uCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA;;wBAA1B,SAA0B,CAAC;wBAC3B,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,SAAS,GAAG,IAAA,oBAAO,EAAC,eAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC;wBAC7D,sBAAO,IAAI,oBAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KAC1C;IACH,sBAAC;AAAD,CAAC,AAZD,CAAqC,oBAAU,GAY9C;AAZY,0CAAe","sourcesContent":["import {By, element, ElementFinder} from 'protractor';\nimport {MatAutocompleteProfile} from '../../angular-materials';\nimport {O3rElement} from '../element';\n\nexport {SelectElementProfile} from '../../elements';\n\n/**\n * Implementation dedicated to Protractor.\n */\nexport class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.setValue(value);\n await this.click();\n const matOption = element(By.css('.mat-option, mat-option'));\n return new O3rElement(matOption).click();\n }\n}\n"]}
1
+ {"version":3,"file":"autocomplete-material.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/autocomplete-material.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AAEtD,sCAAsC;AAItC;;;GAGG;AACH;IAAqC,2CAAU;IAC7C,yBAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,uCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA;;wBAA1B,SAA0B,CAAC;wBAC3B,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,SAAS,GAAG,IAAA,oBAAO,EAAC,eAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC;wBAC7D,sBAAO,IAAI,oBAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KAC1C;IACH,sBAAC;AAAD,CAAC,AAZD,CAAqC,oBAAU,GAY9C;AAZY,0CAAe","sourcesContent":["import {By, element, ElementFinder} from 'protractor';\nimport {MatAutocompleteProfile} from '../../angular-materials';\nimport {O3rElement} from '../element';\n\nexport {SelectElementProfile} from '../../elements';\n\n/**\n * Implementation dedicated to Protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.setValue(value);\n await this.click();\n const matOption = element(By.css('.mat-option, mat-option'));\n return new O3rElement(matOption).click();\n }\n}\n"]}
@@ -4,6 +4,7 @@ import { O3rElement } from '../element';
4
4
  export { SelectElementProfile } from '../../elements';
5
5
  /**
6
6
  * Implementation dedicated to Protractor.
7
+ * @deprecated Will be removed in v13, please use Playwright instead
7
8
  */
8
9
  export declare class MatSelect extends O3rElement implements MatSelectProfile {
9
10
  constructor(sourceElement: ElementFinder | O3rElement);
@@ -1 +1 @@
1
- {"version":3,"file":"select-material.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/select-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD;;GAEG;AACH,qBAAa,SAAU,SAAQ,UAAW,YAAW,gBAAgB;gBACvD,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAY3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAe3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAe3D,kBAAkB;IACX,QAAQ;CAIhB"}
1
+ {"version":3,"file":"select-material.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/select-material.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,SAAU,SAAQ,UAAW,YAAW,gBAAgB;gBACvD,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAY3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAe3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAe3D,kBAAkB;IACX,QAAQ;CAIhB"}
@@ -6,6 +6,7 @@ var protractor_1 = require("protractor");
6
6
  var element_1 = require("../element");
7
7
  /**
8
8
  * Implementation dedicated to Protractor.
9
+ * @deprecated Will be removed in v13, please use Playwright instead
9
10
  */
10
11
  var MatSelect = /** @class */ (function (_super) {
11
12
  tslib_1.__extends(MatSelect, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"select-material.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/select-material.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AAEtD,sCAAsC;AAGtC;;GAEG;AACH;IAA+B,qCAAU;IACvC,mBAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,iCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBA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;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBAEc,qBAAM,oBAAO,CAAC,GAAG,CAAC,eAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,EAAE,EAAA;;wBAAtF,OAAO,GAAoB,SAA2D;8BAEnE,EAAP,mBAAO;;;6BAAP,CAAA,qBAAO,CAAA;wBAAd,GAAG;wBACN,MAAM,GAAG,IAAI,oBAAU,CAAC,GAAG,CAAC,CAAC;wBAC/B,qBAAM,MAAM,CAAC,OAAO,EAAE,EAAA;;wBAA1B,IAAI,CAAA,SAAsB,MAAK,KAAK,EAAE,CAAC;4BACrC,sBAAO,MAAM,CAAC,KAAK,EAAE,EAAC;wBACxB,CAAC;;;wBAJe,IAAO,CAAA;;4BAOzB,sBAAO,OAAO,CAAC,MAAM,CAAC,4BAAqB,KAAK,kCAA+B,CAAC,EAAC;;;;KAClF;IAED,kBAAkB;IACX,4BAAQ,GAAf;QACE,OAAO,CAAC,IAAI,CAAC,mGAAmG,CAAC,CAAC;QAClH,OAAO,gBAAK,CAAC,QAAQ,WAAE,CAAC;IAC1B,CAAC;IACH,gBAAC;AAAD,CAAC,AAvDD,CAA+B,oBAAU,GAuDxC;AAvDY,8BAAS","sourcesContent":["import {By, element, ElementFinder} from 'protractor';\nimport {MatSelectProfile} from '../../angular-materials';\nimport {O3rElement} from '../element';\nexport {SelectElementProfile} from '../../elements';\n\n/**\n * Implementation dedicated to Protractor.\n */\nexport class MatSelect extends O3rElement implements MatSelectProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByIndex(index: number, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n if (typeof options[index] !== 'undefined') {\n const option = new O3rElement(options[index]);\n return option.click();\n } else {\n return Promise.reject(`Option with index ${index} not found in select element.`);\n }\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n\n for (const opt of options) {\n const option = new O3rElement(opt);\n if (await option.getAttribute('ng-reflect-value') === value) {\n return option.click();\n }\n }\n\n return Promise.reject(`Option with value ${value} not found in select element.`);\n }\n\n /** @inheritdoc */\n public async selectByLabel(label: string, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n\n for (const opt of options) {\n const option = new O3rElement(opt);\n if (await option.getText() === label) {\n return option.click();\n }\n }\n\n return Promise.reject(`Option with label ${label} not found in select element.`);\n }\n\n /** @inheritDoc */\n public getValue() {\n console.warn('Usage of \"getValue\" is not recommended on Material Select elements. Use \"getPlainText()\" instead.');\n return super.getValue();\n }\n}\n"]}
1
+ {"version":3,"file":"select-material.js","sourceRoot":"","sources":["../../../../src/core/protractor/angular-materials/select-material.ts"],"names":[],"mappings":";;;;AAAA,yCAAsD;AAEtD,sCAAsC;AAGtC;;;GAGG;AACH;IAA+B,qCAAU;IACvC,mBAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,iCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBAEc,qBAAM,oBAAO,CAAC,GAAG,CAAC,eAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,EAAE,EAAA;;wBAAtF,OAAO,GAAoB,SAA2D;wBAC5F,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,WAAW,EAAE,CAAC;4BACpC,MAAM,GAAG,IAAI,oBAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC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,qBAAM,MAAM,CAAC,OAAO,EAAE,EAAA;;wBAA1B,IAAI,CAAA,SAAsB,MAAK,KAAK,EAAE,CAAC;4BACrC,sBAAO,MAAM,CAAC,KAAK,EAAE,EAAC;wBACxB,CAAC;;;wBAJe,IAAO,CAAA;;4BAOzB,sBAAO,OAAO,CAAC,MAAM,CAAC,4BAAqB,KAAK,kCAA+B,CAAC,EAAC;;;;KAClF;IAED,kBAAkB;IACX,4BAAQ,GAAf;QACE,OAAO,CAAC,IAAI,CAAC,mGAAmG,CAAC,CAAC;QAClH,OAAO,gBAAK,CAAC,QAAQ,WAAE,CAAC;IAC1B,CAAC;IACH,gBAAC;AAAD,CAAC,AAvDD,CAA+B,oBAAU,GAuDxC;AAvDY,8BAAS","sourcesContent":["import {By, element, ElementFinder} from 'protractor';\nimport {MatSelectProfile} from '../../angular-materials';\nimport {O3rElement} from '../element';\nexport {SelectElementProfile} from '../../elements';\n\n/**\n * Implementation dedicated to Protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class MatSelect extends O3rElement implements MatSelectProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByIndex(index: number, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n if (typeof options[index] !== 'undefined') {\n const option = new O3rElement(options[index]);\n return option.click();\n } else {\n return Promise.reject(`Option with index ${index} not found in select element.`);\n }\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n\n for (const opt of options) {\n const option = new O3rElement(opt);\n if (await option.getAttribute('ng-reflect-value') === value) {\n return option.click();\n }\n }\n\n return Promise.reject(`Option with value ${value} not found in select element.`);\n }\n\n /** @inheritdoc */\n public async selectByLabel(label: string, _timeout?: number) {\n await this.click();\n // eslint-disable-next-line no-underscore-dangle\n const options: ElementFinder[] = await element.all(By.css('mat-option')).asElementFinders_();\n\n for (const opt of options) {\n const option = new O3rElement(opt);\n if (await option.getText() === label) {\n return option.click();\n }\n }\n\n return Promise.reject(`Option with label ${label} not found in select element.`);\n }\n\n /** @inheritDoc */\n public getValue() {\n console.warn('Usage of \"getValue\" is not recommended on Material Select elements. Use \"getPlainText()\" instead.');\n return super.getValue();\n }\n}\n"]}
@@ -1,9 +1,13 @@
1
1
  import type { ComponentFixtureProfile } from '../component-fixture';
2
2
  import { O3rElement, O3rElementConstructor } from './element';
3
3
  import { O3rGroup, O3rGroupConstructor } from './group';
4
+ /**
5
+ * @deprecated Will be removed in v13, please use Playwright instead
6
+ */
4
7
  export type { ComponentFixtureProfile, Constructable, FixtureWithCustom } from '../component-fixture';
5
8
  /**
6
9
  * Implementation of the fixture dedicated to protractor, hence using the webdriver to interact with the dom.
10
+ * @deprecated Will be removed in v13, please use Playwright instead
7
11
  */
8
12
  export declare class O3rComponentFixture<V extends O3rElement = O3rElement> implements ComponentFixtureProfile<V> {
9
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"component-fixture.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/component-fixture.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGxD,YAAY,EAAE,uBAAuB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEtG;;GAEG;AACH,qBAAa,mBAAmB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,CAAE,YAAW,uBAAuB,CAAC,CAAC,CAAC;IACvG;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAE1B;;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EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAC7I,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAyB9L,kBAAkB;IACX,UAAU;IAIjB,kBAAkB;IACX,gBAAgB,IAAI,OAAO,CAAC;QAAC,CAAC,aAAa,EAAE,MAAM,GAAG,uBAAuB,EAAE,CAAA;KAAC,CAAC;IAIxF,kBAAkB;IACL,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAIpF"}
@@ -10,6 +10,7 @@ var element_1 = require("./element");
10
10
  var utils_1 = require("./utils");
11
11
  /**
12
12
  * Implementation of the fixture dedicated to protractor, hence using the webdriver to interact with the dom.
13
+ * @deprecated Will be removed in v13, please use Playwright instead
13
14
  */
14
15
  var O3rComponentFixture = /** @class */ (function () {
15
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"component-fixture.js","sourceRoot":"","sources":["../../../src/core/protractor/component-fixture.ts"],"names":[],"mappings":";;;;AAAA,4BAA4B;AAC5B,yCAAiE;AACjE,4CAAuD;AAGvD,sCAAyC;AACzC,qCAA8D;AAE9D,iCAAyC;AAIzC;;GAEG;AACH;IAME;;;;OAIG;IACH,6BAAY,WAAe;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACO,qDAAuB,GAAjC,UAAwD,MAAU,EAAE,QAAiB;QACnF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAA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OAAO,CAAC,OAAO,CAAC,EAAC,KAAK,EAAE,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC;IAC1C,CAAC;IAED,kBAAkB;IACL,6CAAe,GAA5B,UAA6B,QAAgB,EAAE,QAAiB;;;;;;wBACxD,aAAa,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;wBAChE,qBAAM,CAAC,aAAa,IAAI,oBAAO,CAAC,CAAC,gBAAgB,CAAC,eAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAA;4BAA5E,sBAAO,CAAC,CAAC,SAAmE,CAAC,EAAC;;;;KAC/E;IACH,0BAAC;AAAD,CAAC,AAjND,IAiNC;AAjNY,kDAAmB","sourcesContent":["/* eslint-disable new-cap */\nimport { browser, By, element, ElementFinder } from 'protractor';\nimport { FixtureUsageError } from '../../errors/index';\n\nimport type { ComponentFixtureProfile } from '../component-fixture';\nimport { withTimeout } from '../helpers';\nimport { O3rElement, O3rElementConstructor } from './element';\nimport { O3rGroup, O3rGroupConstructor } from './group';\nimport { convertPromise } from './utils';\n\nexport type { ComponentFixtureProfile, Constructable, FixtureWithCustom } from '../component-fixture';\n\n/**\n * Implementation of the fixture dedicated to protractor, hence using the webdriver to interact with the dom.\n */\nexport class O3rComponentFixture<V extends O3rElement = O3rElement> implements ComponentFixtureProfile<V> {\n /**\n * DOM element linked to the fixture.\n */\n protected rootElement?: V;\n\n /**\n * Root element of this fixture. Optional in a Protractor.\n * All further queries will be applied to the element tree if any, otherwise they will be applied to the whole DOM.\n * @param rootElement\n */\n constructor(rootElement?: V) {\n this.rootElement = rootElement;\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param elemnt ElementProfile to test\n * @param _timeout specific timeout that will throw when reach\n */\n protected throwOnUndefinedElement<T extends O3rElement>(elemnt?: T, _timeout?: number): Promise<T> {\n if (!elemnt) {\n throw new Error('Element not found in ' + this.constructor.name);\n }\n return Promise.resolve(elemnt);\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param elemnt ElementProfile to test\n * @param timeout specific timeout that will throw when reach\n */\n protected async throwOnUndefined<T extends O3rElement>(elemnt: Promise<T | undefined>, timeout?: number): Promise<T> {\n return withTimeout(elemnt, timeout)\n .then((el) => {\n if (!el) {\n throw new Error('Element not found in ' + this.constructor.name);\n }\n return el;\n });\n }\n\n\n /**\n * Get the element associated to the selector if present\n * @param selector Selector to access the element\n * @param elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options Options supported\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async queryWithOptions(\n selector: string,\n elementConstructor?: O3rElementConstructor<O3rElement>,\n options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}\n ): Promise<O3rElement | undefined> {\n let queryElement: O3rElement | undefined;\n if (options.index !== undefined) {\n queryElement = await this.queryNth(selector, options.index, elementConstructor as any);\n } else {\n queryElement = await this.query(selector, elementConstructor as any);\n }\n if (options.shouldThrowIfNotPresent) {\n return this.throwOnUndefinedElement<O3rElement>(queryElement, options.timeout);\n }\n return queryElement;\n }\n\n /**\n * Get text from the element associated to the given selector, or undefined if the element is not found or not visible\n * @param selector Selector to access the element\n * @param options Options supported\n * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async getText<T extends O3rElement>(selector: string, options: {\n elementConstructor?: O3rElementConstructor<T> | undefined;\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}): Promise<string | undefined> {\n const getTextElement = await this.queryWithOptions(selector, options.elementConstructor, options);\n if (!getTextElement || !await getTextElement.isVisible()) {\n return;\n }\n return await getTextElement.getText();\n }\n\n /**\n * Check if the element associated to the given selector is visible\n * @param selector Selector to access the element\n * @param options Options supported\n * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async isVisible<T extends O3rElement>(selector: string, options: {\n elementConstructor?: O3rElementConstructor<T> | undefined;\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}): Promise<boolean> {\n const isVisibleElement = await this.queryWithOptions(selector, options.elementConstructor, options);\n return !!isVisibleElement && await isVisibleElement.isVisible();\n }\n\n /**\n * Click on the element associated to the given selector if it exists and is visible\n * @param selector Selector to access the element\n * @param options Options supported\n * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async click<T extends O3rElement>(selector: string, options: {\n elementConstructor?: O3rElementConstructor<T> | undefined;\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}): Promise<void> {\n const clickElement = await this.queryWithOptions(selector, options.elementConstructor, options);\n if (!!clickElement && await clickElement.isVisible()) {\n await clickElement.click();\n }\n }\n\n /** @inheritdoc */\n public async query(selector: string, returnType?: undefined): Promise<O3rElement | undefined>;\n public async query<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n public async query<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T> | undefined): Promise<T | O3rElement | undefined> {\n const sourceElement = this.rootElement && this.rootElement.sourceElement;\n const cssSelector = By.css(selector);\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const isElPresent = await (sourceElement! || browser).isElementPresent(cssSelector);\n if (!isElPresent) {\n console.warn(`No component matching ${selector} found`);\n return;\n }\n const queriedElement = sourceElement ? sourceElement.element(cssSelector) : element(cssSelector);\n return returnType ? new returnType(queriedElement) : new O3rElement(queriedElement);\n }\n\n /** @inheritdoc */\n public async queryNth(selector: string, index: number, returnType?: undefined): Promise<O3rElement | undefined>;\n public async queryNth<T extends O3rElement>(selector: string, index: number, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n public async queryNth<T extends O3rElement>(selector: string, index: number, returnType: O3rElementConstructor<T> | undefined): Promise<T | O3rElement | undefined> {\n const sourceElement = this.rootElement && this.rootElement.sourceElement;\n const item = (sourceElement || element).all(By.css(selector)).get(index);\n if (!(await item.isPresent())) {\n console.warn(`No component matching ${selector}:nth(${index}) found`);\n return;\n }\n return new (returnType || O3rElement)(item);\n }\n\n /** @inheritdoc */\n public async queryAll(_selector: string, _returnType?: undefined, groupType?: undefined, timeout?: number): Promise<O3rElement[]>;\n public async queryAll<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T>, groupType?: undefined, timeout?: number): Promise<T[]>;\n public async queryAll<T extends O3rElement, K extends O3rGroup<T>>(selector: string, returnType: O3rElementConstructor<T>, groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;\n public async queryAll<T extends O3rElement, K extends O3rGroup<T>>(\n selector: string,\n returnType: O3rElementConstructor<T> | undefined,\n groupType: O3rGroupConstructor<K, T> | undefined,\n _timeout?: number\n ): Promise<(T | O3rElement)[] | K> {\n const pElements = (this.rootElement ? this.rootElement.sourceElement.all(By.css(selector)) : element.all(By.css(selector)))\n .filter((item) => typeof item !== 'undefined')\n .then((elf: ElementFinder[]) => elf.map((item) => (returnType ? new returnType(item) : new O3rElement(item))));\n const elements = await convertPromise(pElements);\n\n if (groupType) {\n const group = new groupType(elements as T[]);\n const isValid = await group.isValidGroup();\n\n if (!isValid) {\n throw new FixtureUsageError('invalid group of items');\n }\n return Promise.resolve(group);\n }\n\n return elements;\n }\n\n /** @inheritdoc */\n public getElement() {\n return this.rootElement;\n }\n\n /** @inheritdoc */\n public getSubComponents(): Promise<{[componentName: string]: ComponentFixtureProfile[]}> {\n return Promise.resolve({block: [this]});\n }\n\n /** @inheritDoc */\n public async queryNotPresent(selector: string, _timeout?: number): Promise<boolean> {\n const sourceElement = this.rootElement && this.rootElement.sourceElement;\n return !(await (sourceElement || browser).isElementPresent(By.css(selector)));\n }\n}\n"]}
1
+ {"version":3,"file":"component-fixture.js","sourceRoot":"","sources":["../../../src/core/protractor/component-fixture.ts"],"names":[],"mappings":";;;;AAAA,4BAA4B;AAC5B,yCAAiE;AACjE,4CAAuD;AAGvD,sCAAyC;AACzC,qCAA8D;AAE9D,iCAAyC;AAOzC;;;GAGG;AACH;IAME;;;;OAIG;IACH,6BAAY,WAAe;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACO,qDAAuB,GAAjC,UAAwD,MAAU,EAAE,QAAiB;QACnF,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACa,8CAAgB,GAAhC,UAAuD,MAA8B,EAAE,OAAgB;;;;gBACrG,sBAAO,IAAA,qBAAW,EAAC,MAAM,EAAE,OAAO,CAAC;yBAChC,IAAI,CAAC,UAAC,EAAE;wBACP,IAAI,CAAC,EAAE,EAAE,CAAC;4BACR,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,KAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;wBACnE,CAAC;wBACD,OAAO,EAAE,CAAC;oBACZ,CAAC,CAAC,EAAC;;;KACN;IAGD;;;;;;;;OAQG;IACa,8CAAgB,GAAhC;oEACE,QAAgB,EAChB,kBAAsD,EACtD,OAIM;;YAJN,wBAAA,EAAA,YAIM;;;;6BAGF,CAAA,OAAO,CAAC,KAAK,KAAK,SAAS,CAAA,EAA3B,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;wBAChG,qBAAM,IAAA,sBAAc,EAAC,SAAS,CAAC,EAAA;;wBAA1C,QAAQ,GAAG,SAA+B;6BAE5C,SAAS,EAAT,wBAAS;wBACL,KAAK,GAAG,IAAI,SAAS,CAAC,QAAe,CAAC,CAAC;wBAC7B,qBAAM,KAAK,CAAC,YAAY,EAAE,EAAA;;wBAApC,OAAO,GAAG,SAA0B;wBAE1C,IAAI,CAAC,OAAO,EAAE,CAAC;4BACb,MAAM,IAAI,yBAAiB,CAAC,wBAAwB,CAAC,CAAC;wBACxD,CAAC;wBACD,sBAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAC;4BAGhC,sBAAO,QAAQ,EAAC;;;;KACjB;IAED,kBAAkB;IACX,wCAAU,GAAjB;QACE,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,kBAAkB;IACX,8CAAgB,GAAvB;QACE,OAAO,OAAO,CAAC,OAAO,CAAC,EAAC,KAAK,EAAE,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC;IAC1C,CAAC;IAED,kBAAkB;IACL,6CAAe,GAA5B,UAA6B,QAAgB,EAAE,QAAiB;;;;;;wBACxD,aAAa,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;wBAChE,qBAAM,CAAC,aAAa,IAAI,oBAAO,CAAC,CAAC,gBAAgB,CAAC,eAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAA;4BAA5E,sBAAO,CAAC,CAAC,SAAmE,CAAC,EAAC;;;;KAC/E;IACH,0BAAC;AAAD,CAAC,AAjND,IAiNC;AAjNY,kDAAmB","sourcesContent":["/* eslint-disable new-cap */\nimport { browser, By, element, ElementFinder } from 'protractor';\nimport { FixtureUsageError } from '../../errors/index';\n\nimport type { ComponentFixtureProfile } from '../component-fixture';\nimport { withTimeout } from '../helpers';\nimport { O3rElement, O3rElementConstructor } from './element';\nimport { O3rGroup, O3rGroupConstructor } from './group';\nimport { convertPromise } from './utils';\n\n/**\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport type { ComponentFixtureProfile, Constructable, FixtureWithCustom } from '../component-fixture';\n\n/**\n * Implementation of the fixture dedicated to protractor, hence using the webdriver to interact with the dom.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rComponentFixture<V extends O3rElement = O3rElement> implements ComponentFixtureProfile<V> {\n /**\n * DOM element linked to the fixture.\n */\n protected rootElement?: V;\n\n /**\n * Root element of this fixture. Optional in a Protractor.\n * All further queries will be applied to the element tree if any, otherwise they will be applied to the whole DOM.\n * @param rootElement\n */\n constructor(rootElement?: V) {\n this.rootElement = rootElement;\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param elemnt ElementProfile to test\n * @param _timeout specific timeout that will throw when reach\n */\n protected throwOnUndefinedElement<T extends O3rElement>(elemnt?: T, _timeout?: number): Promise<T> {\n if (!elemnt) {\n throw new Error('Element not found in ' + this.constructor.name);\n }\n return Promise.resolve(elemnt);\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param elemnt ElementProfile to test\n * @param timeout specific timeout that will throw when reach\n */\n protected async throwOnUndefined<T extends O3rElement>(elemnt: Promise<T | undefined>, timeout?: number): Promise<T> {\n return withTimeout(elemnt, timeout)\n .then((el) => {\n if (!el) {\n throw new Error('Element not found in ' + this.constructor.name);\n }\n return el;\n });\n }\n\n\n /**\n * Get the element associated to the selector if present\n * @param selector Selector to access the element\n * @param elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options Options supported\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async queryWithOptions(\n selector: string,\n elementConstructor?: O3rElementConstructor<O3rElement>,\n options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}\n ): Promise<O3rElement | undefined> {\n let queryElement: O3rElement | undefined;\n if (options.index !== undefined) {\n queryElement = await this.queryNth(selector, options.index, elementConstructor as any);\n } else {\n queryElement = await this.query(selector, elementConstructor as any);\n }\n if (options.shouldThrowIfNotPresent) {\n return this.throwOnUndefinedElement<O3rElement>(queryElement, options.timeout);\n }\n return queryElement;\n }\n\n /**\n * Get text from the element associated to the given selector, or undefined if the element is not found or not visible\n * @param selector Selector to access the element\n * @param options Options supported\n * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async getText<T extends O3rElement>(selector: string, options: {\n elementConstructor?: O3rElementConstructor<T> | undefined;\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}): Promise<string | undefined> {\n const getTextElement = await this.queryWithOptions(selector, options.elementConstructor, options);\n if (!getTextElement || !await getTextElement.isVisible()) {\n return;\n }\n return await getTextElement.getText();\n }\n\n /**\n * Check if the element associated to the given selector is visible\n * @param selector Selector to access the element\n * @param options Options supported\n * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async isVisible<T extends O3rElement>(selector: string, options: {\n elementConstructor?: O3rElementConstructor<T> | undefined;\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}): Promise<boolean> {\n const isVisibleElement = await this.queryWithOptions(selector, options.elementConstructor, options);\n return !!isVisibleElement && await isVisibleElement.isVisible();\n }\n\n /**\n * Click on the element associated to the given selector if it exists and is visible\n * @param selector Selector to access the element\n * @param options Options supported\n * @param options.elementConstructor Constructor that will be used to create the Element, defaults to O3rElement\n * @param options.index index Select the element associated to the index\n * @param options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present\n * @param options.timeout Duration to wait for the element to be present before it throws\n */\n protected async click<T extends O3rElement>(selector: string, options: {\n elementConstructor?: O3rElementConstructor<T> | undefined;\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}): Promise<void> {\n const clickElement = await this.queryWithOptions(selector, options.elementConstructor, options);\n if (!!clickElement && await clickElement.isVisible()) {\n await clickElement.click();\n }\n }\n\n /** @inheritdoc */\n public async query(selector: string, returnType?: undefined): Promise<O3rElement | undefined>;\n public async query<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n public async query<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T> | undefined): Promise<T | O3rElement | undefined> {\n const sourceElement = this.rootElement && this.rootElement.sourceElement;\n const cssSelector = By.css(selector);\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n const isElPresent = await (sourceElement! || browser).isElementPresent(cssSelector);\n if (!isElPresent) {\n console.warn(`No component matching ${selector} found`);\n return;\n }\n const queriedElement = sourceElement ? sourceElement.element(cssSelector) : element(cssSelector);\n return returnType ? new returnType(queriedElement) : new O3rElement(queriedElement);\n }\n\n /** @inheritdoc */\n public async queryNth(selector: string, index: number, returnType?: undefined): Promise<O3rElement | undefined>;\n public async queryNth<T extends O3rElement>(selector: string, index: number, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n public async queryNth<T extends O3rElement>(selector: string, index: number, returnType: O3rElementConstructor<T> | undefined): Promise<T | O3rElement | undefined> {\n const sourceElement = this.rootElement && this.rootElement.sourceElement;\n const item = (sourceElement || element).all(By.css(selector)).get(index);\n if (!(await item.isPresent())) {\n console.warn(`No component matching ${selector}:nth(${index}) found`);\n return;\n }\n return new (returnType || O3rElement)(item);\n }\n\n /** @inheritdoc */\n public async queryAll(_selector: string, _returnType?: undefined, groupType?: undefined, timeout?: number): Promise<O3rElement[]>;\n public async queryAll<T extends O3rElement>(selector: string, returnType: O3rElementConstructor<T>, groupType?: undefined, timeout?: number): Promise<T[]>;\n public async queryAll<T extends O3rElement, K extends O3rGroup<T>>(selector: string, returnType: O3rElementConstructor<T>, groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;\n public async queryAll<T extends O3rElement, K extends O3rGroup<T>>(\n selector: string,\n returnType: O3rElementConstructor<T> | undefined,\n groupType: O3rGroupConstructor<K, T> | undefined,\n _timeout?: number\n ): Promise<(T | O3rElement)[] | K> {\n const pElements = (this.rootElement ? this.rootElement.sourceElement.all(By.css(selector)) : element.all(By.css(selector)))\n .filter((item) => typeof item !== 'undefined')\n .then((elf: ElementFinder[]) => elf.map((item) => (returnType ? new returnType(item) : new O3rElement(item))));\n const elements = await convertPromise(pElements);\n\n if (groupType) {\n const group = new groupType(elements as T[]);\n const isValid = await group.isValidGroup();\n\n if (!isValid) {\n throw new FixtureUsageError('invalid group of items');\n }\n return Promise.resolve(group);\n }\n\n return elements;\n }\n\n /** @inheritdoc */\n public getElement() {\n return this.rootElement;\n }\n\n /** @inheritdoc */\n public getSubComponents(): Promise<{[componentName: string]: ComponentFixtureProfile[]}> {\n return Promise.resolve({block: [this]});\n }\n\n /** @inheritDoc */\n public async queryNotPresent(selector: string, _timeout?: number): Promise<boolean> {\n const sourceElement = this.rootElement && this.rootElement.sourceElement;\n return !(await (sourceElement || browser).isElementPresent(By.css(selector)));\n }\n}\n"]}
@@ -3,6 +3,7 @@ import { ElementProfile } from '../element';
3
3
  export { ElementProfile } from '../element';
4
4
  /**
5
5
  * Implementation dedicated to protractor.
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  */
7
8
  export declare class O3rElement implements ElementProfile {
8
9
  /** Protractor ElementProfile */
@@ -31,6 +32,7 @@ export declare class O3rElement implements ElementProfile {
31
32
  }
32
33
  /**
33
34
  * Constructor of a O3rElement
35
+ * @deprecated Will be removed in v13, please use Playwright instead
34
36
  */
35
37
  export type O3rElementConstructor<T extends ElementProfile> = new (sourceElement: ElementFinder | O3rElement) => T;
36
38
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAC,MAAM,YAAY,CAAC;AAGlD,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE1C;;GAEG;AACH,qBAAa,UAAW,YAAW,cAAc;IAC/C,gCAAgC;IACzB,aAAa,EAAE,aAAa,CAAC;gBAExB,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACX,OAAO;IAId,kBAAkB;IACL,YAAY;IAKzB,kBAAkB;IACX,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAIlD,kBAAkB;IACX,SAAS;IAShB,kBAAkB;IACL,QAAQ;IAKrB,kBAAkB;IACL,QAAQ,CAAC,KAAK,EAAE,MAAM;IAQnC,kBAAkB;IACL,UAAU;IAQvB,kBAAkB;IACL,KAAK;IAKlB,kBAAkB;IACL,SAAS;IAItB,kBAAkB;IACL,YAAY,CAAC,aAAa,EAAE,MAAM;CAIhD;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,cAAc,IAAI,KAAK,aAAa,EAAE,aAAa,GAAG,UAAU,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAC,MAAM,YAAY,CAAC;AAGlD,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE1C;;;GAGG;AACH,qBAAa,UAAW,YAAW,cAAc;IAC/C,gCAAgC;IACzB,aAAa,EAAE,aAAa,CAAC;gBAExB,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACX,OAAO;IAId,kBAAkB;IACL,YAAY;IAKzB,kBAAkB;IACX,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAIlD,kBAAkB;IACX,SAAS;IAShB,kBAAkB;IACL,QAAQ;IAKrB,kBAAkB;IACL,QAAQ,CAAC,KAAK,EAAE,MAAM;IAQnC,kBAAkB;IACL,UAAU;IAQvB,kBAAkB;IACL,KAAK;IAKlB,kBAAkB;IACL,SAAS;IAItB,kBAAkB;IACL,YAAY,CAAC,aAAa,EAAE,MAAM;CAIhD;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,cAAc,IAAI,KAAK,aAAa,EAAE,aAAa,GAAG,UAAU,KAAK,CAAC,CAAC"}
@@ -8,6 +8,7 @@ var protractor_2 = require("../../tools/protractor");
8
8
  var utils_1 = require("./utils");
9
9
  /**
10
10
  * Implementation dedicated to protractor.
11
+ * @deprecated Will be removed in v13, please use Playwright instead
11
12
  */
12
13
  var O3rElement = /** @class */ (function () {
13
14
  function O3rElement(sourceElement) {
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../../../src/core/protractor/element.ts"],"names":[],"mappings":";;;;AAAA,yCAAkD;AAClD,8CAAyD;AACzD,qDAA0D;AAE1D,iCAAuC;AAIvC;;GAEG;AACH;IAIE,oBAAY,aAAyC;QACnD,IAAI,CAAC,aAAa,GAAG,aAAa,YAAY,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;IACzG,CAAC;IAED,kBAAkB;IACX,4BAAO,GAAd;QACE,OAAO,IAAA,sBAAc,EAAC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,kBAAkB;IACL,iCAAY,GAAzB;;;;;4BACoB,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAAhC,SAAS,GAAG,SAAoB;wBACtC,sBAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS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AS,CAAA,EAA1B,wBAA0B;wBAC5B,qBAAM,CAAA,KAAA,IAAI,CAAC,aAAa,CAAA,CAAC,QAAQ,WAAI,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAC;;wBAA9F,SAA8F,CAAC;;;;;;KAElG;IAED,kBAAkB;IACL,0BAAK,GAAlB;;;;4BACE,qBAAM,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,EAAA;;wBAAhC,SAAgC,CAAC;wBACjC,sBAAO,IAAA,+BAAkB,GAAE,EAAC;;;;KAC7B;IAED,kBAAkB;IACL,8BAAS,GAAtB;;;;4BACS,qBAAM,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,EAAA;4BAA7C,sBAAO,SAAsC,EAAC;;;;KAC/C;IAED,kBAAkB;IACL,iCAAY,GAAzB,UAA0B,aAAqB;;;;;4BAC3B,qBAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,aAAa,CAAC,EAAA;;wBAAhE,SAAS,GAAG,SAAoD;wBACtE,sBAAO,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAC;;;;KACnD;IACH,iBAAC;AAAD,CAAC,AA1ED,IA0EC;AA1EY,gCAAU","sourcesContent":["import {browser, ElementFinder} from 'protractor';\nimport {protractor as ptor} from 'protractor/built/ptor';\nimport {waitForOtterStable} from '../../tools/protractor';\nimport {ElementProfile} from '../element';\nimport {convertPromise} from './utils';\n\nexport {ElementProfile} from '../element';\n\n/**\n * Implementation dedicated to protractor.\n */\nexport class O3rElement implements ElementProfile {\n /** Protractor ElementProfile */\n public sourceElement: ElementFinder;\n\n constructor(sourceElement: ElementFinder | O3rElement) {\n this.sourceElement = sourceElement instanceof O3rElement ? sourceElement.sourceElement : sourceElement;\n }\n\n /** @inheritdoc */\n public getText() {\n return convertPromise(this.sourceElement.getText());\n }\n\n /** @inheritdoc */\n public async getPlainText() {\n const innerText = await this.getText();\n return Promise.resolve(innerText ? innerText.replace(/(?:\\r\\n|\\r|\\n)/g, ' ').replace(/\\s\\s+/g, ' ').trim() : undefined);\n }\n\n /** @inheritdoc */\n public getInnerHTML(): Promise<string | undefined> {\n return convertPromise(this.sourceElement.getInnerHtml());\n }\n\n /** @inheritdoc */\n public mouseOver() {\n return convertPromise(\n browser\n .actions()\n .mouseMove(this.sourceElement)\n .perform()\n );\n }\n\n /** @inheritdoc */\n public async getValue() {\n const value = await this.sourceElement.getAttribute('value');\n return value !== null ? value : undefined;\n }\n\n /** @inheritdoc */\n public async setValue(input: string) {\n // Clears the value in the field\n await this.clearValue();\n await this.sourceElement.sendKeys(input);\n await this.sourceElement.sendKeys(ptor.Key.TAB);\n return waitForOtterStable();\n }\n\n /** @inheritdoc */\n public async clearValue() {\n const currentValue = await this.getValue();\n\n if (currentValue !== undefined) {\n await this.sourceElement.sendKeys(...Array(currentValue.length + 1).fill(ptor.Key.BACK_SPACE));\n }\n }\n\n /** @inheritdoc */\n public async click() {\n await this.sourceElement.click();\n return waitForOtterStable();\n }\n\n /** @inheritdoc */\n public async isVisible() {\n return await this.sourceElement.isDisplayed();\n }\n\n /** @inheritdoc */\n public async getAttribute(attributeName: string) {\n const attribute = await this.sourceElement.getAttribute(attributeName);\n return attribute !== null ? attribute : undefined;\n }\n}\n\n/**\n * Constructor of a O3rElement\n */\nexport type O3rElementConstructor<T extends ElementProfile> = new (sourceElement: ElementFinder | O3rElement) => T;\n"]}
1
+ {"version":3,"file":"element.js","sourceRoot":"","sources":["../../../src/core/protractor/element.ts"],"names":[],"mappings":";;;;AAAA,yCAAkD;AAClD,8CAAyD;AACzD,qDAA0D;AAE1D,iCAAuC;AAIvC;;;GAGG;AACH;IAIE,oBAAY,aAAyC;QACnD,IAAI,CAAC,aAAa,GAAG,aAAa,YAAY,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC,aA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OtterStable} from '../../tools/protractor';\nimport {ElementProfile} from '../element';\nimport {convertPromise} from './utils';\n\nexport {ElementProfile} from '../element';\n\n/**\n * Implementation dedicated to protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rElement implements ElementProfile {\n /** Protractor ElementProfile */\n public sourceElement: ElementFinder;\n\n constructor(sourceElement: ElementFinder | O3rElement) {\n this.sourceElement = sourceElement instanceof O3rElement ? sourceElement.sourceElement : sourceElement;\n }\n\n /** @inheritdoc */\n public getText() {\n return convertPromise(this.sourceElement.getText());\n }\n\n /** @inheritdoc */\n public async getPlainText() {\n const innerText = await this.getText();\n return Promise.resolve(innerText ? innerText.replace(/(?:\\r\\n|\\r|\\n)/g, ' ').replace(/\\s\\s+/g, ' ').trim() : undefined);\n }\n\n /** @inheritdoc */\n public getInnerHTML(): Promise<string | undefined> {\n return convertPromise(this.sourceElement.getInnerHtml());\n }\n\n /** @inheritdoc */\n public mouseOver() {\n return convertPromise(\n browser\n .actions()\n .mouseMove(this.sourceElement)\n .perform()\n );\n }\n\n /** @inheritdoc */\n public async getValue() {\n const value = await this.sourceElement.getAttribute('value');\n return value !== null ? value : undefined;\n }\n\n /** @inheritdoc */\n public async setValue(input: string) {\n // Clears the value in the field\n await this.clearValue();\n await this.sourceElement.sendKeys(input);\n await this.sourceElement.sendKeys(ptor.Key.TAB);\n return waitForOtterStable();\n }\n\n /** @inheritdoc */\n public async clearValue() {\n const currentValue = await this.getValue();\n\n if (currentValue !== undefined) {\n await this.sourceElement.sendKeys(...Array(currentValue.length + 1).fill(ptor.Key.BACK_SPACE));\n }\n }\n\n /** @inheritdoc */\n public async click() {\n await this.sourceElement.click();\n return waitForOtterStable();\n }\n\n /** @inheritdoc */\n public async isVisible() {\n return await this.sourceElement.isDisplayed();\n }\n\n /** @inheritdoc */\n public async getAttribute(attributeName: string) {\n const attribute = await this.sourceElement.getAttribute(attributeName);\n return attribute !== null ? attribute : undefined;\n }\n}\n\n/**\n * Constructor of a O3rElement\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport type O3rElementConstructor<T extends ElementProfile> = new (sourceElement: ElementFinder | O3rElement) => T;\n"]}
@@ -3,6 +3,7 @@ import { CheckboxElementProfile } from '../../elements';
3
3
  import { O3rElement } from '../element';
4
4
  /**
5
5
  * Implementation dedicated to karma / TestBed.
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  */
7
8
  export declare class O3rCheckboxElement extends O3rElement implements CheckboxElementProfile {
8
9
  constructor(sourceElement: ElementFinder);
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-element.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/elements/checkbox-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,UAAW,YAAW,sBAAsB;gBACtE,aAAa,EAAE,aAAa;IAIxC,kBAAkB;IACL,KAAK,CAAC,KAAK,UAAO,EAAE,eAAe,CAAC,EAAE,UAAU;IAS7D,kBAAkB;IACX,OAAO;IAId,kBAAkB;IACL,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAI3C"}
1
+ {"version":3,"file":"checkbox-element.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/elements/checkbox-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAW,YAAW,sBAAsB;gBACtE,aAAa,EAAE,aAAa;IAIxC,kBAAkB;IACL,KAAK,CAAC,KAAK,UAAO,EAAE,eAAe,CAAC,EAAE,UAAU;IAS7D,kBAAkB;IACX,OAAO;IAId,kBAAkB;IACL,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAI3C"}
@@ -5,6 +5,7 @@ var tslib_1 = require("tslib");
5
5
  var element_1 = require("../element");
6
6
  /**
7
7
  * Implementation dedicated to karma / TestBed.
8
+ * @deprecated Will be removed in v13, please use Playwright instead
8
9
  */
9
10
  var O3rCheckboxElement = /** @class */ (function (_super) {
10
11
  tslib_1.__extends(O3rCheckboxElement, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-element.js","sourceRoot":"","sources":["../../../../src/core/protractor/elements/checkbox-element.ts"],"names":[],"mappings":";;;;AAEA,sCAAsC;AAEtC;;GAEG;AACH;IAAwC,8CAAU;IAChD,4BAAY,aAA4B;QACtC,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,kCAAK,GAAlB;oEAAmB,KAAY,EAAE,eAA4B;;YAA1C,sBAAA,EAAA,YAAY;;;4BACR,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAArC,YAAY,GAAG,SAAsB;wBAC3C,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;4BAC3B,sBAAO,OAAO,CAAC,OAAO,EAAE,EAAC;wBAC3B,CAAC;wBAED,sBAAO,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAC;;;;KACjE;IAED,kBAAkB;IACX,oCAAO,GAAd;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,kBAAkB;IACL,sCAAS,GAAtB;;;;;4BACgB,qBAAM,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,EAAA;;wBAA7C,KAAK,GAAG,SAAqC;wBACnD,sBAAO,KAAK,EAAC;;;;KACd;IACH,yBAAC;AAAD,CAAC,AAzBD,CAAwC,oBAAU,GAyBjD;AAzBY,gDAAkB","sourcesContent":["import {ElementFinder} from 'protractor';\nimport {CheckboxElementProfile} from '../../elements';\nimport {O3rElement} from '../element';\n\n/**\n * Implementation dedicated to karma / TestBed.\n */\nexport class O3rCheckboxElement extends O3rElement implements CheckboxElementProfile {\n constructor(sourceElement: ElementFinder) {\n super(sourceElement);\n }\n\n /** @inheritDoc */\n public async check(value = true, associatedLabel?: O3rElement) {\n const currentValue = await this.isChecked();\n if (currentValue === value) {\n return Promise.resolve();\n }\n\n return associatedLabel ? associatedLabel.click() : this.click();\n }\n\n /** @inheritDoc */\n public uncheck() {\n return this.check(false);\n }\n\n /** @inheritDoc */\n public async isChecked(): Promise<boolean> {\n const value = await this.sourceElement.isSelected();\n return value;\n }\n}\n"]}
1
+ {"version":3,"file":"checkbox-element.js","sourceRoot":"","sources":["../../../../src/core/protractor/elements/checkbox-element.ts"],"names":[],"mappings":";;;;AAEA,sCAAsC;AAEtC;;;GAGG;AACH;IAAwC,8CAAU;IAChD,4BAAY,aAA4B;QACtC,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,kCAAK,GAAlB;oEAAmB,KAAY,EAAE,eAA4B;;YAA1C,sBAAA,EAAA,YAAY;;;4BACR,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAArC,YAAY,GAAG,SAAsB;wBAC3C,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;4BAC3B,sBAAO,OAAO,CAAC,OAAO,EAAE,EAAC;wBAC3B,CAAC;wBAED,sBAAO,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAAC;;;;KACjE;IAED,kBAAkB;IACX,oCAAO,GAAd;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,kBAAkB;IACL,sCAAS,GAAtB;;;;;4BACgB,qBAAM,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,EAAA;;wBAA7C,KAAK,GAAG,SAAqC;wBACnD,sBAAO,KAAK,EAAC;;;;KACd;IACH,yBAAC;AAAD,CAAC,AAzBD,CAAwC,oBAAU,GAyBjD;AAzBY,gDAAkB","sourcesContent":["import {ElementFinder} from 'protractor';\nimport {CheckboxElementProfile} from '../../elements';\nimport {O3rElement} from '../element';\n\n/**\n * Implementation dedicated to karma / TestBed.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rCheckboxElement extends O3rElement implements CheckboxElementProfile {\n constructor(sourceElement: ElementFinder) {\n super(sourceElement);\n }\n\n /** @inheritDoc */\n public async check(value = true, associatedLabel?: O3rElement) {\n const currentValue = await this.isChecked();\n if (currentValue === value) {\n return Promise.resolve();\n }\n\n return associatedLabel ? associatedLabel.click() : this.click();\n }\n\n /** @inheritDoc */\n public uncheck() {\n return this.check(false);\n }\n\n /** @inheritDoc */\n public async isChecked(): Promise<boolean> {\n const value = await this.sourceElement.isSelected();\n return value;\n }\n}\n"]}
@@ -3,6 +3,7 @@ import { RadioElementProfile } from '../../elements';
3
3
  import { O3rElement } from '../element';
4
4
  /**
5
5
  * Implementation dedicated to karma / TestBed.
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  */
7
8
  export declare class O3rRadioElement extends O3rElement implements RadioElementProfile {
8
9
  constructor(sourceElement: ElementFinder);
@@ -1 +1 @@
1
- {"version":3,"file":"radio-element.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/elements/radio-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,qBAAa,eAAgB,SAAQ,UAAW,YAAW,mBAAmB;gBAChE,aAAa,EAAE,aAAa;IAIxC,kBAAkB;IACL,KAAK,CAAC,KAAK,UAAO;IAU/B,kBAAkB;IACX,OAAO;IAId,kBAAkB;IACL,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAI3C"}
1
+ {"version":3,"file":"radio-element.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/elements/radio-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,UAAW,YAAW,mBAAmB;gBAChE,aAAa,EAAE,aAAa;IAIxC,kBAAkB;IACL,KAAK,CAAC,KAAK,UAAO;IAU/B,kBAAkB;IACX,OAAO;IAId,kBAAkB;IACL,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAI3C"}
@@ -5,6 +5,7 @@ var tslib_1 = require("tslib");
5
5
  var element_1 = require("../element");
6
6
  /**
7
7
  * Implementation dedicated to karma / TestBed.
8
+ * @deprecated Will be removed in v13, please use Playwright instead
8
9
  */
9
10
  var O3rRadioElement = /** @class */ (function (_super) {
10
11
  tslib_1.__extends(O3rRadioElement, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"radio-element.js","sourceRoot":"","sources":["../../../../src/core/protractor/elements/radio-element.ts"],"names":[],"mappings":";;;;AAEA,sCAAsC;AAEtC;;GAEG;AACH;IAAqC,2CAAU;IAC7C,yBAAY,aAA4B;QACtC,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,+BAAK,GAAlB;oEAAmB,KAAY;;YAAZ,sBAAA,EAAA,YAAY;;;4BACR,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAArC,YAAY,GAAG,SAAsB;wBAC3C,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;4BAC3B,OAAO,CAAC,IAAI,CAAC,qCAA8B,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAE,CAAC,CAAC;4BAC9E,sBAAO,OAAO,CAAC,OAAO,EAAE,EAAC;wBAC3B,CAAC;wBAED,sBAAO,IAAI,CAAC,KAAK,EAAE,EAAC;;;;KACrB;IAED,kBAAkB;IACX,iCAAO,GAAd;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,kBAAkB;IACL,mCAAS,GAAtB;;;;;4BACkB,qBAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAA;;wBAA5C,OAAO,GAAG,SAAkC;wBAClD,sBAAO,OAAO,KAAK,SAAS,EAAC;;;;KAC9B;IACH,sBAAC;AAAD,CAAC,AA1BD,CAAqC,oBAAU,GA0B9C;AA1BY,0CAAe","sourcesContent":["import {ElementFinder} from 'protractor';\nimport {RadioElementProfile} from '../../elements';\nimport {O3rElement} from '../element';\n\n/**\n * Implementation dedicated to karma / TestBed.\n */\nexport class O3rRadioElement extends O3rElement implements RadioElementProfile {\n constructor(sourceElement: ElementFinder) {\n super(sourceElement);\n }\n\n /** @inheritDoc */\n public async check(value = true) {\n const currentValue = await this.isChecked();\n if (currentValue === value) {\n console.warn(`O3rRadioElement is already ${value ? 'checked' : 'unchecked'}`);\n return Promise.resolve();\n }\n\n return this.click();\n }\n\n /** @inheritDoc */\n public uncheck() {\n return this.check(false);\n }\n\n /** @inheritDoc */\n public async isChecked(): Promise<boolean> {\n const checked = await this.getAttribute('checked');\n return checked !== undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"radio-element.js","sourceRoot":"","sources":["../../../../src/core/protractor/elements/radio-element.ts"],"names":[],"mappings":";;;;AAEA,sCAAsC;AAEtC;;;GAGG;AACH;IAAqC,2CAAU;IAC7C,yBAAY,aAA4B;QACtC,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,+BAAK,GAAlB;oEAAmB,KAAY;;YAAZ,sBAAA,EAAA,YAAY;;;4BACR,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAArC,YAAY,GAAG,SAAsB;wBAC3C,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;4BAC3B,OAAO,CAAC,IAAI,CAAC,qCAA8B,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAE,CAAC,CAAC;4BAC9E,sBAAO,OAAO,CAAC,OAAO,EAAE,EAAC;wBAC3B,CAAC;wBAED,sBAAO,IAAI,CAAC,KAAK,EAAE,EAAC;;;;KACrB;IAED,kBAAkB;IACX,iCAAO,GAAd;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,kBAAkB;IACL,mCAAS,GAAtB;;;;;4BACkB,qBAAM,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAA;;wBAA5C,OAAO,GAAG,SAAkC;wBAClD,sBAAO,OAAO,KAAK,SAAS,EAAC;;;;KAC9B;IACH,sBAAC;AAAD,CAAC,AA1BD,CAAqC,oBAAU,GA0B9C;AA1BY,0CAAe","sourcesContent":["import {ElementFinder} from 'protractor';\nimport {RadioElementProfile} from '../../elements';\nimport {O3rElement} from '../element';\n\n/**\n * Implementation dedicated to karma / TestBed.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rRadioElement extends O3rElement implements RadioElementProfile {\n constructor(sourceElement: ElementFinder) {\n super(sourceElement);\n }\n\n /** @inheritDoc */\n public async check(value = true) {\n const currentValue = await this.isChecked();\n if (currentValue === value) {\n console.warn(`O3rRadioElement is already ${value ? 'checked' : 'unchecked'}`);\n return Promise.resolve();\n }\n\n return this.click();\n }\n\n /** @inheritDoc */\n public uncheck() {\n return this.check(false);\n }\n\n /** @inheritDoc */\n public async isChecked(): Promise<boolean> {\n const checked = await this.getAttribute('checked');\n return checked !== undefined;\n }\n}\n"]}
@@ -4,6 +4,7 @@ import { O3rElement } from '../element';
4
4
  export { SelectElementProfile } from '../../elements';
5
5
  /**
6
6
  * Implementation dedicated to Protractor.
7
+ * @deprecated Will be removed in v13, please use Playwright instead
7
8
  */
8
9
  export declare class O3rSelectElement extends O3rElement implements SelectElementProfile {
9
10
  constructor(sourceElement: ElementFinder | O3rElement);
@@ -1 +1 @@
1
- {"version":3,"file":"select-element.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/elements/select-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,aAAa,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,oBAAoB;gBAClE,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAM3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAK5D"}
1
+ {"version":3,"file":"select-element.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/elements/select-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAK,aAAa,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,UAAW,YAAW,oBAAoB;gBAClE,aAAa,EAAE,aAAa,GAAG,UAAU;IAIrD,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAM3D,kBAAkB;IACL,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAK5D"}
@@ -6,6 +6,7 @@ var protractor_1 = require("protractor");
6
6
  var element_1 = require("../element");
7
7
  /**
8
8
  * Implementation dedicated to Protractor.
9
+ * @deprecated Will be removed in v13, please use Playwright instead
9
10
  */
10
11
  var O3rSelectElement = /** @class */ (function (_super) {
11
12
  tslib_1.__extends(O3rSelectElement, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"select-element.js","sourceRoot":"","sources":["../../../../src/core/protractor/elements/select-element.ts"],"names":[],"mappings":";;;;AAAA,yCAA6C;AAE7C,sCAAsC;AAItC;;GAEG;AACH;IAAsC,4CAAU;IAC9C,0BAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,wCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,eAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;wBAC7D,sBAAO,IAAI,oBAAU,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KACnD;IAED,kBAAkB;IACL,wCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,eAAE,CAAC,GAAG,CAAC,wBAAiB,KAAK,OAAI,CAAC,CAAC,CAAC;wBAC9E,sBAAO,IAAI,oBAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KACvC;IACH,uBAAC;AAAD,CAAC,AAlBD,CAAsC,oBAAU,GAkB/C;AAlBY,4CAAgB","sourcesContent":["import {By, ElementFinder} from 'protractor';\nimport {SelectElementProfile} from '../../elements';\nimport {O3rElement} from '../element';\n\nexport {SelectElementProfile} from '../../elements';\n\n/**\n * Implementation dedicated to Protractor.\n */\nexport class O3rSelectElement extends O3rElement implements SelectElementProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByIndex(index: number, _timeout?: number) {\n await this.click();\n const options = this.sourceElement.all(By.tagName('option'));\n return new O3rElement(options.get(index)).click();\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.click();\n const option = this.sourceElement.element(By.css(`option[value='${value}']`));\n return new O3rElement(option).click();\n }\n}\n"]}
1
+ {"version":3,"file":"select-element.js","sourceRoot":"","sources":["../../../../src/core/protractor/elements/select-element.ts"],"names":[],"mappings":";;;;AAAA,yCAA6C;AAE7C,sCAAsC;AAItC;;;GAGG;AACH;IAAsC,4CAAU;IAC9C,0BAAY,aAAyC;QACnD,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,wCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,eAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;wBAC7D,sBAAO,IAAI,oBAAU,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KACnD;IAED,kBAAkB;IACL,wCAAa,GAA1B,UAA2B,KAAa,EAAE,QAAiB;;;;;4BACzD,qBAAM,IAAI,CAAC,KAAK,EAAE,EAAA;;wBAAlB,SAAkB,CAAC;wBACb,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,eAAE,CAAC,GAAG,CAAC,wBAAiB,KAAK,OAAI,CAAC,CAAC,CAAC;wBAC9E,sBAAO,IAAI,oBAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAC;;;;KACvC;IACH,uBAAC;AAAD,CAAC,AAlBD,CAAsC,oBAAU,GAkB/C;AAlBY,4CAAgB","sourcesContent":["import {By, ElementFinder} from 'protractor';\nimport {SelectElementProfile} from '../../elements';\nimport {O3rElement} from '../element';\n\nexport {SelectElementProfile} from '../../elements';\n\n/**\n * Implementation dedicated to Protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rSelectElement extends O3rElement implements SelectElementProfile {\n constructor(sourceElement: ElementFinder | O3rElement) {\n super(sourceElement);\n }\n\n /** @inheritdoc */\n public async selectByIndex(index: number, _timeout?: number) {\n await this.click();\n const options = this.sourceElement.all(By.tagName('option'));\n return new O3rElement(options.get(index)).click();\n }\n\n /** @inheritdoc */\n public async selectByValue(value: string, _timeout?: number) {\n await this.click();\n const option = this.sourceElement.element(By.css(`option[value='${value}']`));\n return new O3rElement(option).click();\n }\n}\n"]}
@@ -3,10 +3,12 @@ import { ElementProfile, O3rElement } from './element';
3
3
  export { GroupProfile } from '../group';
4
4
  /**
5
5
  * Constructor of a O3rGroup
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  */
7
8
  export type O3rGroupConstructor<T extends GroupProfile<V>, V extends ElementProfile> = new (sourceElement: V[]) => T;
8
9
  /**
9
10
  * Implementation dedicated to karma / TestBed.
11
+ * @deprecated Will be removed in v13, please use Playwright instead
10
12
  */
11
13
  export declare class O3rGroup<T extends O3rElement> implements GroupProfile<T> {
12
14
  protected sourceElement: T[];
@@ -1 +1 @@
1
- {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC;;GAEG;AAEH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,cAAc,IAAI,KAAK,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AAErH;;GAEG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,UAAU,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IAOxD,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE;IALxC,kBAAkB;IAClB,IAAW,KAAK,IAAI,CAAC,EAAE,CAEtB;gBAEqB,aAAa,EAAE,CAAC,EAAE;IAExC,kBAAkB;IACX,YAAY;CAGpB"}
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC;;;GAGG;AAEH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,cAAc,IAAI,KAAK,aAAa,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AAErH;;;GAGG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,UAAU,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IAOxD,SAAS,CAAC,aAAa,EAAE,CAAC,EAAE;IALxC,kBAAkB;IAClB,IAAW,KAAK,IAAI,CAAC,EAAE,CAEtB;gBAEqB,aAAa,EAAE,CAAC,EAAE;IAExC,kBAAkB;IACX,YAAY;CAGpB"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.O3rGroup = void 0;
4
4
  /**
5
5
  * Implementation dedicated to karma / TestBed.
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  */
7
8
  var O3rGroup = /** @class */ (function () {
8
9
  function O3rGroup(sourceElement) {
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","sourceRoot":"","sources":["../../../src/core/protractor/group.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACH;IAOE,kBAAsB,aAAkB;QAAlB,kBAAa,GAAb,aAAa,CAAK;IAAG,CAAC;IAJ5C,sBAAW,2BAAK;QADhB,kBAAkB;aAClB;YACE,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;;;OAAA;IAID,kBAAkB;IACX,+BAAY,GAAnB;QACE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACH,eAAC;AAAD,CAAC,AAbD,IAaC;AAbY,4BAAQ","sourcesContent":["import { GroupProfile } from '../group';\nimport { ElementProfile, O3rElement } from './element';\n\nexport {GroupProfile} from '../group';\n\n/**\n * Constructor of a O3rGroup\n */\n// eslint-disable-next-line no-use-before-define\nexport type O3rGroupConstructor<T extends GroupProfile<V>, V extends ElementProfile> = new (sourceElement: V[]) => T;\n\n/**\n * Implementation dedicated to karma / TestBed.\n */\nexport class O3rGroup<T extends O3rElement> implements GroupProfile<T> {\n\n /** @inheritDoc */\n public get items(): T[] {\n return this.sourceElement;\n }\n\n constructor(protected sourceElement: T[]) {}\n\n /** @inheritDoc */\n public isValidGroup() {\n return Promise.resolve(true);\n }\n}\n"]}
1
+ {"version":3,"file":"group.js","sourceRoot":"","sources":["../../../src/core/protractor/group.ts"],"names":[],"mappings":";;;AAYA;;;GAGG;AACH;IAOE,kBAAsB,aAAkB;QAAlB,kBAAa,GAAb,aAAa,CAAK;IAAG,CAAC;IAJ5C,sBAAW,2BAAK;QADhB,kBAAkB;aAClB;YACE,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;;;OAAA;IAID,kBAAkB;IACX,+BAAY,GAAnB;QACE,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACH,eAAC;AAAD,CAAC,AAbD,IAaC;AAbY,4BAAQ","sourcesContent":["import { GroupProfile } from '../group';\nimport { ElementProfile, O3rElement } from './element';\n\nexport {GroupProfile} from '../group';\n\n/**\n * Constructor of a O3rGroup\n * @deprecated Will be removed in v13, please use Playwright instead\n */\n// eslint-disable-next-line no-use-before-define\nexport type O3rGroupConstructor<T extends GroupProfile<V>, V extends ElementProfile> = new (sourceElement: V[]) => T;\n\n/**\n * Implementation dedicated to karma / TestBed.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rGroup<T extends O3rElement> implements GroupProfile<T> {\n\n /** @inheritDoc */\n public get items(): T[] {\n return this.sourceElement;\n }\n\n constructor(protected sourceElement: T[]) {}\n\n /** @inheritDoc */\n public isValidGroup() {\n return Promise.resolve(true);\n }\n}\n"]}
@@ -3,6 +3,7 @@ import { O3rRadioElement } from '../elements/radio-element';
3
3
  import { O3rGroup } from '../group';
4
4
  /**
5
5
  * Group element to manage a radio group
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  */
7
8
  export declare class O3rRadioGroup extends O3rGroup<O3rRadioElement> implements RadioGroupProfile {
8
9
  constructor(sourceElement: O3rRadioElement[]);
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/groups/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,qBAAa,aAAc,SAAQ,QAAQ,CAAC,eAAe,CAAE,YAAW,iBAAiB;gBAC3E,aAAa,EAAE,eAAe,EAAE;IAI5C,kBAAkB;IACL,YAAY;IAiBzB;;OAEG;IACU,eAAe;CAW7B"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../../src/core/protractor/groups/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;;GAGG;AACH,qBAAa,aAAc,SAAQ,QAAQ,CAAC,eAAe,CAAE,YAAW,iBAAiB;gBAC3E,aAAa,EAAE,eAAe,EAAE;IAI5C,kBAAkB;IACL,YAAY;IAiBzB;;OAEG;IACU,eAAe;CAW7B"}
@@ -5,6 +5,7 @@ var tslib_1 = require("tslib");
5
5
  var group_1 = require("../group");
6
6
  /**
7
7
  * Group element to manage a radio group
8
+ * @deprecated Will be removed in v13, please use Playwright instead
8
9
  */
9
10
  var O3rRadioGroup = /** @class */ (function (_super) {
10
11
  tslib_1.__extends(O3rRadioGroup, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/core/protractor/groups/radio-group.ts"],"names":[],"mappings":";;;;AAEA,kCAAoC;AAEpC;;GAEG;AACH;IAAmC,yCAAyB;IAC1D,uBAAY,aAAgC;QAC1C,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,oCAAY,GAAzB;;;;;;wBACM,IAAI,GAAG,EAAE,CAAC;8BAEe,EAAV,KAAA,IAAI,CAAC,KAAK;;;6BAAV,CAAA,cAAU,CAAA;wBAAlB,IAAI;wBACI,qBAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAA;;wBAA1C,QAAQ,GAAG,SAA+B;wBAChD,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;4BACrC,OAAO,CAAC,IAAI,CAAC,uFAAgF,IAAI,kBAAQ,QAAQ,IAAI,WAAW,CAAE,CAAC,CAAC;4BACpI,sBAAO,KAAK,EAAC;wBACf,CAAC;wBACD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;4BAC3B,IAAI,GAAG,QAAQ,CAAC;wBAClB,CAAC;;;wBARgB,IAAU,CAAA;;4BAW7B,sBAAO,IAAI,EAAC;;;;KACb;IAED;;OAEG;IACU,uCAAe,GAA5B;;;;;;8BAE+B,EAAV,KAAA,IAAI,CAAC,KAAK;;;6BAAV,CAAA,cAAU,CAAA;wBAAlB,IAAI;wBACM,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAnC,UAAU,GAAG,SAAsB;wBACzC,IAAI,UAAU,EAAE,CAAC;4BACf,sBAAO,IAAI,EAAC;wBACd,CAAC;;;wBAJgB,IAAU,CAAA;;4BAO7B,sBAAO,SAAS,EAAC;;;;KAClB;IACH,oBAAC;AAAD,CAAC,AArCD,CAAmC,gBAAQ,GAqC1C;AArCY,sCAAa","sourcesContent":["import { RadioGroupProfile } from '../../groups/radio-group';\nimport { O3rRadioElement } from '../elements/radio-element';\nimport { O3rGroup } from '../group';\n\n/**\n * Group element to manage a radio group\n */\nexport class O3rRadioGroup extends O3rGroup<O3rRadioElement> implements RadioGroupProfile {\n constructor(sourceElement: O3rRadioElement[]) {\n super(sourceElement);\n }\n\n /** @inheritDoc */\n public async isValidGroup() {\n let name = '';\n\n for (const item of this.items) {\n const itemName = await item.getAttribute('name');\n if (name !== '' && name !== itemName) {\n console.warn(`Items in this radio group are not consistent, incompatible input names found ${name} and ${itemName || 'undefined'}`);\n return false;\n }\n if (itemName !== undefined) {\n name = itemName;\n }\n }\n\n return true;\n }\n\n /**\n * Get the selected radio\n */\n public async getSelectedItem() {\n\n for (const item of this.items) {\n const isSelected = await item.isChecked();\n if (isSelected) {\n return item;\n }\n }\n\n return undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/core/protractor/groups/radio-group.ts"],"names":[],"mappings":";;;;AAEA,kCAAoC;AAEpC;;;GAGG;AACH;IAAmC,yCAAyB;IAC1D,uBAAY,aAAgC;QAC1C,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IAED,kBAAkB;IACL,oCAAY,GAAzB;;;;;;wBACM,IAAI,GAAG,EAAE,CAAC;8BAEe,EAAV,KAAA,IAAI,CAAC,KAAK;;;6BAAV,CAAA,cAAU,CAAA;wBAAlB,IAAI;wBACI,qBAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAA;;wBAA1C,QAAQ,GAAG,SAA+B;wBAChD,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;4BACrC,OAAO,CAAC,IAAI,CAAC,uFAAgF,IAAI,kBAAQ,QAAQ,IAAI,WAAW,CAAE,CAAC,CAAC;4BACpI,sBAAO,KAAK,EAAC;wBACf,CAAC;wBACD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;4BAC3B,IAAI,GAAG,QAAQ,CAAC;wBAClB,CAAC;;;wBARgB,IAAU,CAAA;;4BAW7B,sBAAO,IAAI,EAAC;;;;KACb;IAED;;OAEG;IACU,uCAAe,GAA5B;;;;;;8BAE+B,EAAV,KAAA,IAAI,CAAC,KAAK;;;6BAAV,CAAA,cAAU,CAAA;wBAAlB,IAAI;wBACM,qBAAM,IAAI,CAAC,SAAS,EAAE,EAAA;;wBAAnC,UAAU,GAAG,SAAsB;wBACzC,IAAI,UAAU,EAAE,CAAC;4BACf,sBAAO,IAAI,EAAC;wBACd,CAAC;;;wBAJgB,IAAU,CAAA;;4BAO7B,sBAAO,SAAS,EAAC;;;;KAClB;IACH,oBAAC;AAAD,CAAC,AArCD,CAAmC,gBAAQ,GAqC1C;AArCY,sCAAa","sourcesContent":["import { RadioGroupProfile } from '../../groups/radio-group';\nimport { O3rRadioElement } from '../elements/radio-element';\nimport { O3rGroup } from '../group';\n\n/**\n * Group element to manage a radio group\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rRadioGroup extends O3rGroup<O3rRadioElement> implements RadioGroupProfile {\n constructor(sourceElement: O3rRadioElement[]) {\n super(sourceElement);\n }\n\n /** @inheritDoc */\n public async isValidGroup() {\n let name = '';\n\n for (const item of this.items) {\n const itemName = await item.getAttribute('name');\n if (name !== '' && name !== itemName) {\n console.warn(`Items in this radio group are not consistent, incompatible input names found ${name} and ${itemName || 'undefined'}`);\n return false;\n }\n if (itemName !== undefined) {\n name = itemName;\n }\n }\n\n return true;\n }\n\n /**\n * Get the selected radio\n */\n public async getSelectedItem() {\n\n for (const item of this.items) {\n const isSelected = await item.isChecked();\n if (isSelected) {\n return item;\n }\n }\n\n return undefined;\n }\n}\n"]}
@@ -4,6 +4,7 @@ import { O3rElement } from './element';
4
4
  export { PageFixtureProfile } from '../page-fixture';
5
5
  /**
6
6
  * Implementation of the page fixture dedicated to protractor.
7
+ * @deprecated Will be removed in v13, please use Playwright instead
7
8
  */
8
9
  export declare class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {
9
10
  constructor(rootElement?: V);
@@ -1 +1 @@
1
- {"version":3,"file":"page-fixture.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/page-fixture.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,qBAAa,cAAc,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAE,YAAW,kBAAkB,CAAC,CAAC,CAAC;gBAChH,WAAW,CAAC,EAAE,CAAC;IAIpB,QAAQ;CAGhB"}
1
+ {"version":3,"file":"page-fixture.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/page-fixture.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,qBAAa,cAAc,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAE,YAAW,kBAAkB,CAAC,CAAC,CAAC;gBAChH,WAAW,CAAC,EAAE,CAAC;IAIpB,QAAQ;CAGhB"}
@@ -7,6 +7,7 @@ var component_fixture_1 = require("./component-fixture");
7
7
  var utils_1 = require("./utils");
8
8
  /**
9
9
  * Implementation of the page fixture dedicated to protractor.
10
+ * @deprecated Will be removed in v13, please use Playwright instead
10
11
  */
11
12
  var O3rPageFixture = /** @class */ (function (_super) {
12
13
  tslib_1.__extends(O3rPageFixture, _super);
@@ -1 +1 @@
1
- {"version":3,"file":"page-fixture.js","sourceRoot":"","sources":["../../../src/core/protractor/page-fixture.ts"],"names":[],"mappings":";;;;AAAA,yCAAmC;AAEnC,yDAAwD;AAExD,iCAAuC;AAIvC;;GAEG;AACH;IAAuE,0CAAsB;IAC3F,wBAAY,WAAe;QACzB,OAAA,MAAK,YAAC,WAAW,CAAC,SAAC;IACrB,CAAC;IAEM,iCAAQ,GAAf;QACE,OAAO,IAAA,sBAAc,EAAC,oBAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,CAAuE,uCAAmB,GAQzF;AARY,wCAAc","sourcesContent":["import {browser} from 'protractor';\nimport {PageFixtureProfile} from '../page-fixture';\nimport {O3rComponentFixture} from './component-fixture';\nimport {O3rElement} from './element';\nimport {convertPromise} from './utils';\n\nexport {PageFixtureProfile} from '../page-fixture';\n\n/**\n * Implementation of the page fixture dedicated to protractor.\n */\nexport class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {\n constructor(rootElement?: V) {\n super(rootElement);\n }\n\n public getTitle() {\n return convertPromise(browser.getTitle());\n }\n}\n"]}
1
+ {"version":3,"file":"page-fixture.js","sourceRoot":"","sources":["../../../src/core/protractor/page-fixture.ts"],"names":[],"mappings":";;;;AAAA,yCAAmC;AAEnC,yDAAwD;AAExD,iCAAuC;AAIvC;;;GAGG;AACH;IAAuE,0CAAsB;IAC3F,wBAAY,WAAe;QACzB,OAAA,MAAK,YAAC,WAAW,CAAC,SAAC;IACrB,CAAC;IAEM,iCAAQ,GAAf;QACE,OAAO,IAAA,sBAAc,EAAC,oBAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5C,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,CAAuE,uCAAmB,GAQzF;AARY,wCAAc","sourcesContent":["import {browser} from 'protractor';\nimport {PageFixtureProfile} from '../page-fixture';\nimport {O3rComponentFixture} from './component-fixture';\nimport {O3rElement} from './element';\nimport {convertPromise} from './utils';\n\nexport {PageFixtureProfile} from '../page-fixture';\n\n/**\n * Implementation of the page fixture dedicated to protractor.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {\n constructor(rootElement?: V) {\n super(rootElement);\n }\n\n public getTitle() {\n return convertPromise(browser.getTitle());\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { promise as pPromise } from 'protractor';
2
2
  /**
3
3
  * Converts a webdriver promise to ES6 promise so the rest of the framework handles ES6 promises only
4
+ * @deprecated Will be removed in v13, please use Playwright instead
4
5
  * @param promise
5
6
  */
6
7
  export declare function convertPromise<T>(promise: pPromise.Promise<T>): Promise<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,cAE7D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE/C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,cAE7D"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertPromise = convertPromise;
4
4
  /**
5
5
  * Converts a webdriver promise to ES6 promise so the rest of the framework handles ES6 promises only
6
+ * @deprecated Will be removed in v13, please use Playwright instead
6
7
  * @param promise
7
8
  */
8
9
  function convertPromise(promise) {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":";;AAMA,wCAEC;AAND;;;GAGG;AACH,SAAgB,cAAc,CAAI,OAA4B;IAC5D,OAAO,IAAI,OAAO,CAAI,UAAC,OAAO,EAAE,MAAM,IAAK,OAAA,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAA7B,CAA6B,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["import {promise as pPromise} from 'protractor';\n\n/**\n * Converts a webdriver promise to ES6 promise so the rest of the framework handles ES6 promises only\n * @param promise\n */\nexport function convertPromise<T>(promise: pPromise.Promise<T>) {\n return new Promise<T>((resolve, reject) => promise.then(resolve, reject));\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/protractor/utils.ts"],"names":[],"mappings":";;AAOA,wCAEC;AAPD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,OAA4B;IAC5D,OAAO,IAAI,OAAO,CAAI,UAAC,OAAO,EAAE,MAAM,IAAK,OAAA,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAA7B,CAA6B,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["import {promise as pPromise} from 'protractor';\n\n/**\n * Converts a webdriver promise to ES6 promise so the rest of the framework handles ES6 promises only\n * @deprecated Will be removed in v13, please use Playwright instead\n * @param promise\n */\nexport function convertPromise<T>(promise: pPromise.Promise<T>) {\n return new Promise<T>((resolve, reject) => promise.then(resolve, reject));\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/testing",
3
- "version": "11.3.0-prerelease.4",
3
+ "version": "11.3.0-prerelease.40",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -105,10 +105,10 @@
105
105
  "@material/slider": "^14.0.0",
106
106
  "@ngrx/store": "~18.0.0",
107
107
  "@ngx-translate/core": "~15.0.0",
108
- "@o3r/core": "^11.3.0-prerelease.4",
109
- "@o3r/localization": "^11.3.0-prerelease.4",
110
- "@o3r/schematics": "^11.3.0-prerelease.4",
111
- "@playwright/test": "~1.46.0",
108
+ "@o3r/core": "^11.3.0-prerelease.40",
109
+ "@o3r/localization": "^11.3.0-prerelease.40",
110
+ "@o3r/schematics": "^11.3.0-prerelease.40",
111
+ "@playwright/test": "~1.47.0",
112
112
  "@schematics/angular": "~18.2.0",
113
113
  "pixelmatch": "^5.2.1",
114
114
  "pngjs": "^7.0.0",
@@ -188,13 +188,13 @@
188
188
  "@ngx-translate/core": "~15.0.0",
189
189
  "@nx/eslint-plugin": "~19.5.0",
190
190
  "@nx/jest": "~19.5.0",
191
- "@o3r/build-helpers": "^11.3.0-prerelease.4",
192
- "@o3r/core": "^11.3.0-prerelease.4",
193
- "@o3r/eslint-plugin": "^11.3.0-prerelease.4",
194
- "@o3r/localization": "^11.3.0-prerelease.4",
195
- "@o3r/schematics": "^11.3.0-prerelease.4",
196
- "@o3r/test-helpers": "^11.3.0-prerelease.4",
197
- "@playwright/test": "~1.46.0",
191
+ "@o3r/build-helpers": "^11.3.0-prerelease.40",
192
+ "@o3r/core": "^11.3.0-prerelease.40",
193
+ "@o3r/eslint-plugin": "^11.3.0-prerelease.40",
194
+ "@o3r/localization": "^11.3.0-prerelease.40",
195
+ "@o3r/schematics": "^11.3.0-prerelease.40",
196
+ "@o3r/test-helpers": "^11.3.0-prerelease.40",
197
+ "@playwright/test": "~1.47.0",
198
198
  "@schematics/angular": "~18.2.0",
199
199
  "@stylistic/eslint-plugin-ts": "~2.4.0",
200
200
  "@types/jest": "~29.5.2",
@@ -8,15 +8,18 @@
8
8
  * flow with `initFetchManager()`
9
9
  *
10
10
  * You can ignore the waiting of fetchs by setting `browser.ignoreSynchronization` to `true`
11
+ * @deprecated Will be removed in v13, please use Playwright instead
11
12
  */
12
13
  export declare function waitForOtterStable(): Promise<void>;
13
14
  /**
14
15
  * This function initiliaze the FetchManager. Set `window.fetch` variable with a custom behaviour in order to count the
15
16
  * fetch calls.
17
+ * @deprecated Will be removed in v13, please use Playwright instead
16
18
  */
17
19
  export declare function initFetchManager(): Promise<void>;
18
20
  /**
19
21
  * This function stops the FetchManager. Reset `window.fetch` variable with its native behaviour.
22
+ * @deprecated Will be removed in v13, please use Playwright instead
20
23
  */
21
24
  export declare function stopFetchManager(): Promise<void>;
22
25
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/tools/protractor/fetch-manager/utils.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,kBAOvC;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,kBAQrC;AAED;;GAEG;AACH,wBAAsB,gBAAgB,kBAErC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/tools/protractor/fetch-manager/utils.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,kBAOvC;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,kBAQrC;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,kBAErC"}
@@ -17,6 +17,7 @@ var protractor_1 = require("protractor");
17
17
  * flow with `initFetchManager()`
18
18
  *
19
19
  * You can ignore the waiting of fetchs by setting `browser.ignoreSynchronization` to `true`
20
+ * @deprecated Will be removed in v13, please use Playwright instead
20
21
  */
21
22
  function waitForOtterStable() {
22
23
  return tslib_1.__awaiter(this, void 0, void 0, function () {
@@ -41,6 +42,7 @@ function waitForOtterStable() {
41
42
  /**
42
43
  * This function initiliaze the FetchManager. Set `window.fetch` variable with a custom behaviour in order to count the
43
44
  * fetch calls.
45
+ * @deprecated Will be removed in v13, please use Playwright instead
44
46
  */
45
47
  function initFetchManager() {
46
48
  return tslib_1.__awaiter(this, void 0, void 0, function () {
@@ -62,6 +64,7 @@ function initFetchManager() {
62
64
  }
63
65
  /**
64
66
  * This function stops the FetchManager. Reset `window.fetch` variable with its native behaviour.
67
+ * @deprecated Will be removed in v13, please use Playwright instead
65
68
  */
66
69
  function stopFetchManager() {
67
70
  return tslib_1.__awaiter(this, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/tools/protractor/fetch-manager/utils.ts"],"names":[],"mappings":";;AAeA,gDAOC;AAMD,4CAQC;AAKD,4CAEC;;AA3CD,4BAA8B;AAC9B,gCAAkC;AAClC,yCAAqC;AAErC;;;;;;;;;;GAUG;AACH,SAAsB,kBAAkB;;;;wBACtC,qBAAM,oBAAO,CAAC,cAAc,EAAE,EAAA;;oBAA9B,SAA8B,CAAC;yBAC3B,CAAC,oBAAO,CAAC,qBAAqB,EAA9B,wBAA8B;oBAChC,qBAAM,oBAAO,CAAC,kBAAkB,CAC9B,mFAAmF,CAAC,EAAA;;oBADtF,SACsF,CAAC;oBACvF,qBAAM,oBAAO,CAAC,cAAc,EAAE,EAAA;;oBAA9B,SAA8B,CAAC;;;;;;CAElC;AAED;;;GAGG;AACH,SAAsB,gBAAgB;;;;;;oBAC9B,YAAY,GAAG,EAAE,CAAC,YAAY,CAClC,IAAI,CAAC,OAAO,CACV,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EACxF,mBAAmB,CAAC,EACtB,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAAC;oBACtB,qBAAM,oBAAO,CAAC,aAAa,CAAC,YAAY,CAAC,EAAA;;oBAAzC,SAAyC,CAAC;oBAC1C,qBAAM,oBAAO,CAAC,aAAa,CAAC,2CAA2C,CAAC,EAAA;;oBAAxE,SAAwE,CAAC;;;;;CAC1E;AAED;;GAEG;AACH,SAAsB,gBAAgB;;;;wBACpC,qBAAM,oBAAO,CAAC,aAAa,CAAC,2CAA2C,CAAC,EAAA;;oBAAxE,SAAwE,CAAC;;;;;CAC1E","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { browser } from 'protractor';\n\n/**\n * This function waits for all fetchs calls to be resolved and the page to be stable to resolve the promise.\n * It permits to easily run synchronous e2e tests on a flow that uses fetchs calls with protractor.\n * This is very useful in the case of Otter calls to backend because protractor synchronization manager do not care\n * about fetchs calls.\n *\n * This function needs the FetchManager to have been initialized and injected in the browser at the beginning of the\n * flow with `initFetchManager()`\n *\n * You can ignore the waiting of fetchs by setting `browser.ignoreSynchronization` to `true`\n */\nexport async function waitForOtterStable() {\n await browser.waitForAngular();\n if (!browser.ignoreSynchronization) {\n await browser.executeAsyncScript(\n 'window.fetchManager.getInstance().waitForFetchs(arguments[arguments.length - 1]);');\n await browser.waitForAngular();\n }\n}\n\n/**\n * This function initiliaze the FetchManager. Set `window.fetch` variable with a custom behaviour in order to count the\n * fetch calls.\n */\nexport async function initFetchManager() {\n const fetchManager = fs.readFileSync(\n path.resolve(\n process.cwd(), 'node_modules', '@o3r', 'testing', 'tools', 'protractor', 'fetch-manager',\n '_fetch-manager.js'),\n {encoding: 'utf8'});\n await browser.executeScript(fetchManager);\n await browser.executeScript('window.fetchManager.getInstance().init();');\n}\n\n/**\n * This function stops the FetchManager. Reset `window.fetch` variable with its native behaviour.\n */\nexport async function stopFetchManager() {\n await browser.executeScript('window.fetchManager.getInstance().stop();');\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/tools/protractor/fetch-manager/utils.ts"],"names":[],"mappings":";;AAgBA,gDAOC;AAOD,4CAQC;AAMD,4CAEC;;AA9CD,4BAA8B;AAC9B,gCAAkC;AAClC,yCAAqC;AAErC;;;;;;;;;;;GAWG;AACH,SAAsB,kBAAkB;;;;wBACtC,qBAAM,oBAAO,CAAC,cAAc,EAAE,EAAA;;oBAA9B,SAA8B,CAAC;yBAC3B,CAAC,oBAAO,CAAC,qBAAqB,EAA9B,wBAA8B;oBAChC,qBAAM,oBAAO,CAAC,kBAAkB,CAC9B,mFAAmF,CAAC,EAAA;;oBADtF,SACsF,CAAC;oBACvF,qBAAM,oBAAO,CAAC,cAAc,EAAE,EAAA;;oBAA9B,SAA8B,CAAC;;;;;;CAElC;AAED;;;;GAIG;AACH,SAAsB,gBAAgB;;;;;;oBAC9B,YAAY,GAAG,EAAE,CAAC,YAAY,CAClC,IAAI,CAAC,OAAO,CACV,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EACxF,mBAAmB,CAAC,EACtB,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAAC;oBACtB,qBAAM,oBAAO,CAAC,aAAa,CAAC,YAAY,CAAC,EAAA;;oBAAzC,SAAyC,CAAC;oBAC1C,qBAAM,oBAAO,CAAC,aAAa,CAAC,2CAA2C,CAAC,EAAA;;oBAAxE,SAAwE,CAAC;;;;;CAC1E;AAED;;;GAGG;AACH,SAAsB,gBAAgB;;;;wBACpC,qBAAM,oBAAO,CAAC,aAAa,CAAC,2CAA2C,CAAC,EAAA;;oBAAxE,SAAwE,CAAC;;;;;CAC1E","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { browser } from 'protractor';\n\n/**\n * This function waits for all fetchs calls to be resolved and the page to be stable to resolve the promise.\n * It permits to easily run synchronous e2e tests on a flow that uses fetchs calls with protractor.\n * This is very useful in the case of Otter calls to backend because protractor synchronization manager do not care\n * about fetchs calls.\n *\n * This function needs the FetchManager to have been initialized and injected in the browser at the beginning of the\n * flow with `initFetchManager()`\n *\n * You can ignore the waiting of fetchs by setting `browser.ignoreSynchronization` to `true`\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport async function waitForOtterStable() {\n await browser.waitForAngular();\n if (!browser.ignoreSynchronization) {\n await browser.executeAsyncScript(\n 'window.fetchManager.getInstance().waitForFetchs(arguments[arguments.length - 1]);');\n await browser.waitForAngular();\n }\n}\n\n/**\n * This function initiliaze the FetchManager. Set `window.fetch` variable with a custom behaviour in order to count the\n * fetch calls.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport async function initFetchManager() {\n const fetchManager = fs.readFileSync(\n path.resolve(\n process.cwd(), 'node_modules', '@o3r', 'testing', 'tools', 'protractor', 'fetch-manager',\n '_fetch-manager.js'),\n {encoding: 'utf8'});\n await browser.executeScript(fetchManager);\n await browser.executeScript('window.fetchManager.getInstance().init();');\n}\n\n/**\n * This function stops the FetchManager. Reset `window.fetch` variable with its native behaviour.\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport async function stopFetchManager() {\n await browser.executeScript('window.fetchManager.getInstance().stop();');\n}\n"]}
@@ -1,4 +1,7 @@
1
- /** A call to postMessage */
1
+ /**
2
+ * A call to postMessage
3
+ * @deprecated Will be removed in v13, please use Playwright instead
4
+ */
2
5
  export interface PostMessageCall {
3
6
  /** Data passed in the message */
4
7
  data: any;
@@ -7,5 +10,8 @@ export interface PostMessageCall {
7
10
  /** Timestamp of the message */
8
11
  timestamp: Date;
9
12
  }
13
+ /**
14
+ * @deprecated Will be removed in v13, please use Playwright instead
15
+ */
10
16
  export type ConditionFn = (postCall: PostMessageCall) => boolean;
11
17
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/core.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,IAAI,EAAE,GAAG,CAAC;IACV,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAC"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/core.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,iCAAiC;IACjC,IAAI,EAAE,GAAG,CAAC;IACV,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/core.ts"],"names":[],"mappings":"","sourcesContent":["/** A call to postMessage */\nexport interface PostMessageCall {\n /** Data passed in the message */\n data: any;\n /** Target origin passed in the message */\n targetOrigin: string;\n /** Timestamp of the message */\n timestamp: Date;\n}\n\nexport type ConditionFn = (postCall: PostMessageCall) => boolean;\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/core.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A call to postMessage\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport interface PostMessageCall {\n /** Data passed in the message */\n data: any;\n /** Target origin passed in the message */\n targetOrigin: string;\n /** Timestamp of the message */\n timestamp: Date;\n}\n\n/**\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport type ConditionFn = (postCall: PostMessageCall) => boolean;\n"]}
@@ -1,6 +1,7 @@
1
1
  import { ConditionFn, PostMessageCall } from './core';
2
2
  /**
3
3
  * Controls the postMessage interceptor
4
+ * @deprecated Will be removed in v13, please use Playwright instead
4
5
  */
5
6
  export declare class PostMessageInterceptor {
6
7
  private readonly GET_INSTANCE;
@@ -1 +1 @@
1
- {"version":3,"file":"post-message-interceptor.d.ts","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/post-message-interceptor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEtD;;GAEG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiD;IAE9E;;;;OAIG;YACW,kBAAkB;IAIhC;;;;OAIG;YACW,uBAAuB;IAIrC;;;OAGG;IACU,UAAU;IAWvB;;OAEG;IACU,IAAI;IAIjB;;;OAGG;IACU,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW;IAI7C;;OAEG;IACU,aAAa;IAI1B;;;;OAIG;IACU,WAAW,CAAC,eAAe,SAAM,EAAE,OAAO,SAAK,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAG1F"}
1
+ {"version":3,"file":"post-message-interceptor.d.ts","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/post-message-interceptor.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEtD;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiD;IAE9E;;;;OAIG;YACW,kBAAkB;IAIhC;;;;OAIG;YACW,uBAAuB;IAIrC;;;OAGG;IACU,UAAU;IAWvB;;OAEG;IACU,IAAI;IAIjB;;;OAGG;IACU,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW;IAI7C;;OAEG;IACU,aAAa;IAI1B;;;;OAIG;IACU,WAAW,CAAC,eAAe,SAAM,EAAE,OAAO,SAAK,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAG1F"}
@@ -7,6 +7,7 @@ var path = require("node:path");
7
7
  var protractor_1 = require("protractor");
8
8
  /**
9
9
  * Controls the postMessage interceptor
10
+ * @deprecated Will be removed in v13, please use Playwright instead
10
11
  */
11
12
  var PostMessageInterceptor = /** @class */ (function () {
12
13
  function PostMessageInterceptor() {
@@ -1 +1 @@
1
- {"version":3,"file":"post-message-interceptor.js","sourceRoot":"","sources":["../../../../src/tools/protractor/post-message-interceptor/post-message-interceptor.ts"],"names":[],"mappings":";;;;AAAA,4BAA8B;AAC9B,gCAAkC;AAClC,yCAAqC;AAIrC;;GAEG;AACH;IAAA;QACmB,iBAAY,GAAG,6CAA6C,CAAC;IAiEhF,CAAC;IA/DC;;;;OAIG;IACW,mDAAkB,GAAhC,UAAiC,UAAkB;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;;;;4BAC1D,qBAAM,oBAAO,CAAC,aAAa,OAArB,oBAAO,yBAAe,UAAG,IAAI,CAAC,YAAY,cAAI,UAAU,oBAAiB,GAAK,IAAI,WAAC;4BAAhG,sBAAO,SAAyF,EAAC;;;;KAClG;IAED;;;;OAIG;IACW,wDAAuB,GAArC,UAAsC,UAAkB;QAAE,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,6BAAc;;;;;4BAC/D,qBAAM,oBAAO,CAAC,kBAAkB,OAA1B,oBAAO,yBAAoB,UAAG,IAAI,CAAC,YAAY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lEY,wDAAsB","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { browser } from 'protractor';\n\nimport { ConditionFn, PostMessageCall } from './core';\n\n/**\n * Controls the postMessage interceptor\n */\nexport class PostMessageInterceptor {\n private readonly GET_INSTANCE = 'window.postMessageInterceptor.getInstance()';\n\n /**\n * Executes a script in the app\n * @param methodName\n * @param {...any} args\n */\n private async execInstanceMethod(methodName: string, ...args: any[]) {\n return await browser.executeScript(`${this.GET_INSTANCE}.${methodName}(...arguments);`, ...args);\n }\n\n /**\n * Executes an async script in the app\n * @param methodName\n * @param {...any} args\n */\n private async execInstanceAsyncMethod(methodName: string, ...args: any[]) {\n return await browser.executeAsyncScript(`${this.GET_INSTANCE}.${methodName}(...arguments);`, ...args);\n }\n\n /**\n * Initializes the PostMessageInterceptor in the app\n * NOTE: It does not start listening right away. You need to call listen()\n */\n public async initialize() {\n const fetchManager = fs.readFileSync(\n path.resolve(process.cwd(), 'node_modules', '@o3r', 'testing', 'tools', 'protractor', 'post-message-interceptor', '_post-message-interceptor.js'),\n {\n encoding: 'utf8'\n }\n );\n await browser.executeScript(fetchManager);\n await this.execInstanceMethod('init');\n }\n\n /**\n * Stops the PostMessageInterceptor.\n */\n public async stop() {\n await this.execInstanceMethod('stop');\n }\n\n /**\n * Listens for post messages\n * @param conditionFn an optional boolean function that will evaluate if the message should be saved or not in the stack\n */\n public async listen(conditionFn?: ConditionFn) {\n await this.execInstanceMethod('listen', conditionFn);\n }\n\n /**\n * Stops listening for post messages, resets the stack and clears the condition\n */\n public async stopListening() {\n await this.execInstanceMethod('stopListening');\n }\n\n /**\n * Get all the post messages\n * @param timeoutInterval Interval in milliseconds between two checks\n * @param retries How many retries to be executed (-1 for infinite retries)\n */\n public async getMessages(timeoutInterval = 100, retries = -1): Promise<PostMessageCall[]> {\n return (await this.execInstanceAsyncMethod('getMessages', timeoutInterval, retries)) as PostMessageCall[];\n }\n}\n"]}
1
+ {"version":3,"file":"post-message-interceptor.js","s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qBAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAA;;wBAArC,SAAqC,CAAC;;;;;KACvC;IAED;;;OAGG;IACU,uCAAM,GAAnB,UAAoB,WAAyB;;;;4BAC3C,qBAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAA;;wBAApD,SAAoD,CAAC;;;;;KACtD;IAED;;OAEG;IACU,8CAAa,GAA1B;;;;4BACE,qBAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAA;;wBAA9C,SAA8C,CAAC;;;;;KAChD;IAED;;;;OAIG;IACU,4CAAW,GAAxB;oEAAyB,eAAqB,EAAE,OAAY;YAAnC,gCAAA,EAAA,qBAAqB;YAAE,wBAAA,EAAA,WAAW,CAAC;;;4BAClD,qBAAM,IAAI,CAAC,uBAAuB,CAAC,aAAa,EAAE,eAAe,EAAE,OAAO,CAAC,EAAA;4BAAnF,sBAAO,CAAC,SAA2E,CAAsB,EAAC;;;;KAC3G;IACH,6BAAC;AAAD,CAAC,AAlED,IAkEC;AAlEY,wDAAsB","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { browser } from 'protractor';\n\nimport { ConditionFn, PostMessageCall } from './core';\n\n/**\n * Controls the postMessage interceptor\n * @deprecated Will be removed in v13, please use Playwright instead\n */\nexport class PostMessageInterceptor {\n private readonly GET_INSTANCE = 'window.postMessageInterceptor.getInstance()';\n\n /**\n * Executes a script in the app\n * @param methodName\n * @param {...any} args\n */\n private async execInstanceMethod(methodName: string, ...args: any[]) {\n return await browser.executeScript(`${this.GET_INSTANCE}.${methodName}(...arguments);`, ...args);\n }\n\n /**\n * Executes an async script in the app\n * @param methodName\n * @param {...any} args\n */\n private async execInstanceAsyncMethod(methodName: string, ...args: any[]) {\n return await browser.executeAsyncScript(`${this.GET_INSTANCE}.${methodName}(...arguments);`, ...args);\n }\n\n /**\n * Initializes the PostMessageInterceptor in the app\n * NOTE: It does not start listening right away. You need to call listen()\n */\n public async initialize() {\n const fetchManager = fs.readFileSync(\n path.resolve(process.cwd(), 'node_modules', '@o3r', 'testing', 'tools', 'protractor', 'post-message-interceptor', '_post-message-interceptor.js'),\n {\n encoding: 'utf8'\n }\n );\n await browser.executeScript(fetchManager);\n await this.execInstanceMethod('init');\n }\n\n /**\n * Stops the PostMessageInterceptor.\n */\n public async stop() {\n await this.execInstanceMethod('stop');\n }\n\n /**\n * Listens for post messages\n * @param conditionFn an optional boolean function that will evaluate if the message should be saved or not in the stack\n */\n public async listen(conditionFn?: ConditionFn) {\n await this.execInstanceMethod('listen', conditionFn);\n }\n\n /**\n * Stops listening for post messages, resets the stack and clears the condition\n */\n public async stopListening() {\n await this.execInstanceMethod('stopListening');\n }\n\n /**\n * Get all the post messages\n * @param timeoutInterval Interval in milliseconds between two checks\n * @param retries How many retries to be executed (-1 for infinite retries)\n */\n public async getMessages(timeoutInterval = 100, retries = -1): Promise<PostMessageCall[]> {\n return (await this.execInstanceAsyncMethod('getMessages', timeoutInterval, retries)) as PostMessageCall[];\n }\n}\n"]}