@jahia/cypress 1.0.4 → 1.0.5

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 (59) hide show
  1. package/dist/page-object/baseComponent.d.ts +2 -11
  2. package/dist/page-object/baseComponent.js +1 -25
  3. package/dist/page-object/html/iframe.d.ts +10 -0
  4. package/dist/page-object/html/iframe.js +46 -0
  5. package/dist/page-object/html/index.d.ts +1 -0
  6. package/dist/page-object/html/index.js +13 -0
  7. package/dist/page-object/iframe.d.ts +0 -1
  8. package/dist/page-object/iframe.js +0 -3
  9. package/dist/page-object/index.d.ts +3 -1
  10. package/dist/page-object/index.js +3 -1
  11. package/dist/page-object/material/index.d.ts +2 -0
  12. package/dist/page-object/material/index.js +14 -0
  13. package/dist/page-object/material/muiinput.d.ts +8 -0
  14. package/dist/page-object/material/muiinput.js +36 -0
  15. package/dist/page-object/material/muiradio.d.ts +5 -0
  16. package/dist/page-object/material/muiradio.js +32 -0
  17. package/dist/page-object/moonstone/accordion.d.ts +0 -1
  18. package/dist/page-object/moonstone/accordion.js +0 -3
  19. package/dist/page-object/moonstone/button.d.ts +0 -3
  20. package/dist/page-object/moonstone/button.js +0 -6
  21. package/dist/page-object/moonstone/dropdown.d.ts +0 -2
  22. package/dist/page-object/moonstone/dropdown.js +2 -4
  23. package/dist/page-object/moonstone/index.d.ts +0 -2
  24. package/dist/page-object/moonstone/index.js +0 -3
  25. package/dist/page-object/moonstone/menu.d.ts +0 -2
  26. package/dist/page-object/moonstone/menu.js +0 -3
  27. package/dist/page-object/moonstone/muiinput.d.ts +0 -1
  28. package/dist/page-object/moonstone/muiinput.js +1 -4
  29. package/dist/page-object/moonstone/muiradio.d.ts +0 -2
  30. package/dist/page-object/moonstone/muiradio.js +0 -3
  31. package/dist/page-object/moonstone/pagination.d.ts +0 -2
  32. package/dist/page-object/moonstone/pagination.js +3 -5
  33. package/dist/page-object/moonstone/primaryNav.d.ts +0 -2
  34. package/dist/page-object/moonstone/primaryNav.js +0 -3
  35. package/dist/page-object/moonstone/secondaryNav.d.ts +0 -2
  36. package/dist/page-object/moonstone/secondaryNav.js +0 -3
  37. package/dist/page-object/moonstone/table.d.ts +0 -4
  38. package/dist/page-object/moonstone/table.js +5 -16
  39. package/dist/page-object/utils.d.ts +11 -0
  40. package/dist/page-object/utils.js +39 -0
  41. package/package.json +1 -1
  42. package/src/page-object/baseComponent.ts +1 -23
  43. package/src/page-object/{iframe.ts → html/iframe.ts} +1 -5
  44. package/src/page-object/html/index.ts +1 -0
  45. package/src/page-object/index.ts +3 -1
  46. package/src/page-object/material/index.ts +2 -0
  47. package/src/page-object/{moonstone → material}/muiinput.ts +2 -6
  48. package/src/page-object/material/muiradio.ts +13 -0
  49. package/src/page-object/moonstone/accordion.ts +1 -5
  50. package/src/page-object/moonstone/button.ts +1 -9
  51. package/src/page-object/moonstone/dropdown.ts +3 -6
  52. package/src/page-object/moonstone/index.ts +0 -3
  53. package/src/page-object/moonstone/menu.ts +1 -6
  54. package/src/page-object/moonstone/pagination.ts +4 -8
  55. package/src/page-object/moonstone/primaryNav.ts +1 -5
  56. package/src/page-object/moonstone/secondaryNav.ts +1 -5
  57. package/src/page-object/moonstone/table.ts +6 -21
  58. package/src/page-object/utils.ts +39 -0
  59. package/src/page-object/moonstone/muiradio.ts +0 -17
@@ -1,18 +1,9 @@
1
1
  /// <reference types="cypress" />
2
2
  import Chainable = Cypress.Chainable;
