playwright-cucumber-ts-steps 1.3.2 → 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 +29 -29
- package/dist/backend/actions/form.d.ts +2 -2
- package/dist/backend/actions/form.js +2 -2
- package/dist/backend/actions/formTable.d.ts +1 -1
- package/dist/backend/actions/formTable.js +1 -1
- package/dist/backend/actions/frames.d.ts +3 -3
- package/dist/backend/actions/frames.js +3 -3
- package/dist/backend/actions/inputs.d.ts +14 -14
- package/dist/backend/actions/inputs.js +14 -14
- package/dist/backend/actions/interactions.d.ts +7 -7
- package/dist/backend/actions/interactions.js +7 -7
- package/dist/backend/actions/keyboard.d.ts +6 -6
- package/dist/backend/actions/keyboard.js +6 -6
- package/dist/backend/actions/misc.d.ts +15 -15
- package/dist/backend/actions/misc.js +15 -15
- package/dist/backend/actions/mobile.d.ts +7 -7
- package/dist/backend/actions/mobile.js +7 -7
- package/dist/backend/actions/mouse.d.ts +9 -9
- package/dist/backend/actions/mouse.js +9 -9
- package/dist/backend/actions/navigation.d.ts +5 -5
- package/dist/backend/actions/navigation.js +5 -5
- package/dist/backend/actions/visual.d.ts +6 -6
- package/dist/backend/actions/visual.js +6 -6
- package/dist/backend/actions/waits.d.ts +6 -6
- package/dist/backend/actions/waits.js +6 -6
- package/dist/backend/api/assertions.d.ts +3 -3
- package/dist/backend/api/assertions.js +3 -3
- package/dist/backend/api/mock.d.ts +3 -3
- package/dist/backend/api/mock.js +3 -3
- package/dist/backend/api/network.d.ts +6 -6
- package/dist/backend/api/network.js +6 -6
- package/dist/backend/api/requests.d.ts +4 -4
- package/dist/backend/api/requests.js +4 -4
- package/dist/backend/assertions/document.d.ts +10 -10
- package/dist/backend/assertions/document.js +10 -10
- package/dist/backend/assertions/elements.d.ts +28 -28
- package/dist/backend/assertions/elements.js +28 -28
- package/dist/backend/assertions/expectVisible.d.ts +1 -1
- package/dist/backend/assertions/expectVisible.js +1 -1
- package/dist/backend/assertions/forms.d.ts +7 -7
- package/dist/backend/assertions/forms.js +7 -7
- package/dist/backend/assertions/pageState.d.ts +4 -4
- package/dist/backend/assertions/pageState.js +4 -4
- package/dist/backend/assertions/storage.d.ts +11 -11
- package/dist/backend/assertions/storage.js +11 -11
- package/dist/backend/assertions/text.d.ts +17 -17
- package/dist/backend/assertions/text.js +17 -17
- package/dist/backend/assertions/visibility.d.ts +15 -15
- package/dist/backend/assertions/visibility.js +15 -15
- package/dist/backend/auth/index.d.ts +2 -2
- package/dist/backend/auth/index.js +2 -2
- package/dist/backend/db/steps.d.ts +9 -9
- package/dist/backend/db/steps.js +9 -9
- package/dist/backend/elements/alerts.d.ts +3 -3
- package/dist/backend/elements/alerts.js +3 -3
- package/dist/backend/elements/find.d.ts +15 -15
- package/dist/backend/elements/find.js +15 -15
- package/dist/backend/elements/forms.d.ts +4 -4
- package/dist/backend/elements/forms.js +4 -4
- package/dist/backend/elements/frames.d.ts +3 -3
- package/dist/backend/elements/frames.js +3 -3
- 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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Performs a standard HTTP GET request and stores the response in the global API state.
|
|
3
3
|
* Supports fixtures for reusable API endpoints.
|
|
4
|
-
* @example When I make a GET request to "users.list"
|
|
4
|
+
* @example When I pw make a GET request to "users.list"
|
|
5
5
|
*/
|
|
6
6
|
export declare function makeGetRequest(page: any, urlKey: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Performs a standard HTTP DELETE request and stores the response in the global API state.
|
|
9
9
|
* Supports fixtures for reusable API endpoints.
|
|
10
|
-
* @example When I make a DELETE request to "users.delete"
|
|
10
|
+
* @example When I pw make a DELETE request to "users.delete"
|
|
11
11
|
*/
|
|
12
12
|
export declare function makeDeleteRequest(page: any, urlKey: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Performs an HTTP POST request using a Gherkin Data Table as the JSON payload.
|
|
15
|
-
* @example When I make a POST request to "users.create" with data
|
|
15
|
+
* @example When I pw make a POST request to "users.create" with data
|
|
16
16
|
* | name | John |
|
|
17
17
|
* | job | Dev |
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ export declare function makePostRequestWithTable(page: any, urlKey: string, tabl
|
|
|
20
20
|
/**
|
|
21
21
|
* Performs an HTTP POST request using the contents of a local JSON file as the payload.
|
|
22
22
|
* Supports fixtures for reusable API endpoints and payloads.
|
|
23
|
-
* @example When I make a POST request to "users.create" with payload from "user.newUser"
|
|
23
|
+
* @example When I pw make a POST request to "users.create" with payload from "user.newUser"
|
|
24
24
|
*/
|
|
25
25
|
export declare function makePostRequestWithFile(page: any, urlKey: string, filePathKey: string): Promise<void>;
|
|
26
26
|
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -49,7 +49,7 @@ const fixtures_1 = require("../utils/fixtures");
|
|
|
49
49
|
/**
|
|
50
50
|
* Performs a standard HTTP GET request and stores the response in the global API state.
|
|
51
51
|
* Supports fixtures for reusable API endpoints.
|
|
52
|
-
* @example When I make a GET request to "users.list"
|
|
52
|
+
* @example When I pw make a GET request to "users.list"
|
|
53
53
|
*/
|
|
54
54
|
async function makeGetRequest(page, urlKey) {
|
|
55
55
|
const endpoints = (0, fixtures_1.loadFixture)("endpoints.json");
|
|
@@ -61,7 +61,7 @@ async function makeGetRequest(page, urlKey) {
|
|
|
61
61
|
/**
|
|
62
62
|
* Performs a standard HTTP DELETE request and stores the response in the global API state.
|
|
63
63
|
* Supports fixtures for reusable API endpoints.
|
|
64
|
-
* @example When I make a DELETE request to "users.delete"
|
|
64
|
+
* @example When I pw make a DELETE request to "users.delete"
|
|
65
65
|
*/
|
|
66
66
|
async function makeDeleteRequest(page, urlKey) {
|
|
67
67
|
const endpoints = (0, fixtures_1.loadFixture)("endpoints.json");
|
|
@@ -72,7 +72,7 @@ async function makeDeleteRequest(page, urlKey) {
|
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Performs an HTTP POST request using a Gherkin Data Table as the JSON payload.
|
|
75
|
-
* @example When I make a POST request to "users.create" with data
|
|
75
|
+
* @example When I pw make a POST request to "users.create" with data
|
|
76
76
|
* | name | John |
|
|
77
77
|
* | job | Dev |
|
|
78
78
|
*/
|
|
@@ -95,7 +95,7 @@ async function makePostRequestWithTable(page, urlKey, tableData) {
|
|
|
95
95
|
/**
|
|
96
96
|
* Performs an HTTP POST request using the contents of a local JSON file as the payload.
|
|
97
97
|
* Supports fixtures for reusable API endpoints and payloads.
|
|
98
|
-
* @example When I make a POST request to "users.create" with payload from "user.newUser"
|
|
98
|
+
* @example When I pw make a POST request to "users.create" with payload from "user.newUser"
|
|
99
99
|
*/
|
|
100
100
|
async function makePostRequestWithFile(page, urlKey, filePathKey) {
|
|
101
101
|
const endpoints = (0, fixtures_1.loadFixture)("endpoints.json");
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Asserts that the document title equals the expected value.
|
|
3
3
|
* Supports fixtures for reusable title values.
|
|
4
|
-
* @example Then I see document title "My Website - Home"
|
|
4
|
+
* @example Then I pw see document title "My Website - Home"
|
|
5
5
|
*/
|
|
6
6
|
export declare function expectDocumentTitle(page: any, titleKey: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Asserts that the document title contains the expected substring.
|
|
9
9
|
* Supports fixtures for reusable title values.
|
|
10
|
-
* @example Then I see document title contains "Website"
|
|
10
|
+
* @example Then I pw see document title contains "Website"
|
|
11
11
|
*/
|
|
12
12
|
export declare function expectDocumentTitleContains(page: any, titleKey: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Asserts that the current URL equals the expected value.
|
|
15
15
|
* Supports fixtures for reusable URL values.
|
|
16
|
-
* @example Then I see URL "https://example.com/dashboard"
|
|
16
|
+
* @example Then I pw see URL "https://example.com/dashboard"
|
|
17
17
|
*/
|
|
18
18
|
export declare function expectUrl(page: any, urlKey: string): Promise<void>;
|
|
19
19
|
/**
|
|
20
20
|
* Asserts that the current URL contains the expected substring.
|
|
21
21
|
* Supports fixtures for reusable URL values.
|
|
22
|
-
* @example Then I see URL contains "dashboard"
|
|
22
|
+
* @example Then I pw see URL contains "dashboard"
|
|
23
23
|
*/
|
|
24
24
|
export declare function expectUrlContains(page: any, urlPartKey: string): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Asserts that the current pathname equals the expected value.
|
|
27
27
|
* Supports fixtures for reusable pathname values.
|
|
28
|
-
* @example Then I see pathname "/dashboard"
|
|
28
|
+
* @example Then I pw see pathname "/dashboard"
|
|
29
29
|
*/
|
|
30
30
|
export declare function expectPathname(page: any, pathnameKey: string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Asserts that the current pathname contains the expected substring.
|
|
33
33
|
* Supports fixtures for reusable pathname values.
|
|
34
|
-
* @example Then I see pathname contains "dashboard"
|
|
34
|
+
* @example Then I pw see pathname contains "dashboard"
|
|
35
35
|
*/
|
|
36
36
|
export declare function expectPathnameContains(page: any, pathnamePartKey: string): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Asserts that the current hash equals the expected value.
|
|
39
39
|
* Supports fixtures for reusable hash values.
|
|
40
|
-
* @example Then I see hash "#section1"
|
|
40
|
+
* @example Then I pw see hash "#section1"
|
|
41
41
|
*/
|
|
42
42
|
export declare function expectHash(page: any, hashKey: string): Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Asserts that the current hash contains the expected substring.
|
|
45
45
|
* Supports fixtures for reusable hash values.
|
|
46
|
-
* @example Then I see hash contains "section"
|
|
46
|
+
* @example Then I pw see hash contains "section"
|
|
47
47
|
*/
|
|
48
48
|
export declare function expectHashContains(page: any, hashPartKey: string): Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Asserts that the current search parameters contain the expected substring.
|
|
51
51
|
* Supports fixtures for reusable search values.
|
|
52
|
-
* @example Then I see search contains "query=test"
|
|
52
|
+
* @example Then I pw see search contains "query=test"
|
|
53
53
|
*/
|
|
54
54
|
export declare function expectSearchContains(page: any, searchPartKey: string): Promise<void>;
|
|
55
55
|
/**
|
|
56
56
|
* Asserts that the current location equals the expected value.
|
|
57
57
|
* Supports fixtures for reusable location values.
|
|
58
|
-
* @example Then I see location "https://example.com/dashboard#top"
|
|
58
|
+
* @example Then I pw see location "https://example.com/dashboard#top"
|
|
59
59
|
*/
|
|
60
60
|
export declare function expectLocation(page: any, locationKey: string): Promise<void>;
|
|
61
61
|
//# sourceMappingURL=document.d.ts.map
|
|
@@ -20,7 +20,7 @@ const fixtures_1 = require("../utils/fixtures");
|
|
|
20
20
|
/**
|
|
21
21
|
* Asserts that the document title equals the expected value.
|
|
22
22
|
* Supports fixtures for reusable title values.
|
|
23
|
-
* @example Then I see document title "My Website - Home"
|
|
23
|
+
* @example Then I pw see document title "My Website - Home"
|
|
24
24
|
*/
|
|
25
25
|
async function expectDocumentTitle(page, titleKey) {
|
|
26
26
|
const titles = (0, fixtures_1.loadFixture)("titles.json");
|
|
@@ -31,7 +31,7 @@ async function expectDocumentTitle(page, titleKey) {
|
|
|
31
31
|
/**
|
|
32
32
|
* Asserts that the document title contains the expected substring.
|
|
33
33
|
* Supports fixtures for reusable title values.
|
|
34
|
-
* @example Then I see document title contains "Website"
|
|
34
|
+
* @example Then I pw see document title contains "Website"
|
|
35
35
|
*/
|
|
36
36
|
async function expectDocumentTitleContains(page, titleKey) {
|
|
37
37
|
const titles = (0, fixtures_1.loadFixture)("titles.json");
|
|
@@ -45,7 +45,7 @@ async function expectDocumentTitleContains(page, titleKey) {
|
|
|
45
45
|
/**
|
|
46
46
|
* Asserts that the current URL equals the expected value.
|
|
47
47
|
* Supports fixtures for reusable URL values.
|
|
48
|
-
* @example Then I see URL "https://example.com/dashboard"
|
|
48
|
+
* @example Then I pw see URL "https://example.com/dashboard"
|
|
49
49
|
*/
|
|
50
50
|
async function expectUrl(page, urlKey) {
|
|
51
51
|
const urls = (0, fixtures_1.loadFixture)("urls.json");
|
|
@@ -56,7 +56,7 @@ async function expectUrl(page, urlKey) {
|
|
|
56
56
|
/**
|
|
57
57
|
* Asserts that the current URL contains the expected substring.
|
|
58
58
|
* Supports fixtures for reusable URL values.
|
|
59
|
-
* @example Then I see URL contains "dashboard"
|
|
59
|
+
* @example Then I pw see URL contains "dashboard"
|
|
60
60
|
*/
|
|
61
61
|
async function expectUrlContains(page, urlPartKey) {
|
|
62
62
|
const urls = (0, fixtures_1.loadFixture)("urls.json");
|
|
@@ -70,7 +70,7 @@ async function expectUrlContains(page, urlPartKey) {
|
|
|
70
70
|
/**
|
|
71
71
|
* Asserts that the current pathname equals the expected value.
|
|
72
72
|
* Supports fixtures for reusable pathname values.
|
|
73
|
-
* @example Then I see pathname "/dashboard"
|
|
73
|
+
* @example Then I pw see pathname "/dashboard"
|
|
74
74
|
*/
|
|
75
75
|
async function expectPathname(page, pathnameKey) {
|
|
76
76
|
const paths = (0, fixtures_1.loadFixture)("paths.json");
|
|
@@ -84,7 +84,7 @@ async function expectPathname(page, pathnameKey) {
|
|
|
84
84
|
/**
|
|
85
85
|
* Asserts that the current pathname contains the expected substring.
|
|
86
86
|
* Supports fixtures for reusable pathname values.
|
|
87
|
-
* @example Then I see pathname contains "dashboard"
|
|
87
|
+
* @example Then I pw see pathname contains "dashboard"
|
|
88
88
|
*/
|
|
89
89
|
async function expectPathnameContains(page, pathnamePartKey) {
|
|
90
90
|
const paths = (0, fixtures_1.loadFixture)("paths.json");
|
|
@@ -98,7 +98,7 @@ async function expectPathnameContains(page, pathnamePartKey) {
|
|
|
98
98
|
/**
|
|
99
99
|
* Asserts that the current hash equals the expected value.
|
|
100
100
|
* Supports fixtures for reusable hash values.
|
|
101
|
-
* @example Then I see hash "#section1"
|
|
101
|
+
* @example Then I pw see hash "#section1"
|
|
102
102
|
*/
|
|
103
103
|
async function expectHash(page, hashKey) {
|
|
104
104
|
const hashes = (0, fixtures_1.loadFixture)("hashes.json");
|
|
@@ -112,7 +112,7 @@ async function expectHash(page, hashKey) {
|
|
|
112
112
|
/**
|
|
113
113
|
* Asserts that the current hash contains the expected substring.
|
|
114
114
|
* Supports fixtures for reusable hash values.
|
|
115
|
-
* @example Then I see hash contains "section"
|
|
115
|
+
* @example Then I pw see hash contains "section"
|
|
116
116
|
*/
|
|
117
117
|
async function expectHashContains(page, hashPartKey) {
|
|
118
118
|
const hashes = (0, fixtures_1.loadFixture)("hashes.json");
|
|
@@ -126,7 +126,7 @@ async function expectHashContains(page, hashPartKey) {
|
|
|
126
126
|
/**
|
|
127
127
|
* Asserts that the current search parameters contain the expected substring.
|
|
128
128
|
* Supports fixtures for reusable search values.
|
|
129
|
-
* @example Then I see search contains "query=test"
|
|
129
|
+
* @example Then I pw see search contains "query=test"
|
|
130
130
|
*/
|
|
131
131
|
async function expectSearchContains(page, searchPartKey) {
|
|
132
132
|
const searches = (0, fixtures_1.loadFixture)("searches.json");
|
|
@@ -140,7 +140,7 @@ async function expectSearchContains(page, searchPartKey) {
|
|
|
140
140
|
/**
|
|
141
141
|
* Asserts that the current location equals the expected value.
|
|
142
142
|
* Supports fixtures for reusable location values.
|
|
143
|
-
* @example Then I see location "https://example.com/dashboard#top"
|
|
143
|
+
* @example Then I pw see location "https://example.com/dashboard#top"
|
|
144
144
|
*/
|
|
145
145
|
async function expectLocation(page, locationKey) {
|
|
146
146
|
const locations = (0, fixtures_1.loadFixture)("locations.json");
|
|
@@ -1,163 +1,163 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Counts the number of elements matching the selector.
|
|
3
3
|
* Supports fixtures for reusable selectors.
|
|
4
|
-
* @example Then I count elements "li.item"
|
|
4
|
+
* @example Then I pw count elements "li.item"
|
|
5
5
|
*/
|
|
6
6
|
export declare function countElements(page: any, selectorKey: string): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* Asserts that a button element does not exist or is not visible.
|
|
9
9
|
* Supports fixtures for reusable selectors.
|
|
10
|
-
* @example Then I do not see button element "nav.logoutBtn"
|
|
10
|
+
* @example Then I pw do not see button element "nav.logoutBtn"
|
|
11
11
|
*/
|
|
12
12
|
export declare function expectButtonNotVisible(page: any, selectorKey: string): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Asserts that a heading element does not exist or is not visible.
|
|
15
15
|
* Supports fixtures for reusable selectors.
|
|
16
|
-
* @example Then I do not see heading element "h1.main-title"
|
|
16
|
+
* @example Then I pw do not see heading element "h1.main-title"
|
|
17
17
|
*/
|
|
18
18
|
export declare function expectHeadingNotVisible(page: any, selectorKey: string): Promise<void>;
|
|
19
19
|
/**
|
|
20
20
|
* Asserts that a label element does not exist or is not visible.
|
|
21
21
|
* Supports fixtures for reusable selectors.
|
|
22
|
-
* @example Then I do not see label element "label.username-label"
|
|
22
|
+
* @example Then I pw do not see label element "label.username-label"
|
|
23
23
|
*/
|
|
24
24
|
export declare function expectLabelNotVisible(page: any, selectorKey: string): Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* Asserts that a link element does not exist or is not visible.
|
|
27
27
|
* Supports fixtures for reusable selectors.
|
|
28
|
-
* @example Then I do not see link element "a.privacy-link"
|
|
28
|
+
* @example Then I pw do not see link element "a.privacy-link"
|
|
29
29
|
*/
|
|
30
30
|
export declare function expectLinkNotVisible(page: any, selectorKey: string): Promise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* Asserts that an element with a specific test ID does not exist or is not visible.
|
|
33
33
|
* Supports fixtures for reusable test IDs.
|
|
34
|
-
* @example Then I do not see testid element "data-testid=my-component"
|
|
34
|
+
* @example Then I pw do not see testid element "data-testid=my-component"
|
|
35
35
|
*/
|
|
36
36
|
export declare function expectTestIdNotVisible(page: any, selectorKey: string): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Asserts that an element with a specific role does not exist or is not visible.
|
|
39
39
|
* Supports fixtures for reusable roles.
|
|
40
|
-
* @example Then I do not see role element "button"
|
|
40
|
+
* @example Then I pw do not see role element "button"
|
|
41
41
|
*/
|
|
42
42
|
export declare function expectRoleNotVisible(page: any, roleKey: string): Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Asserts that an option element does not exist or is not visible.
|
|
45
45
|
* Supports fixtures for reusable selectors.
|
|
46
|
-
* @example Then I do not see option element "option[value='disabled']"
|
|
46
|
+
* @example Then I pw do not see option element "option[value='disabled']"
|
|
47
47
|
*/
|
|
48
48
|
export declare function expectOptionNotVisible(page: any, selectorKey: string): Promise<void>;
|
|
49
49
|
/**
|
|
50
50
|
* Asserts that an element with a specific attribute does not exist or is not visible.
|
|
51
51
|
* Supports fixtures for reusable selectors and attribute values.
|
|
52
|
-
* @example Then I do not see element with attribute "aria-hidden" having value "false"
|
|
52
|
+
* @example Then I pw do not see element with attribute "aria-hidden" having value "false"
|
|
53
53
|
*/
|
|
54
54
|
export declare function expectElementWithAttributeNotVisible(page: any, attrKey: string, valueKey: string): Promise<void>;
|
|
55
55
|
/**
|
|
56
56
|
* Asserts that an element has an attribute containing the specified value.
|
|
57
57
|
* Supports fixtures for reusable selectors, attributes and values.
|
|
58
|
-
* @example Then I see element attribute "class" contains "active"
|
|
58
|
+
* @example Then I pw see element attribute "class" contains "active"
|
|
59
59
|
*/
|
|
60
60
|
export declare function expectElementAttributeContains(page: any, selectorKey: string, attrKey: string, valueKey: string): Promise<void>;
|
|
61
61
|
/**
|
|
62
62
|
* Asserts that an element has an attribute equal to the specified value.
|
|
63
63
|
* Supports fixtures for reusable selectors, attributes and values.
|
|
64
|
-
* @example Then I see element attribute "class" equals "btn-primary"
|
|
64
|
+
* @example Then I pw see element attribute "class" equals "btn-primary"
|
|
65
65
|
*/
|
|
66
66
|
export declare function expectElementAttributeEquals(page: any, selectorKey: string, attrKey: string, valueKey: string): Promise<void>;
|
|
67
67
|
/**
|
|
68
68
|
* Asserts that an element has a specific attribute.
|
|
69
69
|
* Supports fixtures for reusable selectors and attributes.
|
|
70
|
-
* @example Then I see element has attribute "aria-label"
|
|
70
|
+
* @example Then I pw see element has attribute "aria-label"
|
|
71
71
|
*/
|
|
72
72
|
export declare function expectElementHasAttribute(page: any, selectorKey: string, attrKey: string): Promise<void>;
|
|
73
73
|
/**
|
|
74
74
|
* Asserts that a button element exists and is visible.
|
|
75
75
|
* Supports fixtures for reusable selectors.
|
|
76
|
-
* @example Then I see button element "nav.loginBtn"
|
|
76
|
+
* @example Then I pw see button element "nav.loginBtn"
|
|
77
77
|
*/
|
|
78
78
|
export declare function expectButtonVisible(page: any, selectorKey: string): Promise<void>;
|
|
79
79
|
/**
|
|
80
80
|
* Gets an element by selector and asserts it has a class containing the specified text.
|
|
81
|
-
* @example Then I get element by selector "button.primary" to have class containing "active"
|
|
81
|
+
* @example Then I pw get element by selector "button.primary" to have class containing "active"
|
|
82
82
|
*/
|
|
83
83
|
export declare function expectElementToHaveClassContaining(page: any, selectorKey: string, classKey: string): Promise<void>;
|
|
84
84
|
/**
|
|
85
85
|
* Asserts that an element does NOT contain the specified text.
|
|
86
86
|
* Supports fixtures for reusable selectors and text values.
|
|
87
|
-
* @example Then I get element by selector "error.message" to not contain text "success"
|
|
87
|
+
* @example Then I pw get element by selector "error.message" to not contain text "success"
|
|
88
88
|
*/
|
|
89
89
|
export declare function expectElementToNotContainText(page: any, selectorKey: string, textKey: string): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* Gets an element by selector and asserts it has the exact text specified.
|
|
92
|
-
* @example Then I get element by selector "header.title" to have text "Welcome Home"
|
|
92
|
+
* @example Then I pw get element by selector "header.title" to have text "Welcome Home"
|
|
93
93
|
*/
|
|
94
94
|
export declare function expectElementToHaveText(page: any, selectorKey: string, textKey: string): Promise<void>;
|
|
95
95
|
/**
|
|
96
96
|
* Gets an element by selector and asserts it contains the specified text.
|
|
97
|
-
* @example Then I get element by selector "error.message" to contain text "invalid credentials"
|
|
97
|
+
* @example Then I pw get element by selector "error.message" to contain text "invalid credentials"
|
|
98
98
|
*/
|
|
99
99
|
export declare function expectElementToContainText(page: any, selectorKey: string, textKey: string): Promise<void>;
|
|
100
100
|
/**
|
|
101
101
|
* Gets an element by selector and asserts it has the specified value.
|
|
102
|
-
* @example Then I get element by selector "login.usernameField" to have value "john_doe"
|
|
102
|
+
* @example Then I pw get element by selector "login.usernameField" to have value "john_doe"
|
|
103
103
|
*/
|
|
104
104
|
export declare function expectElementToHaveValue(page: any, selectorKey: string, valueKey: string): Promise<void>;
|
|
105
105
|
/**
|
|
106
106
|
* Gets an element by selector and asserts it has the specified attribute with value.
|
|
107
|
-
* @example Then I get element by selector "terms.link" to have attribute "href" with value "/terms-and-conditions"
|
|
107
|
+
* @example Then I pw get element by selector "terms.link" to have attribute "href" with value "/terms-and-conditions"
|
|
108
108
|
*/
|
|
109
109
|
export declare function expectElementAttributeValue(page: any, selectorKey: string, attrKey: string, valueKey: string): Promise<void>;
|
|
110
110
|
/**
|
|
111
111
|
* Gets an element by selector and asserts it is visible.
|
|
112
|
-
* @example When I get element by selector "div.modal" to be visible
|
|
112
|
+
* @example When I pw get element by selector "div.modal" to be visible
|
|
113
113
|
*/
|
|
114
114
|
export declare function getElementBySelectorToBeVisible(page: any, selectorKey: string): Promise<void>;
|
|
115
115
|
/**
|
|
116
116
|
* Asserts that a heading element exists and is visible.
|
|
117
117
|
* Supports fixtures for reusable selectors.
|
|
118
|
-
* @example Then I see heading element "h1.main-title"
|
|
118
|
+
* @example Then I pw see heading element "h1.main-title"
|
|
119
119
|
*/
|
|
120
120
|
export declare function expectHeadingVisible(page: any, selectorKey: string): Promise<void>;
|
|
121
121
|
/**
|
|
122
122
|
* Asserts that a label element exists and is visible.
|
|
123
123
|
* Supports fixtures for reusable selectors.
|
|
124
|
-
* @example Then I see label element "label.username-label"
|
|
124
|
+
* @example Then I pw see label element "label.username-label"
|
|
125
125
|
*/
|
|
126
126
|
export declare function expectLabelVisible(page: any, selectorKey: string): Promise<void>;
|
|
127
127
|
/**
|
|
128
128
|
* Asserts that a link element exists and is visible.
|
|
129
129
|
* Supports fixtures for reusable selectors.
|
|
130
|
-
* @example Then I see link element "a.privacy-link"
|
|
130
|
+
* @example Then I pw see link element "a.privacy-link"
|
|
131
131
|
*/
|
|
132
132
|
export declare function expectLinkVisible(page: any, selectorKey: string): Promise<void>;
|
|
133
133
|
/**
|
|
134
134
|
* Asserts that an element with a specific test ID exists and is visible.
|
|
135
135
|
* Supports fixtures for reusable test IDs.
|
|
136
|
-
* @example Then I see testid element "data-testid=my-component"
|
|
136
|
+
* @example Then I pw see testid element "data-testid=my-component"
|
|
137
137
|
*/
|
|
138
138
|
export declare function expectTestIdVisible(page: any, selectorKey: string): Promise<void>;
|
|
139
139
|
/**
|
|
140
140
|
* Asserts that an element with a specific role exists and is visible.
|
|
141
141
|
* Supports fixtures for reusable roles.
|
|
142
|
-
* @example Then I see role element "button"
|
|
142
|
+
* @example Then I pw see role element "button"
|
|
143
143
|
*/
|
|
144
144
|
export declare function expectRoleVisible(page: any, roleKey: string): Promise<void>;
|
|
145
145
|
/**
|
|
146
146
|
* Asserts that an option element exists and is visible.
|
|
147
147
|
* Supports fixtures for reusable selectors.
|
|
148
|
-
* @example Then I see option element "option[value='enabled']"
|
|
148
|
+
* @example Then I pw see option element "option[value='enabled']"
|
|
149
149
|
*/
|
|
150
150
|
export declare function expectOptionVisible(page: any, selectorKey: string): Promise<void>;
|
|
151
151
|
/**
|
|
152
152
|
* Asserts that an element has a specific count of occurrences.
|
|
153
153
|
* Supports fixtures for reusable selectors.
|
|
154
|
-
* @example Then I expect "li.item" to have count 5
|
|
154
|
+
* @example Then I pw expect "li.item" to have count 5
|
|
155
155
|
*/
|
|
156
156
|
export declare function expectElementToHaveCount(page: any, selectorKey: string, count: number): Promise<void>;
|
|
157
157
|
/**
|
|
158
158
|
* Asserts that an element is hidden (not visible).
|
|
159
159
|
* Supports fixtures for reusable selectors.
|
|
160
|
-
* @example Then I expect "modal.overlay" to be hidden
|
|
160
|
+
* @example Then I pw expect "modal.overlay" to be hidden
|
|
161
161
|
*/
|
|
162
162
|
export declare function expectElementToBeHidden(page: any, selectorKey: string): Promise<void>;
|
|
163
163
|
//# sourceMappingURL=elements.d.ts.map
|