@helvetia-design/playwright 0.1.0 → 0.2.0
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.
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +14 -8
- package/dist/src/lib/components/accordion.po.d.ts +13 -0
- package/dist/src/lib/components/accordion.po.js +26 -16
- package/dist/src/lib/components/app-footer.po.d.ts +16 -0
- package/dist/src/lib/components/app-footer.po.js +35 -25
- package/dist/src/lib/components/app-navbar.po.d.ts +13 -0
- package/dist/src/lib/components/app-navbar.po.js +32 -22
- package/dist/src/lib/components/badge.po.d.ts +6 -0
- package/dist/src/lib/components/badge.po.js +21 -11
- package/dist/src/lib/components/brand-icon.po.d.ts +7 -0
- package/dist/src/lib/components/brand-icon.po.js +15 -5
- package/dist/src/lib/components/button.po.d.ts +9 -0
- package/dist/src/lib/components/button.po.js +29 -19
- package/dist/src/lib/components/card.po.d.ts +25 -0
- package/dist/src/lib/components/card.po.js +68 -38
- package/dist/src/lib/components/carousel.po.d.ts +13 -0
- package/dist/src/lib/components/carousel.po.js +31 -18
- package/dist/src/lib/components/checkbox.po.d.ts +12 -0
- package/dist/src/lib/components/checkbox.po.js +31 -21
- package/dist/src/lib/components/close.po.d.ts +6 -0
- package/dist/src/lib/components/close.po.js +19 -9
- package/dist/src/lib/components/content.po.d.ts +6 -0
- package/dist/src/lib/components/content.po.js +21 -11
- package/dist/src/lib/components/counter.po.d.ts +18 -0
- package/dist/src/lib/components/counter.po.js +29 -19
- package/dist/src/lib/components/data-item.po.d.ts +18 -0
- package/dist/src/lib/components/data-item.po.js +88 -42
- package/dist/src/lib/components/data.po.d.ts +12 -0
- package/dist/src/lib/components/data.po.js +33 -23
- package/dist/src/lib/components/datepicker.po.d.ts +18 -0
- package/dist/src/lib/components/datepicker.po.js +33 -23
- package/dist/src/lib/components/divider.po.d.ts +5 -0
- package/dist/src/lib/components/divider.po.js +15 -5
- package/dist/src/lib/components/drawer.po.d.ts +11 -0
- package/dist/src/lib/components/drawer.po.js +26 -16
- package/dist/src/lib/components/file-upload.po.d.ts +18 -0
- package/dist/src/lib/components/file-upload.po.js +45 -35
- package/dist/src/lib/components/heading.po.d.ts +6 -0
- package/dist/src/lib/components/heading.po.js +21 -11
- package/dist/src/lib/components/hint.po.d.ts +10 -0
- package/dist/src/lib/components/hint.po.js +26 -16
- package/dist/src/lib/components/icon.po.d.ts +7 -0
- package/dist/src/lib/components/icon.po.js +15 -5
- package/dist/src/lib/components/index.d.ts +50 -0
- package/dist/src/lib/components/index.js +55 -49
- package/dist/src/lib/components/input.po.d.ts +12 -0
- package/dist/src/lib/components/input.po.js +30 -20
- package/dist/src/lib/components/label.po.d.ts +6 -0
- package/dist/src/lib/components/label.po.js +21 -11
- package/dist/src/lib/components/list.po.d.ts +18 -0
- package/dist/src/lib/components/list.po.js +36 -18
- package/dist/src/lib/components/logo.po.d.ts +7 -0
- package/dist/src/lib/components/logo.po.js +15 -5
- package/dist/src/lib/components/modal.po.d.ts +15 -0
- package/dist/src/lib/components/modal.po.js +31 -21
- package/dist/src/lib/components/notification.po.d.ts +12 -0
- package/dist/src/lib/components/notification.po.js +25 -15
- package/dist/src/lib/components/number-input.po.d.ts +12 -0
- package/dist/src/lib/components/number-input.po.js +30 -20
- package/dist/src/lib/components/page-object.d.ts +9 -0
- package/dist/src/lib/components/page-object.js +38 -10
- package/dist/src/lib/components/pagination.po.d.ts +15 -0
- package/dist/src/lib/components/pagination.po.js +36 -26
- package/dist/src/lib/components/phone-input.po.d.ts +28 -0
- package/dist/src/lib/components/phone-input.po.js +52 -42
- package/dist/src/lib/components/popup.po.d.ts +11 -0
- package/dist/src/lib/components/popup.po.js +26 -16
- package/dist/src/lib/components/progress-bar.po.d.ts +15 -0
- package/dist/src/lib/components/progress-bar.po.js +98 -0
- package/dist/src/lib/components/radio.po.d.ts +11 -0
- package/dist/src/lib/components/radio.po.js +29 -19
- package/dist/src/lib/components/root.po.d.ts +6 -0
- package/dist/src/lib/components/root.po.js +21 -11
- package/dist/src/lib/components/segment.po.d.ts +11 -0
- package/dist/src/lib/components/segment.po.js +29 -19
- package/dist/src/lib/components/select.po.d.ts +24 -0
- package/dist/src/lib/components/select.po.js +46 -36
- package/dist/src/lib/components/shape.po.d.ts +5 -0
- package/dist/src/lib/components/shape.po.js +15 -5
- package/dist/src/lib/components/sheet.po.d.ts +10 -0
- package/dist/src/lib/components/sheet.po.js +30 -20
- package/dist/src/lib/components/slider.po.d.ts +18 -0
- package/dist/src/lib/components/slider.po.js +28 -18
- package/dist/src/lib/components/snackbar.po.d.ts +16 -0
- package/dist/src/lib/components/snackbar.po.js +32 -22
- package/dist/src/lib/components/spinner.po.d.ts +7 -0
- package/dist/src/lib/components/spinner.po.js +15 -5
- package/dist/src/lib/components/stack.po.d.ts +6 -0
- package/dist/src/lib/components/stack.po.js +21 -11
- package/dist/src/lib/components/steps.po.d.ts +13 -0
- package/dist/src/lib/components/steps.po.js +32 -22
- package/dist/src/lib/components/tabs.po.d.ts +13 -0
- package/dist/src/lib/components/tabs.po.js +32 -22
- package/dist/src/lib/components/tag.po.d.ts +8 -0
- package/dist/src/lib/components/tag.po.js +23 -13
- package/dist/src/lib/components/text.po.d.ts +6 -0
- package/dist/src/lib/components/text.po.js +21 -11
- package/dist/src/lib/components/textarea.po.d.ts +11 -0
- package/dist/src/lib/components/textarea.po.js +28 -18
- package/dist/src/lib/components/toast.po.d.ts +14 -0
- package/dist/src/lib/components/toast.po.js +30 -20
- package/dist/src/lib/components/toggle.po.d.ts +12 -0
- package/dist/src/lib/components/toggle.po.js +31 -21
- package/dist/src/lib/components/tooltip.po.d.ts +6 -0
- package/dist/src/lib/components/tooltip.po.js +21 -11
- package/dist/src/lib/devices.d.ts +1 -0
- package/dist/src/lib/devices.js +15 -5
- package/dist/src/lib/extend.d.ts +13 -0
- package/dist/src/lib/extend.js +82 -64
- package/dist/src/lib/functions/a11y.d.ts +2 -0
- package/dist/src/lib/functions/a11y.js +20 -9
- package/dist/src/lib/functions/target-size.d.ts +7 -0
- package/dist/src/lib/functions/target-size.js +36 -0
- package/dist/src/lib/matchers/index.d.ts +12 -0
- package/dist/src/lib/matchers/index.js +21 -11
- package/dist/src/lib/matchers/to-have-first-received-event-detail.d.ts +5 -0
- package/dist/src/lib/matchers/to-have-first-received-event-detail.js +16 -5
- package/dist/src/lib/matchers/to-have-nth-received-event-detail.d.ts +5 -0
- package/dist/src/lib/matchers/to-have-nth-received-event-detail.js +16 -5
- package/dist/src/lib/matchers/to-have-received-event-detail.d.ts +5 -0
- package/dist/src/lib/matchers/to-have-received-event-detail.js +16 -5
- package/dist/src/lib/matchers/to-have-received-event-times.d.ts +5 -0
- package/dist/src/lib/matchers/to-have-received-event-times.js +11 -1
- package/dist/src/lib/matchers/to-have-received-event.d.ts +5 -0
- package/dist/src/lib/matchers/to-have-received-event.js +11 -1
- package/dist/src/lib/page/event-spy.d.ts +44 -0
- package/dist/src/lib/page/event-spy.js +32 -33
- package/dist/src/lib/page/utils/assert-hydrated.d.ts +9 -0
- package/dist/src/lib/page/utils/assert-hydrated.js +72 -0
- package/dist/src/lib/page/utils/form.d.ts +9 -0
- package/dist/src/lib/page/utils/form.js +37 -0
- package/dist/src/lib/page/utils/goto.d.ts +8 -0
- package/dist/src/lib/page/utils/goto.js +19 -13
- package/dist/src/lib/page/utils/held-pages.d.ts +3 -0
- package/dist/src/lib/page/utils/held-pages.js +11 -0
- package/dist/src/lib/page/utils/hold-hydration.d.ts +22 -0
- package/dist/src/lib/page/utils/hold-hydration.js +180 -0
- package/dist/src/lib/page/utils/index.d.ts +10 -0
- package/dist/src/lib/page/utils/index.js +15 -6
- package/dist/src/lib/page/utils/locator.d.ts +21 -0
- package/dist/src/lib/page/utils/locator.js +18 -8
- package/dist/src/lib/page/utils/mount-ssr.d.ts +23 -0
- package/dist/src/lib/page/utils/mount-ssr.js +27 -65
- package/dist/src/lib/page/utils/mount.d.ts +4 -0
- package/dist/src/lib/page/utils/mount.js +26 -8
- package/dist/src/lib/page/utils/render-ssr.d.ts +3 -0
- package/dist/src/lib/page/utils/render-ssr.js +56 -0
- package/dist/src/lib/page/utils/setup-ssr-visual-test.d.ts +8 -0
- package/dist/src/lib/page/utils/setup-ssr-visual-test.js +95 -0
- package/dist/src/lib/page/utils/spy-on-event.d.ts +3 -0
- package/dist/src/lib/page/utils/spy-on-event.js +18 -8
- package/dist/src/lib/page/utils/wait-for-changes.d.ts +2 -0
- package/dist/src/lib/page/utils/wait-for-changes.js +22 -7
- package/dist/src/lib/screenshot.d.ts +8 -0
- package/dist/src/lib/screenshot.js +36 -2
- package/dist/src/lib/screenshot.spec.d.ts +1 -0
- package/dist/src/lib/test-expect.d.ts +22 -0
- package/dist/src/lib/test-expect.js +4 -1
- package/dist/src/lib/types.d.ts +40 -0
- package/dist/src/lib/types.js +5 -1
- package/package.json +10 -5
- package/sbom.cdx.json +14894 -16749
|
@@ -1,23 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get DsCard () {
|
|
13
|
+
return DsCard;
|
|
14
|
+
},
|
|
15
|
+
get DsCardActions () {
|
|
16
|
+
return DsCardActions;
|
|
17
|
+
},
|
|
18
|
+
get DsCardContent () {
|
|
19
|
+
return DsCardContent;
|
|
20
|
+
},
|
|
21
|
+
get DsCardHeader () {
|
|
22
|
+
return DsCardHeader;
|
|
23
|
+
},
|
|
24
|
+
get DsCardSubtitle () {
|
|
25
|
+
return DsCardSubtitle;
|
|
26
|
+
},
|
|
27
|
+
get DsCardTitle () {
|
|
28
|
+
return DsCardTitle;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
32
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
33
|
+
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
34
|
+
var _test = require("@playwright/test");
|
|
35
|
+
var _pageobject = require("./page-object");
|
|
36
|
+
var DsCard = /*#__PURE__*/ function(PageObject) {
|
|
7
37
|
"use strict";
|
|
8
|
-
_inherits(DsCard, PageObject);
|
|
38
|
+
_inherits._(DsCard, PageObject);
|
|
9
39
|
function DsCard(el) {
|
|
10
40
|
return PageObject.call(this, el) || this;
|
|
11
41
|
}
|
|
12
42
|
var _proto = DsCard.prototype;
|
|
13
43
|
_proto.assertToContainText = function assertToContainText(text) {
|
|
14
|
-
return _async_to_generator(function() {
|
|
15
|
-
return _ts_generator(this, function(_state) {
|
|
44
|
+
return _async_to_generator._(function() {
|
|
45
|
+
return _ts_generator._(this, function(_state) {
|
|
16
46
|
switch(_state.label){
|
|
17
47
|
case 0:
|
|
18
48
|
return [
|
|
19
49
|
4,
|
|
20
|
-
expect(this.el).toContainText(text)
|
|
50
|
+
(0, _test.expect)(this.el).toContainText(text)
|
|
21
51
|
];
|
|
22
52
|
case 1:
|
|
23
53
|
_state.sent();
|
|
@@ -29,22 +59,22 @@ export var DsCard = /*#__PURE__*/ function(PageObject) {
|
|
|
29
59
|
}).call(this);
|
|
30
60
|
};
|
|
31
61
|
return DsCard;
|
|
32
|
-
}(PageObject);
|
|
33
|
-
|
|
62
|
+
}(_pageobject.PageObject);
|
|
63
|
+
var DsCardTitle = /*#__PURE__*/ function(PageObject) {
|
|
34
64
|
"use strict";
|
|
35
|
-
_inherits(DsCardTitle, PageObject);
|
|
65
|
+
_inherits._(DsCardTitle, PageObject);
|
|
36
66
|
function DsCardTitle(el) {
|
|
37
67
|
return PageObject.call(this, el) || this;
|
|
38
68
|
}
|
|
39
69
|
var _proto = DsCardTitle.prototype;
|
|
40
70
|
_proto.assertToContainText = function assertToContainText(text) {
|
|
41
|
-
return _async_to_generator(function() {
|
|
42
|
-
return _ts_generator(this, function(_state) {
|
|
71
|
+
return _async_to_generator._(function() {
|
|
72
|
+
return _ts_generator._(this, function(_state) {
|
|
43
73
|
switch(_state.label){
|
|
44
74
|
case 0:
|
|
45
75
|
return [
|
|
46
76
|
4,
|
|
47
|
-
expect(this.el).toContainText(text)
|
|
77
|
+
(0, _test.expect)(this.el).toContainText(text)
|
|
48
78
|
];
|
|
49
79
|
case 1:
|
|
50
80
|
_state.sent();
|
|
@@ -56,22 +86,22 @@ export var DsCardTitle = /*#__PURE__*/ function(PageObject) {
|
|
|
56
86
|
}).call(this);
|
|
57
87
|
};
|
|
58
88
|
return DsCardTitle;
|
|
59
|
-
}(PageObject);
|
|
60
|
-
|
|
89
|
+
}(_pageobject.PageObject);
|
|
90
|
+
var DsCardSubtitle = /*#__PURE__*/ function(PageObject) {
|
|
61
91
|
"use strict";
|
|
62
|
-
_inherits(DsCardSubtitle, PageObject);
|
|
92
|
+
_inherits._(DsCardSubtitle, PageObject);
|
|
63
93
|
function DsCardSubtitle(el) {
|
|
64
94
|
return PageObject.call(this, el) || this;
|
|
65
95
|
}
|
|
66
96
|
var _proto = DsCardSubtitle.prototype;
|
|
67
97
|
_proto.assertToContainText = function assertToContainText(text) {
|
|
68
|
-
return _async_to_generator(function() {
|
|
69
|
-
return _ts_generator(this, function(_state) {
|
|
98
|
+
return _async_to_generator._(function() {
|
|
99
|
+
return _ts_generator._(this, function(_state) {
|
|
70
100
|
switch(_state.label){
|
|
71
101
|
case 0:
|
|
72
102
|
return [
|
|
73
103
|
4,
|
|
74
|
-
expect(this.el).toContainText(text)
|
|
104
|
+
(0, _test.expect)(this.el).toContainText(text)
|
|
75
105
|
];
|
|
76
106
|
case 1:
|
|
77
107
|
_state.sent();
|
|
@@ -83,22 +113,22 @@ export var DsCardSubtitle = /*#__PURE__*/ function(PageObject) {
|
|
|
83
113
|
}).call(this);
|
|
84
114
|
};
|
|
85
115
|
return DsCardSubtitle;
|
|
86
|
-
}(PageObject);
|
|
87
|
-
|
|
116
|
+
}(_pageobject.PageObject);
|
|
117
|
+
var DsCardContent = /*#__PURE__*/ function(PageObject) {
|
|
88
118
|
"use strict";
|
|
89
|
-
_inherits(DsCardContent, PageObject);
|
|
119
|
+
_inherits._(DsCardContent, PageObject);
|
|
90
120
|
function DsCardContent(el) {
|
|
91
121
|
return PageObject.call(this, el) || this;
|
|
92
122
|
}
|
|
93
123
|
var _proto = DsCardContent.prototype;
|
|
94
124
|
_proto.assertToContainText = function assertToContainText(text) {
|
|
95
|
-
return _async_to_generator(function() {
|
|
96
|
-
return _ts_generator(this, function(_state) {
|
|
125
|
+
return _async_to_generator._(function() {
|
|
126
|
+
return _ts_generator._(this, function(_state) {
|
|
97
127
|
switch(_state.label){
|
|
98
128
|
case 0:
|
|
99
129
|
return [
|
|
100
130
|
4,
|
|
101
|
-
expect(this.el).toContainText(text)
|
|
131
|
+
(0, _test.expect)(this.el).toContainText(text)
|
|
102
132
|
];
|
|
103
133
|
case 1:
|
|
104
134
|
_state.sent();
|
|
@@ -110,30 +140,30 @@ export var DsCardContent = /*#__PURE__*/ function(PageObject) {
|
|
|
110
140
|
}).call(this);
|
|
111
141
|
};
|
|
112
142
|
return DsCardContent;
|
|
113
|
-
}(PageObject);
|
|
114
|
-
|
|
143
|
+
}(_pageobject.PageObject);
|
|
144
|
+
var DsCardActions = /*#__PURE__*/ function(PageObject) {
|
|
115
145
|
"use strict";
|
|
116
|
-
_inherits(DsCardActions, PageObject);
|
|
146
|
+
_inherits._(DsCardActions, PageObject);
|
|
117
147
|
function DsCardActions(el) {
|
|
118
148
|
return PageObject.call(this, el) || this;
|
|
119
149
|
}
|
|
120
150
|
return DsCardActions;
|
|
121
|
-
}(PageObject);
|
|
122
|
-
|
|
151
|
+
}(_pageobject.PageObject);
|
|
152
|
+
var DsCardHeader = /*#__PURE__*/ function(PageObject) {
|
|
123
153
|
"use strict";
|
|
124
|
-
_inherits(DsCardHeader, PageObject);
|
|
154
|
+
_inherits._(DsCardHeader, PageObject);
|
|
125
155
|
function DsCardHeader(el) {
|
|
126
156
|
return PageObject.call(this, el) || this;
|
|
127
157
|
}
|
|
128
158
|
var _proto = DsCardHeader.prototype;
|
|
129
159
|
_proto.assertToContainText = function assertToContainText(text) {
|
|
130
|
-
return _async_to_generator(function() {
|
|
131
|
-
return _ts_generator(this, function(_state) {
|
|
160
|
+
return _async_to_generator._(function() {
|
|
161
|
+
return _ts_generator._(this, function(_state) {
|
|
132
162
|
switch(_state.label){
|
|
133
163
|
case 0:
|
|
134
164
|
return [
|
|
135
165
|
4,
|
|
136
|
-
expect(this.el).toContainText(text)
|
|
166
|
+
(0, _test.expect)(this.el).toContainText(text)
|
|
137
167
|
];
|
|
138
168
|
case 1:
|
|
139
169
|
_state.sent();
|
|
@@ -145,4 +175,4 @@ export var DsCardHeader = /*#__PURE__*/ function(PageObject) {
|
|
|
145
175
|
}).call(this);
|
|
146
176
|
};
|
|
147
177
|
return DsCardHeader;
|
|
148
|
-
}(PageObject);
|
|
178
|
+
}(_pageobject.PageObject);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Locator } from '@playwright/test';
|
|
2
|
+
import { PageObject } from './page-object';
|
|
3
|
+
import { E2ELocator } from '../page/utils';
|
|
4
|
+
export declare class DsCarousel extends PageObject {
|
|
5
|
+
constructor(el: E2ELocator);
|
|
6
|
+
item(name: string): Locator;
|
|
7
|
+
dot(index: number): Locator;
|
|
8
|
+
clickDot(index: number): Promise<void>;
|
|
9
|
+
scrollBtnBelow(direction: 'prev' | 'next'): Locator;
|
|
10
|
+
selectItem(name: string): Promise<void>;
|
|
11
|
+
assertItemSelected(name: string): Promise<void>;
|
|
12
|
+
assertItemNotSelected(name: string): Promise<void>;
|
|
13
|
+
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DsCarousel", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DsCarousel;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
12
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
13
|
+
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
14
|
+
var _test = require("@playwright/test");
|
|
15
|
+
var _pageobject = require("./page-object");
|
|
16
|
+
var DsCarousel = /*#__PURE__*/ function(PageObject) {
|
|
7
17
|
"use strict";
|
|
8
|
-
_inherits(DsCarousel, PageObject);
|
|
18
|
+
_inherits._(DsCarousel, PageObject);
|
|
9
19
|
function DsCarousel(el) {
|
|
10
20
|
return PageObject.call(this, el) || this;
|
|
11
21
|
}
|
|
@@ -17,8 +27,8 @@ export var DsCarousel = /*#__PURE__*/ function(PageObject) {
|
|
|
17
27
|
return this.el.locator('.dot').nth(index);
|
|
18
28
|
};
|
|
19
29
|
_proto.clickDot = function clickDot(index) {
|
|
20
|
-
return _async_to_generator(function() {
|
|
21
|
-
return _ts_generator(this, function(_state) {
|
|
30
|
+
return _async_to_generator._(function() {
|
|
31
|
+
return _ts_generator._(this, function(_state) {
|
|
22
32
|
switch(_state.label){
|
|
23
33
|
case 0:
|
|
24
34
|
return [
|
|
@@ -34,9 +44,12 @@ export var DsCarousel = /*#__PURE__*/ function(PageObject) {
|
|
|
34
44
|
});
|
|
35
45
|
}).call(this);
|
|
36
46
|
};
|
|
47
|
+
_proto.scrollBtnBelow = function scrollBtnBelow(direction) {
|
|
48
|
+
return this.el.locator(".scroll-btn-below--" + direction);
|
|
49
|
+
};
|
|
37
50
|
_proto.selectItem = function selectItem(name) {
|
|
38
|
-
return _async_to_generator(function() {
|
|
39
|
-
return _ts_generator(this, function(_state) {
|
|
51
|
+
return _async_to_generator._(function() {
|
|
52
|
+
return _ts_generator._(this, function(_state) {
|
|
40
53
|
switch(_state.label){
|
|
41
54
|
case 0:
|
|
42
55
|
return [
|
|
@@ -53,13 +66,13 @@ export var DsCarousel = /*#__PURE__*/ function(PageObject) {
|
|
|
53
66
|
}).call(this);
|
|
54
67
|
};
|
|
55
68
|
_proto.assertItemSelected = function assertItemSelected(name) {
|
|
56
|
-
return _async_to_generator(function() {
|
|
57
|
-
return _ts_generator(this, function(_state) {
|
|
69
|
+
return _async_to_generator._(function() {
|
|
70
|
+
return _ts_generator._(this, function(_state) {
|
|
58
71
|
switch(_state.label){
|
|
59
72
|
case 0:
|
|
60
73
|
return [
|
|
61
74
|
4,
|
|
62
|
-
expect(this.item(name)).toHaveAttribute('selected', '')
|
|
75
|
+
(0, _test.expect)(this.item(name)).toHaveAttribute('selected', '')
|
|
63
76
|
];
|
|
64
77
|
case 1:
|
|
65
78
|
_state.sent();
|
|
@@ -71,13 +84,13 @@ export var DsCarousel = /*#__PURE__*/ function(PageObject) {
|
|
|
71
84
|
}).call(this);
|
|
72
85
|
};
|
|
73
86
|
_proto.assertItemNotSelected = function assertItemNotSelected(name) {
|
|
74
|
-
return _async_to_generator(function() {
|
|
75
|
-
return _ts_generator(this, function(_state) {
|
|
87
|
+
return _async_to_generator._(function() {
|
|
88
|
+
return _ts_generator._(this, function(_state) {
|
|
76
89
|
switch(_state.label){
|
|
77
90
|
case 0:
|
|
78
91
|
return [
|
|
79
92
|
4,
|
|
80
|
-
expect(this.item(name)).not.toHaveAttribute('selected', '')
|
|
93
|
+
(0, _test.expect)(this.item(name)).not.toHaveAttribute('selected', '')
|
|
81
94
|
];
|
|
82
95
|
case 1:
|
|
83
96
|
_state.sent();
|
|
@@ -89,4 +102,4 @@ export var DsCarousel = /*#__PURE__*/ function(PageObject) {
|
|
|
89
102
|
}).call(this);
|
|
90
103
|
};
|
|
91
104
|
return DsCarousel;
|
|
92
|
-
}(PageObject);
|
|
105
|
+
}(_pageobject.PageObject);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Locator } from '@playwright/test';
|
|
2
|
+
import { E2ELocator } from '../page/utils';
|
|
3
|
+
import { PageObject } from './page-object';
|
|
4
|
+
export declare class DsCheckbox extends PageObject {
|
|
5
|
+
readonly nativeInput: Locator;
|
|
6
|
+
constructor(el: E2ELocator);
|
|
7
|
+
check(): Promise<void>;
|
|
8
|
+
uncheck(): Promise<void>;
|
|
9
|
+
assertToBeChecked(): Promise<void>;
|
|
10
|
+
assertToBeUnchecked(): Promise<void>;
|
|
11
|
+
assertToBeDisabled(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DsCheckbox", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DsCheckbox;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
12
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
13
|
+
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
14
|
+
var _test = require("@playwright/test");
|
|
15
|
+
var _pageobject = require("./page-object");
|
|
16
|
+
var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
7
17
|
"use strict";
|
|
8
|
-
_inherits(DsCheckbox, PageObject);
|
|
18
|
+
_inherits._(DsCheckbox, PageObject);
|
|
9
19
|
function DsCheckbox(el) {
|
|
10
20
|
var _this;
|
|
11
21
|
_this = PageObject.call(this, el) || this;
|
|
@@ -14,8 +24,8 @@ export var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
|
14
24
|
}
|
|
15
25
|
var _proto = DsCheckbox.prototype;
|
|
16
26
|
_proto.check = function check() {
|
|
17
|
-
return _async_to_generator(function() {
|
|
18
|
-
return _ts_generator(this, function(_state) {
|
|
27
|
+
return _async_to_generator._(function() {
|
|
28
|
+
return _ts_generator._(this, function(_state) {
|
|
19
29
|
switch(_state.label){
|
|
20
30
|
case 0:
|
|
21
31
|
return [
|
|
@@ -32,8 +42,8 @@ export var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
|
32
42
|
}).call(this);
|
|
33
43
|
};
|
|
34
44
|
_proto.uncheck = function uncheck() {
|
|
35
|
-
return _async_to_generator(function() {
|
|
36
|
-
return _ts_generator(this, function(_state) {
|
|
45
|
+
return _async_to_generator._(function() {
|
|
46
|
+
return _ts_generator._(this, function(_state) {
|
|
37
47
|
switch(_state.label){
|
|
38
48
|
case 0:
|
|
39
49
|
return [
|
|
@@ -50,13 +60,13 @@ export var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
|
50
60
|
}).call(this);
|
|
51
61
|
};
|
|
52
62
|
_proto.assertToBeChecked = function assertToBeChecked() {
|
|
53
|
-
return _async_to_generator(function() {
|
|
54
|
-
return _ts_generator(this, function(_state) {
|
|
63
|
+
return _async_to_generator._(function() {
|
|
64
|
+
return _ts_generator._(this, function(_state) {
|
|
55
65
|
switch(_state.label){
|
|
56
66
|
case 0:
|
|
57
67
|
return [
|
|
58
68
|
4,
|
|
59
|
-
expect(this.nativeInput).toBeChecked()
|
|
69
|
+
(0, _test.expect)(this.nativeInput).toBeChecked()
|
|
60
70
|
];
|
|
61
71
|
case 1:
|
|
62
72
|
_state.sent();
|
|
@@ -68,13 +78,13 @@ export var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
|
68
78
|
}).call(this);
|
|
69
79
|
};
|
|
70
80
|
_proto.assertToBeUnchecked = function assertToBeUnchecked() {
|
|
71
|
-
return _async_to_generator(function() {
|
|
72
|
-
return _ts_generator(this, function(_state) {
|
|
81
|
+
return _async_to_generator._(function() {
|
|
82
|
+
return _ts_generator._(this, function(_state) {
|
|
73
83
|
switch(_state.label){
|
|
74
84
|
case 0:
|
|
75
85
|
return [
|
|
76
86
|
4,
|
|
77
|
-
expect(this.nativeInput).not.toBeChecked()
|
|
87
|
+
(0, _test.expect)(this.nativeInput).not.toBeChecked()
|
|
78
88
|
];
|
|
79
89
|
case 1:
|
|
80
90
|
_state.sent();
|
|
@@ -86,13 +96,13 @@ export var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
|
86
96
|
}).call(this);
|
|
87
97
|
};
|
|
88
98
|
_proto.assertToBeDisabled = function assertToBeDisabled() {
|
|
89
|
-
return _async_to_generator(function() {
|
|
90
|
-
return _ts_generator(this, function(_state) {
|
|
99
|
+
return _async_to_generator._(function() {
|
|
100
|
+
return _ts_generator._(this, function(_state) {
|
|
91
101
|
switch(_state.label){
|
|
92
102
|
case 0:
|
|
93
103
|
return [
|
|
94
104
|
4,
|
|
95
|
-
expect(this.nativeInput).toBeDisabled()
|
|
105
|
+
(0, _test.expect)(this.nativeInput).toBeDisabled()
|
|
96
106
|
];
|
|
97
107
|
case 1:
|
|
98
108
|
_state.sent();
|
|
@@ -104,4 +114,4 @@ export var DsCheckbox = /*#__PURE__*/ function(PageObject) {
|
|
|
104
114
|
}).call(this);
|
|
105
115
|
};
|
|
106
116
|
return DsCheckbox;
|
|
107
|
-
}(PageObject);
|
|
117
|
+
}(_pageobject.PageObject);
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DsClose", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DsClose;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
12
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
13
|
+
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
14
|
+
var _pageobject = require("./page-object");
|
|
15
|
+
var DsClose = /*#__PURE__*/ function(PageObject) {
|
|
6
16
|
"use strict";
|
|
7
|
-
_inherits(DsClose, PageObject);
|
|
17
|
+
_inherits._(DsClose, PageObject);
|
|
8
18
|
function DsClose(el) {
|
|
9
19
|
return PageObject.call(this, el) || this;
|
|
10
20
|
}
|
|
11
21
|
var _proto = DsClose.prototype;
|
|
12
22
|
_proto.click = function click() {
|
|
13
|
-
return _async_to_generator(function() {
|
|
14
|
-
return _ts_generator(this, function(_state) {
|
|
23
|
+
return _async_to_generator._(function() {
|
|
24
|
+
return _ts_generator._(this, function(_state) {
|
|
15
25
|
switch(_state.label){
|
|
16
26
|
case 0:
|
|
17
27
|
return [
|
|
@@ -28,4 +38,4 @@ export var DsClose = /*#__PURE__*/ function(PageObject) {
|
|
|
28
38
|
}).call(this);
|
|
29
39
|
};
|
|
30
40
|
return DsClose;
|
|
31
|
-
}(PageObject);
|
|
41
|
+
}(_pageobject.PageObject);
|
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DsContent", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DsContent;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
12
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
13
|
+
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
14
|
+
var _test = require("@playwright/test");
|
|
15
|
+
var _pageobject = require("./page-object");
|
|
16
|
+
var DsContent = /*#__PURE__*/ function(PageObject) {
|
|
7
17
|
"use strict";
|
|
8
|
-
_inherits(DsContent, PageObject);
|
|
18
|
+
_inherits._(DsContent, PageObject);
|
|
9
19
|
function DsContent(el) {
|
|
10
20
|
return PageObject.call(this, el) || this;
|
|
11
21
|
}
|
|
12
22
|
var _proto = DsContent.prototype;
|
|
13
23
|
_proto.assertToContainText = function assertToContainText(text) {
|
|
14
|
-
return _async_to_generator(function() {
|
|
15
|
-
return _ts_generator(this, function(_state) {
|
|
24
|
+
return _async_to_generator._(function() {
|
|
25
|
+
return _ts_generator._(this, function(_state) {
|
|
16
26
|
switch(_state.label){
|
|
17
27
|
case 0:
|
|
18
28
|
return [
|
|
19
29
|
4,
|
|
20
|
-
expect(this.el).toContainText(text)
|
|
30
|
+
(0, _test.expect)(this.el).toContainText(text)
|
|
21
31
|
];
|
|
22
32
|
case 1:
|
|
23
33
|
_state.sent();
|
|
@@ -29,4 +39,4 @@ export var DsContent = /*#__PURE__*/ function(PageObject) {
|
|
|
29
39
|
}).call(this);
|
|
30
40
|
};
|
|
31
41
|
return DsContent;
|
|
32
|
-
}(PageObject);
|
|
42
|
+
}(_pageobject.PageObject);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Locator } from '@playwright/test';
|
|
2
|
+
import { E2ELocator } from '../page/utils';
|
|
3
|
+
import { PageObject } from './page-object';
|
|
4
|
+
export declare class DsCounter extends PageObject {
|
|
5
|
+
readonly counter: Locator;
|
|
6
|
+
readonly decreaseButton: Locator;
|
|
7
|
+
readonly increaseButton: Locator;
|
|
8
|
+
readonly valueDisplay: Locator;
|
|
9
|
+
constructor(el: E2ELocator);
|
|
10
|
+
/**
|
|
11
|
+
* Waits out a macrotask tick so `dsChange`'s debounced (setTimeout(0)) emit has
|
|
12
|
+
* actually run before the returned promise resolves.
|
|
13
|
+
*/
|
|
14
|
+
increase(): Promise<void>;
|
|
15
|
+
decrease(): Promise<void>;
|
|
16
|
+
assertValue(value: string): Promise<void>;
|
|
17
|
+
assertToBeDisabled(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "DsCounter", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return DsCounter;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
|
|
12
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
13
|
+
var _ts_generator = require("@swc/helpers/_/_ts_generator");
|
|
14
|
+
var _test = require("@playwright/test");
|
|
15
|
+
var _pageobject = require("./page-object");
|
|
16
|
+
var DsCounter = /*#__PURE__*/ function(PageObject) {
|
|
7
17
|
"use strict";
|
|
8
|
-
_inherits(DsCounter, PageObject);
|
|
18
|
+
_inherits._(DsCounter, PageObject);
|
|
9
19
|
function DsCounter(el) {
|
|
10
20
|
var _this;
|
|
11
21
|
_this = PageObject.call(this, el) || this;
|
|
@@ -20,8 +30,8 @@ export var DsCounter = /*#__PURE__*/ function(PageObject) {
|
|
|
20
30
|
* Waits out a macrotask tick so `dsChange`'s debounced (setTimeout(0)) emit has
|
|
21
31
|
* actually run before the returned promise resolves.
|
|
22
32
|
*/ _proto.increase = function increase() {
|
|
23
|
-
return _async_to_generator(function() {
|
|
24
|
-
return _ts_generator(this, function(_state) {
|
|
33
|
+
return _async_to_generator._(function() {
|
|
34
|
+
return _ts_generator._(this, function(_state) {
|
|
25
35
|
switch(_state.label){
|
|
26
36
|
case 0:
|
|
27
37
|
return [
|
|
@@ -48,8 +58,8 @@ export var DsCounter = /*#__PURE__*/ function(PageObject) {
|
|
|
48
58
|
}).call(this);
|
|
49
59
|
};
|
|
50
60
|
_proto.decrease = function decrease() {
|
|
51
|
-
return _async_to_generator(function() {
|
|
52
|
-
return _ts_generator(this, function(_state) {
|
|
61
|
+
return _async_to_generator._(function() {
|
|
62
|
+
return _ts_generator._(this, function(_state) {
|
|
53
63
|
switch(_state.label){
|
|
54
64
|
case 0:
|
|
55
65
|
return [
|
|
@@ -76,13 +86,13 @@ export var DsCounter = /*#__PURE__*/ function(PageObject) {
|
|
|
76
86
|
}).call(this);
|
|
77
87
|
};
|
|
78
88
|
_proto.assertValue = function assertValue(value) {
|
|
79
|
-
return _async_to_generator(function() {
|
|
80
|
-
return _ts_generator(this, function(_state) {
|
|
89
|
+
return _async_to_generator._(function() {
|
|
90
|
+
return _ts_generator._(this, function(_state) {
|
|
81
91
|
switch(_state.label){
|
|
82
92
|
case 0:
|
|
83
93
|
return [
|
|
84
94
|
4,
|
|
85
|
-
expect(this.el).toHaveAttribute('value', value)
|
|
95
|
+
(0, _test.expect)(this.el).toHaveAttribute('value', value)
|
|
86
96
|
];
|
|
87
97
|
case 1:
|
|
88
98
|
_state.sent();
|
|
@@ -94,19 +104,19 @@ export var DsCounter = /*#__PURE__*/ function(PageObject) {
|
|
|
94
104
|
}).call(this);
|
|
95
105
|
};
|
|
96
106
|
_proto.assertToBeDisabled = function assertToBeDisabled() {
|
|
97
|
-
return _async_to_generator(function() {
|
|
98
|
-
return _ts_generator(this, function(_state) {
|
|
107
|
+
return _async_to_generator._(function() {
|
|
108
|
+
return _ts_generator._(this, function(_state) {
|
|
99
109
|
switch(_state.label){
|
|
100
110
|
case 0:
|
|
101
111
|
return [
|
|
102
112
|
4,
|
|
103
|
-
expect(this.decreaseButton).toHaveAttribute('disabled', '')
|
|
113
|
+
(0, _test.expect)(this.decreaseButton).toHaveAttribute('disabled', '')
|
|
104
114
|
];
|
|
105
115
|
case 1:
|
|
106
116
|
_state.sent();
|
|
107
117
|
return [
|
|
108
118
|
4,
|
|
109
|
-
expect(this.increaseButton).toHaveAttribute('disabled', '')
|
|
119
|
+
(0, _test.expect)(this.increaseButton).toHaveAttribute('disabled', '')
|
|
110
120
|
];
|
|
111
121
|
case 2:
|
|
112
122
|
_state.sent();
|
|
@@ -118,4 +128,4 @@ export var DsCounter = /*#__PURE__*/ function(PageObject) {
|
|
|
118
128
|
}).call(this);
|
|
119
129
|
};
|
|
120
130
|
return DsCounter;
|
|
121
|
-
}(PageObject);
|
|
131
|
+
}(_pageobject.PageObject);
|