playwright-cucumber-ts-steps 1.3.1 → 1.3.3
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/README.md +358 -671
- package/dist/backend/actions/click.d.ts +29 -29
- package/dist/backend/actions/click.js +59 -59
- package/dist/backend/actions/form.d.ts +2 -2
- package/dist/backend/actions/form.js +4 -4
- package/dist/backend/actions/formTable.d.ts +1 -1
- package/dist/backend/actions/formTable.js +2 -2
- package/dist/backend/actions/frames.d.ts +3 -3
- package/dist/backend/actions/frames.js +6 -6
- package/dist/backend/actions/inputs.d.ts +14 -14
- package/dist/backend/actions/inputs.js +32 -32
- package/dist/backend/actions/interactions.d.ts +7 -7
- package/dist/backend/actions/interactions.js +13 -13
- package/dist/backend/actions/keyboard.d.ts +6 -6
- package/dist/backend/actions/keyboard.js +12 -12
- package/dist/backend/actions/misc.d.ts +15 -15
- package/dist/backend/actions/misc.js +30 -30
- package/dist/backend/actions/mobile.d.ts +7 -7
- package/dist/backend/actions/mobile.js +14 -14
- package/dist/backend/actions/mouse.d.ts +9 -9
- package/dist/backend/actions/mouse.js +18 -18
- package/dist/backend/actions/navigation.d.ts +5 -5
- package/dist/backend/actions/navigation.js +10 -10
- package/dist/backend/actions/visual.d.ts +6 -6
- package/dist/backend/actions/visual.js +13 -13
- package/dist/backend/actions/waits.d.ts +6 -6
- package/dist/backend/actions/waits.js +12 -12
- package/dist/backend/api/assertions.d.ts +3 -3
- package/dist/backend/api/assertions.js +6 -6
- package/dist/backend/api/mock.d.ts +3 -3
- package/dist/backend/api/mock.js +6 -6
- package/dist/backend/api/network.d.ts +6 -6
- package/dist/backend/api/network.js +12 -12
- package/dist/backend/api/requests.d.ts +4 -4
- package/dist/backend/api/requests.js +8 -8
- package/dist/backend/assertions/document.d.ts +10 -10
- package/dist/backend/assertions/document.js +20 -20
- package/dist/backend/assertions/elements.d.ts +28 -28
- package/dist/backend/assertions/elements.js +56 -56
- package/dist/backend/assertions/expectVisible.d.ts +1 -1
- package/dist/backend/assertions/expectVisible.js +2 -2
- package/dist/backend/assertions/forms.d.ts +7 -7
- package/dist/backend/assertions/forms.js +14 -14
- package/dist/backend/assertions/pageState.d.ts +4 -4
- package/dist/backend/assertions/pageState.js +8 -8
- package/dist/backend/assertions/storage.d.ts +11 -11
- package/dist/backend/assertions/storage.js +22 -22
- package/dist/backend/assertions/text.d.ts +17 -17
- package/dist/backend/assertions/text.js +34 -34
- package/dist/backend/assertions/visibility.d.ts +15 -15
- package/dist/backend/assertions/visibility.js +30 -30
- package/dist/backend/auth/index.d.ts +2 -2
- package/dist/backend/auth/index.js +4 -4
- package/dist/backend/db/steps.d.ts +10 -10
- package/dist/backend/db/steps.d.ts.map +1 -1
- package/dist/backend/db/steps.js +19 -19
- package/dist/backend/elements/alerts.d.ts +3 -3
- package/dist/backend/elements/alerts.js +6 -6
- package/dist/backend/elements/find.d.ts +15 -15
- package/dist/backend/elements/find.js +41 -41
- package/dist/backend/elements/forms.d.ts +4 -4
- package/dist/backend/elements/forms.js +8 -8
- package/dist/backend/elements/frames.d.ts +3 -3
- package/dist/backend/elements/frames.js +6 -6
- package/dist/backend/utils/fixtures.d.ts +22 -0
- package/dist/backend/utils/fixtures.d.ts.map +1 -1
- package/dist/backend/utils/fixtures.js +76 -2
- package/dist/backend/utils/resolver.js +1 -1
- package/dist/component/runner.d.ts +1 -1
- package/dist/component/runner.d.ts.map +1 -1
- package/dist/component/runner.js +38 -5
- package/dist/core/runner.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/metadata.json +270 -270
- package/package.json +3 -2
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Asserts that an input element has the expected value.
|
|
3
3
|
* Supports fixtures for reusable selectors and values.
|
|
4
|
-
* @example Then I see input value "login.username" equals "testuser"
|
|
4
|
+
* @example Then I pw see input value "login.username" equals "testuser"
|
|
5
5
|
*/
|
|
6
6
|
export declare function expectInputValue(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Asserts that an input element has a value containing the expected substring.
|
|
9
9
|
* Supports fixtures for reusable selectors and values.
|
|
10
|
-
* @example Then I see input value "login.username" contains "test"
|
|
10
|
+
* @example Then I pw see input value "login.username" contains "test"
|
|
11
11
|
*/
|
|
12
12
|
export declare function expectInputValueContains(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Asserts that a textarea element has the expected value.
|
|
15
15
|
* Supports fixtures for reusable selectors and values.
|
|
16
|
-
* @example Then I see textarea value "comments.textarea" equals "This is my comment"
|
|
16
|
+
* @example Then I pw see textarea value "comments.textarea" equals "This is my comment"
|
|
17
17
|
*/
|
|
18
18
|
export declare function expectTextareaValue(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
19
19
|
/**
|
|
20
20
|
* Asserts that a textarea element has a value containing the expected substring.
|
|
21
21
|
* Supports fixtures for reusable selectors and values.
|
|
22
|
-
* @example Then I see textarea value "comments.textarea" contains "comment"
|
|
22
|
+
* @example Then I pw see textarea value "comments.textarea" contains "comment"
|
|
23
23
|
*/
|
|
24
24
|
export declare function expectTextareaValueContains(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Asserts that an element has the expected text content.
|
|
27
27
|
* Supports fixtures for reusable selectors and text values.
|
|
28
|
-
* @example Then I see text "header.title" equals "Welcome to our site"
|
|
28
|
+
* @example Then I pw see text "header.title" equals "Welcome to our site"
|
|
29
29
|
*/
|
|
30
30
|
export declare function expectText(page: any, selectorKey: string, textKey: string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Asserts that an element has text content containing the expected substring.
|
|
33
33
|
* Supports fixtures for reusable selectors and text values.
|
|
34
|
-
* @example Then I see text "header.title" contains "Welcome"
|
|
34
|
+
* @example Then I pw see text "header.title" contains "Welcome"
|
|
35
35
|
*/
|
|
36
36
|
export declare function expectTextContains(page: any, selectorKey: string, textKey: string): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Asserts that an element has the expected value (for form elements).
|
|
39
39
|
* Supports fixtures for reusable selectors and values.
|
|
40
|
-
* @example Then I see value "input.amount" equals "100"
|
|
40
|
+
* @example Then I pw see value "input.amount" equals "100"
|
|
41
41
|
*/
|
|
42
42
|
export declare function expectValue(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
43
43
|
//# sourceMappingURL=forms.d.ts.map
|
|
@@ -17,7 +17,7 @@ const fixtures_1 = require("../utils/fixtures");
|
|
|
17
17
|
/**
|
|
18
18
|
* Asserts that an input element has the expected value.
|
|
19
19
|
* Supports fixtures for reusable selectors and values.
|
|
20
|
-
* @example Then I see input value "login.username" equals "testuser"
|
|
20
|
+
* @example Then I pw see input value "login.username" equals "testuser"
|
|
21
21
|
*/
|
|
22
22
|
async function expectInputValue(page, selectorKey, valueKey) {
|
|
23
23
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -30,7 +30,7 @@ async function expectInputValue(page, selectorKey, valueKey) {
|
|
|
30
30
|
/**
|
|
31
31
|
* Asserts that an input element has a value containing the expected substring.
|
|
32
32
|
* Supports fixtures for reusable selectors and values.
|
|
33
|
-
* @example Then I see input value "login.username" contains "test"
|
|
33
|
+
* @example Then I pw see input value "login.username" contains "test"
|
|
34
34
|
*/
|
|
35
35
|
async function expectInputValueContains(page, selectorKey, valueKey) {
|
|
36
36
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -46,7 +46,7 @@ async function expectInputValueContains(page, selectorKey, valueKey) {
|
|
|
46
46
|
/**
|
|
47
47
|
* Asserts that a textarea element has the expected value.
|
|
48
48
|
* Supports fixtures for reusable selectors and values.
|
|
49
|
-
* @example Then I see textarea value "comments.textarea" equals "This is my comment"
|
|
49
|
+
* @example Then I pw see textarea value "comments.textarea" equals "This is my comment"
|
|
50
50
|
*/
|
|
51
51
|
async function expectTextareaValue(page, selectorKey, valueKey) {
|
|
52
52
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -59,7 +59,7 @@ async function expectTextareaValue(page, selectorKey, valueKey) {
|
|
|
59
59
|
/**
|
|
60
60
|
* Asserts that a textarea element has a value containing the expected substring.
|
|
61
61
|
* Supports fixtures for reusable selectors and values.
|
|
62
|
-
* @example Then I see textarea value "comments.textarea" contains "comment"
|
|
62
|
+
* @example Then I pw see textarea value "comments.textarea" contains "comment"
|
|
63
63
|
*/
|
|
64
64
|
async function expectTextareaValueContains(page, selectorKey, valueKey) {
|
|
65
65
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -75,7 +75,7 @@ async function expectTextareaValueContains(page, selectorKey, valueKey) {
|
|
|
75
75
|
/**
|
|
76
76
|
* Asserts that an element has the expected text content.
|
|
77
77
|
* Supports fixtures for reusable selectors and text values.
|
|
78
|
-
* @example Then I see text "header.title" equals "Welcome to our site"
|
|
78
|
+
* @example Then I pw see text "header.title" equals "Welcome to our site"
|
|
79
79
|
*/
|
|
80
80
|
async function expectText(page, selectorKey, textKey) {
|
|
81
81
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -88,7 +88,7 @@ async function expectText(page, selectorKey, textKey) {
|
|
|
88
88
|
/**
|
|
89
89
|
* Asserts that an element has text content containing the expected substring.
|
|
90
90
|
* Supports fixtures for reusable selectors and text values.
|
|
91
|
-
* @example Then I see text "header.title" contains "Welcome"
|
|
91
|
+
* @example Then I pw see text "header.title" contains "Welcome"
|
|
92
92
|
*/
|
|
93
93
|
async function expectTextContains(page, selectorKey, textKey) {
|
|
94
94
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -104,7 +104,7 @@ async function expectTextContains(page, selectorKey, textKey) {
|
|
|
104
104
|
/**
|
|
105
105
|
* Asserts that an element has the expected value (for form elements).
|
|
106
106
|
* Supports fixtures for reusable selectors and values.
|
|
107
|
-
* @example Then I see value "input.amount" equals "100"
|
|
107
|
+
* @example Then I pw see value "input.amount" equals "100"
|
|
108
108
|
*/
|
|
109
109
|
async function expectValue(page, selectorKey, valueKey) {
|
|
110
110
|
const selectors = (0, fixtures_1.loadFixture)("selectors.json");
|
|
@@ -117,10 +117,10 @@ async function expectValue(page, selectorKey, valueKey) {
|
|
|
117
117
|
// ==================================================
|
|
118
118
|
// GLUE STEPS
|
|
119
119
|
// ==================================================
|
|
120
|
-
(0, registry_1.Step)("I see input value {string} equals {string}", expectInputValue, "Then");
|
|
121
|
-
(0, registry_1.Step)("I see input value {string} contains {string}", expectInputValueContains, "Then");
|
|
122
|
-
(0, registry_1.Step)("I see textarea value {string} equals {string}", expectTextareaValue, "Then");
|
|
123
|
-
(0, registry_1.Step)("I see textarea value {string} contains {string}", expectTextareaValueContains, "Then");
|
|
124
|
-
(0, registry_1.Step)("I see text {string} equals {string}", expectText, "Then");
|
|
125
|
-
(0, registry_1.Step)("I see text {string} contains {string}", expectTextContains, "Then");
|
|
126
|
-
(0, registry_1.Step)("I see value {string} equals {string}", expectValue, "Then");
|
|
120
|
+
(0, registry_1.Step)("I pw see input value {string} equals {string}", expectInputValue, "Then");
|
|
121
|
+
(0, registry_1.Step)("I pw see input value {string} contains {string}", expectInputValueContains, "Then");
|
|
122
|
+
(0, registry_1.Step)("I pw see textarea value {string} equals {string}", expectTextareaValue, "Then");
|
|
123
|
+
(0, registry_1.Step)("I pw see textarea value {string} contains {string}", expectTextareaValueContains, "Then");
|
|
124
|
+
(0, registry_1.Step)("I pw see text {string} equals {string}", expectText, "Then");
|
|
125
|
+
(0, registry_1.Step)("I pw see text {string} contains {string}", expectTextContains, "Then");
|
|
126
|
+
(0, registry_1.Step)("I pw see value {string} equals {string}", expectValue, "Then");
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Asserts that the current browser URL contains a specific substring.
|
|
3
3
|
* Supports fixtures for reusable URL parts.
|
|
4
|
-
* @example Then I expect the url to contain "dashboard"
|
|
4
|
+
* @example Then I pw expect the url to contain "dashboard"
|
|
5
5
|
*/
|
|
6
6
|
export declare function expectUrlToContain(page: any, partKey: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Asserts that the current browser URL exactly matches the provided string.
|
|
9
9
|
* Supports fixtures for reusable URLs.
|
|
10
|
-
* @example Then I expect the url to be "app.dashboardUrl"
|
|
10
|
+
* @example Then I pw expect the url to be "app.dashboardUrl"
|
|
11
11
|
*/
|
|
12
12
|
export declare function expectUrlToBe(page: any, urlKey: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Asserts that the page's `<title>` tag contains a specific substring.
|
|
15
15
|
* Supports fixtures for reusable title parts.
|
|
16
|
-
* @example Then I expect the title to contain "Welcome"
|
|
16
|
+
* @example Then I pw expect the title to contain "Welcome"
|
|
17
17
|
*/
|
|
18
18
|
export declare function expectTitleToContain(page: any, partKey: string): Promise<void>;
|
|
19
19
|
/**
|
|
20
20
|
* Asserts that the page's `<title>` tag exactly matches the provided string.
|
|
21
21
|
* Supports fixtures for reusable titles.
|
|
22
|
-
* @example Then I expect the title to be "app.homeTitle"
|
|
22
|
+
* @example Then I pw expect the title to be "app.homeTitle"
|
|
23
23
|
*/
|
|
24
24
|
export declare function expectTitleToBe(page: any, titleKey: string): Promise<void>;
|
|
25
25
|
//# sourceMappingURL=pageState.d.ts.map
|
|
@@ -14,7 +14,7 @@ const fixtures_1 = require("../utils/fixtures");
|
|
|
14
14
|
/**
|
|
15
15
|
* Asserts that the current browser URL contains a specific substring.
|
|
16
16
|
* Supports fixtures for reusable URL parts.
|
|
17
|
-
* @example Then I expect the url to contain "dashboard"
|
|
17
|
+
* @example Then I pw expect the url to contain "dashboard"
|
|
18
18
|
*/
|
|
19
19
|
async function expectUrlToContain(page, partKey) {
|
|
20
20
|
const urls = (0, fixtures_1.loadFixture)("urls.json");
|
|
@@ -25,7 +25,7 @@ async function expectUrlToContain(page, partKey) {
|
|
|
25
25
|
/**
|
|
26
26
|
* Asserts that the current browser URL exactly matches the provided string.
|
|
27
27
|
* Supports fixtures for reusable URLs.
|
|
28
|
-
* @example Then I expect the url to be "app.dashboardUrl"
|
|
28
|
+
* @example Then I pw expect the url to be "app.dashboardUrl"
|
|
29
29
|
*/
|
|
30
30
|
async function expectUrlToBe(page, urlKey) {
|
|
31
31
|
const urls = (0, fixtures_1.loadFixture)("urls.json");
|
|
@@ -36,7 +36,7 @@ async function expectUrlToBe(page, urlKey) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Asserts that the page's `<title>` tag contains a specific substring.
|
|
38
38
|
* Supports fixtures for reusable title parts.
|
|
39
|
-
* @example Then I expect the title to contain "Welcome"
|
|
39
|
+
* @example Then I pw expect the title to contain "Welcome"
|
|
40
40
|
*/
|
|
41
41
|
async function expectTitleToContain(page, partKey) {
|
|
42
42
|
const titles = (0, fixtures_1.loadFixture)("titles.json");
|
|
@@ -47,7 +47,7 @@ async function expectTitleToContain(page, partKey) {
|
|
|
47
47
|
/**
|
|
48
48
|
* Asserts that the page's `<title>` tag exactly matches the provided string.
|
|
49
49
|
* Supports fixtures for reusable titles.
|
|
50
|
-
* @example Then I expect the title to be "app.homeTitle"
|
|
50
|
+
* @example Then I pw expect the title to be "app.homeTitle"
|
|
51
51
|
*/
|
|
52
52
|
async function expectTitleToBe(page, titleKey) {
|
|
53
53
|
const titles = (0, fixtures_1.loadFixture)("titles.json");
|
|
@@ -58,7 +58,7 @@ async function expectTitleToBe(page, titleKey) {
|
|
|
58
58
|
// ==================================================
|
|
59
59
|
// GLUE STEPS
|
|
60
60
|
// ==================================================
|
|
61
|
-
(0, registry_1.Step)("I expect the url to contain {string}", expectUrlToContain, "Then");
|
|
62
|
-
(0, registry_1.Step)("I expect the url to be {string}", expectUrlToBe, "Then");
|
|
63
|
-
(0, registry_1.Step)("I expect the title to contain {string}", expectTitleToContain, "Then");
|
|
64
|
-
(0, registry_1.Step)("I expect the title to be {string}", expectTitleToBe, "Then");
|
|
61
|
+
(0, registry_1.Step)("I pw expect the url to contain {string}", expectUrlToContain, "Then");
|
|
62
|
+
(0, registry_1.Step)("I pw expect the url to be {string}", expectUrlToBe, "Then");
|
|
63
|
+
(0, registry_1.Step)("I pw expect the title to contain {string}", expectTitleToContain, "Then");
|
|
64
|
+
(0, registry_1.Step)("I pw expect the title to be {string}", expectTitleToBe, "Then");
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Asserts that a cookie exists and has the expected value.
|
|
3
3
|
* Supports fixtures for reusable cookie names and values.
|
|
4
|
-
* @example Then I see cookie "session_id" has value "abc123"
|
|
4
|
+
* @example Then I pw see cookie "session_id" has value "abc123"
|
|
5
5
|
*/
|
|
6
6
|
export declare function expectCookieHasValue(page: any, cookieNameKey: string, valueKey: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Asserts that a cookie exists and contains the expected substring.
|
|
9
9
|
* Supports fixtures for reusable cookie names and values.
|
|
10
|
-
* @example Then I see cookie "session_id" contains value "abc"
|
|
10
|
+
* @example Then I pw see cookie "session_id" contains value "abc"
|
|
11
11
|
*/
|
|
12
12
|
export declare function expectCookieContainsValue(page: any, cookieNameKey: string, valueKey: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Asserts that a cookie does not exist.
|
|
15
15
|
* Supports fixtures for reusable cookie names.
|
|
16
|
-
* @example Then I do not see cookie "old_session"
|
|
16
|
+
* @example Then I pw do not see cookie "old_session"
|
|
17
17
|
*/
|
|
18
18
|
export declare function expectCookieDoesNotExist(page: any, cookieNameKey: string): Promise<void>;
|
|
19
19
|
/**
|
|
20
20
|
* Asserts that a local storage item exists and has the expected value.
|
|
21
21
|
* Supports fixtures for reusable storage keys and values.
|
|
22
|
-
* @example Then I see local storage item "user_prefs" equals "dark_theme"
|
|
22
|
+
* @example Then I pw see local storage item "user_prefs" equals "dark_theme"
|
|
23
23
|
*/
|
|
24
24
|
export declare function expectLocalStorageItemEquals(page: any, keyKey: string, valueKey: string): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Asserts that a local storage item exists and contains the expected substring.
|
|
27
27
|
* Supports fixtures for reusable storage keys and values.
|
|
28
|
-
* @example Then I see local storage item "user_prefs" contains "theme"
|
|
28
|
+
* @example Then I pw see local storage item "user_prefs" contains "theme"
|
|
29
29
|
*/
|
|
30
30
|
export declare function expectLocalStorageItemContains(page: any, keyKey: string, valueKey: string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Asserts that a local storage item exists.
|
|
33
33
|
* Supports fixtures for reusable storage keys.
|
|
34
|
-
* @example Then I see local storage item "user_id"
|
|
34
|
+
* @example Then I pw see local storage item "user_id"
|
|
35
35
|
*/
|
|
36
36
|
export declare function expectLocalStorageItem(page: any, keyKey: string): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Asserts that a local storage item does not exist.
|
|
39
39
|
* Supports fixtures for reusable storage keys.
|
|
40
|
-
* @example Then I do not see local storage item "old_data"
|
|
40
|
+
* @example Then I pw do not see local storage item "old_data"
|
|
41
41
|
*/
|
|
42
42
|
export declare function expectLocalStorageItemDoesNotExist(page: any, keyKey: string): Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Asserts that a session storage item exists and has the expected value.
|
|
45
45
|
* Supports fixtures for reusable storage keys and values.
|
|
46
|
-
* @example Then I see session storage item "temp_data" equals "abc123"
|
|
46
|
+
* @example Then I pw see session storage item "temp_data" equals "abc123"
|
|
47
47
|
*/
|
|
48
48
|
export declare function expectSessionStorageItemEquals(page: any, keyKey: string, valueKey: string): Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Asserts that a session storage item exists and contains the expected substring.
|
|
51
51
|
* Supports fixtures for reusable storage keys and values.
|
|
52
|
-
* @example Then I see session storage item "temp_data" contains "abc"
|
|
52
|
+
* @example Then I pw see session storage item "temp_data" contains "abc"
|
|
53
53
|
*/
|
|
54
54
|
export declare function expectSessionStorageItemContains(page: any, keyKey: string, valueKey: string): Promise<void>;
|
|
55
55
|
/**
|
|
56
56
|
* Asserts that a session storage item exists.
|
|
57
57
|
* Supports fixtures for reusable storage keys.
|
|
58
|
-
* @example Then I see session storage item "temp_token"
|
|
58
|
+
* @example Then I pw see session storage item "temp_token"
|
|
59
59
|
*/
|
|
60
60
|
export declare function expectSessionStorageItem(page: any, keyKey: string): Promise<void>;
|
|
61
61
|
/**
|
|
62
62
|
* Asserts that a session storage item does not exist.
|
|
63
63
|
* Supports fixtures for reusable storage keys.
|
|
64
|
-
* @example Then I do not see session storage item "expired_token"
|
|
64
|
+
* @example Then I pw do not see session storage item "expired_token"
|
|
65
65
|
*/
|
|
66
66
|
export declare function expectSessionStorageItemDoesNotExist(page: any, keyKey: string): Promise<void>;
|
|
67
67
|
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -20,7 +20,7 @@ const fixtures_1 = require("../utils/fixtures");
|
|
|
20
20
|
/**
|
|
21
21
|
* Asserts that a cookie exists and has the expected value.
|
|
22
22
|
* Supports fixtures for reusable cookie names and values.
|
|
23
|
-
* @example Then I see cookie "session_id" has value "abc123"
|
|
23
|
+
* @example Then I pw see cookie "session_id" has value "abc123"
|
|
24
24
|
*/
|
|
25
25
|
async function expectCookieHasValue(page, cookieNameKey, valueKey) {
|
|
26
26
|
const cookies = (0, fixtures_1.loadFixture)("cookies.json");
|
|
@@ -40,7 +40,7 @@ async function expectCookieHasValue(page, cookieNameKey, valueKey) {
|
|
|
40
40
|
/**
|
|
41
41
|
* Asserts that a cookie exists and contains the expected substring.
|
|
42
42
|
* Supports fixtures for reusable cookie names and values.
|
|
43
|
-
* @example Then I see cookie "session_id" contains value "abc"
|
|
43
|
+
* @example Then I pw see cookie "session_id" contains value "abc"
|
|
44
44
|
*/
|
|
45
45
|
async function expectCookieContainsValue(page, cookieNameKey, valueKey) {
|
|
46
46
|
const cookies = (0, fixtures_1.loadFixture)("cookies.json");
|
|
@@ -60,7 +60,7 @@ async function expectCookieContainsValue(page, cookieNameKey, valueKey) {
|
|
|
60
60
|
/**
|
|
61
61
|
* Asserts that a cookie does not exist.
|
|
62
62
|
* Supports fixtures for reusable cookie names.
|
|
63
|
-
* @example Then I do not see cookie "old_session"
|
|
63
|
+
* @example Then I pw do not see cookie "old_session"
|
|
64
64
|
*/
|
|
65
65
|
async function expectCookieDoesNotExist(page, cookieNameKey) {
|
|
66
66
|
const cookies = (0, fixtures_1.loadFixture)("cookies.json");
|
|
@@ -75,7 +75,7 @@ async function expectCookieDoesNotExist(page, cookieNameKey) {
|
|
|
75
75
|
/**
|
|
76
76
|
* Asserts that a local storage item exists and has the expected value.
|
|
77
77
|
* Supports fixtures for reusable storage keys and values.
|
|
78
|
-
* @example Then I see local storage item "user_prefs" equals "dark_theme"
|
|
78
|
+
* @example Then I pw see local storage item "user_prefs" equals "dark_theme"
|
|
79
79
|
*/
|
|
80
80
|
async function expectLocalStorageItemEquals(page, keyKey, valueKey) {
|
|
81
81
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -94,7 +94,7 @@ async function expectLocalStorageItemEquals(page, keyKey, valueKey) {
|
|
|
94
94
|
/**
|
|
95
95
|
* Asserts that a local storage item exists and contains the expected substring.
|
|
96
96
|
* Supports fixtures for reusable storage keys and values.
|
|
97
|
-
* @example Then I see local storage item "user_prefs" contains "theme"
|
|
97
|
+
* @example Then I pw see local storage item "user_prefs" contains "theme"
|
|
98
98
|
*/
|
|
99
99
|
async function expectLocalStorageItemContains(page, keyKey, valueKey) {
|
|
100
100
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -113,7 +113,7 @@ async function expectLocalStorageItemContains(page, keyKey, valueKey) {
|
|
|
113
113
|
/**
|
|
114
114
|
* Asserts that a local storage item exists.
|
|
115
115
|
* Supports fixtures for reusable storage keys.
|
|
116
|
-
* @example Then I see local storage item "user_id"
|
|
116
|
+
* @example Then I pw see local storage item "user_id"
|
|
117
117
|
*/
|
|
118
118
|
async function expectLocalStorageItem(page, keyKey) {
|
|
119
119
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -127,7 +127,7 @@ async function expectLocalStorageItem(page, keyKey) {
|
|
|
127
127
|
/**
|
|
128
128
|
* Asserts that a local storage item does not exist.
|
|
129
129
|
* Supports fixtures for reusable storage keys.
|
|
130
|
-
* @example Then I do not see local storage item "old_data"
|
|
130
|
+
* @example Then I pw do not see local storage item "old_data"
|
|
131
131
|
*/
|
|
132
132
|
async function expectLocalStorageItemDoesNotExist(page, keyKey) {
|
|
133
133
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -141,7 +141,7 @@ async function expectLocalStorageItemDoesNotExist(page, keyKey) {
|
|
|
141
141
|
/**
|
|
142
142
|
* Asserts that a session storage item exists and has the expected value.
|
|
143
143
|
* Supports fixtures for reusable storage keys and values.
|
|
144
|
-
* @example Then I see session storage item "temp_data" equals "abc123"
|
|
144
|
+
* @example Then I pw see session storage item "temp_data" equals "abc123"
|
|
145
145
|
*/
|
|
146
146
|
async function expectSessionStorageItemEquals(page, keyKey, valueKey) {
|
|
147
147
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -160,7 +160,7 @@ async function expectSessionStorageItemEquals(page, keyKey, valueKey) {
|
|
|
160
160
|
/**
|
|
161
161
|
* Asserts that a session storage item exists and contains the expected substring.
|
|
162
162
|
* Supports fixtures for reusable storage keys and values.
|
|
163
|
-
* @example Then I see session storage item "temp_data" contains "abc"
|
|
163
|
+
* @example Then I pw see session storage item "temp_data" contains "abc"
|
|
164
164
|
*/
|
|
165
165
|
async function expectSessionStorageItemContains(page, keyKey, valueKey) {
|
|
166
166
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -179,7 +179,7 @@ async function expectSessionStorageItemContains(page, keyKey, valueKey) {
|
|
|
179
179
|
/**
|
|
180
180
|
* Asserts that a session storage item exists.
|
|
181
181
|
* Supports fixtures for reusable storage keys.
|
|
182
|
-
* @example Then I see session storage item "temp_token"
|
|
182
|
+
* @example Then I pw see session storage item "temp_token"
|
|
183
183
|
*/
|
|
184
184
|
async function expectSessionStorageItem(page, keyKey) {
|
|
185
185
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -193,7 +193,7 @@ async function expectSessionStorageItem(page, keyKey) {
|
|
|
193
193
|
/**
|
|
194
194
|
* Asserts that a session storage item does not exist.
|
|
195
195
|
* Supports fixtures for reusable storage keys.
|
|
196
|
-
* @example Then I do not see session storage item "expired_token"
|
|
196
|
+
* @example Then I pw do not see session storage item "expired_token"
|
|
197
197
|
*/
|
|
198
198
|
async function expectSessionStorageItemDoesNotExist(page, keyKey) {
|
|
199
199
|
const keys = (0, fixtures_1.loadFixture)("keys.json");
|
|
@@ -207,14 +207,14 @@ async function expectSessionStorageItemDoesNotExist(page, keyKey) {
|
|
|
207
207
|
// ==================================================
|
|
208
208
|
// GLUE STEPS
|
|
209
209
|
// ==================================================
|
|
210
|
-
(0, registry_1.Step)("I see cookie {string} has value {string}", expectCookieHasValue, "Then");
|
|
211
|
-
(0, registry_1.Step)("I see cookie {string} contains value {string}", expectCookieContainsValue, "Then");
|
|
212
|
-
(0, registry_1.Step)("I do not see cookie {string}", expectCookieDoesNotExist, "Then");
|
|
213
|
-
(0, registry_1.Step)("I see local storage item {string} equals {string}", expectLocalStorageItemEquals, "Then");
|
|
214
|
-
(0, registry_1.Step)("I see local storage item {string} contains {string}", expectLocalStorageItemContains, "Then");
|
|
215
|
-
(0, registry_1.Step)("I see local storage item {string}", expectLocalStorageItem, "Then");
|
|
216
|
-
(0, registry_1.Step)("I do not see local storage item {string}", expectLocalStorageItemDoesNotExist, "Then");
|
|
217
|
-
(0, registry_1.Step)("I see session storage item {string} equals {string}", expectSessionStorageItemEquals, "Then");
|
|
218
|
-
(0, registry_1.Step)("I see session storage item {string} contains {string}", expectSessionStorageItemContains, "Then");
|
|
219
|
-
(0, registry_1.Step)("I see session storage item {string}", expectSessionStorageItem, "Then");
|
|
220
|
-
(0, registry_1.Step)("I do not see session storage item {string}", expectSessionStorageItemDoesNotExist, "Then");
|
|
210
|
+
(0, registry_1.Step)("I pw see cookie {string} has value {string}", expectCookieHasValue, "Then");
|
|
211
|
+
(0, registry_1.Step)("I pw see cookie {string} contains value {string}", expectCookieContainsValue, "Then");
|
|
212
|
+
(0, registry_1.Step)("I pw do not see cookie {string}", expectCookieDoesNotExist, "Then");
|
|
213
|
+
(0, registry_1.Step)("I pw see local storage item {string} equals {string}", expectLocalStorageItemEquals, "Then");
|
|
214
|
+
(0, registry_1.Step)("I pw see local storage item {string} contains {string}", expectLocalStorageItemContains, "Then");
|
|
215
|
+
(0, registry_1.Step)("I pw see local storage item {string}", expectLocalStorageItem, "Then");
|
|
216
|
+
(0, registry_1.Step)("I pw do not see local storage item {string}", expectLocalStorageItemDoesNotExist, "Then");
|
|
217
|
+
(0, registry_1.Step)("I pw see session storage item {string} equals {string}", expectSessionStorageItemEquals, "Then");
|
|
218
|
+
(0, registry_1.Step)("I pw see session storage item {string} contains {string}", expectSessionStorageItemContains, "Then");
|
|
219
|
+
(0, registry_1.Step)("I pw see session storage item {string}", expectSessionStorageItem, "Then");
|
|
220
|
+
(0, registry_1.Step)("I pw do not see session storage item {string}", expectSessionStorageItemDoesNotExist, "Then");
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param page - The Playwright page object
|
|
5
5
|
* @param selectorKey - The selector key (can be a fixture key or raw CSS selector)
|
|
6
6
|
* @param textKey - The text key (can be a fixture key or raw text)
|
|
7
|
-
* @example Then I see exact element text "Welcome Home"
|
|
7
|
+
* @example Then I pw see exact element text "Welcome Home"
|
|
8
8
|
*/
|
|
9
9
|
export declare function expectElementToHaveExactText(page: any, selectorKey: string, textKey: string): Promise<void>;
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ export declare function expectElementToHaveExactText(page: any, selectorKey: str
|
|
|
12
12
|
* Supports fixtures for reusable selectors and text values.
|
|
13
13
|
* @param page - The Playwright page object
|
|
14
14
|
* @param textKey - The text key (can be a fixture key or raw text)
|
|
15
|
-
* @example Then I see text "Welcome" (will match "Welcome Home" or "Welcome!")
|
|
15
|
+
* @example Then I pw see text "Welcome" (will match "Welcome Home" or "Welcome!")
|
|
16
16
|
*
|
|
17
17
|
* Global Visibility Check: Finds text anywhere on the page without needing a selector.
|
|
18
18
|
*/
|
|
@@ -22,7 +22,7 @@ export declare function expectGlobalTextVisible(page: any, textKey: string): Pro
|
|
|
22
22
|
* Supports fixtures for reusable selectors and text values.
|
|
23
23
|
* @param page - The Playwright page object
|
|
24
24
|
* @param textKey - The text key (can be a fixture key or raw text)
|
|
25
|
-
* @example Then I do not see text "error"
|
|
25
|
+
* @example Then I pw do not see text "error"
|
|
26
26
|
*/
|
|
27
27
|
export declare function expectGlobalTextNotVisible(page: any, textKey: string): Promise<void>;
|
|
28
28
|
/**
|
|
@@ -31,7 +31,7 @@ export declare function expectGlobalTextNotVisible(page: any, textKey: string):
|
|
|
31
31
|
* @param page - The Playwright page object
|
|
32
32
|
* @param selectorKey - The selector key (can be a fixture key or raw CSS selector)
|
|
33
33
|
* @param valueKey - The value key (can be a fixture key or raw value)
|
|
34
|
-
* @example Then I see exact value "john_doe"
|
|
34
|
+
* @example Then I pw see exact value "john_doe"
|
|
35
35
|
*/
|
|
36
36
|
export declare function expectElementToHaveExactValue(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
37
37
|
/**
|
|
@@ -40,7 +40,7 @@ export declare function expectElementToHaveExactValue(page: any, selectorKey: st
|
|
|
40
40
|
* @param page - The Playwright page object
|
|
41
41
|
* @param selectorKey - The selector key (can be a fixture key or raw CSS selector)
|
|
42
42
|
* @param valueKey - The value key (can be a fixture key or raw value)
|
|
43
|
-
* @example Then I do not see exact value "john_doe"
|
|
43
|
+
* @example Then I pw do not see exact value "john_doe"
|
|
44
44
|
*/
|
|
45
45
|
export declare function expectElementToNotHaveExactValue(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
46
46
|
/**
|
|
@@ -50,7 +50,7 @@ export declare function expectElementToNotHaveExactValue(page: any, selectorKey:
|
|
|
50
50
|
* @param selectorKey - The selector key (can be a fixture key or raw CSS selector)
|
|
51
51
|
* @param attrKey - The attribute key (can be a fixture key or raw attribute name)
|
|
52
52
|
* @param valueKey - The value key (can be a fixture key or raw value)
|
|
53
|
-
* @example Then I see exact attribute "href" with value "/terms-and-conditions"
|
|
53
|
+
* @example Then I pw see exact attribute "href" with value "/terms-and-conditions"
|
|
54
54
|
*/
|
|
55
55
|
export declare function expectElementToHaveExactAttribute(page: any, selectorKey: string, attrKey: string, valueKey: string): Promise<void>;
|
|
56
56
|
/**
|
|
@@ -60,57 +60,57 @@ export declare function expectElementToHaveExactAttribute(page: any, selectorKey
|
|
|
60
60
|
* @param selectorKey - The selector key (can be a fixture key or raw CSS selector)
|
|
61
61
|
* @param attrKey - The attribute key (can be a fixture key or raw attribute name)
|
|
62
62
|
* @param valueKey - The value key (can be a fixture key or raw value)
|
|
63
|
-
* @example Then I do not see exact attribute "href" with value "/wrong-url"
|
|
63
|
+
* @example Then I pw do not see exact attribute "href" with value "/wrong-url"
|
|
64
64
|
*/
|
|
65
65
|
export declare function expectElementToNotHaveExactAttribute(page: any, selectorKey: string, attrKey: string, valueKey: string): Promise<void>;
|
|
66
66
|
/**
|
|
67
67
|
* Asserts that a button with specific text is visible.
|
|
68
68
|
* @param page - The Playwright page object
|
|
69
69
|
* @param textKey - The text key (can be a fixture key or raw text)
|
|
70
|
-
* @example Then I see button text "Submit"
|
|
71
|
-
* @example Then I see button text "buttons.saveKey" (fixture)
|
|
70
|
+
* @example Then I pw see button text "Submit"
|
|
71
|
+
* @example Then I pw see button text "buttons.saveKey" (fixture)
|
|
72
72
|
*/
|
|
73
73
|
export declare function iSeeButtonText(page: any, textKey: string): Promise<void>;
|
|
74
74
|
/**
|
|
75
75
|
* Asserts that a heading with specific text is visible.
|
|
76
76
|
* @param page - The Playwright page object
|
|
77
77
|
* @param textKey - The text key (can be a fixture key or raw text)
|
|
78
|
-
* @example Then I see heading text "Welcome"
|
|
78
|
+
* @example Then I pw see heading text "Welcome"
|
|
79
79
|
*/
|
|
80
80
|
export declare function iSeeHeadingText(page: any, textKey: string): Promise<void>;
|
|
81
81
|
/**
|
|
82
82
|
* Asserts that a link with specific text is visible.
|
|
83
|
-
* @example Then I see link text "Read More"
|
|
83
|
+
* @example Then I pw see link text "Read More"
|
|
84
84
|
*/
|
|
85
85
|
export declare function iSeeLinkText(page: any, textKey: string): Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* Asserts that a label with specific text is visible.
|
|
88
|
-
* @example Then I see label text "Email Address"
|
|
88
|
+
* @example Then I pw see label text "Email Address"
|
|
89
89
|
*/
|
|
90
90
|
export declare function iSeeLabelText(page: any, textKey: string): Promise<void>;
|
|
91
91
|
/**
|
|
92
92
|
* Asserts that a button with specific text is NOT visible or does not exist.
|
|
93
|
-
* @example Then I do not see button text "Delete"
|
|
93
|
+
* @example Then I pw do not see button text "Delete"
|
|
94
94
|
*/
|
|
95
95
|
export declare function iDoNotSeeButtonText(page: any, textKey: string): Promise<void>;
|
|
96
96
|
/**
|
|
97
97
|
* Asserts that a heading with specific text is NOT visible or does not exist.
|
|
98
|
-
* @example Then I do not see heading text "Old Title"
|
|
98
|
+
* @example Then I pw do not see heading text "Old Title"
|
|
99
99
|
*/
|
|
100
100
|
export declare function iDoNotSeeHeadingText(page: any, textKey: string): Promise<void>;
|
|
101
101
|
/**
|
|
102
102
|
* Asserts that a link with specific text is NOT visible or does not exist.
|
|
103
|
-
* @example Then I do not see link text "Expired Offer"
|
|
103
|
+
* @example Then I pw do not see link text "Expired Offer"
|
|
104
104
|
*/
|
|
105
105
|
export declare function iDoNotSeeLinkText(page: any, textKey: string): Promise<void>;
|
|
106
106
|
/**
|
|
107
107
|
* Asserts that a label with specific text is NOT visible or does not exist.
|
|
108
|
-
* @example Then I do not see label text "Secret Info"
|
|
108
|
+
* @example Then I pw do not see label text "Secret Info"
|
|
109
109
|
*/
|
|
110
110
|
export declare function iDoNotSeeLabelText(page: any, textKey: string): Promise<void>;
|
|
111
111
|
/**
|
|
112
112
|
* Gets an element by selector and asserts it is hidden.
|
|
113
|
-
* @example When I get element by selector "div.loader" to be hidden
|
|
113
|
+
* @example When I pw get element by selector "div.loader" to be hidden
|
|
114
114
|
*/
|
|
115
115
|
export declare function getElementBySelectorToBeHidden(page: any, selectorKey: string): Promise<void>;
|
|
116
116
|
//# sourceMappingURL=text.d.ts.map
|