@helvetia-design/playwright 0.0.0-stage → 0.0.2

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 (76) hide show
  1. package/LICENSE +210 -0
  2. package/dist/src/index.js +8 -0
  3. package/dist/src/lib/components/accordion.po.js +74 -0
  4. package/dist/src/lib/components/app-footer.po.js +132 -0
  5. package/dist/src/lib/components/app-navbar.po.js +106 -0
  6. package/dist/src/lib/components/badge.po.js +32 -0
  7. package/dist/src/lib/components/brand-icon.po.js +13 -0
  8. package/dist/src/lib/components/button.po.js +86 -0
  9. package/dist/src/lib/components/card.po.js +148 -0
  10. package/dist/src/lib/components/carousel.po.js +92 -0
  11. package/dist/src/lib/components/checkbox.po.js +107 -0
  12. package/dist/src/lib/components/close.po.js +31 -0
  13. package/dist/src/lib/components/content.po.js +32 -0
  14. package/dist/src/lib/components/counter.po.js +121 -0
  15. package/dist/src/lib/components/data-item.po.js +235 -0
  16. package/dist/src/lib/components/data.po.js +110 -0
  17. package/dist/src/lib/components/datepicker.po.js +260 -0
  18. package/dist/src/lib/components/divider.po.js +10 -0
  19. package/dist/src/lib/components/drawer.po.js +55 -0
  20. package/dist/src/lib/components/file-upload.po.js +200 -0
  21. package/dist/src/lib/components/heading.po.js +32 -0
  22. package/dist/src/lib/components/hint.po.js +71 -0
  23. package/dist/src/lib/components/icon.po.js +13 -0
  24. package/dist/src/lib/components/index.js +49 -0
  25. package/dist/src/lib/components/input.po.js +107 -0
  26. package/dist/src/lib/components/label.po.js +32 -0
  27. package/dist/src/lib/components/list.po.js +68 -0
  28. package/dist/src/lib/components/logo.po.js +13 -0
  29. package/dist/src/lib/components/modal.po.js +97 -0
  30. package/dist/src/lib/components/notification.po.js +56 -0
  31. package/dist/src/lib/components/number-input.po.js +107 -0
  32. package/dist/src/lib/components/page-object.js +47 -0
  33. package/dist/src/lib/components/pagination.po.js +146 -0
  34. package/dist/src/lib/components/phone-input.po.js +302 -0
  35. package/dist/src/lib/components/popup.po.js +55 -0
  36. package/dist/src/lib/components/radio.po.js +89 -0
  37. package/dist/src/lib/components/root.po.js +32 -0
  38. package/dist/src/lib/components/segment.po.js +135 -0
  39. package/dist/src/lib/components/select.po.js +257 -0
  40. package/dist/src/lib/components/shape.po.js +10 -0
  41. package/dist/src/lib/components/sheet.po.js +88 -0
  42. package/dist/src/lib/components/slider.po.js +101 -0
  43. package/dist/src/lib/components/snackbar.po.js +115 -0
  44. package/dist/src/lib/components/spinner.po.js +13 -0
  45. package/dist/src/lib/components/stack.po.js +32 -0
  46. package/dist/src/lib/components/steps.po.js +112 -0
  47. package/dist/src/lib/components/tabs.po.js +110 -0
  48. package/dist/src/lib/components/tag.po.js +53 -0
  49. package/dist/src/lib/components/text.po.js +32 -0
  50. package/dist/src/lib/components/textarea.po.js +89 -0
  51. package/dist/src/lib/components/toast.po.js +92 -0
  52. package/dist/src/lib/components/toggle.po.js +107 -0
  53. package/dist/src/lib/components/tooltip.po.js +32 -0
  54. package/dist/src/lib/devices.js +6 -0
  55. package/dist/src/lib/extend.js +375 -0
  56. package/dist/src/lib/functions/a11y.js +31 -0
  57. package/dist/src/lib/matchers/index.js +12 -0
  58. package/dist/src/lib/matchers/to-have-first-received-event-detail.js +44 -0
  59. package/dist/src/lib/matchers/to-have-nth-received-event-detail.js +53 -0
  60. package/dist/src/lib/matchers/to-have-received-event-detail.js +44 -0
  61. package/dist/src/lib/matchers/to-have-received-event-times.js +33 -0
  62. package/dist/src/lib/matchers/to-have-received-event.js +33 -0
  63. package/dist/src/lib/page/event-spy.js +198 -0
  64. package/dist/src/lib/page/utils/goto.js +71 -0
  65. package/dist/src/lib/page/utils/index.js +6 -0
  66. package/dist/src/lib/page/utils/locator.js +38 -0
  67. package/dist/src/lib/page/utils/mount-ssr.js +118 -0
  68. package/dist/src/lib/page/utils/mount.js +70 -0
  69. package/dist/src/lib/page/utils/spy-on-event.js +34 -0
  70. package/dist/src/lib/page/utils/wait-for-changes.js +99 -0
  71. package/dist/src/lib/screenshot.js +13 -0
  72. package/dist/src/lib/test-expect.js +1 -0
  73. package/dist/src/lib/types.js +54 -0
  74. package/package.json +31 -3
  75. package/sbom.cdx.json +80472 -0
  76. package/README.md +0 -3
