@o3r/testing 13.0.0-next.6 → 13.0.0-prerelease.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/core/angular/angular-materials/autocomplete-material.js +9 -20
  2. package/core/angular/angular-materials/autocomplete-material.js.map +1 -1
  3. package/core/angular/angular-materials/index.js +1 -1
  4. package/core/angular/angular-materials/select-material.js +42 -91
  5. package/core/angular/angular-materials/select-material.js.map +1 -1
  6. package/core/angular/angular-materials/slider-material.js +8 -11
  7. package/core/angular/angular-materials/slider-material.js.map +1 -1
  8. package/core/angular/component-fixture.js +68 -148
  9. package/core/angular/component-fixture.js.map +1 -1
  10. package/core/angular/element.js +44 -50
  11. package/core/angular/element.js.map +1 -1
  12. package/core/angular/elements/checkbox-element.js +12 -16
  13. package/core/angular/elements/checkbox-element.js.map +1 -1
  14. package/core/angular/elements/index.js +1 -1
  15. package/core/angular/elements/radio-element.js +12 -16
  16. package/core/angular/elements/radio-element.js.map +1 -1
  17. package/core/angular/elements/select-element.js +28 -49
  18. package/core/angular/elements/select-element.js.map +1 -1
  19. package/core/angular/elements/slider-element.js +38 -42
  20. package/core/angular/elements/slider-element.js.map +1 -1
  21. package/core/angular/group.js +9 -14
  22. package/core/angular/group.js.map +1 -1
  23. package/core/angular/groups/index.js +1 -1
  24. package/core/angular/groups/radio-group.js +25 -62
  25. package/core/angular/groups/radio-group.js.map +1 -1
  26. package/core/angular/index.js +1 -1
  27. package/core/angular/page-fixture.js +8 -11
  28. package/core/angular/page-fixture.js.map +1 -1
  29. package/core/angular-materials/autocomplete-material.js +8 -11
  30. package/core/angular-materials/autocomplete-material.js.map +1 -1
  31. package/core/angular-materials/index.js +1 -1
  32. package/core/angular-materials/select-material.js +12 -15
  33. package/core/angular-materials/select-material.js.map +1 -1
  34. package/core/angular-materials/slider-material.js +5 -8
  35. package/core/angular-materials/slider-material.js.map +1 -1
  36. package/core/component-fixture.js +28 -33
  37. package/core/component-fixture.js.map +1 -1
  38. package/core/element.js +24 -26
  39. package/core/element.js.map +1 -1
  40. package/core/elements/checkbox-element.js +12 -16
  41. package/core/elements/checkbox-element.js.map +1 -1
  42. package/core/elements/index.js +1 -1
  43. package/core/elements/radio-element.js +12 -16
  44. package/core/elements/radio-element.js.map +1 -1
  45. package/core/elements/select-element.js +10 -13
  46. package/core/elements/select-element.js.map +1 -1
  47. package/core/elements/slider-element.js +5 -8
  48. package/core/elements/slider-element.js.map +1 -1
  49. package/core/group.js +9 -15
  50. package/core/group.js.map +1 -1
  51. package/core/groups/index.js +1 -1
  52. package/core/groups/radio-group.js +8 -11
  53. package/core/groups/radio-group.js.map +1 -1
  54. package/core/helpers.js +11 -16
  55. package/core/helpers.js.map +1 -1
  56. package/core/index.js +1 -1
  57. package/core/page-fixture.js +8 -11
  58. package/core/page-fixture.js.map +1 -1
  59. package/core/playwright/angular-materials/autocomplete-material.js +26 -56
  60. package/core/playwright/angular-materials/autocomplete-material.js.map +1 -1
  61. package/core/playwright/angular-materials/index.js +1 -1
  62. package/core/playwright/angular-materials/select-material.js +48 -110
  63. package/core/playwright/angular-materials/select-material.js.map +1 -1
  64. package/core/playwright/angular-materials/slider-material.js +7 -10
  65. package/core/playwright/angular-materials/slider-material.js.map +1 -1
  66. package/core/playwright/component-fixture.js +88 -173
  67. package/core/playwright/component-fixture.js.map +1 -1
  68. package/core/playwright/element.js +38 -90
  69. package/core/playwright/element.js.map +1 -1
  70. package/core/playwright/elements/checkbox-element.js +49 -94
  71. package/core/playwright/elements/checkbox-element.js.map +1 -1
  72. package/core/playwright/elements/index.js +1 -1
  73. package/core/playwright/elements/radio-element.js +18 -34
  74. package/core/playwright/elements/radio-element.js.map +1 -1
  75. package/core/playwright/elements/select-element.js +14 -21
  76. package/core/playwright/elements/select-element.js.map +1 -1
  77. package/core/playwright/elements/slider-element.js +78 -157
  78. package/core/playwright/elements/slider-element.js.map +1 -1
  79. package/core/playwright/group.js +9 -14
  80. package/core/playwright/group.js.map +1 -1
  81. package/core/playwright/groups/index.js +1 -1
  82. package/core/playwright/groups/radio-group.js +27 -64
  83. package/core/playwright/groups/radio-group.js.map +1 -1
  84. package/core/playwright/index.js +1 -1
  85. package/core/playwright/page-fixture.js +8 -18
  86. package/core/playwright/page-fixture.js.map +1 -1
  87. package/errors/fixture-usage-error.js +5 -10
  88. package/errors/fixture-usage-error.js.map +1 -1
  89. package/errors/index.js +1 -1
  90. package/errors/transpilation-purpose-only.js +5 -10
  91. package/errors/transpilation-purpose-only.js.map +1 -1
  92. package/kassette/index.js +1 -1
  93. package/kassette/update-dates-in-mocks.js +66 -85
  94. package/kassette/update-dates-in-mocks.js.map +1 -1
  95. package/localization/index.js +1 -1
  96. package/localization/localization-mock.js +38 -60
  97. package/localization/localization-mock.js.map +1 -1
  98. package/mocks/index.js +1 -1
  99. package/mocks/mock-component-generator.js +54 -53
  100. package/mocks/mock-component-generator.js.map +1 -1
  101. package/package.json +59 -58
  102. package/public_api.js +1 -1
  103. package/schematics/add-functions-to-fixture/models.d.ts.map +1 -1
  104. package/schematics/add-functions-to-fixture/models.js.map +1 -1
  105. package/schematics/ng-add/index.d.ts.map +1 -1
  106. package/schematics/ng-add/index.js +4 -6
  107. package/schematics/ng-add/index.js.map +1 -1
  108. package/schematics/ng-add/playwright/index.d.ts.map +1 -1
  109. package/schematics/ng-add/playwright/index.js +3 -4
  110. package/schematics/ng-add/playwright/index.js.map +1 -1
  111. package/schematics/ng-add/schema.json +2 -1
  112. package/schematics/playwright/sanity/schema.json +2 -1
  113. package/schematics/playwright/scenario/schema.json +2 -1
  114. package/store/index.js +1 -1
  115. package/store/testable-select.js +13 -13
  116. package/store/testable-select.js.map +1 -1
  117. package/tools/index.js +1 -1
  118. package/tools/path-replacement/index.js +1 -1
  119. package/tools/path-replacement/path-replacement.js +24 -20
  120. package/tools/path-replacement/path-replacement.js.map +1 -1
  121. package/visual-test/index.js +1 -1
  122. package/visual-test/utils.js +18 -7
  123. package/visual-test/utils.js.map +1 -1
  124. package/visual-test/visual-test.d.ts.map +1 -1
  125. package/visual-test/visual-test.js +30 -35
  126. package/visual-test/visual-test.js.map +1 -1
  127. package/visual-testing-reporter/index.d.ts.map +1 -1
  128. package/visual-testing-reporter/index.js +37 -40
  129. package/visual-testing-reporter/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","sourceRoot":"","sources":["../../../src/core/angular/group.ts"],"names":[],"mappings":";;;AAeA;;GAEG;AACH;IAME,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,AAZD,IAYC;AAZY,4BAAQ","sourcesContent":["import {\n GroupProfile,\n} from '../group';\nimport {\n ElementProfile,\n O3rElement,\n} from './element';\n\nexport { GroupProfile } from '../group';\n\n/**\n * Constructor of a O3rGroup\n */\nexport type O3rGroupConstructor<T extends GroupProfile<V>, V extends ElementProfile> = new (sourceElement: V[]) => T;\n\n/**\n * Implementation dedicated to angular / TestBed.\n */\nexport class O3rGroup<T extends O3rElement> implements GroupProfile<T> {\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/angular/group.ts"],"names":[],"mappings":";;;AAeA;;GAEG;AACH,MAAa,QAAQ;IACnB,kBAAkB;IAClB,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,YAAsB,aAAkB;QAAlB,kBAAa,GAAb,aAAa,CAAK;IAAG,CAAC;IAE5C,kBAAkB;IACX,YAAY;QACjB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAZD,4BAYC","sourcesContent":["import {\n GroupProfile,\n} from '../group';\nimport {\n ElementProfile,\n O3rElement,\n} from './element';\n\nexport { GroupProfile } from '../group';\n\n/**\n * Constructor of a O3rGroup\n */\nexport type O3rGroupConstructor<T extends GroupProfile<V>, V extends ElementProfile> = new (sourceElement: V[]) => T;\n\n/**\n * Implementation dedicated to angular / TestBed.\n */\nexport class O3rGroup<T extends O3rElement> implements GroupProfile<T> {\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,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
3
+ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./radio-group"), exports);
5
5
  //# sourceMappingURL=index.js.map
@@ -1,75 +1,38 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.O3rRadioGroup = void 0;
4
- var tslib_1 = require("tslib");
5
- var group_1 = require("../group");
4
+ const group_1 = require("../group");
6
5
  /**
7
6
  * Group element to manage a radio group
8
7
  */
9
- var O3rRadioGroup = /** @class */ (function (_super) {
10
- tslib_1.__extends(O3rRadioGroup, _super);
11
- function O3rRadioGroup(sourceElement) {
12
- return _super.call(this, sourceElement) || this;
8
+ class O3rRadioGroup extends group_1.O3rGroup {
9
+ constructor(sourceElement) {
10
+ super(sourceElement);
13
11
  }
14
12
  /** @inheritDoc */
15
- O3rRadioGroup.prototype.isValidGroup = function () {
16
- return tslib_1.__awaiter(this, void 0, void 0, function () {
17
- var name, _i, _a, item, itemName;
18
- return tslib_1.__generator(this, function (_b) {
19
- switch (_b.label) {
20
- case 0:
21
- name = '';
22
- _i = 0, _a = this.items;
23
- _b.label = 1;
24
- case 1:
25
- if (!(_i < _a.length)) return [3 /*break*/, 4];
26
- item = _a[_i];
27
- return [4 /*yield*/, item.getAttribute('name')];
28
- case 2:
29
- itemName = _b.sent();
30
- if (name !== '' && name !== itemName) {
31
- return [2 /*return*/, false];
32
- }
33
- name = itemName;
34
- _b.label = 3;
35
- case 3:
36
- _i++;
37
- return [3 /*break*/, 1];
38
- case 4: return [2 /*return*/, true];
39
- }
40
- });
41
- });
42
- };
13
+ async isValidGroup() {
14
+ let name = '';
15
+ for (const item of this.items) {
16
+ const itemName = await item.getAttribute('name');
17
+ if (name !== '' && name !== itemName) {
18
+ return false;
19
+ }
20
+ name = itemName;
21
+ }
22
+ return true;
23
+ }
43
24
  /**
44
25
  * Get the selected radio
45
26
  */
46
- O3rRadioGroup.prototype.getSelectedItem = function () {
47
- return tslib_1.__awaiter(this, void 0, void 0, function () {
48
- var _i, _a, item, isSelected;
49
- return tslib_1.__generator(this, function (_b) {
50
- switch (_b.label) {
51
- case 0:
52
- _i = 0, _a = this.items;
53
- _b.label = 1;
54
- case 1:
55
- if (!(_i < _a.length)) return [3 /*break*/, 4];
56
- item = _a[_i];
57
- return [4 /*yield*/, item.isChecked()];
58
- case 2:
59
- isSelected = _b.sent();
60
- if (isSelected) {
61
- return [2 /*return*/, item];
62
- }
63
- _b.label = 3;
64
- case 3:
65
- _i++;
66
- return [3 /*break*/, 1];
67
- case 4: return [2 /*return*/, undefined];
68
- }
69
- });
70
- });
71
- };
72
- return O3rRadioGroup;
73
- }(group_1.O3rGroup));
27
+ async getSelectedItem() {
28
+ for (const item of this.items) {
29
+ const isSelected = await item.isChecked();
30
+ if (isSelected) {
31
+ return item;
32
+ }
33
+ }
34
+ return undefined;
35
+ }
36
+ }
74
37
  exports.O3rRadioGroup = O3rRadioGroup;
75
38
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../src/core/angular/groups/radio-group.ts"],"names":[],"mappings":";;;;AAMA,kCAEkB;AAElB;;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,sBAAO,KAAK,EAAC;wBACf,CAAC;wBAED,IAAI,GAAG,QAAQ,CAAC;;;wBANC,IAAU,CAAA;;4BAS7B,sBAAO,IAAI,EAAC;;;;KACb;IAED;;OAEG;IACU,uCAAe,GAA5B;;;;;;8BAC+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,AAlCD,CAAmC,gBAAQ,GAkC1C;AAlCY,sCAAa","sourcesContent":["import {\n RadioGroupProfile,\n} from '../../groups/radio-group';\nimport {\n O3rRadioElement,\n} from '../elements/radio-element';\nimport {\n O3rGroup,\n} 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 return false;\n }\n\n name = itemName;\n }\n\n return true;\n }\n\n /**\n * Get the selected radio\n */\n public async getSelectedItem() {\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/angular/groups/radio-group.ts"],"names":[],"mappings":";;;AAMA,oCAEkB;AAElB;;GAEG;AACH,MAAa,aAAc,SAAQ,gBAAyB;IAC1D,YAAY,aAAgC;QAC1C,KAAK,CAAC,aAAa,CAAC,CAAC;IACvB,CAAC;IAED,kBAAkB;IACX,KAAK,CAAC,YAAY;QACvB,IAAI,IAAI,GAAG,EAAE,CAAC;QAEd,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACjD,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrC,OAAO,KAAK,CAAC;YACf,CAAC;YAED,IAAI,GAAG,QAAQ,CAAC;QAClB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,eAAe;QAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YAC1C,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAlCD,sCAkCC","sourcesContent":["import {\n RadioGroupProfile,\n} from '../../groups/radio-group';\nimport {\n O3rRadioElement,\n} from '../elements/radio-element';\nimport {\n O3rGroup,\n} 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 return false;\n }\n\n name = itemName;\n }\n\n return true;\n }\n\n /**\n * Get the selected radio\n */\n public async getSelectedItem() {\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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
3
+ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./angular-materials"), exports);
5
5
  tslib_1.__exportStar(require("./component-fixture"), exports);
6
6
  tslib_1.__exportStar(require("./element"), exports);
@@ -1,23 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.O3rPageFixture = void 0;
4
- var tslib_1 = require("tslib");
5
- var index_1 = require("../../errors/index");
6
- var component_fixture_1 = require("./component-fixture");
4
+ const index_1 = require("../../errors/index");
5
+ const component_fixture_1 = require("./component-fixture");
7
6
  /**
8
7
  * Implementation of the page fixture dedicated to Angular.
9
8
  * Pages are not supposed to be used in a Angular environment!
10
9
  */
11
- var O3rPageFixture = /** @class */ (function (_super) {
12
- tslib_1.__extends(O3rPageFixture, _super);
13
- function O3rPageFixture(element) {
14
- return _super.call(this, element) || this;
10
+ class O3rPageFixture extends component_fixture_1.O3rComponentFixture {
11
+ constructor(element) {
12
+ super(element);
15
13
  }
16
14
  /** @inheritdoc */
17
- O3rPageFixture.prototype.getTitle = function () {
15
+ getTitle() {
18
16
  throw new index_1.TranspilationPurposeOnlyError('getTitle() operation has no sense in Angular context');
19
- };
20
- return O3rPageFixture;
21
- }(component_fixture_1.O3rComponentFixture));
17
+ }
18
+ }
22
19
  exports.O3rPageFixture = O3rPageFixture;
23
20
  //# sourceMappingURL=page-fixture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-fixture.js","sourceRoot":"","sources":["../../../src/core/angular/page-fixture.ts"],"names":[],"mappings":";;;;AAAA,4CAE4B;AAI5B,yDAE6B;AAO7B;;;GAGG;AACH;IAAuE,0CAAsB;IAC3F,wBAAY,OAAU;QACpB,OAAA,MAAK,YAAC,OAAO,CAAC,SAAC;IACjB,CAAC;IAED,kBAAkB;IACX,iCAAQ,GAAf;QACE,MAAM,IAAI,qCAA6B,CAAC,sDAAsD,CAAC,CAAC;IAClG,CAAC;IACH,qBAAC;AAAD,CAAC,AATD,CAAuE,uCAAmB,GASzF;AATY,wCAAc","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../../errors/index';\nimport {\n PageFixtureProfile,\n} from '../page-fixture';\nimport {\n O3rComponentFixture,\n} from './component-fixture';\nimport {\n O3rElement,\n} from './element';\n\nexport { PageFixtureProfile } from '../page-fixture';\n\n/**\n * Implementation of the page fixture dedicated to Angular.\n * Pages are not supposed to be used in a Angular environment!\n */\nexport class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {\n constructor(element: V) {\n super(element);\n }\n\n /** @inheritdoc */\n public getTitle(): Promise<string> {\n throw new TranspilationPurposeOnlyError('getTitle() operation has no sense in Angular context');\n }\n}\n"]}
1
+ {"version":3,"file":"page-fixture.js","sourceRoot":"","sources":["../../../src/core/angular/page-fixture.ts"],"names":[],"mappings":";;;AAAA,8CAE4B;AAI5B,2DAE6B;AAO7B;;;GAGG;AACH,MAAa,cAAkD,SAAQ,uCAAsB;IAC3F,YAAY,OAAU;QACpB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,kBAAkB;IACX,QAAQ;QACb,MAAM,IAAI,qCAA6B,CAAC,sDAAsD,CAAC,CAAC;IAClG,CAAC;CACF;AATD,wCASC","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../../errors/index';\nimport {\n PageFixtureProfile,\n} from '../page-fixture';\nimport {\n O3rComponentFixture,\n} from './component-fixture';\nimport {\n O3rElement,\n} from './element';\n\nexport { PageFixtureProfile } from '../page-fixture';\n\n/**\n * Implementation of the page fixture dedicated to Angular.\n * Pages are not supposed to be used in a Angular environment!\n */\nexport class O3rPageFixture<V extends O3rElement = O3rElement> extends O3rComponentFixture<V> implements PageFixtureProfile<V> {\n constructor(element: V) {\n super(element);\n }\n\n /** @inheritdoc */\n public getTitle(): Promise<string> {\n throw new TranspilationPurposeOnlyError('getTitle() operation has no sense in Angular context');\n }\n}\n"]}
@@ -1,27 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MatAutocomplete = void 0;
4
- var tslib_1 = require("tslib");
5
- var index_1 = require("../../errors/index");
6
- var element_1 = require("../element");
4
+ const index_1 = require("../../errors/index");
5
+ const element_1 = require("../element");
7
6
  /**
8
7
  * Mock for ElementProfile class.
9
8
  * This class is used for fixture compilation purpose.
10
9
  */
11
- var MatAutocomplete = /** @class */ (function (_super) {
12
- tslib_1.__extends(MatAutocomplete, _super);
13
- function MatAutocomplete(_sourceElement) {
14
- return _super.call(this, _sourceElement) || this;
10
+ class MatAutocomplete extends element_1.O3rElement {
11
+ constructor(_sourceElement) {
12
+ super(_sourceElement);
15
13
  }
16
14
  /**
17
15
  * Select an element in a dropdown by value.
18
16
  * @param _value
19
17
  * @param _timeout
20
18
  */
21
- MatAutocomplete.prototype.selectByValue = function (_value, _timeout) {
19
+ selectByValue(_value, _timeout) {
22
20
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
23
- };
24
- return MatAutocomplete;
25
- }(element_1.O3rElement));
21
+ }
22
+ }
26
23
  exports.MatAutocomplete = MatAutocomplete;
27
24
  //# sourceMappingURL=autocomplete-material.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete-material.js","sourceRoot":"","sources":["../../../src/core/angular-materials/autocomplete-material.ts"],"names":[],"mappings":";;;;AAAA,4CAE4B;AAC5B,sCAGoB;AAepB;;;GAGG;AACH;IAAqC,2CAAU;IAC7C,yBAAY,cAAmB;QAC7B,OAAA,MAAK,YAAC,cAAc,CAAC,SAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,uCAAa,GAApB,UAAqB,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IACH,sBAAC;AAAD,CAAC,AAbD,CAAqC,oBAAU,GAa9C;AAbY,0CAAe","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../../errors/index';\nimport {\n ElementProfile,\n O3rElement,\n} from '../element';\n\n/**\n * Interface to describe the material autocomplete elements that are used inside a fixture.\n * As for ComponentFixtureProfile, this abstracts the testing framework that is used by choosing the right\n * implementation at runtime.\n */\nexport interface MatAutocompleteProfile extends ElementProfile {\n\n /**\n * Select an element in a dropdown by value.\n */\n selectByValue(value: string): Promise<void>;\n}\n\n/**\n * Mock for ElementProfile class.\n * This class is used for fixture compilation purpose.\n */\nexport class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {\n constructor(_sourceElement: any) {\n super(_sourceElement);\n }\n\n /**\n * Select an element in a dropdown by value.\n * @param _value\n * @param _timeout\n */\n public selectByValue(_value: string, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n}\n"]}
1
+ {"version":3,"file":"autocomplete-material.js","sourceRoot":"","sources":["../../../src/core/angular-materials/autocomplete-material.ts"],"names":[],"mappings":";;;AAAA,8CAE4B;AAC5B,wCAGoB;AAepB;;;GAGG;AACH,MAAa,eAAgB,SAAQ,oBAAU;IAC7C,YAAY,cAAmB;QAC7B,KAAK,CAAC,cAAc,CAAC,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;CACF;AAbD,0CAaC","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../../errors/index';\nimport {\n ElementProfile,\n O3rElement,\n} from '../element';\n\n/**\n * Interface to describe the material autocomplete elements that are used inside a fixture.\n * As for ComponentFixtureProfile, this abstracts the testing framework that is used by choosing the right\n * implementation at runtime.\n */\nexport interface MatAutocompleteProfile extends ElementProfile {\n\n /**\n * Select an element in a dropdown by value.\n */\n selectByValue(value: string): Promise<void>;\n}\n\n/**\n * Mock for ElementProfile class.\n * This class is used for fixture compilation purpose.\n */\nexport class MatAutocomplete extends O3rElement implements MatAutocompleteProfile {\n constructor(_sourceElement: any) {\n super(_sourceElement);\n }\n\n /**\n * Select an element in a dropdown by value.\n * @param _value\n * @param _timeout\n */\n public selectByValue(_value: string, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
3
+ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./autocomplete-material"), exports);
5
5
  tslib_1.__exportStar(require("./select-material"), exports);
6
6
  tslib_1.__exportStar(require("./slider-material"), exports);
@@ -1,44 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MatSelect = void 0;
4
- var tslib_1 = require("tslib");
5
- var index_1 = require("../../errors/index");
6
- var element_1 = require("../element");
4
+ const index_1 = require("../../errors/index");
5
+ const element_1 = require("../element");
7
6
  /**
8
7
  * Mock for ElementProfile class.
9
8
  * This class is used for fixture compilation purpose.
10
9
  */
11
- var MatSelect = /** @class */ (function (_super) {
12
- tslib_1.__extends(MatSelect, _super);
13
- function MatSelect(_sourceElement) {
14
- return _super.call(this, _sourceElement) || this;
10
+ class MatSelect extends element_1.O3rElement {
11
+ constructor(_sourceElement) {
12
+ super(_sourceElement);
15
13
  }
16
14
  /**
17
15
  * Select an element in a dropdown by index.
18
16
  * @param _index
19
17
  * @param _timeout
20
18
  */
21
- MatSelect.prototype.selectByIndex = function (_index, _timeout) {
19
+ selectByIndex(_index, _timeout) {
22
20
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
23
- };
21
+ }
24
22
  /**
25
23
  * Select an element in a dropdown by value.
26
24
  * @param _value
27
25
  * @param _timeout
28
26
  * @deprecated selectByValue relies on ng-reflect-value, which doesn't work when app is in production mode
29
27
  */
30
- MatSelect.prototype.selectByValue = function (_value, _timeout) {
28
+ selectByValue(_value, _timeout) {
31
29
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
32
- };
30
+ }
33
31
  /**
34
32
  * Select an element in a dropdown by label.
35
33
  * @param _label
36
34
  * @param _timeout
37
35
  */
38
- MatSelect.prototype.selectByLabel = function (_label, _timeout) {
36
+ selectByLabel(_label, _timeout) {
39
37
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
40
- };
41
- return MatSelect;
42
- }(element_1.O3rElement));
38
+ }
39
+ }
43
40
  exports.MatSelect = MatSelect;
44
41
  //# sourceMappingURL=select-material.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-material.js","sourceRoot":"","sources":["../../../src/core/angular-materials/select-material.ts"],"names":[],"mappings":";;;;AAAA,4CAE4B;AAC5B,sCAEoB;AAYpB;;;GAGG;AACH;IAA+B,qCAAU;IACvC,mBAAY,cAAmB;QAC7B,OAAA,MAAK,YAAC,cAAc,CAAC,SAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,iCAAa,GAApB,UAAqB,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACI,iCAAa,GAApB,UAAqB,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;OAIG;IACI,iCAAa,GAApB,UAAqB,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IACH,gBAAC;AAAD,CAAC,AAhCD,CAA+B,oBAAU,GAgCxC;AAhCY,8BAAS","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../../errors/index';\nimport {\n O3rElement,\n} from '../element';\nimport {\n SelectElementProfile,\n} from '../elements';\n\n/**\n * Interface to describe the material select elements that are used inside a fixture.\n * As for ComponentFixtureProfile, this abstracts the testing framework that is used by choosing the right\n * implementation at runtime.\n */\nexport interface MatSelectProfile extends SelectElementProfile {}\n\n/**\n * Mock for ElementProfile class.\n * This class is used for fixture compilation purpose.\n */\nexport class MatSelect extends O3rElement implements MatSelectProfile {\n constructor(_sourceElement: any) {\n super(_sourceElement);\n }\n\n /**\n * Select an element in a dropdown by index.\n * @param _index\n * @param _timeout\n */\n public selectByIndex(_index: number, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Select an element in a dropdown by value.\n * @param _value\n * @param _timeout\n * @deprecated selectByValue relies on ng-reflect-value, which doesn't work when app is in production mode\n */\n public selectByValue(_value: string, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Select an element in a dropdown by label.\n * @param _label\n * @param _timeout\n */\n public selectByLabel(_label: string, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n}\n"]}
1
+ {"version":3,"file":"select-material.js","sourceRoot":"","sources":["../../../src/core/angular-materials/select-material.ts"],"names":[],"mappings":";;;AAAA,8CAE4B;AAC5B,wCAEoB;AAYpB;;;GAGG;AACH,MAAa,SAAU,SAAQ,oBAAU;IACvC,YAAY,cAAmB;QAC7B,KAAK,CAAC,cAAc,CAAC,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,MAAc,EAAE,QAAiB;QACpD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;CACF;AAhCD,8BAgCC","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../../errors/index';\nimport {\n O3rElement,\n} from '../element';\nimport {\n SelectElementProfile,\n} from '../elements';\n\n/**\n * Interface to describe the material select elements that are used inside a fixture.\n * As for ComponentFixtureProfile, this abstracts the testing framework that is used by choosing the right\n * implementation at runtime.\n */\nexport interface MatSelectProfile extends SelectElementProfile {}\n\n/**\n * Mock for ElementProfile class.\n * This class is used for fixture compilation purpose.\n */\nexport class MatSelect extends O3rElement implements MatSelectProfile {\n constructor(_sourceElement: any) {\n super(_sourceElement);\n }\n\n /**\n * Select an element in a dropdown by index.\n * @param _index\n * @param _timeout\n */\n public selectByIndex(_index: number, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Select an element in a dropdown by value.\n * @param _value\n * @param _timeout\n * @deprecated selectByValue relies on ng-reflect-value, which doesn't work when app is in production mode\n */\n public selectByValue(_value: string, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Select an element in a dropdown by label.\n * @param _label\n * @param _timeout\n */\n public selectByLabel(_label: string, _timeout?: number): Promise<void> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n}\n"]}
@@ -1,18 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MatSlider = void 0;
4
- var tslib_1 = require("tslib");
5
- var element_1 = require("../element");
4
+ const element_1 = require("../element");
6
5
  /**
7
6
  * Mock for ElementProfile class.
8
7
  * This class is used for fixture compilation purpose.
9
8
  */
10
- var MatSlider = /** @class */ (function (_super) {
11
- tslib_1.__extends(MatSlider, _super);
12
- function MatSlider(sourceElement) {
13
- return _super.call(this, sourceElement) || this;
9
+ class MatSlider extends element_1.O3rElement {
10
+ constructor(sourceElement) {
11
+ super(sourceElement);
14
12
  }
15
- return MatSlider;
16
- }(element_1.O3rElement));
13
+ }
17
14
  exports.MatSlider = MatSlider;
18
15
  //# sourceMappingURL=slider-material.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider-material.js","sourceRoot":"","sources":["../../../src/core/angular-materials/slider-material.ts"],"names":[],"mappings":";;;;AAAA,sCAEoB;AAYpB;;;GAGG;AACH;IAA+B,qCAAU;IACvC,mBAAY,aAAkB;QAC5B,OAAA,MAAK,YAAC,aAAa,CAAC,SAAC;IACvB,CAAC;IACH,gBAAC;AAAD,CAAC,AAJD,CAA+B,oBAAU,GAIxC;AAJY,8BAAS","sourcesContent":["import {\n O3rElement,\n} from '../element';\nimport type {\n SliderElementProfile,\n} from '../elements';\n\n/**\n * Interface to describe the material Slider elements that are used inside a fixture.\n * As for ComponentFixtureProfile, this abstracts the testing framework that is used by choosing the right\n * implementation at runtime.\n */\nexport interface MatSliderProfile extends SliderElementProfile {}\n\n/**\n * Mock for ElementProfile class.\n * This class is used for fixture compilation purpose.\n */\nexport class MatSlider extends O3rElement implements MatSliderProfile {\n constructor(sourceElement: any) {\n super(sourceElement);\n }\n}\n"]}
1
+ {"version":3,"file":"slider-material.js","sourceRoot":"","sources":["../../../src/core/angular-materials/slider-material.ts"],"names":[],"mappings":";;;AAAA,wCAEoB;AAYpB;;;GAGG;AACH,MAAa,SAAU,SAAQ,oBAAU;IACvC,YAAY,aAAkB;QAC5B,KAAK,CAAC,aAAa,CAAC,CAAC;IACvB,CAAC;CACF;AAJD,8BAIC","sourcesContent":["import {\n O3rElement,\n} from '../element';\nimport type {\n SliderElementProfile,\n} from '../elements';\n\n/**\n * Interface to describe the material Slider elements that are used inside a fixture.\n * As for ComponentFixtureProfile, this abstracts the testing framework that is used by choosing the right\n * implementation at runtime.\n */\nexport interface MatSliderProfile extends SliderElementProfile {}\n\n/**\n * Mock for ElementProfile class.\n * This class is used for fixture compilation purpose.\n */\nexport class MatSlider extends O3rElement implements MatSliderProfile {\n constructor(sourceElement: any) {\n super(sourceElement);\n }\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.O3rComponentFixture = void 0;
4
- var index_1 = require("../errors/index");
4
+ const index_1 = require("../errors/index");
5
5
  /**
6
6
  * Mock for Component fixture class.
7
7
  * This class is used for fixture compilation purpose.
8
8
  */
9
- var O3rComponentFixture = /** @class */ (function () {
10
- function O3rComponentFixture(_element) {
9
+ class O3rComponentFixture {
10
+ constructor(_element) {
11
11
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
12
12
  }
13
13
  /**
@@ -16,22 +16,21 @@ var O3rComponentFixture = /** @class */ (function () {
16
16
  * @param _element ElementProfile to test
17
17
  * @param _timeout specific timeout that will throw when reach
18
18
  */
19
- O3rComponentFixture.prototype.throwOnUndefinedElement = function (_element, _timeout) {
19
+ throwOnUndefinedElement(_element, _timeout) {
20
20
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
21
- };
21
+ }
22
22
  /**
23
23
  * Throws an exception if the element is undefined.
24
24
  * Otherwise returns the element.
25
25
  * @param _element ElementProfile to test
26
26
  * @param _timeout specific timeout that will throw when reach
27
27
  */
28
- O3rComponentFixture.prototype.throwOnUndefined = function (_element, _timeout) {
28
+ throwOnUndefined(_element, _timeout) {
29
29
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
30
- };
31
- O3rComponentFixture.prototype.queryWithOptions = function (_selector, _elementConstructor, _options) {
32
- if (_options === void 0) { _options = {}; }
30
+ }
31
+ queryWithOptions(_selector, _elementConstructor, _options = {}) {
33
32
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
34
- };
33
+ }
35
34
  /**
36
35
  * Get text from the element associated to the given selector, or undefined if the element is not found or not visible
37
36
  * @param _selector Selector to access the element
@@ -41,10 +40,9 @@ var O3rComponentFixture = /** @class */ (function () {
41
40
  * @param _options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
42
41
  * @param _options.timeout Duration to wait for the element to be present before it throws
43
42
  */
44
- O3rComponentFixture.prototype.getText = function (_selector, _options) {
45
- if (_options === void 0) { _options = {}; }
43
+ getText(_selector, _options = {}) {
46
44
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
47
- };
45
+ }
48
46
  /**
49
47
  * Check if the element associated to the given selector is visible
50
48
  * @param _selector Selector to access the element
@@ -54,10 +52,9 @@ var O3rComponentFixture = /** @class */ (function () {
54
52
  * @param _options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
55
53
  * @param _options.timeout Duration to wait for the element to be present before it throws
56
54
  */
57
- O3rComponentFixture.prototype.isVisible = function (_selector, _options) {
58
- if (_options === void 0) { _options = {}; }
55
+ isVisible(_selector, _options = {}) {
59
56
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
60
- };
57
+ }
61
58
  /**
62
59
  * Click on the element associated to the given selector if it exists and is visible
63
60
  * @param _selector Selector to access the element
@@ -67,34 +64,32 @@ var O3rComponentFixture = /** @class */ (function () {
67
64
  * @param _options.shouldThrowIfNotPresent If set to true the function will throw if the element is not present
68
65
  * @param _options.timeout Duration to wait for the element to be present before it throws
69
66
  */
70
- O3rComponentFixture.prototype.click = function (_selector, _options) {
71
- if (_options === void 0) { _options = {}; }
67
+ click(_selector, _options = {}) {
72
68
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
73
- };
69
+ }
74
70
  /** @inheritdoc */
75
- O3rComponentFixture.prototype.query = function (_selector, _returnType) {
71
+ query(_selector, _returnType) {
76
72
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
77
- };
73
+ }
78
74
  /** @inheritdoc */
79
- O3rComponentFixture.prototype.queryAll = function (_selector, _returnType, _groupType, _timeout) {
75
+ queryAll(_selector, _returnType, _groupType, _timeout) {
80
76
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
81
- };
77
+ }
82
78
  /** @inheritdoc */
83
- O3rComponentFixture.prototype.getElement = function () {
79
+ getElement() {
84
80
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
85
- };
81
+ }
86
82
  /** @inheritdoc */
87
- O3rComponentFixture.prototype.getSubComponents = function () {
83
+ getSubComponents() {
88
84
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
89
- };
85
+ }
90
86
  /** @inheritDoc */
91
- O3rComponentFixture.prototype.queryNotPresent = function (_selector, _timeout) {
87
+ queryNotPresent(_selector, _timeout) {
92
88
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
93
- };
94
- O3rComponentFixture.prototype.queryNth = function (_selector, _index, _returnType) {
89
+ }
90
+ queryNth(_selector, _index, _returnType) {
95
91
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
96
- };
97
- return O3rComponentFixture;
98
- }());
92
+ }
93
+ }
99
94
  exports.O3rComponentFixture = O3rComponentFixture;
100
95
  //# sourceMappingURL=component-fixture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-fixture.js","sourceRoot":"","sources":["../../src/core/component-fixture.ts"],"names":[],"mappings":";;;AAAA,yCAEyB;AA+FzB;;;GAGG;AACH;IACE,6BAAY,QAAY;QACtB,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACO,qDAAuB,GAAjC,UAAwD,QAAuB,EAAE,QAAiB;QAChG,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACO,8CAAgB,GAA1B,UAAiD,QAAgC,EAAE,QAAiB;QAClG,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IA6BS,8CAAgB,GAA1B,UACE,SAAiB,EACjB,mBAAyD,EACzD,QAIM;QAJN,yBAAA,EAAA,aAIM;QAEN,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACO,qCAAO,GAAjB,UAAwC,SAAiB,EAAE,QAKrD;QALqD,yBAAA,EAAA,aAKrD;QACJ,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACO,uCAAS,GAAnB,UAA0C,SAAiB,EAAE,QAKvD;QALuD,yBAAA,EAAA,aAKvD;QACJ,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACO,mCAAK,GAAf,UAAsC,SAAiB,EAAE,QAKnD;QALmD,yBAAA,EAAA,aAKnD;QACJ,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAMD,kBAAkB;IACX,mCAAK,GAAZ,UAAmC,SAAiB,EAAE,WAAiD;QACrG,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAQD,kBAAkB;IACX,sCAAQ,GAAf,UACE,SAAiB,EACjB,WAAiD,EACjD,UAAiD,EACjD,QAAiB;QAEjB,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED,kBAAkB;IACX,wCAAU,GAAjB;QACE,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED,kBAAkB;IACX,8CAAgB,GAAvB;QACE,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED,kBAAkB;IACX,6CAAe,GAAtB,UAAuB,SAAiB,EAAE,QAAiB;QACzD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAOM,sCAAQ,GAAf,UAA0C,SAAiB,EAAE,MAAc,EAAE,WAAiD;QAC5H,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IACH,0BAAC;AAAD,CAAC,AAtKD,IAsKC;AAtKY,kDAAmB","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../errors/index';\nimport {\n ElementProfile,\n O3rElement,\n O3rElementConstructor,\n} from './element';\nimport {\n GroupProfile,\n O3rGroupConstructor,\n} from './group';\n\n/**\n * Interface to describe the Component fixture that is used as an abstraction layer to access the DOM of a component.\n * It comes with two implementations that are chosen a build time whether you will use it in a karma or protractor\n * runtime. This way the same fixture is usable for both component and e2e tests.\n */\nexport interface ComponentFixtureProfile<V extends ElementProfile = ElementProfile> {\n /**\n * Return the root element of the component fixture.\n */\n getElement(): V | undefined;\n\n /**\n * Queries an element using the CSS selector passed as argument.\n * If the fixture has a context (was created with a TestBed or Protractor element) the query will be applied\n * to this element's tree only.\n * @param selector CSS selector for the desired element\n * @param returnType Constructor of the element expected\n */\n query(selector: string, returnType?: undefined): Promise<ElementProfile | undefined>;\n query<T extends ElementProfile>(selector: string, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n query<T extends ElementProfile>(selector: string, returnType: O3rElementConstructor<T> | undefined): Promise<T | ElementProfile | undefined>;\n\n /**\n * Queries the nth element of a list using the CSS selector passed as argument.\n * If the fixture has a context (was created with a TestBed or Protractor element) the query will be applied\n * to this element's tree only.\n * @param selector CSS selector for the desired element\n * @param index Index of the element to retrieve\n * @param returnType Constructor of the element expected\n */\n queryNth(selector: string, index: number, returnType?: undefined): Promise<ElementProfile | undefined>;\n queryNth<T extends ElementProfile>(selector: string, index: number, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n queryNth<T extends ElementProfile>(selector: string, index: number, returnType: O3rElementConstructor<T> | undefined): Promise<T | ElementProfile | undefined>;\n\n /**\n * Queries a list of elements using the CSS selector passed as argument.\n * If the fixture has a context (was created with a TestBed or Protractor element) the query will be applied\n * to this element's tree only.\n * @param selector CSS selector for the desired elements\n * @param returnType Constructor of the element expected\n * @param groupType\n * @param timeout\n */\n queryAll(selector: string, returnType?: undefined, groupType?: undefined, timeout?: number): Promise<O3rElement[]>;\n queryAll<T extends ElementProfile>(selector: string, returnType: O3rElementConstructor<T>, groupType?: undefined, timeout?: number): Promise<T[]>;\n queryAll<T extends ElementProfile, K extends GroupProfile<T>>(selector: string, returnType: O3rElementConstructor<T>, groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;\n queryAll<T extends ElementProfile, K extends GroupProfile<T>>(\n selector: string,\n returnType: O3rElementConstructor<T> | undefined,\n groupType: O3rGroupConstructor<K, T> | undefined,\n timeout?: number\n ): Promise<(T | O3rElement)[] | K>;\n\n /**\n * Returns the component fixtures corresponding to the sub-components.\n */\n getSubComponents(): Promise<{ [componentName: string]: ComponentFixtureProfile[] }>;\n\n /**\n * Returns true if the provided selector has no match in the document.\n * A custom timeout value can be passed for asynchronous implementations that support it.\n * @param selector\n * @param timeout\n */\n queryNotPresent(selector: string, timeout?: number): Promise<boolean>;\n}\n\n/**\n * Interface to tell typescript that the element which implements\n * it can be used as a prototype\n */\nexport type Constructable<T extends ComponentFixtureProfile, U extends FixtureWithCustom = FixtureWithCustom> = new (elem?: ElementProfile, customFixtures?: U) => T;\n\n/**\n * This is the type that has to be extended by each component fixture context\n * It contains the custom fixture type for a component presenter and its subcomponents fixtures contexts\n * key: presenter name\n * fixture: custom presenter type\n * customSubFixtures: custom fixtures for the presenter subcomponents\n */\nexport interface FixtureWithCustom {\n [fixtureKey: string]: { fixture?: Constructable<ComponentFixtureProfile, FixtureWithCustom>; customSubFixtures?: FixtureWithCustom } | undefined;\n}\n\n/**\n * Mock for Component fixture class.\n * This class is used for fixture compilation purpose.\n */\nexport class O3rComponentFixture<V extends O3rElement = O3rElement> implements ComponentFixtureProfile<V> {\n constructor(_element?: V) {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param _element ElementProfile to test\n * @param _timeout specific timeout that will throw when reach\n */\n protected throwOnUndefinedElement<T extends O3rElement>(_element: T | undefined, _timeout?: number): Promise<T> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param _element ElementProfile to test\n * @param _timeout specific timeout that will throw when reach\n */\n protected throwOnUndefined<T extends O3rElement>(_element: Promise<T | undefined>, _timeout?: number): Promise<T | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 queryWithOptions(\n _selector: string,\n _elementConstructor: undefined,\n _options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n }\n ): Promise<O3rElement | undefined>;\n protected queryWithOptions<T extends O3rElement>(\n _selector: string,\n _elementConstructor: O3rElementConstructor<T>,\n _options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n }\n ): Promise<T | undefined>;\n protected queryWithOptions<T extends O3rElement>(\n _selector: string,\n _elementConstructor: O3rElementConstructor<T> | undefined,\n _options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}\n ): Promise<T | O3rElement | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 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 throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 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 throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 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 throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public query(_selector: string, _returnType?: undefined, timeout?: number): Promise<O3rElement | undefined>;\n /** @inheritdoc */\n public query<T extends O3rElement>(_selector: string, _returnType: O3rElementConstructor<T>, timeout?: number): Promise<T | undefined>;\n /** @inheritdoc */\n public query<T extends O3rElement>(_selector: string, _returnType: O3rElementConstructor<T> | undefined): Promise<T | O3rElement | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public queryAll(_selector: string, _returnType?: undefined, _groupType?: undefined, timeout?: number): Promise<O3rElement[]>;\n /** @inheritdoc */\n public queryAll<T extends O3rElement>(_selector: string, _returnType: O3rElementConstructor<T>, _groupType?: undefined, timeout?: number): Promise<T[]>;\n /** @inheritdoc */\n public queryAll<T extends O3rElement, K extends GroupProfile<T>>(_selector: string, _returnType: O3rElementConstructor<T>, _groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;\n /** @inheritdoc */\n public queryAll<T extends O3rElement, K extends GroupProfile<T>>(\n _selector: string,\n _returnType: O3rElementConstructor<T> | undefined,\n _groupType: O3rGroupConstructor<K, T> | undefined,\n _timeout?: number\n ): Promise<(T | O3rElement)[] | K> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public getElement(): V | undefined {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public getSubComponents(): Promise<{ [componentName: string]: ComponentFixtureProfile[] }> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritDoc */\n public queryNotPresent(_selector: string, _timeout?: number): Promise<boolean> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * @inheritDoc\n */\n public queryNth(_selector: string, _index: number, _returnType?: undefined): Promise<ElementProfile | undefined>;\n public queryNth<T extends ElementProfile>(_selector: string, _index: number, _returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n public queryNth<T extends ElementProfile>(_selector: string, _index: number, _returnType: O3rElementConstructor<T> | undefined): Promise<T | ElementProfile | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n}\n"]}
1
+ {"version":3,"file":"component-fixture.js","sourceRoot":"","sources":["../../src/core/component-fixture.ts"],"names":[],"mappings":";;;AAAA,2CAEyB;AA+FzB;;;GAGG;AACH,MAAa,mBAAmB;IAC9B,YAAY,QAAY;QACtB,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACO,uBAAuB,CAAuB,QAAuB,EAAE,QAAiB;QAChG,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACO,gBAAgB,CAAuB,QAAgC,EAAE,QAAiB;QAClG,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IA6BS,gBAAgB,CACxB,SAAiB,EACjB,mBAAyD,EACzD,WAII,EAAE;QAEN,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACO,OAAO,CAAuB,SAAiB,EAAE,WAKvD,EAAE;QACJ,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACO,SAAS,CAAuB,SAAiB,EAAE,WAKzD,EAAE;QACJ,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;OAQG;IACO,KAAK,CAAuB,SAAiB,EAAE,WAKrD,EAAE;QACJ,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAMD,kBAAkB;IACX,KAAK,CAAuB,SAAiB,EAAE,WAAiD;QACrG,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAQD,kBAAkB;IACX,QAAQ,CACb,SAAiB,EACjB,WAAiD,EACjD,UAAiD,EACjD,QAAiB;QAEjB,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED,kBAAkB;IACX,UAAU;QACf,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED,kBAAkB;IACX,gBAAgB;QACrB,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAED,kBAAkB;IACX,eAAe,CAAC,SAAiB,EAAE,QAAiB;QACzD,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;IAOM,QAAQ,CAA2B,SAAiB,EAAE,MAAc,EAAE,WAAiD;QAC5H,MAAM,IAAI,qCAA6B,CAAC,uCAAuC,CAAC,CAAC;IACnF,CAAC;CACF;AAtKD,kDAsKC","sourcesContent":["import {\n TranspilationPurposeOnlyError,\n} from '../errors/index';\nimport {\n ElementProfile,\n O3rElement,\n O3rElementConstructor,\n} from './element';\nimport {\n GroupProfile,\n O3rGroupConstructor,\n} from './group';\n\n/**\n * Interface to describe the Component fixture that is used as an abstraction layer to access the DOM of a component.\n * It comes with two implementations that are chosen a build time whether you will use it in a karma or protractor\n * runtime. This way the same fixture is usable for both component and e2e tests.\n */\nexport interface ComponentFixtureProfile<V extends ElementProfile = ElementProfile> {\n /**\n * Return the root element of the component fixture.\n */\n getElement(): V | undefined;\n\n /**\n * Queries an element using the CSS selector passed as argument.\n * If the fixture has a context (was created with a TestBed or Protractor element) the query will be applied\n * to this element's tree only.\n * @param selector CSS selector for the desired element\n * @param returnType Constructor of the element expected\n */\n query(selector: string, returnType?: undefined): Promise<ElementProfile | undefined>;\n query<T extends ElementProfile>(selector: string, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n query<T extends ElementProfile>(selector: string, returnType: O3rElementConstructor<T> | undefined): Promise<T | ElementProfile | undefined>;\n\n /**\n * Queries the nth element of a list using the CSS selector passed as argument.\n * If the fixture has a context (was created with a TestBed or Protractor element) the query will be applied\n * to this element's tree only.\n * @param selector CSS selector for the desired element\n * @param index Index of the element to retrieve\n * @param returnType Constructor of the element expected\n */\n queryNth(selector: string, index: number, returnType?: undefined): Promise<ElementProfile | undefined>;\n queryNth<T extends ElementProfile>(selector: string, index: number, returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n queryNth<T extends ElementProfile>(selector: string, index: number, returnType: O3rElementConstructor<T> | undefined): Promise<T | ElementProfile | undefined>;\n\n /**\n * Queries a list of elements using the CSS selector passed as argument.\n * If the fixture has a context (was created with a TestBed or Protractor element) the query will be applied\n * to this element's tree only.\n * @param selector CSS selector for the desired elements\n * @param returnType Constructor of the element expected\n * @param groupType\n * @param timeout\n */\n queryAll(selector: string, returnType?: undefined, groupType?: undefined, timeout?: number): Promise<O3rElement[]>;\n queryAll<T extends ElementProfile>(selector: string, returnType: O3rElementConstructor<T>, groupType?: undefined, timeout?: number): Promise<T[]>;\n queryAll<T extends ElementProfile, K extends GroupProfile<T>>(selector: string, returnType: O3rElementConstructor<T>, groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;\n queryAll<T extends ElementProfile, K extends GroupProfile<T>>(\n selector: string,\n returnType: O3rElementConstructor<T> | undefined,\n groupType: O3rGroupConstructor<K, T> | undefined,\n timeout?: number\n ): Promise<(T | O3rElement)[] | K>;\n\n /**\n * Returns the component fixtures corresponding to the sub-components.\n */\n getSubComponents(): Promise<{ [componentName: string]: ComponentFixtureProfile[] }>;\n\n /**\n * Returns true if the provided selector has no match in the document.\n * A custom timeout value can be passed for asynchronous implementations that support it.\n * @param selector\n * @param timeout\n */\n queryNotPresent(selector: string, timeout?: number): Promise<boolean>;\n}\n\n/**\n * Interface to tell typescript that the element which implements\n * it can be used as a prototype\n */\nexport type Constructable<T extends ComponentFixtureProfile, U extends FixtureWithCustom = FixtureWithCustom> = new (elem?: ElementProfile, customFixtures?: U) => T;\n\n/**\n * This is the type that has to be extended by each component fixture context\n * It contains the custom fixture type for a component presenter and its subcomponents fixtures contexts\n * key: presenter name\n * fixture: custom presenter type\n * customSubFixtures: custom fixtures for the presenter subcomponents\n */\nexport interface FixtureWithCustom {\n [fixtureKey: string]: { fixture?: Constructable<ComponentFixtureProfile, FixtureWithCustom>; customSubFixtures?: FixtureWithCustom } | undefined;\n}\n\n/**\n * Mock for Component fixture class.\n * This class is used for fixture compilation purpose.\n */\nexport class O3rComponentFixture<V extends O3rElement = O3rElement> implements ComponentFixtureProfile<V> {\n constructor(_element?: V) {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param _element ElementProfile to test\n * @param _timeout specific timeout that will throw when reach\n */\n protected throwOnUndefinedElement<T extends O3rElement>(_element: T | undefined, _timeout?: number): Promise<T> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * Throws an exception if the element is undefined.\n * Otherwise returns the element.\n * @param _element ElementProfile to test\n * @param _timeout specific timeout that will throw when reach\n */\n protected throwOnUndefined<T extends O3rElement>(_element: Promise<T | undefined>, _timeout?: number): Promise<T | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 queryWithOptions(\n _selector: string,\n _elementConstructor: undefined,\n _options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n }\n ): Promise<O3rElement | undefined>;\n protected queryWithOptions<T extends O3rElement>(\n _selector: string,\n _elementConstructor: O3rElementConstructor<T>,\n _options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n }\n ): Promise<T | undefined>;\n protected queryWithOptions<T extends O3rElement>(\n _selector: string,\n _elementConstructor: O3rElementConstructor<T> | undefined,\n _options: {\n index?: number;\n shouldThrowIfNotPresent?: boolean;\n timeout?: number;\n } = {}\n ): Promise<T | O3rElement | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 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 throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 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 throw new TranspilationPurposeOnlyError('Should target a proper implementation');\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 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 throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public query(_selector: string, _returnType?: undefined, timeout?: number): Promise<O3rElement | undefined>;\n /** @inheritdoc */\n public query<T extends O3rElement>(_selector: string, _returnType: O3rElementConstructor<T>, timeout?: number): Promise<T | undefined>;\n /** @inheritdoc */\n public query<T extends O3rElement>(_selector: string, _returnType: O3rElementConstructor<T> | undefined): Promise<T | O3rElement | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public queryAll(_selector: string, _returnType?: undefined, _groupType?: undefined, timeout?: number): Promise<O3rElement[]>;\n /** @inheritdoc */\n public queryAll<T extends O3rElement>(_selector: string, _returnType: O3rElementConstructor<T>, _groupType?: undefined, timeout?: number): Promise<T[]>;\n /** @inheritdoc */\n public queryAll<T extends O3rElement, K extends GroupProfile<T>>(_selector: string, _returnType: O3rElementConstructor<T>, _groupType: O3rGroupConstructor<K, T>, timeout?: number): Promise<K>;\n /** @inheritdoc */\n public queryAll<T extends O3rElement, K extends GroupProfile<T>>(\n _selector: string,\n _returnType: O3rElementConstructor<T> | undefined,\n _groupType: O3rGroupConstructor<K, T> | undefined,\n _timeout?: number\n ): Promise<(T | O3rElement)[] | K> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public getElement(): V | undefined {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritdoc */\n public getSubComponents(): Promise<{ [componentName: string]: ComponentFixtureProfile[] }> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /** @inheritDoc */\n public queryNotPresent(_selector: string, _timeout?: number): Promise<boolean> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n\n /**\n * @inheritDoc\n */\n public queryNth(_selector: string, _index: number, _returnType?: undefined): Promise<ElementProfile | undefined>;\n public queryNth<T extends ElementProfile>(_selector: string, _index: number, _returnType: O3rElementConstructor<T>): Promise<T | undefined>;\n public queryNth<T extends ElementProfile>(_selector: string, _index: number, _returnType: O3rElementConstructor<T> | undefined): Promise<T | ElementProfile | undefined> {\n throw new TranspilationPurposeOnlyError('Should target a proper implementation');\n }\n}\n"]}
package/core/element.js CHANGED
@@ -1,54 +1,52 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.O3rElement = void 0;
4
- var index_1 = require("../errors/index");
4
+ const index_1 = require("../errors/index");
5
5
  /**
6
6
  * Mock for ElementProfile class.
7
7
  * This class is used for fixture compilation purpose.
8
8
  */
9
- var O3rElement = /** @class */ (function () {
10
- function O3rElement(_sourceElement) {
11
- }
12
- O3rElement.prototype.getInnerHTML = function () {
9
+ class O3rElement {
10
+ constructor(_sourceElement) { }
11
+ getInnerHTML() {
13
12
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
14
- };
13
+ }
15
14
  /** @inheritdoc */
16
- O3rElement.prototype.getText = function () {
15
+ getText() {
17
16
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
18
- };
17
+ }
19
18
  /** @inheritdoc */
20
- O3rElement.prototype.getPlainText = function () {
19
+ getPlainText() {
21
20
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
22
- };
21
+ }
23
22
  /** @inheritdoc */
24
- O3rElement.prototype.click = function () {
23
+ click() {
25
24
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
26
- };
25
+ }
27
26
  /** @inheritdoc */
28
- O3rElement.prototype.getAttribute = function (_attributeName) {
27
+ getAttribute(_attributeName) {
29
28
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
30
- };
29
+ }
31
30
  /** @inheritdoc */
32
- O3rElement.prototype.mouseOver = function () {
31
+ mouseOver() {
33
32
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
34
- };
33
+ }
35
34
  /** @inheritdoc */
36
- O3rElement.prototype.getValue = function () {
35
+ getValue() {
37
36
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
38
- };
37
+ }
39
38
  /** @inheritdoc */
40
- O3rElement.prototype.setValue = function (_input) {
39
+ setValue(_input) {
41
40
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
42
- };
41
+ }
43
42
  /** @inheritdoc */
44
- O3rElement.prototype.clearValue = function () {
43
+ clearValue() {
45
44
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
46
- };
45
+ }
47
46
  /** @inheritdoc */
48
- O3rElement.prototype.isVisible = function () {
47
+ isVisible() {
49
48
  throw new index_1.TranspilationPurposeOnlyError('Should target a proper implementation');
50
- };
51
- return O3rElement;
52
- }());
49
+ }
50
+ }
53
51
  exports.O3rElement = O3rElement;
54
52
  //# sourceMappingURL=element.js.map