3
- export declare function getElement(selector: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Chainable<JQuery>;
4
- export declare function get<Component extends BaseComponent>(C: {
3
+ export declare type ComponentType<Component> = {
5
4
  new (p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component;
6
5
  defaultSelector: string;
7
- }, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
8
- export declare function getByRole<Component extends BaseComponent>(C: {
9
- new (p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component;
10
- defaultSelector: string;
11
- }, role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
12
- export declare function getByContent<Component extends BaseComponent>(c: {
13
- new (p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component;
14
- defaultSelector: string;
15
- }, content: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
6
+ };
16
7
  export declare class BaseComponent {
17
8
  static count: number;
18
9
  element: Chainable<JQuery>;
@@ -1,30 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.BaseComponent = exports.getByContent = exports.getByRole = exports.get = exports.getElement = void 0;
4
- function getElement(selector, parent, assertion) {
5
- var chainable = parent ? parent.get().find(selector) : cy.get(selector);
6
- if (assertion) {
7
- return chainable.should(assertion);
8
- }
9
- return chainable;
10
- }
11
- exports.getElement = getElement;
12
- function get(C, parent, assertion) {
13
- return new C(getElement(C.defaultSelector, parent, assertion), assertion);
14
- }
15
- exports.get = get;
16
- function getByRole(C, role, parent, assertion) {
17
- return new C(getElement(C.defaultSelector + "[data-sel-role=\"" + role + "\"]", parent, assertion), assertion);
18
- }
19
- exports.getByRole = getByRole;
20
- function getByContent(c, content, parent, assertion) {
21
- var chainable = getElement(c.defaultSelector, parent).should('contains', content).contains(content);
22
- if (assertion) {
23
- chainable = chainable.should(assertion);
24
- }
25
- return new c(chainable, assertion);
26
- }
27
- exports.getByContent = getByContent;
3
+ exports.BaseComponent = void 0;
28
4
  var BaseComponent = /** @class */ (function () {
29
5
  function BaseComponent(element, assertion) {
30
6
  this.id = BaseComponent.count++;
@@ -0,0 +1,10 @@
1
+ /// <reference types="cypress" />
2
+ import { BaseComponent } from "../baseComponent";
3
+ import Chainable = Cypress.Chainable;
4
+ export declare class IFrame extends BaseComponent {
5
+ static defaultSelector: string;
6
+ private body;
7
+ constructor(element: Chainable<JQuery>, assertion?: (s: JQuery) => void);
8
+ getBody(): Chainable<JQuery>;
9
+ enter(): void;
10
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ exports.__esModule = true;
18
+ exports.IFrame = void 0;
19
+ var baseComponent_1 = require("../baseComponent");
20
+ var IFrame = /** @class */ (function (_super) {
21
+ __extends(IFrame, _super);
22
+ function IFrame(element, assertion) {
23
+ var _this = _super.call(this, element, assertion) || this;
24
+ _this.get()
25
+ .should(function (f) {
26
+ var fr = f[0];
27
+ expect(fr.contentWindow.location.href).not.equals('about:blank');
28
+ expect(fr.contentWindow.document.readyState).equals('complete');
29
+ expect(fr.contentDocument.body).not.be.empty;
30
+ })
31
+ .its('0.contentDocument.body').as('framebody' + _this.id);
32
+ return _this;
33
+ }
34
+ IFrame.prototype.getBody = function () {
35
+ return cy.get('@framebody' + this.id);
36
+ };
37
+ IFrame.prototype.enter = function () {
38
+ this.get().then(function (f) {
39
+ var fr = f[0];
40
+ cy.visit(fr.contentWindow.location.href);
41
+ });
42
+ };
43
+ IFrame.defaultSelector = 'iframe';
44
+ return IFrame;
45
+ }(baseComponent_1.BaseComponent));
46
+ exports.IFrame = IFrame;
@@ -0,0 +1 @@
1
+ export * from './iframe';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ exports.__esModule = true;
13
+ __exportStar(require("./iframe"), exports);
@@ -3,7 +3,6 @@ import { BaseComponent } from "./baseComponent";
3
3
  import Chainable = Cypress.Chainable;
4
4
  export declare class IFrame extends BaseComponent {
5
5
  static defaultSelector: string;
6
- static get(parent?: BaseComponent): IFrame;
7
6
  private body;
8
7
  constructor(element: Chainable<JQuery>, assertion?: (s: JQuery) => void);
9
8
  getBody(): Chainable<JQuery>;
@@ -31,9 +31,6 @@ var IFrame = /** @class */ (function (_super) {
31
31
  .its('0.contentDocument.body').as('framebody' + _this.id);
32
32
  return _this;
33
33
  }
34
- IFrame.get = function (parent) {
35
- return baseComponent_1.get(IFrame, parent);
36
- };
37
34
  IFrame.prototype.getBody = function () {
38
35
  return cy.get('@framebody' + this.id);
39
36
  };
@@ -1,4 +1,6 @@
1
1
  export * from './baseComponent';
2
2
  export * from './basePage';
3
- export * from './iframe';
3
+ export * from './html';
4
+ export * from './material';
4
5
  export * from './moonstone';
6
+ export * from './utils';
@@ -12,5 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  exports.__esModule = true;
13
13
  __exportStar(require("./baseComponent"), exports);
14
14
  __exportStar(require("./basePage"), exports);
15
- __exportStar(require("./iframe"), exports);
15
+ __exportStar(require("./html"), exports);
16
+ __exportStar(require("./material"), exports);
16
17
  __exportStar(require("./moonstone"), exports);
18
+ __exportStar(require("./utils"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './muiinput';
2
+ export * from './muiradio';
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ exports.__esModule = true;
13
+ __exportStar(require("./muiinput"), exports);
14
+ __exportStar(require("./muiradio"), exports);
@@ -0,0 +1,8 @@
1
+ /// <reference types="cypress" />
2
+ import { BaseComponent } from "../baseComponent";
3
+ import TypeOptions = Cypress.TypeOptions;
4
+ export declare class MUIInput extends BaseComponent {
5
+ static defaultSelector: string;
6
+ clear(): MUIInput;
7
+ type(text: string, options?: Partial<TypeOptions>): MUIInput;
8
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ exports.__esModule = true;
18
+ exports.MUIInput = void 0;
19
+ var baseComponent_1 = require("../baseComponent");
20
+ var MUIInput = /** @class */ (function (_super) {
21
+ __extends(MUIInput, _super);
22
+ function MUIInput() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ MUIInput.prototype.clear = function () {
26
+ this.get().clear();
27
+ return this;
28
+ };
29
+ MUIInput.prototype.type = function (text, options) {
30
+ this.get().type(text, options);
31
+ return this;
32
+ };
33
+ MUIInput.defaultSelector = 'div';
34
+ return MUIInput;
35
+ }(baseComponent_1.BaseComponent));
36
+ exports.MUIInput = MUIInput;
@@ -0,0 +1,5 @@
1
+ import { BaseComponent } from "../baseComponent";
2
+ export declare class MUIRadio extends BaseComponent {
3
+ static defaultSelector: string;
4
+ click(): MUIRadio;
5
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ exports.__esModule = true;
18
+ exports.MUIRadio = void 0;
19
+ var baseComponent_1 = require("../baseComponent");
20
+ var MUIRadio = /** @class */ (function (_super) {
21
+ __extends(MUIRadio, _super);
22
+ function MUIRadio() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ MUIRadio.prototype.click = function () {
26
+ this.get().click();
27
+ return this;
28
+ };
29
+ MUIRadio.defaultSelector = 'label';
30
+ return MUIRadio;
31
+ }(baseComponent_1.BaseComponent));
32
+ exports.MUIRadio = MUIRadio;
@@ -3,7 +3,6 @@ import { BaseComponent } from "../baseComponent";
3
3
  import Chainable = Cypress.Chainable;
4
4
  export declare class Accordion extends BaseComponent {
5
5
  static defaultSelector: string;
6
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Accordion;
7
6
  click(itemName: string): Accordion;
8
7
  listItems(): Chainable<string[]>;
9
8
  getContent(): Chainable<JQuery>;
@@ -22,9 +22,6 @@ var Accordion = /** @class */ (function (_super) {
22
22
  function Accordion() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- Accordion.get = function (parent, assertion) {
26
- return baseComponent_1.get(Accordion, parent, assertion);
27
- };
28
25
  Accordion.prototype.click = function (itemName) {
29
26
  this.get().find("section.moonstone-accordionItem header[aria-controls=\"" + itemName + "\"]").click();
30
27
  return this;
@@ -1,8 +1,5 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  export declare class Button extends BaseComponent {
4
3
  static defaultSelector: string;
5
- static getByContent(content: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Button;
6
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Button;
7
4
  click(): Button;
8
5
  }
@@ -22,12 +22,6 @@ var Button = /** @class */ (function (_super) {
22
22
  function Button() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- Button.getByContent = function (content, parent, assertion) {
26
- return baseComponent_1.getByContent(Button, content, parent, assertion);
27
- };
28
- Button.getByRole = function (role, parent, assertion) {
29
- return baseComponent_1.getByRole(Button, role, parent, assertion);
30
- };
31
25
  Button.prototype.click = function () {
32
26
  this.get().click();
33
27
  return this;
@@ -1,7 +1,5 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  export declare class Dropdown extends BaseComponent {
4
3
  static defaultSelector: string;
5
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Dropdown;
6
4
  select(item: string): Dropdown;
7
5
  }
@@ -18,17 +18,15 @@ exports.__esModule = true;
18
18
  exports.Dropdown = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var menu_1 = require("./menu");
21
+ var utils_1 = require("../utils");
21
22
  var Dropdown = /** @class */ (function (_super) {
22
23
  __extends(Dropdown, _super);
23
24
  function Dropdown() {
24
25
  return _super !== null && _super.apply(this, arguments) || this;
25
26
  }
26
- Dropdown.getByRole = function (role, parent, assertion) {
27
- return baseComponent_1.getByRole(Dropdown, role, parent, assertion);
28
- };
29
27
  Dropdown.prototype.select = function (item) {
30
28
  this.get().click();
31
- menu_1.Menu.get(this).select(item);
29
+ utils_1.getComponent(menu_1.Menu).select(item);
32
30
  return this;
33
31
  };
34
32
  Dropdown.defaultSelector = '.moonstone-dropdown_container';
@@ -2,8 +2,6 @@ export * from './accordion';
2
2
  export * from './button';
3
3
  export * from './dropdown';
4
4
  export * from './menu';
5
- export * from './muiinput';
6
- export * from './muiradio';
7
5
  export * from './pagination';
8
6
  export * from './primaryNav';
9
7
  export * from './secondaryNav';
@@ -14,9 +14,6 @@ __exportStar(require("./accordion"), exports);
14
14
  __exportStar(require("./button"), exports);
15
15
  __exportStar(require("./dropdown"), exports);
16
16
  __exportStar(require("./menu"), exports);
17
- // export * from './muidialog'
18
- __exportStar(require("./muiinput"), exports);
19
- __exportStar(require("./muiradio"), exports);
20
17
  __exportStar(require("./pagination"), exports);
21
18
  __exportStar(require("./primaryNav"), exports);
22
19
  __exportStar(require("./secondaryNav"), exports);
@@ -1,8 +1,6 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  export declare class Menu extends BaseComponent {
4
3
  static defaultSelector: string;
5
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Menu;
6
4
  select(item: string): Menu;
7
5
  selectByRole(item: string): Menu;
8
6
  }
@@ -22,9 +22,6 @@ var Menu = /** @class */ (function (_super) {
22
22
  function Menu() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- Menu.get = function (parent, assertion) {
26
- return baseComponent_1.get(Menu, parent, assertion);
27
- };
28
25
  Menu.prototype.select = function (item) {
29
26
  this.get().find(".moonstone-menuItem").should("contain", item).contains(item).trigger('click');
30
27
  return this;
@@ -3,7 +3,6 @@ import { BaseComponent } from "../baseComponent";
3
3
  import TypeOptions = Cypress.TypeOptions;
4
4
  export declare class MUIInput extends BaseComponent {
5
5
  static defaultSelector: string;
6
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): MUIInput;
7
6
  clear(): MUIInput;
8
7
  type(text: string, options?: Partial<TypeOptions>): MUIInput;
9
8
  }
@@ -22,9 +22,6 @@ var MUIInput = /** @class */ (function (_super) {
22
22
  function MUIInput() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- MUIInput.getByRole = function (role, parent, assertion) {
26
- return baseComponent_1.getByRole(MUIInput, role, parent, assertion);
27
- };
28
25
  MUIInput.prototype.clear = function () {
29
26
  this.get().clear();
30
27
  return this;
@@ -33,7 +30,7 @@ var MUIInput = /** @class */ (function (_super) {
33
30
  this.get().type(text, options);
34
31
  return this;
35
32
  };
36
- MUIInput.defaultSelector = 'input';
33
+ MUIInput.defaultSelector = 'div';
37
34
  return MUIInput;
38
35
  }(baseComponent_1.BaseComponent));
39
36
  exports.MUIInput = MUIInput;
@@ -1,7 +1,5 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  export declare class MUIRadio extends BaseComponent {
4
3
  static defaultSelector: string;
5
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): MUIRadio;
6
4
  click(): MUIRadio;
7
5
  }
@@ -22,9 +22,6 @@ var MUIRadio = /** @class */ (function (_super) {
22
22
  function MUIRadio() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- MUIRadio.getByRole = function (role, parent, assertion) {
26
- return baseComponent_1.getByRole(MUIRadio, role, parent, assertion);
27
- };
28
25
  MUIRadio.prototype.click = function () {
29
26
  this.get().click();
30
27
  return this;
@@ -1,9 +1,7 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  import Chainable = Cypress.Chainable;
4
3
  export declare class Pagination extends BaseComponent {
5
4
  static defaultSelector: string;
6
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Pagination;
7
5
  clickNextPage(): Pagination;
8
6
  clickPreviousPage(): Pagination;
9
7
  getTotalRows(): Chainable<number>;
@@ -18,20 +18,18 @@ exports.__esModule = true;
18
18
  exports.Pagination = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var button_1 = require("./button");
21
+ var utils_1 = require("../utils");
21
22
  var Pagination = /** @class */ (function (_super) {
22
23
  __extends(Pagination, _super);
23
24
  function Pagination() {
24
25
  return _super !== null && _super.apply(this, arguments) || this;
25
26
  }
26
- Pagination.get = function (parent, assertion) {
27
- return baseComponent_1.get(Pagination, parent, assertion);
28
- };
29
27
  Pagination.prototype.clickNextPage = function () {
30
- button_1.Button.getByRole('table-pagination-button-next-page', this).click();
28
+ utils_1.getComponentByRole(button_1.Button, 'table-pagination-button-next-page', this).click();
31
29
  return this;
32
30
  };
33
31
  Pagination.prototype.clickPreviousPage = function () {
34
- button_1.Button.getByRole('table-pagination-button-previous-page', this).click();
32
+ utils_1.getComponentByRole(button_1.Button, 'table-pagination-button-previous-page', this).click();
35
33
  return this;
36
34
  };
37
35
  Pagination.prototype.getTotalRows = function () {
@@ -1,9 +1,7 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  import Chainable = Cypress.Chainable;
4
3
  export declare class PrimaryNav extends BaseComponent {
5
4
  static defaultSelector: string;
6
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): PrimaryNav;
7
5
  click(itemName: string): void;
8
6
  listItems(): Chainable<string[]>;
9
7
  }
@@ -22,9 +22,6 @@ var PrimaryNav = /** @class */ (function (_super) {
22
22
  function PrimaryNav() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- PrimaryNav.get = function (parent, assertion) {
26
- return baseComponent_1.get(PrimaryNav, parent, assertion);
27
- };
28
25
  PrimaryNav.prototype.click = function (itemName) {
29
26
  this.get().find(".moonstone-primaryNavItem[role=\"" + itemName + "\"]").click();
30
27
  };
@@ -1,6 +1,4 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from "../baseComponent";
3
2
  export declare class SecondaryNav extends BaseComponent {
4
3
  static defaultSelector: string;
5
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): SecondaryNav;
6
4
  }
@@ -22,9 +22,6 @@ var SecondaryNav = /** @class */ (function (_super) {
22
22
  function SecondaryNav() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- SecondaryNav.get = function (parent, assertion) {
26
- return baseComponent_1.get(SecondaryNav, parent, assertion);
27
- };
28
25
  SecondaryNav.defaultSelector = '.moonstone-secondaryNav_wrapper';
29
26
  return SecondaryNav;
30
27
  }(baseComponent_1.BaseComponent));
@@ -3,15 +3,11 @@ import { BaseComponent } from "../baseComponent";
3
3
  import { Menu } from "./menu";
4
4
  export declare class Table extends BaseComponent {
5
5
  static defaultSelector: string;
6
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Table;
7
6
  getRows(assertion?: (s: JQuery) => void): TableRow;
8
7
  getRowByIndex(i: number, assertion?: (s: JQuery) => void): TableRow;
9
8
  getRowByContent(content: string, assertion?: (s: JQuery) => void): TableRow;
10
9
  }
11
10
  export declare class TableRow extends BaseComponent {
12
11
  static defaultSelector: string;
13
- static get(parent: Table, assertion?: (s: JQuery) => void): TableRow;
14
- static getByIndex(parent: Table, i: number, assertion?: (s: JQuery) => void): TableRow;
15
- static getByContent(parent: Table, content: string, assertion?: (s: JQuery) => void): TableRow;
16
12
  contextMenu(): Menu;
17
13
  }
@@ -18,22 +18,20 @@ exports.__esModule = true;
18
18
  exports.TableRow = exports.Table = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var menu_1 = require("./menu");
21
+ var utils_1 = require("../utils");
21
22
  var Table = /** @class */ (function (_super) {
22
23
  __extends(Table, _super);
23
24
  function Table() {
24
25
  return _super !== null && _super.apply(this, arguments) || this;
25
26
  }
26
- Table.get = function (parent, assertion) {
27
- return baseComponent_1.get(Table, parent, assertion);
28
- };
29
27
  Table.prototype.getRows = function (assertion) {
30
- return TableRow.get(this, assertion);
28
+ return utils_1.getComponent(TableRow, this, assertion);
31
29
  };
32
30
  Table.prototype.getRowByIndex = function (i, assertion) {
33
- return TableRow.getByIndex(this, i, assertion);
31
+ return utils_1.getComponentByIndex(TableRow, i, this, assertion);
34
32
  };
35
33
  Table.prototype.getRowByContent = function (content, assertion) {
36
- return TableRow.getByContent(this, content, assertion);
34
+ return utils_1.getComponentByContent(TableRow, content, this, assertion);
37
35
  };
38
36
  Table.defaultSelector = '.moonstone-Table';
39
37
  return Table;
@@ -44,18 +42,9 @@ var TableRow = /** @class */ (function (_super) {
44
42
  function TableRow() {
45
43
  return _super !== null && _super.apply(this, arguments) || this;
46
44
  }
47
- TableRow.get = function (parent, assertion) {
48
- return baseComponent_1.get(TableRow, parent, assertion);
49
- };
50
- TableRow.getByIndex = function (parent, i, assertion) {
51
- return new TableRow(baseComponent_1.getElement(this.defaultSelector + ":nth-child(" + i + ")", parent, assertion));
52
- };
53
- TableRow.getByContent = function (parent, content, assertion) {
54
- return baseComponent_1.getByContent(TableRow, content, parent, assertion);
55
- };
56
45
  TableRow.prototype.contextMenu = function () {
57
46
  this.get().rightclick();
58
- return new menu_1.Menu(baseComponent_1.getElement('#menuHolder .moonstone-menu:not(.moonstone-hidden)'));
47
+ return utils_1.getComponentBySelector(menu_1.Menu, '#menuHolder .moonstone-menu:not(.moonstone-hidden)');
59
48
  };
60
49
  TableRow.defaultSelector = '.moonstone-TableBody .moonstone-TableRow';
61
50
  return TableRow;
@@ -0,0 +1,11 @@
1
+ /// <reference types="cypress" />
2
+ import { Table } from "./moonstone";
3
+ import { BaseComponent, ComponentType } from "./baseComponent";
4
+ import Chainable = Cypress.Chainable;
5
+ export declare function getElement(selector: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Chainable<JQuery>;
6
+ export declare function getComponentBySelector<Component>(C: ComponentType<Component>, selector: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
7
+ export declare function getComponent<Component>(C: ComponentType<Component>, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
8
+ export declare function getComponentByIndex<Component>(C: ComponentType<Component>, i: number, parent: Table, assertion?: (s: JQuery) => void): Component;
9
+ export declare function getComponentByRole<Component>(C: ComponentType<Component>, role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
10
+ export declare function getComponentByAttr<Component>(C: ComponentType<Component>, attr: string, value: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
11
+ export declare function getComponentByContent<Component>(c: ComponentType<Component>, content: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.getComponentByContent = exports.getComponentByAttr = exports.getComponentByRole = exports.getComponentByIndex = exports.getComponent = exports.getComponentBySelector = exports.getElement = void 0;
4
+ function getElement(selector, parent, assertion) {
5
+ var chainable = parent ? parent.get().find(selector) : cy.get(selector);
6
+ if (assertion) {
7
+ return chainable.should(assertion);
8
+ }
9
+ return chainable;
10
+ }
11
+ exports.getElement = getElement;
12
+ function getComponentBySelector(C, selector, parent, assertion) {
13
+ return new C(getElement(selector, parent, assertion), assertion);
14
+ }
15
+ exports.getComponentBySelector = getComponentBySelector;
16
+ function getComponent(C, parent, assertion) {
17
+ return getComponentBySelector(C, C.defaultSelector, parent, assertion);
18
+ }
19
+ exports.getComponent = getComponent;
20
+ function getComponentByIndex(C, i, parent, assertion) {
21
+ return getComponentBySelector(C, C.defaultSelector + ":nth-child(" + i + ")", parent, assertion);
22
+ }
23
+ exports.getComponentByIndex = getComponentByIndex;
24
+ function getComponentByRole(C, role, parent, assertion) {
25
+ return getComponentBySelector(C, C.defaultSelector + "[data-sel-role=\"" + role + "\"]", parent, assertion);
26
+ }
27
+ exports.getComponentByRole = getComponentByRole;
28
+ function getComponentByAttr(C, attr, value, parent, assertion) {
29
+ return getComponentBySelector(C, C.defaultSelector + "[" + attr + "=\"" + value + "\"]", parent, assertion);
30
+ }
31
+ exports.getComponentByAttr = getComponentByAttr;
32
+ function getComponentByContent(c, content, parent, assertion) {
33
+ var chainable = getElement(c.defaultSelector, parent).should('contains', content).contains(content);
34
+ if (assertion) {
35
+ chainable = chainable.should(assertion);
36
+ }
37
+ return new c(chainable, assertion);
38
+ }
39
+ exports.getComponentByContent = getComponentByContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts"
@@ -1,28 +1,6 @@
1
1
  import Chainable = Cypress.Chainable;
2
2
 
3
- export function getElement(selector: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Chainable<JQuery> {
4
- const chainable = parent ? parent.get().find(selector) : cy.get(selector);
5
- if (assertion) {
6
- return chainable.should(assertion)
7
- }
8
- return chainable;
9
- }
10
-
11
- export function get<Component extends BaseComponent>(C: { new(p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component, defaultSelector: string }, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
12
- return new C(getElement(C.defaultSelector, parent, assertion), assertion)
13
- }
14
-
15
- export function getByRole<Component extends BaseComponent>(C: { new(p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component, defaultSelector: string }, role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
16
- return new C(getElement(`${C.defaultSelector}[data-sel-role="${role}"]`, parent, assertion), assertion)
17
- }
18
-
19
- export function getByContent<Component extends BaseComponent>(c: { new(p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component, defaultSelector: string }, content: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
20
- let chainable = getElement(c.defaultSelector, parent).should('contains', content).contains(content);
21
- if (assertion) {
22
- chainable = chainable.should(assertion)
23
- }
24
- return new c(chainable, assertion)
25
- }
3
+ export type ComponentType<Component> = { new(p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component, defaultSelector: string };
26
4
 
27
5
  export class BaseComponent {
28
6
  static count = 0
@@ -1,13 +1,9 @@
1
- import {BaseComponent, get} from "./baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import Chainable = Cypress.Chainable;
3
3
 
4
4
  export class IFrame extends BaseComponent {
5
5
  static defaultSelector = 'iframe'
6
6
 
7
- static get(parent?: BaseComponent): IFrame {
8
- return get(IFrame, parent)
9
- }
10
-
11
7
  private body: JQuery<HTMLElement>
12
8
 
13
9
  constructor(element: Chainable<JQuery>, assertion?: (s: JQuery) => void) {
@@ -0,0 +1 @@
1
+ export * from './iframe'
@@ -1,4 +1,6 @@
1
1
  export * from './baseComponent'
2
2
  export * from './basePage'
3
- export * from './iframe'
3
+ export * from './html'
4
+ export * from './material'
4
5
  export * from './moonstone'
6
+ export * from './utils'
@@ -0,0 +1,2 @@
1
+ export * from './muiinput'
2
+ export * from './muiradio'
@@ -1,12 +1,8 @@
1
- import {BaseComponent, getByRole} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import TypeOptions = Cypress.TypeOptions;
3
3
 
4
4
  export class MUIInput extends BaseComponent {
5
- static defaultSelector = 'input'
6
-
7
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): MUIInput {
8
- return getByRole(MUIInput, role, parent, assertion)
9
- }
5
+ static defaultSelector = 'div'
10
6
 
11
7
  clear(): MUIInput {
12
8
  this.get().clear()
@@ -0,0 +1,13 @@
1
+ import {BaseComponent} from "../baseComponent"
2
+
3
+
4
+ export class MUIRadio extends BaseComponent {
5
+ static defaultSelector = 'label'
6
+
7
+ click(): MUIRadio {
8
+ this.get().click()
9
+ return this
10
+ }
11
+
12
+ }
13
+
@@ -1,13 +1,9 @@
1
- import {BaseComponent, get} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import Chainable = Cypress.Chainable;
3
3
 
4
4
  export class Accordion extends BaseComponent {
5
5
  static defaultSelector = '.moonstone-accordion'
6
6
 
7
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Accordion {
8
- return get(Accordion, parent, assertion)
9
- }
10
-
11
7
  click(itemName: string): Accordion {
12
8
  this.get().find(`section.moonstone-accordionItem header[aria-controls="${itemName}"]`).click()
13
9
  return this
@@ -1,17 +1,9 @@
1
- import {BaseComponent, getByContent, getByRole} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
 
3
3
 
4
4
  export class Button extends BaseComponent {
5
5
  static defaultSelector = '.moonstone-button'
6
6
 
7
- static getByContent(content: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Button {
8
- return getByContent(Button, content, parent, assertion)
9
- }
10
-
11
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Button {
12
- return getByRole(Button, role, parent, assertion)
13
- }
14
-
15
7
  click(): Button {
16
8
  this.get().click()
17
9
  return this
@@ -1,17 +1,14 @@
1
- import {BaseComponent, getByRole} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import {Menu} from "./menu";
3
+ import {getComponent} from "../utils";
3
4
 
4
5
 
5
6
  export class Dropdown extends BaseComponent {
6
7
  static defaultSelector = '.moonstone-dropdown_container'
7
8
 
8
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Dropdown {
9
- return getByRole(Dropdown, role, parent, assertion)
10
- }
11
-
12
9
  select(item: string): Dropdown {
13
10
  this.get().click()
14
- Menu.get(this).select(item)
11
+ getComponent(Menu).select(item)
15
12
  return this
16
13
  }
17
14
 
@@ -2,9 +2,6 @@ export * from './accordion'
2
2
  export * from './button'
3
3
  export * from './dropdown'
4
4
  export * from './menu'
5
- // export * from './muidialog'
6
- export * from './muiinput'
7
- export * from './muiradio'
8
5
  export * from './pagination'
9
6
  export * from './primaryNav'
10
7
  export * from './secondaryNav'
@@ -1,13 +1,8 @@
1
- import {BaseComponent, get} from "../baseComponent"
2
-
1
+ import {BaseComponent} from "../baseComponent"
3
2
 
4
3
  export class Menu extends BaseComponent {
5
4
  static defaultSelector = '.moonstone-menu'
6
5
 
7
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Menu {
8
- return get(Menu, parent, assertion)
9
- }
10
-
11
6
  select(item: string): Menu {
12
7
  this.get().find(`.moonstone-menuItem`).should("contain", item).contains(item).trigger('click')
13
8
  return this
@@ -1,22 +1,18 @@
1
- import {BaseComponent, get} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import {Button} from "./button";
3
3
  import Chainable = Cypress.Chainable;
4
-
4
+ import {getComponentByRole} from "../utils";
5
5
 
6
6
  export class Pagination extends BaseComponent {
7
7
  static defaultSelector = '.moonstone-tablePagination'
8
8
 
9
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Pagination {
10
- return get(Pagination, parent, assertion)
11
- }
12
-
13
9
  clickNextPage(): Pagination {
14
- Button.getByRole('table-pagination-button-next-page', this).click()
10
+ getComponentByRole(Button, 'table-pagination-button-next-page', this).click()
15
11
  return this
16
12
  }
17
13
 
18
14
  clickPreviousPage(): Pagination {
19
- Button.getByRole('table-pagination-button-previous-page', this).click()
15
+ getComponentByRole(Button, 'table-pagination-button-previous-page', this).click()
20
16
  return this
21
17
  }
22
18
 
@@ -1,13 +1,9 @@
1
- import {BaseComponent, get} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import Chainable = Cypress.Chainable;
3
3
 
4
4
  export class PrimaryNav extends BaseComponent {
5
5
  static defaultSelector = '.moonstone-primaryNav'
6
6
 
7
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): PrimaryNav {
8
- return get(PrimaryNav, parent, assertion)
9
- }
10
-
11
7
  click(itemName: string): void {
12
8
  this.get().find(`.moonstone-primaryNavItem[role="${itemName}"]`).click()
13
9
  }
@@ -1,9 +1,5 @@
1
- import {BaseComponent, get} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
 
3
3
  export class SecondaryNav extends BaseComponent{
4
4
  static defaultSelector = '.moonstone-secondaryNav_wrapper'
5
-
6
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): SecondaryNav {
7
- return get(SecondaryNav, parent, assertion)
8
- }
9
5
  }
@@ -1,44 +1,29 @@
1
- import {BaseComponent, get, getByContent, getElement} from "../baseComponent"
1
+ import {BaseComponent} from "../baseComponent"
2
2
  import {Menu} from "./menu"
3
+ import {getComponent, getComponentByContent, getComponentByIndex, getComponentBySelector} from "../utils";
3
4
 
4
5
  export class Table extends BaseComponent {
5
6
  static defaultSelector = '.moonstone-Table'
6
7
 
7
- static get(parent?: BaseComponent, assertion?: (s: JQuery) => void): Table {
8
- return get(Table, parent, assertion)
9
- }
10
-
11
8
  getRows(assertion?: (s: JQuery) => void): TableRow {
12
- return TableRow.get(this, assertion)
9
+ return getComponent(TableRow, this, assertion)
13
10
  }
14
11
 
15
12
  getRowByIndex(i: number, assertion?: (s: JQuery) => void): TableRow {
16
- return TableRow.getByIndex(this, i, assertion)
13
+ return getComponentByIndex(TableRow, i, this, assertion)
17
14
  }
18
15
 
19
16
  getRowByContent(content: string, assertion?: (s: JQuery) => void): TableRow {
20
- return TableRow.getByContent(this, content, assertion)
17
+ return getComponentByContent(TableRow, content, this, assertion)
21
18
  }
22
19
  }
23
20
 
24
21
  export class TableRow extends BaseComponent {
25
22
  static defaultSelector = '.moonstone-TableBody .moonstone-TableRow'
26
23
 
27
- static get(parent: Table, assertion?: (s: JQuery) => void): TableRow {
28
- return get(TableRow, parent, assertion)
29
- }
30
-
31
- static getByIndex(parent: Table, i: number, assertion?: (s: JQuery) => void): TableRow {
32
- return new TableRow(getElement(`${this.defaultSelector}:nth-child(${i})`, parent, assertion))
33
- }
34
-
35
- static getByContent(parent: Table, content: string, assertion?: (s: JQuery) => void): TableRow {
36
- return getByContent(TableRow, content, parent, assertion)
37
- }
38
-
39
24
  contextMenu(): Menu {
40
25
  this.get().rightclick()
41
- return new Menu(getElement('#menuHolder .moonstone-menu:not(.moonstone-hidden)'))
26
+ return getComponentBySelector(Menu, '#menuHolder .moonstone-menu:not(.moonstone-hidden)')
42
27
  }
43
28
 
44
29
  }
@@ -0,0 +1,39 @@
1
+ import {Table} from "./moonstone";
2
+ import {BaseComponent, ComponentType} from "./baseComponent";
3
+ import Chainable = Cypress.Chainable;
4
+
5
+ export function getElement(selector: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Chainable<JQuery> {
6
+ const chainable = parent ? parent.get().find(selector) : cy.get(selector);
7
+ if (assertion) {
8
+ return chainable.should(assertion)
9
+ }
10
+ return chainable;
11
+ }
12
+
13
+ export function getComponentBySelector<Component>(C: ComponentType<Component>, selector: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
14
+ return new C(getElement(selector, parent, assertion), assertion)
15
+ }
16
+
17
+ export function getComponent<Component>(C: ComponentType<Component>, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
18
+ return getComponentBySelector(C, C.defaultSelector, parent, assertion)
19
+ }
20
+
21
+ export function getComponentByIndex<Component>(C: ComponentType<Component>, i: number, parent: Table, assertion?: (s: JQuery) => void): Component {
22
+ return getComponentBySelector(C, `${C.defaultSelector}:nth-child(${i})`, parent, assertion)
23
+ }
24
+
25
+ export function getComponentByRole<Component >(C: ComponentType<Component>, role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
26
+ return getComponentBySelector(C, `${C.defaultSelector}[data-sel-role="${role}"]`, parent, assertion)
27
+ }
28
+
29
+ export function getComponentByAttr<Component>(C: ComponentType<Component>, attr: string, value: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
30
+ return getComponentBySelector(C, `${C.defaultSelector}[${attr}="${value}"]`, parent, assertion)
31
+ }
32
+
33
+ export function getComponentByContent<Component>(c: ComponentType<Component>, content: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): Component {
34
+ let chainable = getElement(c.defaultSelector, parent).should('contains', content).contains(content);
35
+ if (assertion) {
36
+ chainable = chainable.should(assertion)
37
+ }
38
+ return new c(chainable, assertion)
39
+ }
@@ -1,17 +0,0 @@
1
- import {BaseComponent, getByRole} from "../baseComponent"
2
-
3
-
4
- export class MUIRadio extends BaseComponent {
5
- static defaultSelector = 'label'
6
-
7
- static getByRole(role: string, parent?: BaseComponent, assertion?: (s: JQuery) => void): MUIRadio {
8
- return getByRole(MUIRadio, role, parent, assertion)
9
- }
10
-
11
- click(): MUIRadio {
12
- this.get().click()
13
- return this
14
- }
15
-
16
- }
17
-