@jahia/cypress 3.17.3 → 3.17.4
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.
|
@@ -24,21 +24,24 @@ var Menu = /** @class */ (function (_super) {
|
|
|
24
24
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
25
|
}
|
|
26
26
|
Menu.prototype.submenu = function (item, menu) {
|
|
27
|
-
this.get().find('.moonstone-menuItem').contains(item).should('be.visible')
|
|
27
|
+
this.get().find('.moonstone-menuItem').contains(item).scrollIntoView().should('be.visible');
|
|
28
|
+
this.get().find('.moonstone-menuItem').contains(item).realHover();
|
|
28
29
|
return utils_1.getComponentByRole(Menu, menu);
|
|
29
30
|
};
|
|
30
31
|
Menu.prototype.shouldHaveItem = function (item) {
|
|
31
|
-
this.get().find('.moonstone-menuItem').contains(item).should('be.visible');
|
|
32
|
+
this.get().find('.moonstone-menuItem').contains(item).scrollIntoView().should('be.visible');
|
|
32
33
|
};
|
|
33
34
|
Menu.prototype.shouldNotHaveItem = function (item) {
|
|
34
35
|
this.get().find('.moonstone-menuItem').contains(item).should('not.exist');
|
|
35
36
|
};
|
|
36
37
|
Menu.prototype.select = function (item) {
|
|
37
|
-
this.get().find('.moonstone-menuItem').contains(item).should('be.visible')
|
|
38
|
+
this.get().find('.moonstone-menuItem').contains(item).scrollIntoView().should('be.visible');
|
|
39
|
+
this.get().find('.moonstone-menuItem').contains(item).trigger('click');
|
|
38
40
|
return this;
|
|
39
41
|
};
|
|
40
42
|
Menu.prototype.selectByRole = function (item) {
|
|
41
|
-
this.get().find(".moonstone-menuItem[data-sel-role=\"" + item + "\"]").should('be.visible')
|
|
43
|
+
this.get().find(".moonstone-menuItem[data-sel-role=\"" + item + "\"]").scrollIntoView().should('be.visible');
|
|
44
|
+
this.get().find(".moonstone-menuItem[data-sel-role=\"" + item + "\"]").trigger('click');
|
|
42
45
|
return this;
|
|
43
46
|
};
|
|
44
47
|
Menu.defaultSelector = '.moonstone-menu:not(.moonstone-hidden)';
|
package/package.json
CHANGED
|
@@ -5,12 +5,13 @@ export class Menu extends BaseComponent {
|
|
|
5
5
|
static defaultSelector = '.moonstone-menu:not(.moonstone-hidden)'
|
|
6
6
|
|
|
7
7
|
submenu(item: string, menu: string): Menu {
|
|
8
|
-
this.get().find('.moonstone-menuItem').contains(item).should('be.visible')
|
|
8
|
+
this.get().find('.moonstone-menuItem').contains(item).scrollIntoView().should('be.visible');
|
|
9
|
+
this.get().find('.moonstone-menuItem').contains(item).realHover();
|
|
9
10
|
return getComponentByRole(Menu, menu);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
shouldHaveItem(item: string):void {
|
|
13
|
-
this.get().find('.moonstone-menuItem').contains(item).should('be.visible');
|
|
14
|
+
this.get().find('.moonstone-menuItem').contains(item).scrollIntoView().should('be.visible');
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
shouldNotHaveItem(item: string):void {
|
|
@@ -18,12 +19,14 @@ export class Menu extends BaseComponent {
|
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
select(item: string): Menu {
|
|
21
|
-
this.get().find('.moonstone-menuItem').contains(item).should('be.visible')
|
|
22
|
+
this.get().find('.moonstone-menuItem').contains(item).scrollIntoView().should('be.visible');
|
|
23
|
+
this.get().find('.moonstone-menuItem').contains(item).trigger('click');
|
|
22
24
|
return this;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
selectByRole(item: string): Menu {
|
|
26
|
-
this.get().find(`.moonstone-menuItem[data-sel-role="${item}"]`).should('be.visible')
|
|
28
|
+
this.get().find(`.moonstone-menuItem[data-sel-role="${item}"]`).scrollIntoView().should('be.visible');
|
|
29
|
+
this.get().find(`.moonstone-menuItem[data-sel-role="${item}"]`).trigger('click');
|
|
27
30
|
return this;
|
|
28
31
|
}
|
|
29
32
|
}
|