@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.
- package/LICENSE +210 -0
- package/dist/src/index.js +8 -0
- package/dist/src/lib/components/accordion.po.js +74 -0
- package/dist/src/lib/components/app-footer.po.js +132 -0
- package/dist/src/lib/components/app-navbar.po.js +106 -0
- package/dist/src/lib/components/badge.po.js +32 -0
- package/dist/src/lib/components/brand-icon.po.js +13 -0
- package/dist/src/lib/components/button.po.js +86 -0
- package/dist/src/lib/components/card.po.js +148 -0
- package/dist/src/lib/components/carousel.po.js +92 -0
- package/dist/src/lib/components/checkbox.po.js +107 -0
- package/dist/src/lib/components/close.po.js +31 -0
- package/dist/src/lib/components/content.po.js +32 -0
- package/dist/src/lib/components/counter.po.js +121 -0
- package/dist/src/lib/components/data-item.po.js +235 -0
- package/dist/src/lib/components/data.po.js +110 -0
- package/dist/src/lib/components/datepicker.po.js +260 -0
- package/dist/src/lib/components/divider.po.js +10 -0
- package/dist/src/lib/components/drawer.po.js +55 -0
- package/dist/src/lib/components/file-upload.po.js +200 -0
- package/dist/src/lib/components/heading.po.js +32 -0
- package/dist/src/lib/components/hint.po.js +71 -0
- package/dist/src/lib/components/icon.po.js +13 -0
- package/dist/src/lib/components/index.js +49 -0
- package/dist/src/lib/components/input.po.js +107 -0
- package/dist/src/lib/components/label.po.js +32 -0
- package/dist/src/lib/components/list.po.js +68 -0
- package/dist/src/lib/components/logo.po.js +13 -0
- package/dist/src/lib/components/modal.po.js +97 -0
- package/dist/src/lib/components/notification.po.js +56 -0
- package/dist/src/lib/components/number-input.po.js +107 -0
- package/dist/src/lib/components/page-object.js +47 -0
- package/dist/src/lib/components/pagination.po.js +146 -0
- package/dist/src/lib/components/phone-input.po.js +302 -0
- package/dist/src/lib/components/popup.po.js +55 -0
- package/dist/src/lib/components/radio.po.js +89 -0
- package/dist/src/lib/components/root.po.js +32 -0
- package/dist/src/lib/components/segment.po.js +135 -0
- package/dist/src/lib/components/select.po.js +257 -0
- package/dist/src/lib/components/shape.po.js +10 -0
- package/dist/src/lib/components/sheet.po.js +88 -0
- package/dist/src/lib/components/slider.po.js +101 -0
- package/dist/src/lib/components/snackbar.po.js +115 -0
- package/dist/src/lib/components/spinner.po.js +13 -0
- package/dist/src/lib/components/stack.po.js +32 -0
- package/dist/src/lib/components/steps.po.js +112 -0
- package/dist/src/lib/components/tabs.po.js +110 -0
- package/dist/src/lib/components/tag.po.js +53 -0
- package/dist/src/lib/components/text.po.js +32 -0
- package/dist/src/lib/components/textarea.po.js +89 -0
- package/dist/src/lib/components/toast.po.js +92 -0
- package/dist/src/lib/components/toggle.po.js +107 -0
- package/dist/src/lib/components/tooltip.po.js +32 -0
- package/dist/src/lib/devices.js +6 -0
- package/dist/src/lib/extend.js +375 -0
- package/dist/src/lib/functions/a11y.js +31 -0
- package/dist/src/lib/matchers/index.js +12 -0
- package/dist/src/lib/matchers/to-have-first-received-event-detail.js +44 -0
- package/dist/src/lib/matchers/to-have-nth-received-event-detail.js +53 -0
- package/dist/src/lib/matchers/to-have-received-event-detail.js +44 -0
- package/dist/src/lib/matchers/to-have-received-event-times.js +33 -0
- package/dist/src/lib/matchers/to-have-received-event.js +33 -0
- package/dist/src/lib/page/event-spy.js +198 -0
- package/dist/src/lib/page/utils/goto.js +71 -0
- package/dist/src/lib/page/utils/index.js +6 -0
- package/dist/src/lib/page/utils/locator.js +38 -0
- package/dist/src/lib/page/utils/mount-ssr.js +118 -0
- package/dist/src/lib/page/utils/mount.js +70 -0
- package/dist/src/lib/page/utils/spy-on-event.js +34 -0
- package/dist/src/lib/page/utils/wait-for-changes.js +99 -0
- package/dist/src/lib/screenshot.js +13 -0
- package/dist/src/lib/test-expect.js +1 -0
- package/dist/src/lib/types.js +54 -0
- package/package.json +31 -3
- package/sbom.cdx.json +80472 -0
- package/README.md +0 -3
|
@@ -0,0 +1,101 @@
|
|
|
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 DsSlider = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsSlider, PageObject);
|
|
9
|
+
function DsSlider(el) {
|
|
10
|
+
var _this;
|
|
11
|
+
_this = PageObject.call(this, el) || this;
|
|
12
|
+
_this.slider = el.locator('[part="slider"]');
|
|
13
|
+
_this.handle = _this.slider.locator('.noUi-handle');
|
|
14
|
+
return _this;
|
|
15
|
+
}
|
|
16
|
+
var _proto = DsSlider.prototype;
|
|
17
|
+
/**
|
|
18
|
+
* Sets the value the way a "one-shot" user commit would: drives noUiSlider's own .set() API
|
|
19
|
+
* directly, which fires a single update + set (see slider.picker.ts). Waits out a
|
|
20
|
+
* macrotask tick in-browser so `dsChange`'s debounced (setTimeout(0)) emit has actually run
|
|
21
|
+
* before this resolves — a raw evaluate() round-trip can otherwise return before it fires.
|
|
22
|
+
*/ _proto.fill = function fill(value) {
|
|
23
|
+
return _async_to_generator(function() {
|
|
24
|
+
return _ts_generator(this, function(_state) {
|
|
25
|
+
switch(_state.label){
|
|
26
|
+
case 0:
|
|
27
|
+
return [
|
|
28
|
+
4,
|
|
29
|
+
this.slider.evaluate(function(el, v) {
|
|
30
|
+
return new Promise(function(resolve) {
|
|
31
|
+
;
|
|
32
|
+
el.noUiSlider.set(Number(v));
|
|
33
|
+
setTimeout(resolve, 0);
|
|
34
|
+
});
|
|
35
|
+
}, value)
|
|
36
|
+
];
|
|
37
|
+
case 1:
|
|
38
|
+
_state.sent();
|
|
39
|
+
return [
|
|
40
|
+
2
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}).call(this);
|
|
45
|
+
};
|
|
46
|
+
_proto.blur = function blur() {
|
|
47
|
+
return _async_to_generator(function() {
|
|
48
|
+
return _ts_generator(this, function(_state) {
|
|
49
|
+
switch(_state.label){
|
|
50
|
+
case 0:
|
|
51
|
+
return [
|
|
52
|
+
4,
|
|
53
|
+
this.handle.blur()
|
|
54
|
+
];
|
|
55
|
+
case 1:
|
|
56
|
+
_state.sent();
|
|
57
|
+
return [
|
|
58
|
+
2
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}).call(this);
|
|
63
|
+
};
|
|
64
|
+
_proto.assertValue = function assertValue(value) {
|
|
65
|
+
return _async_to_generator(function() {
|
|
66
|
+
return _ts_generator(this, function(_state) {
|
|
67
|
+
switch(_state.label){
|
|
68
|
+
case 0:
|
|
69
|
+
return [
|
|
70
|
+
4,
|
|
71
|
+
expect(this.el).toHaveAttribute('value', value)
|
|
72
|
+
];
|
|
73
|
+
case 1:
|
|
74
|
+
_state.sent();
|
|
75
|
+
return [
|
|
76
|
+
2
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}).call(this);
|
|
81
|
+
};
|
|
82
|
+
_proto.assertToBeDisabled = function assertToBeDisabled() {
|
|
83
|
+
return _async_to_generator(function() {
|
|
84
|
+
return _ts_generator(this, function(_state) {
|
|
85
|
+
switch(_state.label){
|
|
86
|
+
case 0:
|
|
87
|
+
return [
|
|
88
|
+
4,
|
|
89
|
+
expect(this.slider).toHaveAttribute('disabled', '')
|
|
90
|
+
];
|
|
91
|
+
case 1:
|
|
92
|
+
_state.sent();
|
|
93
|
+
return [
|
|
94
|
+
2
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}).call(this);
|
|
99
|
+
};
|
|
100
|
+
return DsSlider;
|
|
101
|
+
}(PageObject);
|
|
@@ -0,0 +1,115 @@
|
|
|
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 DsSnackbar = /*#__PURE__*/ function(PageObject) {
|
|
8
|
+
"use strict";
|
|
9
|
+
_inherits(DsSnackbar, PageObject);
|
|
10
|
+
function DsSnackbar(el) {
|
|
11
|
+
var _this;
|
|
12
|
+
_this = PageObject.call(this, el) || this;
|
|
13
|
+
_this.close = new DsClose(el.locator('ds-close'));
|
|
14
|
+
_this.heading = el.locator('h2');
|
|
15
|
+
_this.expandButton = el.locator('#mobile-button');
|
|
16
|
+
_this.actions = el.locator('#action').locator('ds-button');
|
|
17
|
+
return _this;
|
|
18
|
+
}
|
|
19
|
+
var _proto = DsSnackbar.prototype;
|
|
20
|
+
_proto.clickClose = function clickClose() {
|
|
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.close.click()
|
|
28
|
+
];
|
|
29
|
+
case 1:
|
|
30
|
+
_state.sent();
|
|
31
|
+
return [
|
|
32
|
+
2
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}).call(this);
|
|
37
|
+
};
|
|
38
|
+
_proto.clickAction = function clickAction(label) {
|
|
39
|
+
return _async_to_generator(function() {
|
|
40
|
+
var action;
|
|
41
|
+
return _ts_generator(this, function(_state) {
|
|
42
|
+
switch(_state.label){
|
|
43
|
+
case 0:
|
|
44
|
+
action = this.actions.filter({
|
|
45
|
+
hasText: label
|
|
46
|
+
});
|
|
47
|
+
return [
|
|
48
|
+
4,
|
|
49
|
+
action.click()
|
|
50
|
+
];
|
|
51
|
+
case 1:
|
|
52
|
+
_state.sent();
|
|
53
|
+
return [
|
|
54
|
+
2
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}).call(this);
|
|
59
|
+
};
|
|
60
|
+
_proto.expand = function expand() {
|
|
61
|
+
return _async_to_generator(function() {
|
|
62
|
+
return _ts_generator(this, function(_state) {
|
|
63
|
+
switch(_state.label){
|
|
64
|
+
case 0:
|
|
65
|
+
return [
|
|
66
|
+
4,
|
|
67
|
+
this.expandButton.click()
|
|
68
|
+
];
|
|
69
|
+
case 1:
|
|
70
|
+
_state.sent();
|
|
71
|
+
return [
|
|
72
|
+
2
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}).call(this);
|
|
77
|
+
};
|
|
78
|
+
_proto.assertToHaveHeading = function assertToHaveHeading(text) {
|
|
79
|
+
return _async_to_generator(function() {
|
|
80
|
+
return _ts_generator(this, function(_state) {
|
|
81
|
+
switch(_state.label){
|
|
82
|
+
case 0:
|
|
83
|
+
return [
|
|
84
|
+
4,
|
|
85
|
+
expect(this.heading).toContainText(text)
|
|
86
|
+
];
|
|
87
|
+
case 1:
|
|
88
|
+
_state.sent();
|
|
89
|
+
return [
|
|
90
|
+
2
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}).call(this);
|
|
95
|
+
};
|
|
96
|
+
_proto.assertToContainText = function assertToContainText(text) {
|
|
97
|
+
return _async_to_generator(function() {
|
|
98
|
+
return _ts_generator(this, function(_state) {
|
|
99
|
+
switch(_state.label){
|
|
100
|
+
case 0:
|
|
101
|
+
return [
|
|
102
|
+
4,
|
|
103
|
+
expect(this.el).toContainText(text)
|
|
104
|
+
];
|
|
105
|
+
case 1:
|
|
106
|
+
_state.sent();
|
|
107
|
+
return [
|
|
108
|
+
2
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}).call(this);
|
|
113
|
+
};
|
|
114
|
+
return DsSnackbar;
|
|
115
|
+
}(PageObject);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { _ as _inherits } from "@swc/helpers/_/_inherits";
|
|
2
|
+
import { PageObject } from './page-object';
|
|
3
|
+
export var DsSpinner = /*#__PURE__*/ function(PageObject) {
|
|
4
|
+
"use strict";
|
|
5
|
+
_inherits(DsSpinner, PageObject);
|
|
6
|
+
function DsSpinner(el) {
|
|
7
|
+
var _this;
|
|
8
|
+
_this = PageObject.call(this, el) || this;
|
|
9
|
+
_this.inner = el.locator('[part="inner"]');
|
|
10
|
+
return _this;
|
|
11
|
+
}
|
|
12
|
+
return DsSpinner;
|
|
13
|
+
}(PageObject);
|
|
@@ -0,0 +1,32 @@
|
|
|
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 DsStack = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsStack, PageObject);
|
|
9
|
+
function DsStack(el) {
|
|
10
|
+
return PageObject.call(this, el) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = DsStack.prototype;
|
|
13
|
+
_proto.assertToContainText = function assertToContainText(text) {
|
|
14
|
+
return _async_to_generator(function() {
|
|
15
|
+
return _ts_generator(this, function(_state) {
|
|
16
|
+
switch(_state.label){
|
|
17
|
+
case 0:
|
|
18
|
+
return [
|
|
19
|
+
4,
|
|
20
|
+
expect(this.el).toContainText(text)
|
|
21
|
+
];
|
|
22
|
+
case 1:
|
|
23
|
+
_state.sent();
|
|
24
|
+
return [
|
|
25
|
+
2
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}).call(this);
|
|
30
|
+
};
|
|
31
|
+
return DsStack;
|
|
32
|
+
}(PageObject);
|
|
@@ -0,0 +1,112 @@
|
|
|
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 DsSteps = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsSteps, PageObject);
|
|
9
|
+
function DsSteps(el) {
|
|
10
|
+
return PageObject.call(this, el) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = DsSteps.prototype;
|
|
13
|
+
_proto.step = function step(name) {
|
|
14
|
+
return this.el.locator('ds-step[name="' + name + '"]');
|
|
15
|
+
};
|
|
16
|
+
_proto.panel = function panel(name) {
|
|
17
|
+
return this.el.locator('ds-step-panel[for="' + name + '"]');
|
|
18
|
+
};
|
|
19
|
+
_proto.selectStep = function selectStep(name) {
|
|
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
|
+
this.step(name).click({
|
|
27
|
+
force: true
|
|
28
|
+
})
|
|
29
|
+
];
|
|
30
|
+
case 1:
|
|
31
|
+
_state.sent();
|
|
32
|
+
return [
|
|
33
|
+
2
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}).call(this);
|
|
38
|
+
};
|
|
39
|
+
_proto.assertStepSelected = function assertStepSelected(name) {
|
|
40
|
+
return _async_to_generator(function() {
|
|
41
|
+
return _ts_generator(this, function(_state) {
|
|
42
|
+
switch(_state.label){
|
|
43
|
+
case 0:
|
|
44
|
+
return [
|
|
45
|
+
4,
|
|
46
|
+
expect(this.step(name)).toHaveAttribute('selected', '')
|
|
47
|
+
];
|
|
48
|
+
case 1:
|
|
49
|
+
_state.sent();
|
|
50
|
+
return [
|
|
51
|
+
2
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}).call(this);
|
|
56
|
+
};
|
|
57
|
+
_proto.assertStepNotSelected = function assertStepNotSelected(name) {
|
|
58
|
+
return _async_to_generator(function() {
|
|
59
|
+
return _ts_generator(this, function(_state) {
|
|
60
|
+
switch(_state.label){
|
|
61
|
+
case 0:
|
|
62
|
+
return [
|
|
63
|
+
4,
|
|
64
|
+
expect(this.step(name)).not.toHaveAttribute('selected', '')
|
|
65
|
+
];
|
|
66
|
+
case 1:
|
|
67
|
+
_state.sent();
|
|
68
|
+
return [
|
|
69
|
+
2
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}).call(this);
|
|
74
|
+
};
|
|
75
|
+
_proto.assertPanelVisible = function assertPanelVisible(name) {
|
|
76
|
+
return _async_to_generator(function() {
|
|
77
|
+
return _ts_generator(this, function(_state) {
|
|
78
|
+
switch(_state.label){
|
|
79
|
+
case 0:
|
|
80
|
+
return [
|
|
81
|
+
4,
|
|
82
|
+
expect(this.panel(name)).toBeVisible()
|
|
83
|
+
];
|
|
84
|
+
case 1:
|
|
85
|
+
_state.sent();
|
|
86
|
+
return [
|
|
87
|
+
2
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}).call(this);
|
|
92
|
+
};
|
|
93
|
+
_proto.assertPanelHidden = function assertPanelHidden(name) {
|
|
94
|
+
return _async_to_generator(function() {
|
|
95
|
+
return _ts_generator(this, function(_state) {
|
|
96
|
+
switch(_state.label){
|
|
97
|
+
case 0:
|
|
98
|
+
return [
|
|
99
|
+
4,
|
|
100
|
+
expect(this.panel(name)).toBeHidden()
|
|
101
|
+
];
|
|
102
|
+
case 1:
|
|
103
|
+
_state.sent();
|
|
104
|
+
return [
|
|
105
|
+
2
|
|
106
|
+
];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}).call(this);
|
|
110
|
+
};
|
|
111
|
+
return DsSteps;
|
|
112
|
+
}(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 { expect } from '@playwright/test';
|
|
5
|
+
import { PageObject } from './page-object';
|
|
6
|
+
export var DsTabs = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsTabs, PageObject);
|
|
9
|
+
function DsTabs(el) {
|
|
10
|
+
return PageObject.call(this, el) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = DsTabs.prototype;
|
|
13
|
+
_proto.tab = function tab(name) {
|
|
14
|
+
return this.el.locator('ds-tab[name="' + name + '"]');
|
|
15
|
+
};
|
|
16
|
+
_proto.panel = function panel(name) {
|
|
17
|
+
return this.el.locator('ds-tab-panel[for="' + name + '"]');
|
|
18
|
+
};
|
|
19
|
+
_proto.selectTab = function selectTab(name) {
|
|
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
|
+
this.tab(name).click()
|
|
27
|
+
];
|
|
28
|
+
case 1:
|
|
29
|
+
_state.sent();
|
|
30
|
+
return [
|
|
31
|
+
2
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}).call(this);
|
|
36
|
+
};
|
|
37
|
+
_proto.assertTabSelected = function assertTabSelected(name) {
|
|
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.tab(name)).toHaveAttribute('selected', '')
|
|
45
|
+
];
|
|
46
|
+
case 1:
|
|
47
|
+
_state.sent();
|
|
48
|
+
return [
|
|
49
|
+
2
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}).call(this);
|
|
54
|
+
};
|
|
55
|
+
_proto.assertTabNotSelected = function assertTabNotSelected(name) {
|
|
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.tab(name)).not.toHaveAttribute('selected', '')
|
|
63
|
+
];
|
|
64
|
+
case 1:
|
|
65
|
+
_state.sent();
|
|
66
|
+
return [
|
|
67
|
+
2
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}).call(this);
|
|
72
|
+
};
|
|
73
|
+
_proto.assertPanelVisible = function assertPanelVisible(name) {
|
|
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.panel(name)).toBeVisible()
|
|
81
|
+
];
|
|
82
|
+
case 1:
|
|
83
|
+
_state.sent();
|
|
84
|
+
return [
|
|
85
|
+
2
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}).call(this);
|
|
90
|
+
};
|
|
91
|
+
_proto.assertPanelHidden = function assertPanelHidden(name) {
|
|
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.panel(name)).toBeHidden()
|
|
99
|
+
];
|
|
100
|
+
case 1:
|
|
101
|
+
_state.sent();
|
|
102
|
+
return [
|
|
103
|
+
2
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}).call(this);
|
|
108
|
+
};
|
|
109
|
+
return DsTabs;
|
|
110
|
+
}(PageObject);
|
|
@@ -0,0 +1,53 @@
|
|
|
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 DsTag = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsTag, PageObject);
|
|
9
|
+
function DsTag(el) {
|
|
10
|
+
var _this;
|
|
11
|
+
_this = PageObject.call(this, el) || this;
|
|
12
|
+
_this.closeButton = el.locator('ds-close');
|
|
13
|
+
return _this;
|
|
14
|
+
}
|
|
15
|
+
var _proto = DsTag.prototype;
|
|
16
|
+
_proto.clickClose = function clickClose() {
|
|
17
|
+
return _async_to_generator(function() {
|
|
18
|
+
return _ts_generator(this, function(_state) {
|
|
19
|
+
switch(_state.label){
|
|
20
|
+
case 0:
|
|
21
|
+
return [
|
|
22
|
+
4,
|
|
23
|
+
this.closeButton.click()
|
|
24
|
+
];
|
|
25
|
+
case 1:
|
|
26
|
+
_state.sent();
|
|
27
|
+
return [
|
|
28
|
+
2
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}).call(this);
|
|
33
|
+
};
|
|
34
|
+
_proto.assertToContainText = function assertToContainText(text) {
|
|
35
|
+
return _async_to_generator(function() {
|
|
36
|
+
return _ts_generator(this, function(_state) {
|
|
37
|
+
switch(_state.label){
|
|
38
|
+
case 0:
|
|
39
|
+
return [
|
|
40
|
+
4,
|
|
41
|
+
expect(this.el).toContainText(text)
|
|
42
|
+
];
|
|
43
|
+
case 1:
|
|
44
|
+
_state.sent();
|
|
45
|
+
return [
|
|
46
|
+
2
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}).call(this);
|
|
51
|
+
};
|
|
52
|
+
return DsTag;
|
|
53
|
+
}(PageObject);
|
|
@@ -0,0 +1,32 @@
|
|
|
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 DsText = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsText, PageObject);
|
|
9
|
+
function DsText(el) {
|
|
10
|
+
return PageObject.call(this, el) || this;
|
|
11
|
+
}
|
|
12
|
+
var _proto = DsText.prototype;
|
|
13
|
+
_proto.assertToContainText = function assertToContainText(text) {
|
|
14
|
+
return _async_to_generator(function() {
|
|
15
|
+
return _ts_generator(this, function(_state) {
|
|
16
|
+
switch(_state.label){
|
|
17
|
+
case 0:
|
|
18
|
+
return [
|
|
19
|
+
4,
|
|
20
|
+
expect(this.el).toContainText(text)
|
|
21
|
+
];
|
|
22
|
+
case 1:
|
|
23
|
+
_state.sent();
|
|
24
|
+
return [
|
|
25
|
+
2
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}).call(this);
|
|
30
|
+
};
|
|
31
|
+
return DsText;
|
|
32
|
+
}(PageObject);
|
|
@@ -0,0 +1,89 @@
|
|
|
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 DsTextarea = /*#__PURE__*/ function(PageObject) {
|
|
7
|
+
"use strict";
|
|
8
|
+
_inherits(DsTextarea, PageObject);
|
|
9
|
+
function DsTextarea(el) {
|
|
10
|
+
var _this;
|
|
11
|
+
_this = PageObject.call(this, el) || this;
|
|
12
|
+
_this.nativeTextarea = el.locator('[part="textarea"]');
|
|
13
|
+
return _this;
|
|
14
|
+
}
|
|
15
|
+
var _proto = DsTextarea.prototype;
|
|
16
|
+
_proto.fill = function fill(value) {
|
|
17
|
+
return _async_to_generator(function() {
|
|
18
|
+
return _ts_generator(this, function(_state) {
|
|
19
|
+
switch(_state.label){
|
|
20
|
+
case 0:
|
|
21
|
+
return [
|
|
22
|
+
4,
|
|
23
|
+
this.nativeTextarea.fill(value)
|
|
24
|
+
];
|
|
25
|
+
case 1:
|
|
26
|
+
_state.sent();
|
|
27
|
+
return [
|
|
28
|
+
2
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}).call(this);
|
|
33
|
+
};
|
|
34
|
+
_proto.blur = function blur() {
|
|
35
|
+
return _async_to_generator(function() {
|
|
36
|
+
return _ts_generator(this, function(_state) {
|
|
37
|
+
switch(_state.label){
|
|
38
|
+
case 0:
|
|
39
|
+
return [
|
|
40
|
+
4,
|
|
41
|
+
this.nativeTextarea.blur()
|
|
42
|
+
];
|
|
43
|
+
case 1:
|
|
44
|
+
_state.sent();
|
|
45
|
+
return [
|
|
46
|
+
2
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}).call(this);
|
|
51
|
+
};
|
|
52
|
+
_proto.assertValue = function assertValue(value) {
|
|
53
|
+
return _async_to_generator(function() {
|
|
54
|
+
return _ts_generator(this, function(_state) {
|
|
55
|
+
switch(_state.label){
|
|
56
|
+
case 0:
|
|
57
|
+
return [
|
|
58
|
+
4,
|
|
59
|
+
expect(this.nativeTextarea).toHaveValue(value)
|
|
60
|
+
];
|
|
61
|
+
case 1:
|
|
62
|
+
_state.sent();
|
|
63
|
+
return [
|
|
64
|
+
2
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}).call(this);
|
|
69
|
+
};
|
|
70
|
+
_proto.assertToBeDisabled = function assertToBeDisabled() {
|
|
71
|
+
return _async_to_generator(function() {
|
|
72
|
+
return _ts_generator(this, function(_state) {
|
|
73
|
+
switch(_state.label){
|
|
74
|
+
case 0:
|
|
75
|
+
return [
|
|
76
|
+
4,
|
|
77
|
+
expect(this.nativeTextarea).toBeDisabled()
|
|
78
|
+
];
|
|
79
|
+
case 1:
|
|
80
|
+
_state.sent();
|
|
81
|
+
return [
|
|
82
|
+
2
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}).call(this);
|
|
87
|
+
};
|
|
88
|
+
return DsTextarea;
|
|
89
|
+
}(PageObject);
|