@@ -0,0 +1,235 @@
1
+ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
+ import { _ as _inherits } from "@swc/helpers/_/_inherits";
3
+ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
+ import { PageObject } from './page-object';
5
+ import { expect } from '@playwright/test';
6
+ export var DsDataItem = /*#__PURE__*/ function(PageObject) {
7
+ "use strict";
8
+ _inherits(DsDataItem, PageObject);
9
+ function DsDataItem(el) {
10
+ return PageObject.call(this, el) || this;
11
+ }
12
+ var _proto = DsDataItem.prototype;
13
+ _proto.assertLabelText = function assertLabelText(text) {
14
+ return _async_to_generator(function() {
15
+ var labelContainer;
16
+ return _ts_generator(this, function(_state) {
17
+ switch(_state.label){
18
+ case 0:
19
+ labelContainer = this.el.locator('label');
20
+ return [
21
+ 4,
22
+ expect(labelContainer).toContainText(text)
23
+ ];
24
+ case 1:
25
+ _state.sent();
26
+ return [
27
+ 2
28
+ ];
29
+ }
30
+ });
31
+ }).call(this);
32
+ };
33
+ _proto.assertValueText = function assertValueText(text) {
34
+ return _async_to_generator(function() {
35
+ var valueContainer;
36
+ return _ts_generator(this, function(_state) {
37
+ switch(_state.label){
38
+ case 0:
39
+ valueContainer = this.el.locator('[class="value-container"]');
40
+ return [
41
+ 4,
42
+ expect(valueContainer).toContainText(text)
43
+ ];
44
+ case 1:
45
+ _state.sent();
46
+ return [
47
+ 2
48
+ ];
49
+ }
50
+ });
51
+ }).call(this);
52
+ };
53
+ _proto.assertIsDisabled = function assertIsDisabled() {
54
+ return _async_to_generator(function() {
55
+ return _ts_generator(this, function(_state) {
56
+ switch(_state.label){
57
+ case 0:
58
+ return [
59
+ 4,
60
+ expect(this.el).toHaveClass(/is-disabled/)
61
+ ];
62
+ case 1:
63
+ _state.sent();
64
+ return [
65
+ 2
66
+ ];
67
+ }
68
+ });
69
+ }).call(this);
70
+ };
71
+ _proto.assertIsNotDisabled = function assertIsNotDisabled() {
72
+ return _async_to_generator(function() {
73
+ return _ts_generator(this, function(_state) {
74
+ switch(_state.label){
75
+ case 0:
76
+ return [
77
+ 4,
78
+ expect(this.el).not.toHaveClass(/is-disabled/)
79
+ ];
80
+ case 1:
81
+ _state.sent();
82
+ return [
83
+ 2
84
+ ];
85
+ }
86
+ });
87
+ }).call(this);
88
+ };
89
+ _proto.assertIsMultiline = function assertIsMultiline() {
90
+ return _async_to_generator(function() {
91
+ return _ts_generator(this, function(_state) {
92
+ switch(_state.label){
93
+ case 0:
94
+ return [
95
+ 4,
96
+ expect(this.el).toHaveClass(/is-multiline/)
97
+ ];
98
+ case 1:
99
+ _state.sent();
100
+ return [
101
+ 2
102
+ ];
103
+ }
104
+ });
105
+ }).call(this);
106
+ };
107
+ _proto.assertIsNotMultiline = function assertIsNotMultiline() {
108
+ return _async_to_generator(function() {
109
+ return _ts_generator(this, function(_state) {
110
+ switch(_state.label){
111
+ case 0:
112
+ return [
113
+ 4,
114
+ expect(this.el).not.toHaveClass(/is-multiline/)
115
+ ];
116
+ case 1:
117
+ _state.sent();
118
+ return [
119
+ 2
120
+ ];
121
+ }
122
+ });
123
+ }).call(this);
124
+ };
125
+ _proto.assertIsEditable = function assertIsEditable() {
126
+ return _async_to_generator(function() {
127
+ return _ts_generator(this, function(_state) {
128
+ switch(_state.label){
129
+ case 0:
130
+ return [
131
+ 4,
132
+ expect(this.el).toHaveClass(/is-editable/)
133
+ ];
134
+ case 1:
135
+ _state.sent();
136
+ return [
137
+ 2
138
+ ];
139
+ }
140
+ });
141
+ }).call(this);
142
+ };
143
+ _proto.assertIsNotEditable = function assertIsNotEditable() {
144
+ return _async_to_generator(function() {
145
+ return _ts_generator(this, function(_state) {
146
+ switch(_state.label){
147
+ case 0:
148
+ return [
149
+ 4,
150
+ expect(this.el).not.toHaveClass(/is-editable/)
151
+ ];
152
+ case 1:
153
+ _state.sent();
154
+ return [
155
+ 2
156
+ ];
157
+ }
158
+ });
159
+ }).call(this);
160
+ };
161
+ _proto.assertHasRequiredIndicator = function assertHasRequiredIndicator() {
162
+ return _async_to_generator(function() {
163
+ var span;
164
+ return _ts_generator(this, function(_state) {
165
+ switch(_state.label){
166
+ case 0:
167
+ span = this.el.locator('slot[name="label"]').locator('.. span');
168
+ return [
169
+ 4,
170
+ expect(span).toBeVisible()
171
+ ];
172
+ case 1:
173
+ _state.sent();
174
+ return [
175
+ 2
176
+ ];
177
+ }
178
+ });
179
+ }).call(this);
180
+ };
181
+ _proto.assertNoRequiredIndicator = function assertNoRequiredIndicator() {
182
+ return _async_to_generator(function() {
183
+ var span;
184
+ return _ts_generator(this, function(_state) {
185
+ switch(_state.label){
186
+ case 0:
187
+ span = this.el.locator('slot[name="label"]').locator('.. span');
188
+ return [
189
+ 4,
190
+ expect(span).not.toBeVisible()
191
+ ];
192
+ case 1:
193
+ _state.sent();
194
+ return [
195
+ 2
196
+ ];
197
+ }
198
+ });
199
+ }).call(this);
200
+ };
201
+ _proto.assertLabelLinksToValue = function assertLabelLinksToValue() {
202
+ return _async_to_generator(function() {
203
+ var labelEl, valueEl, labelId, valueLabelledBy;
204
+ return _ts_generator(this, function(_state) {
205
+ switch(_state.label){
206
+ case 0:
207
+ labelEl = this.el.locator('label');
208
+ valueEl = this.el.locator('[class="value-container"]');
209
+ return [
210
+ 4,
211
+ labelEl.evaluate(function(el) {
212
+ return el.id;
213
+ })
214
+ ];
215
+ case 1:
216
+ labelId = _state.sent();
217
+ return [
218
+ 4,
219
+ valueEl.evaluate(function(el) {
220
+ return el.getAttribute('aria-labelledby');
221
+ })
222
+ ];
223
+ case 2:
224
+ valueLabelledBy = _state.sent();
225
+ expect(labelId).toBeTruthy();
226
+ expect(valueLabelledBy).toBe(labelId);
227
+ return [
228
+ 2
229
+ ];
230
+ }
231
+ });
232
+ }).call(this);
233
+ };
234
+ return DsDataItem;
235
+ }(PageObject);
@@ -0,0 +1,110 @@
1
+ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
+ import { _ as _inherits } from "@swc/helpers/_/_inherits";
3
+ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
+ import { PageObject } from './page-object';
5
+ import { expect } from '@playwright/test';
6
+ export var DsData = /*#__PURE__*/ function(PageObject) {
7
+ "use strict";
8
+ _inherits(DsData, PageObject);
9
+ function DsData(el) {
10
+ return PageObject.call(this, el) || this;
11
+ }
12
+ var _proto = DsData.prototype;
13
+ _proto.getItems = function getItems() {
14
+ return this.el.locator('ds-data-item');
15
+ };
16
+ _proto.getItem = function getItem(index) {
17
+ return this.getItems().nth(index);
18
+ };
19
+ _proto.assertItemCount = function assertItemCount(count) {
20
+ return _async_to_generator(function() {
21
+ return _ts_generator(this, function(_state) {
22
+ switch(_state.label){
23
+ case 0:
24
+ return [
25
+ 4,
26
+ expect(this.getItems()).toHaveCount(count)
27
+ ];
28
+ case 1:
29
+ _state.sent();
30
+ return [
31
+ 2
32
+ ];
33
+ }
34
+ });
35
+ }).call(this);
36
+ };
37
+ _proto.assertIsHorizontal = function assertIsHorizontal() {
38
+ return _async_to_generator(function() {
39
+ return _ts_generator(this, function(_state) {
40
+ switch(_state.label){
41
+ case 0:
42
+ return [
43
+ 4,
44
+ expect(this.el).toHaveClass(/is-horizontal/)
45
+ ];
46
+ case 1:
47
+ _state.sent();
48
+ return [
49
+ 2
50
+ ];
51
+ }
52
+ });
53
+ }).call(this);
54
+ };
55
+ _proto.assertIsNotHorizontal = function assertIsNotHorizontal() {
56
+ return _async_to_generator(function() {
57
+ return _ts_generator(this, function(_state) {
58
+ switch(_state.label){
59
+ case 0:
60
+ return [
61
+ 4,
62
+ expect(this.el).not.toHaveClass(/is-horizontal/)
63
+ ];
64
+ case 1:
65
+ _state.sent();
66
+ return [
67
+ 2
68
+ ];
69
+ }
70
+ });
71
+ }).call(this);
72
+ };
73
+ _proto.assertHasBorder = function assertHasBorder() {
74
+ return _async_to_generator(function() {
75
+ return _ts_generator(this, function(_state) {
76
+ switch(_state.label){
77
+ case 0:
78
+ return [
79
+ 4,
80
+ expect(this.el).toHaveClass(/is-bordered/)
81
+ ];
82
+ case 1:
83
+ _state.sent();
84
+ return [
85
+ 2
86
+ ];
87
+ }
88
+ });
89
+ }).call(this);
90
+ };
91
+ _proto.assertNoBorder = function assertNoBorder() {
92
+ return _async_to_generator(function() {
93
+ return _ts_generator(this, function(_state) {
94
+ switch(_state.label){
95
+ case 0:
96
+ return [
97
+ 4,
98
+ expect(this.el).not.toHaveClass(/is-bordered/)
99
+ ];
100
+ case 1:
101
+ _state.sent();
102
+ return [
103
+ 2
104
+ ];
105
+ }
106
+ });
107
+ }).call(this);
108
+ };
109
+ return DsData;
110
+ }(PageObject);
@@ -0,0 +1,260 @@
1
+ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
+ import { _ as _inherits } from "@swc/helpers/_/_inherits";
3
+ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
+ import { expect } from '@playwright/test';
5
+ import { PageObject } from './page-object';
6
+ export var DsDatepicker = /*#__PURE__*/ function(PageObject) {
7
+ "use strict";
8
+ _inherits(DsDatepicker, PageObject);
9
+ function DsDatepicker(el, options) {
10
+ var _this;
11
+ var _ref;
12
+ _this = PageObject.call(this, el) || this;
13
+ _this.inline = (_ref = options == null ? void 0 : options.inline) != null ? _ref : false;
14
+ _this.nativeInput = el.locator('[part="input"]');
15
+ _this.triggerButton = el.locator('[part="trigger"]');
16
+ _this.clearButton = el.locator('[part="clear"]');
17
+ return _this;
18
+ }
19
+ var _proto = DsDatepicker.prototype;
20
+ _proto.type = function type(formattedDate) {
21
+ return _async_to_generator(function() {
22
+ return _ts_generator(this, function(_state) {
23
+ switch(_state.label){
24
+ case 0:
25
+ return [
26
+ 4,
27
+ this.nativeInput.click()
28
+ ];
29
+ case 1:
30
+ _state.sent();
31
+ return [
32
+ 4,
33
+ this.nativeInput.pressSequentially(formattedDate)
34
+ ];
35
+ case 2:
36
+ _state.sent();
37
+ return [
38
+ 2
39
+ ];
40
+ }
41
+ });
42
+ }).call(this);
43
+ };
44
+ _proto.pick = function pick(isoDate) {
45
+ return _async_to_generator(function() {
46
+ var _isoDate_split, yearStr, monthStr, dayStr, year, month, day, targetCell, currentMonthCell, prevButton, nextButton, i, _ref, _ref1, currentYear, currentMonth;
47
+ return _ts_generator(this, function(_state) {
48
+ switch(_state.label){
49
+ case 0:
50
+ _isoDate_split = isoDate.split('-'), yearStr = _isoDate_split[0], monthStr = _isoDate_split[1], dayStr = _isoDate_split[2];
51
+ year = parseInt(yearStr, 10);
52
+ month = parseInt(monthStr, 10) - 1; // air-datepicker uses 0-indexed months
53
+ day = parseInt(dayStr, 10);
54
+ if (!!this.inline) return [
55
+ 3,
56
+ 2
57
+ ];
58
+ return [
59
+ 4,
60
+ this.triggerButton.click()
61
+ ];
62
+ case 1:
63
+ _state.sent();
64
+ _state.label = 2;
65
+ case 2:
66
+ targetCell = this.el.locator('.air-datepicker-cell.-day-[data-year="' + year + '"][data-month="' + month + '"][data-date="' + day + '"]');
67
+ currentMonthCell = this.el.locator('.air-datepicker-cell.-day-:not(.-other-month-)').first();
68
+ prevButton = this.el.locator('[data-action="prev"] button');
69
+ nextButton = this.el.locator('[data-action="next"] button');
70
+ return [
71
+ 4,
72
+ currentMonthCell.waitFor({
73
+ state: 'visible'
74
+ })
75
+ ];
76
+ case 3:
77
+ _state.sent();
78
+ i = 0;
79
+ _state.label = 4;
80
+ case 4:
81
+ if (!(i < 24)) return [
82
+ 3,
83
+ 14
84
+ ];
85
+ return [
86
+ 4,
87
+ targetCell.isVisible()
88
+ ];
89
+ case 5:
90
+ if (_state.sent()) return [
91
+ 3,
92
+ 14
93
+ ];
94
+ return [
95
+ 4,
96
+ currentMonthCell.getAttribute('data-year')
97
+ ];
98
+ case 6:
99
+ currentYear = parseInt.apply(void 0, [
100
+ (_ref = _state.sent()) != null ? _ref : '0',
101
+ 10
102
+ ]);
103
+ return [
104
+ 4,
105
+ currentMonthCell.getAttribute('data-month')
106
+ ];
107
+ case 7:
108
+ currentMonth = parseInt.apply(void 0, [
109
+ (_ref1 = _state.sent()) != null ? _ref1 : '0',
110
+ 10
111
+ ]);
112
+ if (!(year * 12 + month > currentYear * 12 + currentMonth)) return [
113
+ 3,
114
+ 9
115
+ ];
116
+ return [
117
+ 4,
118
+ nextButton.click()
119
+ ];
120
+ case 8:
121
+ _state.sent();
122
+ return [
123
+ 3,
124
+ 11
125
+ ];
126
+ case 9:
127
+ return [
128
+ 4,
129
+ prevButton.click()
130
+ ];
131
+ case 10:
132
+ _state.sent();
133
+ _state.label = 11;
134
+ case 11:
135
+ return [
136
+ 4,
137
+ currentMonthCell.waitFor({
138
+ state: 'visible'
139
+ })
140
+ ];
141
+ case 12:
142
+ _state.sent();
143
+ _state.label = 13;
144
+ case 13:
145
+ i++;
146
+ return [
147
+ 3,
148
+ 4
149
+ ];
150
+ case 14:
151
+ return [
152
+ 4,
153
+ targetCell.click()
154
+ ];
155
+ case 15:
156
+ _state.sent();
157
+ return [
158
+ 2
159
+ ];
160
+ }
161
+ });
162
+ }).call(this);
163
+ };
164
+ _proto.clear = function clear() {
165
+ return _async_to_generator(function() {
166
+ return _ts_generator(this, function(_state) {
167
+ switch(_state.label){
168
+ case 0:
169
+ return [
170
+ 4,
171
+ this.clearButton.click()
172
+ ];
173
+ case 1:
174
+ _state.sent();
175
+ return [
176
+ 2
177
+ ];
178
+ }
179
+ });
180
+ }).call(this);
181
+ };
182
+ _proto.blur = function blur() {
183
+ return _async_to_generator(function() {
184
+ return _ts_generator(this, function(_state) {
185
+ switch(_state.label){
186
+ case 0:
187
+ if (!!this.inline) return [
188
+ 3,
189
+ 2
190
+ ];
191
+ return [
192
+ 4,
193
+ this.nativeInput.blur()
194
+ ];
195
+ case 1:
196
+ _state.sent();
197
+ _state.label = 2;
198
+ case 2:
199
+ return [
200
+ 2
201
+ ];
202
+ }
203
+ });
204
+ }).call(this);
205
+ };
206
+ _proto.assertValue = function assertValue(value) {
207
+ return _async_to_generator(function() {
208
+ return _ts_generator(this, function(_state) {
209
+ switch(_state.label){
210
+ case 0:
211
+ if (!this.inline) return [
212
+ 3,
213
+ 2
214
+ ];
215
+ return [
216
+ 4,
217
+ expect(this.el).toHaveAttribute('value', value)
218
+ ];
219
+ case 1:
220
+ _state.sent();
221
+ return [
222
+ 3,
223
+ 4
224
+ ];
225
+ case 2:
226
+ return [
227
+ 4,
228
+ expect(this.nativeInput).toHaveValue(value)
229
+ ];
230
+ case 3:
231
+ _state.sent();
232
+ _state.label = 4;
233
+ case 4:
234
+ return [
235
+ 2
236
+ ];
237
+ }
238
+ });
239
+ }).call(this);
240
+ };
241
+ _proto.assertToBeDisabled = function assertToBeDisabled() {
242
+ return _async_to_generator(function() {
243
+ return _ts_generator(this, function(_state) {
244
+ switch(_state.label){
245
+ case 0:
246
+ return [
247
+ 4,
248
+ expect(this.nativeInput).toBeDisabled()
249
+ ];
250
+ case 1:
251
+ _state.sent();
252
+ return [
253
+ 2
254
+ ];
255
+ }
256
+ });
257
+ }).call(this);
258
+ };
259
+ return DsDatepicker;
260
+ }(PageObject);
@@ -0,0 +1,10 @@
1
+ import { _ as _inherits } from "@swc/helpers/_/_inherits";
2
+ import { PageObject } from './page-object';
3
+ export var DsDivider = /*#__PURE__*/ function(PageObject) {
4
+ "use strict";
5
+ _inherits(DsDivider, PageObject);
6
+ function DsDivider(el) {
7
+ return PageObject.call(this, el) || this;
8
+ }
9
+ return DsDivider;
10
+ }(PageObject);
@@ -0,0 +1,55 @@
1
+ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
2
+ import { _ as _inherits } from "@swc/helpers/_/_inherits";
3
+ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
4
+ import { expect } from '@playwright/test';
5
+ import { PageObject } from './page-object';
6
+ import { DsClose } from './close.po';
7
+ export var DsDrawer = /*#__PURE__*/ function(PageObject) {
8
+ "use strict";
9
+ _inherits(DsDrawer, PageObject);
10
+ function DsDrawer(el) {
11
+ var _this;
12
+ _this = PageObject.call(this, el) || this;
13
+ _this.dialog = el.locator('[part="dialog"]');
14
+ _this.close = new DsClose(el.locator('[part="close"]'));
15
+ return _this;
16
+ }
17
+ var _proto = DsDrawer.prototype;
18
+ _proto.assertToBeOpen = function assertToBeOpen() {
19
+ return _async_to_generator(function() {
20
+ return _ts_generator(this, function(_state) {
21
+ switch(_state.label){
22
+ case 0:
23
+ return [
24
+ 4,
25
+ expect(this.el).toHaveClass(/is-open/)
26
+ ];
27
+ case 1:
28
+ _state.sent();
29
+ return [
30
+ 2
31
+ ];
32
+ }
33
+ });
34
+ }).call(this);
35
+ };
36
+ _proto.assertToBeClosed = function assertToBeClosed() {
37
+ return _async_to_generator(function() {
38
+ return _ts_generator(this, function(_state) {
39
+ switch(_state.label){
40
+ case 0:
41
+ return [
42
+ 4,
43
+ expect(this.el).not.toHaveClass(/is-open/)
44
+ ];
45
+ case 1:
46
+ _state.sent();
47
+ return [
48
+ 2
49
+ ];
50
+ }
51
+ });
52
+ }).call(this);
53
+ };
54
+ return DsDrawer;
55
+ }(PageObject);