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.
Files changed (77) hide show
  1. package/README.md +358 -671
  2. package/dist/backend/actions/click.d.ts +29 -29
  3. package/dist/backend/actions/click.js +59 -59
  4. package/dist/backend/actions/form.d.ts +2 -2
  5. package/dist/backend/actions/form.js +4 -4
  6. package/dist/backend/actions/formTable.d.ts +1 -1
  7. package/dist/backend/actions/formTable.js +2 -2
  8. package/dist/backend/actions/frames.d.ts +3 -3
  9. package/dist/backend/actions/frames.js +6 -6
  10. package/dist/backend/actions/inputs.d.ts +14 -14
  11. package/dist/backend/actions/inputs.js +32 -32
  12. package/dist/backend/actions/interactions.d.ts +7 -7
  13. package/dist/backend/actions/interactions.js +13 -13
  14. package/dist/backend/actions/keyboard.d.ts +6 -6
  15. package/dist/backend/actions/keyboard.js +12 -12
  16. package/dist/backend/actions/misc.d.ts +15 -15
  17. package/dist/backend/actions/misc.js +30 -30
  18. package/dist/backend/actions/mobile.d.ts +7 -7
  19. package/dist/backend/actions/mobile.js +14 -14
  20. package/dist/backend/actions/mouse.d.ts +9 -9
  21. package/dist/backend/actions/mouse.js +18 -18
  22. package/dist/backend/actions/navigation.d.ts +5 -5
  23. package/dist/backend/actions/navigation.js +10 -10
  24. package/dist/backend/actions/visual.d.ts +6 -6
  25. package/dist/backend/actions/visual.js +13 -13
  26. package/dist/backend/actions/waits.d.ts +6 -6
  27. package/dist/backend/actions/waits.js +12 -12
  28. package/dist/backend/api/assertions.d.ts +3 -3
  29. package/dist/backend/api/assertions.js +6 -6
  30. package/dist/backend/api/mock.d.ts +3 -3
  31. package/dist/backend/api/mock.js +6 -6
  32. package/dist/backend/api/network.d.ts +6 -6
  33. package/dist/backend/api/network.js +12 -12
  34. package/dist/backend/api/requests.d.ts +4 -4
  35. package/dist/backend/api/requests.js +8 -8
  36. package/dist/backend/assertions/document.d.ts +10 -10
  37. package/dist/backend/assertions/document.js +20 -20
  38. package/dist/backend/assertions/elements.d.ts +28 -28
  39. package/dist/backend/assertions/elements.js +56 -56
  40. package/dist/backend/assertions/expectVisible.d.ts +1 -1
  41. package/dist/backend/assertions/expectVisible.js +2 -2
  42. package/dist/backend/assertions/forms.d.ts +7 -7
  43. package/dist/backend/assertions/forms.js +14 -14
  44. package/dist/backend/assertions/pageState.d.ts +4 -4
  45. package/dist/backend/assertions/pageState.js +8 -8
  46. package/dist/backend/assertions/storage.d.ts +11 -11
  47. package/dist/backend/assertions/storage.js +22 -22
  48. package/dist/backend/assertions/text.d.ts +17 -17
  49. package/dist/backend/assertions/text.js +34 -34
  50. package/dist/backend/assertions/visibility.d.ts +15 -15
  51. package/dist/backend/assertions/visibility.js +30 -30
  52. package/dist/backend/auth/index.d.ts +2 -2
  53. package/dist/backend/auth/index.js +4 -4
  54. package/dist/backend/db/steps.d.ts +10 -10
  55. package/dist/backend/db/steps.d.ts.map +1 -1
  56. package/dist/backend/db/steps.js +19 -19
  57. package/dist/backend/elements/alerts.d.ts +3 -3
  58. package/dist/backend/elements/alerts.js +6 -6
  59. package/dist/backend/elements/find.d.ts +15 -15
  60. package/dist/backend/elements/find.js +41 -41
  61. package/dist/backend/elements/forms.d.ts +4 -4
  62. package/dist/backend/elements/forms.js +8 -8
  63. package/dist/backend/elements/frames.d.ts +3 -3
  64. package/dist/backend/elements/frames.js +6 -6
  65. package/dist/backend/utils/fixtures.d.ts +22 -0
  66. package/dist/backend/utils/fixtures.d.ts.map +1 -1
  67. package/dist/backend/utils/fixtures.js +76 -2
  68. package/dist/backend/utils/resolver.js +1 -1
  69. package/dist/component/runner.d.ts +1 -1
  70. package/dist/component/runner.d.ts.map +1 -1
  71. package/dist/component/runner.js +38 -5
  72. package/dist/core/runner.js +3 -3
  73. package/dist/index.d.ts +1 -0
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +3 -1
  76. package/dist/metadata.json +270 -270
  77. package/package.json +3 -2
@@ -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");
@@ -154,13 +154,13 @@ async function expectLocation(page, locationKey) {
154
154
  // ==================================================
155
155
  // GLUE STEPS
156
156
  // ==================================================
157
- (0, registry_1.Step)("I see document title {string}", expectDocumentTitle, "Then");
158
- (0, registry_1.Step)("I see document title contains {string}", expectDocumentTitleContains, "Then");
159
- (0, registry_1.Step)("I see URL {string}", expectUrl, "Then");
160
- (0, registry_1.Step)("I see URL contains {string}", expectUrlContains, "Then");
161
- (0, registry_1.Step)("I see pathname {string}", expectPathname, "Then");
162
- (0, registry_1.Step)("I see pathname contains {string}", expectPathnameContains, "Then");
163
- (0, registry_1.Step)("I see hash {string}", expectHash, "Then");
164
- (0, registry_1.Step)("I see hash contains {string}", expectHashContains, "Then");
165
- (0, registry_1.Step)("I see search contains {string}", expectSearchContains, "Then");
166
- (0, registry_1.Step)("I see location {string}", expectLocation, "Then");
157
+ (0, registry_1.Step)("I pw see document title {string}", expectDocumentTitle, "Then");
158
+ (0, registry_1.Step)("I pw see document title contains {string}", expectDocumentTitleContains, "Then");
159
+ (0, registry_1.Step)("I pw see URL {string}", expectUrl, "Then");
160
+ (0, registry_1.Step)("I pw see URL contains {string}", expectUrlContains, "Then");
161
+ (0, registry_1.Step)("I pw see pathname {string}", expectPathname, "Then");
162
+ (0, registry_1.Step)("I pw see pathname contains {string}", expectPathnameContains, "Then");
163
+ (0, registry_1.Step)("I pw see hash {string}", expectHash, "Then");
164
+ (0, registry_1.Step)("I pw see hash contains {string}", expectHashContains, "Then");
165
+ (0, registry_1.Step)("I pw see search contains {string}", expectSearchContains, "Then");
166
+ (0, registry_1.Step)("I pw see location {string}", expectLocation, "Then");
@@ -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
@@ -39,7 +39,7 @@ const resolver_1 = require("../utils/resolver");
39
39
  /**
40
40
  * Counts the number of elements matching the selector.
41
41
  * Supports fixtures for reusable selectors.
42
- * @example Then I count elements "li.item"
42
+ * @example Then I pw count elements "li.item"
43
43
  */
44
44
  async function countElements(page, selectorKey) {
45
45
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -50,7 +50,7 @@ async function countElements(page, selectorKey) {
50
50
  /**
51
51
  * Asserts that a button element does not exist or is not visible.
52
52
  * Supports fixtures for reusable selectors.
53
- * @example Then I do not see button element "nav.logoutBtn"
53
+ * @example Then I pw do not see button element "nav.logoutBtn"
54
54
  */
55
55
  async function expectButtonNotVisible(page, selectorKey) {
56
56
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -60,7 +60,7 @@ async function expectButtonNotVisible(page, selectorKey) {
60
60
  /**
61
61
  * Asserts that a heading element does not exist or is not visible.
62
62
  * Supports fixtures for reusable selectors.
63
- * @example Then I do not see heading element "h1.main-title"
63
+ * @example Then I pw do not see heading element "h1.main-title"
64
64
  */
65
65
  async function expectHeadingNotVisible(page, selectorKey) {
66
66
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -76,7 +76,7 @@ async function expectHeadingNotVisible(page, selectorKey) {
76
76
  /**
77
77
  * Asserts that a label element does not exist or is not visible.
78
78
  * Supports fixtures for reusable selectors.
79
- * @example Then I do not see label element "label.username-label"
79
+ * @example Then I pw do not see label element "label.username-label"
80
80
  */
81
81
  async function expectLabelNotVisible(page, selectorKey) {
82
82
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -92,7 +92,7 @@ async function expectLabelNotVisible(page, selectorKey) {
92
92
  /**
93
93
  * Asserts that a link element does not exist or is not visible.
94
94
  * Supports fixtures for reusable selectors.
95
- * @example Then I do not see link element "a.privacy-link"
95
+ * @example Then I pw do not see link element "a.privacy-link"
96
96
  */
97
97
  async function expectLinkNotVisible(page, selectorKey) {
98
98
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -108,7 +108,7 @@ async function expectLinkNotVisible(page, selectorKey) {
108
108
  /**
109
109
  * Asserts that an element with a specific test ID does not exist or is not visible.
110
110
  * Supports fixtures for reusable test IDs.
111
- * @example Then I do not see testid element "data-testid=my-component"
111
+ * @example Then I pw do not see testid element "data-testid=my-component"
112
112
  */
113
113
  async function expectTestIdNotVisible(page, selectorKey) {
114
114
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -124,7 +124,7 @@ async function expectTestIdNotVisible(page, selectorKey) {
124
124
  /**
125
125
  * Asserts that an element with a specific role does not exist or is not visible.
126
126
  * Supports fixtures for reusable roles.
127
- * @example Then I do not see role element "button"
127
+ * @example Then I pw do not see role element "button"
128
128
  */
129
129
  async function expectRoleNotVisible(page, roleKey) {
130
130
  const roles = (0, fixtures_1.loadFixture)("roles.json");
@@ -140,7 +140,7 @@ async function expectRoleNotVisible(page, roleKey) {
140
140
  /**
141
141
  * Asserts that an option element does not exist or is not visible.
142
142
  * Supports fixtures for reusable selectors.
143
- * @example Then I do not see option element "option[value='disabled']"
143
+ * @example Then I pw do not see option element "option[value='disabled']"
144
144
  */
145
145
  async function expectOptionNotVisible(page, selectorKey) {
146
146
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -156,7 +156,7 @@ async function expectOptionNotVisible(page, selectorKey) {
156
156
  /**
157
157
  * Asserts that an element with a specific attribute does not exist or is not visible.
158
158
  * Supports fixtures for reusable selectors and attribute values.
159
- * @example Then I do not see element with attribute "aria-hidden" having value "false"
159
+ * @example Then I pw do not see element with attribute "aria-hidden" having value "false"
160
160
  */
161
161
  async function expectElementWithAttributeNotVisible(page, attrKey, valueKey) {
162
162
  const attributes = (0, fixtures_1.loadFixture)("attributes.json");
@@ -175,7 +175,7 @@ async function expectElementWithAttributeNotVisible(page, attrKey, valueKey) {
175
175
  /**
176
176
  * Asserts that an element has an attribute containing the specified value.
177
177
  * Supports fixtures for reusable selectors, attributes and values.
178
- * @example Then I see element attribute "class" contains "active"
178
+ * @example Then I pw see element attribute "class" contains "active"
179
179
  */
180
180
  async function expectElementAttributeContains(page, selectorKey, attrKey, valueKey) {
181
181
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -194,7 +194,7 @@ async function expectElementAttributeContains(page, selectorKey, attrKey, valueK
194
194
  /**
195
195
  * Asserts that an element has an attribute equal to the specified value.
196
196
  * Supports fixtures for reusable selectors, attributes and values.
197
- * @example Then I see element attribute "class" equals "btn-primary"
197
+ * @example Then I pw see element attribute "class" equals "btn-primary"
198
198
  */
199
199
  async function expectElementAttributeEquals(page, selectorKey, attrKey, valueKey) {
200
200
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -213,7 +213,7 @@ async function expectElementAttributeEquals(page, selectorKey, attrKey, valueKey
213
213
  /**
214
214
  * Asserts that an element has a specific attribute.
215
215
  * Supports fixtures for reusable selectors and attributes.
216
- * @example Then I see element has attribute "aria-label"
216
+ * @example Then I pw see element has attribute "aria-label"
217
217
  */
218
218
  async function expectElementHasAttribute(page, selectorKey, attrKey) {
219
219
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -230,7 +230,7 @@ async function expectElementHasAttribute(page, selectorKey, attrKey) {
230
230
  /**
231
231
  * Asserts that a button element exists and is visible.
232
232
  * Supports fixtures for reusable selectors.
233
- * @example Then I see button element "nav.loginBtn"
233
+ * @example Then I pw see button element "nav.loginBtn"
234
234
  */
235
235
  async function expectButtonVisible(page, selectorKey) {
236
236
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -239,7 +239,7 @@ async function expectButtonVisible(page, selectorKey) {
239
239
  }
240
240
  /**
241
241
  * Gets an element by selector and asserts it has a class containing the specified text.
242
- * @example Then I get element by selector "button.primary" to have class containing "active"
242
+ * @example Then I pw get element by selector "button.primary" to have class containing "active"
243
243
  */
244
244
  async function expectElementToHaveClassContaining(page, selectorKey, classKey) {
245
245
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -255,7 +255,7 @@ async function expectElementToHaveClassContaining(page, selectorKey, classKey) {
255
255
  /**
256
256
  * Asserts that an element does NOT contain the specified text.
257
257
  * Supports fixtures for reusable selectors and text values.
258
- * @example Then I get element by selector "error.message" to not contain text "success"
258
+ * @example Then I pw get element by selector "error.message" to not contain text "success"
259
259
  */
260
260
  async function expectElementToNotContainText(page, selectorKey, textKey) {
261
261
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -267,7 +267,7 @@ async function expectElementToNotContainText(page, selectorKey, textKey) {
267
267
  }
268
268
  /**
269
269
  * Gets an element by selector and asserts it has the exact text specified.
270
- * @example Then I get element by selector "header.title" to have text "Welcome Home"
270
+ * @example Then I pw get element by selector "header.title" to have text "Welcome Home"
271
271
  */
272
272
  async function expectElementToHaveText(page, selectorKey, textKey) {
273
273
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -277,7 +277,7 @@ async function expectElementToHaveText(page, selectorKey, textKey) {
277
277
  }
278
278
  /**
279
279
  * Gets an element by selector and asserts it contains the specified text.
280
- * @example Then I get element by selector "error.message" to contain text "invalid credentials"
280
+ * @example Then I pw get element by selector "error.message" to contain text "invalid credentials"
281
281
  */
282
282
  async function expectElementToContainText(page, selectorKey, textKey) {
283
283
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -287,7 +287,7 @@ async function expectElementToContainText(page, selectorKey, textKey) {
287
287
  }
288
288
  /**
289
289
  * Gets an element by selector and asserts it has the specified value.
290
- * @example Then I get element by selector "login.usernameField" to have value "john_doe"
290
+ * @example Then I pw get element by selector "login.usernameField" to have value "john_doe"
291
291
  */
292
292
  async function expectElementToHaveValue(page, selectorKey, valueKey) {
293
293
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -297,7 +297,7 @@ async function expectElementToHaveValue(page, selectorKey, valueKey) {
297
297
  }
298
298
  /**
299
299
  * Gets an element by selector and asserts it has the specified attribute with value.
300
- * @example Then I get element by selector "terms.link" to have attribute "href" with value "/terms-and-conditions"
300
+ * @example Then I pw get element by selector "terms.link" to have attribute "href" with value "/terms-and-conditions"
301
301
  */
302
302
  async function expectElementAttributeValue(page, selectorKey, attrKey, valueKey) {
303
303
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -308,7 +308,7 @@ async function expectElementAttributeValue(page, selectorKey, attrKey, valueKey)
308
308
  }
309
309
  /**
310
310
  * Gets an element by selector and asserts it is visible.
311
- * @example When I get element by selector "div.modal" to be visible
311
+ * @example When I pw get element by selector "div.modal" to be visible
312
312
  */
313
313
  async function getElementBySelectorToBeVisible(page, selectorKey) {
314
314
  const selector = (0, resolver_1.resolveParam)(selectorKey, "selectors.json");
@@ -318,7 +318,7 @@ async function getElementBySelectorToBeVisible(page, selectorKey) {
318
318
  /**
319
319
  * Asserts that a heading element exists and is visible.
320
320
  * Supports fixtures for reusable selectors.
321
- * @example Then I see heading element "h1.main-title"
321
+ * @example Then I pw see heading element "h1.main-title"
322
322
  */
323
323
  async function expectHeadingVisible(page, selectorKey) {
324
324
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -329,7 +329,7 @@ async function expectHeadingVisible(page, selectorKey) {
329
329
  /**
330
330
  * Asserts that a label element exists and is visible.
331
331
  * Supports fixtures for reusable selectors.
332
- * @example Then I see label element "label.username-label"
332
+ * @example Then I pw see label element "label.username-label"
333
333
  */
334
334
  async function expectLabelVisible(page, selectorKey) {
335
335
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -340,7 +340,7 @@ async function expectLabelVisible(page, selectorKey) {
340
340
  /**
341
341
  * Asserts that a link element exists and is visible.
342
342
  * Supports fixtures for reusable selectors.
343
- * @example Then I see link element "a.privacy-link"
343
+ * @example Then I pw see link element "a.privacy-link"
344
344
  */
345
345
  async function expectLinkVisible(page, selectorKey) {
346
346
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -351,7 +351,7 @@ async function expectLinkVisible(page, selectorKey) {
351
351
  /**
352
352
  * Asserts that an element with a specific test ID exists and is visible.
353
353
  * Supports fixtures for reusable test IDs.
354
- * @example Then I see testid element "data-testid=my-component"
354
+ * @example Then I pw see testid element "data-testid=my-component"
355
355
  */
356
356
  async function expectTestIdVisible(page, selectorKey) {
357
357
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -362,7 +362,7 @@ async function expectTestIdVisible(page, selectorKey) {
362
362
  /**
363
363
  * Asserts that an element with a specific role exists and is visible.
364
364
  * Supports fixtures for reusable roles.
365
- * @example Then I see role element "button"
365
+ * @example Then I pw see role element "button"
366
366
  */
367
367
  async function expectRoleVisible(page, roleKey) {
368
368
  const roles = (0, fixtures_1.loadFixture)("roles.json");
@@ -373,7 +373,7 @@ async function expectRoleVisible(page, roleKey) {
373
373
  /**
374
374
  * Asserts that an option element exists and is visible.
375
375
  * Supports fixtures for reusable selectors.
376
- * @example Then I see option element "option[value='enabled']"
376
+ * @example Then I pw see option element "option[value='enabled']"
377
377
  */
378
378
  async function expectOptionVisible(page, selectorKey) {
379
379
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -384,7 +384,7 @@ async function expectOptionVisible(page, selectorKey) {
384
384
  /**
385
385
  * Asserts that an element has a specific count of occurrences.
386
386
  * Supports fixtures for reusable selectors.
387
- * @example Then I expect "li.item" to have count 5
387
+ * @example Then I pw expect "li.item" to have count 5
388
388
  */
389
389
  async function expectElementToHaveCount(page, selectorKey, count) {
390
390
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -399,7 +399,7 @@ async function expectElementToHaveCount(page, selectorKey, count) {
399
399
  /**
400
400
  * Asserts that an element is hidden (not visible).
401
401
  * Supports fixtures for reusable selectors.
402
- * @example Then I expect "modal.overlay" to be hidden
402
+ * @example Then I pw expect "modal.overlay" to be hidden
403
403
  */
404
404
  async function expectElementToBeHidden(page, selectorKey) {
405
405
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -410,32 +410,32 @@ async function expectElementToBeHidden(page, selectorKey) {
410
410
  // ==================================================
411
411
  // GLUE STEPS
412
412
  // ==================================================
413
- (0, registry_1.Step)("I count elements {string}", countElements, "Then");
414
- (0, registry_1.Step)("I do not see button element {string}", expectButtonNotVisible, "Then");
415
- (0, registry_1.Step)("I do not see heading element {string}", expectHeadingNotVisible, "Then");
416
- (0, registry_1.Step)("I do not see label element {string}", expectLabelNotVisible, "Then");
417
- (0, registry_1.Step)("I do not see link element {string}", expectLinkNotVisible, "Then");
418
- (0, registry_1.Step)("I do not see testid element {string}", expectTestIdNotVisible, "Then");
419
- (0, registry_1.Step)("I do not see role element {string}", expectRoleNotVisible, "Then");
420
- (0, registry_1.Step)("I do not see option element {string}", expectOptionNotVisible, "Then");
421
- (0, registry_1.Step)("I do not see element with attribute {string} having value {string}", expectElementWithAttributeNotVisible, "Then");
422
- (0, registry_1.Step)("I see element attribute {string} contains {string}", expectElementAttributeContains, "Then");
423
- (0, registry_1.Step)("I see element attribute {string} equals {string}", expectElementAttributeEquals, "Then");
424
- (0, registry_1.Step)("I see element has attribute {string}", expectElementHasAttribute, "Then");
425
- (0, registry_1.Step)("I see button element {string}", expectButtonVisible, "Then");
426
- (0, registry_1.Step)("I see heading element {string}", expectHeadingVisible, "Then");
427
- (0, registry_1.Step)("I see label element {string}", expectLabelVisible, "Then");
428
- (0, registry_1.Step)("I see link element {string}", expectLinkVisible, "Then");
429
- (0, registry_1.Step)("I see testid element {string}", expectTestIdVisible, "Then");
430
- (0, registry_1.Step)("I see role element {string}", expectRoleVisible, "Then");
431
- (0, registry_1.Step)("I see option element {string}", expectOptionVisible, "Then");
432
- (0, registry_1.Step)("I expect {string} to have count {int}", expectElementToHaveCount, "Then");
433
- (0, registry_1.Step)("I expect {string} to be hidden", expectElementToBeHidden, "Then");
413
+ (0, registry_1.Step)("I pw count elements {string}", countElements, "Then");
414
+ (0, registry_1.Step)("I pw do not see button element {string}", expectButtonNotVisible, "Then");
415
+ (0, registry_1.Step)("I pw do not see heading element {string}", expectHeadingNotVisible, "Then");
416
+ (0, registry_1.Step)("I pw do not see label element {string}", expectLabelNotVisible, "Then");
417
+ (0, registry_1.Step)("I pw do not see link element {string}", expectLinkNotVisible, "Then");
418
+ (0, registry_1.Step)("I pw do not see testid element {string}", expectTestIdNotVisible, "Then");
419
+ (0, registry_1.Step)("I pw do not see role element {string}", expectRoleNotVisible, "Then");
420
+ (0, registry_1.Step)("I pw do not see option element {string}", expectOptionNotVisible, "Then");
421
+ (0, registry_1.Step)("I pw do not see element with attribute {string} having value {string}", expectElementWithAttributeNotVisible, "Then");
422
+ (0, registry_1.Step)("I pw see element attribute {string} contains {string}", expectElementAttributeContains, "Then");
423
+ (0, registry_1.Step)("I pw see element attribute {string} equals {string}", expectElementAttributeEquals, "Then");
424
+ (0, registry_1.Step)("I pw see element has attribute {string}", expectElementHasAttribute, "Then");
425
+ (0, registry_1.Step)("I pw see button element {string}", expectButtonVisible, "Then");
426
+ (0, registry_1.Step)("I pw see heading element {string}", expectHeadingVisible, "Then");
427
+ (0, registry_1.Step)("I pw see label element {string}", expectLabelVisible, "Then");
428
+ (0, registry_1.Step)("I pw see link element {string}", expectLinkVisible, "Then");
429
+ (0, registry_1.Step)("I pw see testid element {string}", expectTestIdVisible, "Then");
430
+ (0, registry_1.Step)("I pw see role element {string}", expectRoleVisible, "Then");
431
+ (0, registry_1.Step)("I pw see option element {string}", expectOptionVisible, "Then");
432
+ (0, registry_1.Step)("I pw expect {string} to have count {int}", expectElementToHaveCount, "Then");
433
+ (0, registry_1.Step)("I pw expect {string} to be hidden", expectElementToBeHidden, "Then");
434
434
  // Combined element selection and assertion steps
435
- (0, registry_1.Step)("I get element by selector {string} to have class containing {string}", expectElementToHaveClassContaining, "When");
436
- (0, registry_1.Step)("I get element by selector {string} to have text {string}", expectElementToHaveText, "Then");
437
- (0, registry_1.Step)("I get element by selector {string} to contain text {string}", expectElementToContainText, "Then");
438
- (0, registry_1.Step)("I get element by selector {string} to have value {string}", expectElementToHaveValue, "Then");
439
- (0, registry_1.Step)("I get element by selector {string} to have attribute {string} with value {string}", expectElementAttributeValue, "Then");
440
- (0, registry_1.Step)("I get element by selector {string} to be visible", getElementBySelectorToBeVisible, "When");
441
- (0, registry_1.Step)("I get element by selector {string} to not contain text {string}", expectElementToNotContainText, "Then");
435
+ (0, registry_1.Step)("I pw get element by selector {string} to have class containing {string}", expectElementToHaveClassContaining, "When");
436
+ (0, registry_1.Step)("I pw get element by selector {string} to have text {string}", expectElementToHaveText, "Then");
437
+ (0, registry_1.Step)("I pw get element by selector {string} to contain text {string}", expectElementToContainText, "Then");
438
+ (0, registry_1.Step)("I pw get element by selector {string} to have value {string}", expectElementToHaveValue, "Then");
439
+ (0, registry_1.Step)("I pw get element by selector {string} to have attribute {string} with value {string}", expectElementAttributeValue, "Then");
440
+ (0, registry_1.Step)("I pw get element by selector {string} to be visible", getElementBySelectorToBeVisible, "When");
441
+ (0, registry_1.Step)("I pw get element by selector {string} to not contain text {string}", expectElementToNotContainText, "Then");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Asserts that a specific element is visible on the page.
3
3
  * Supports fixtures for reusable selectors.
4
- * @example When I expect the element "header.logo" to be visible
4
+ * @example When I pw expect the element "header.logo" to be visible
5
5
  */
6
6
  export declare function expectVisible(page: any, selectorKey: string, timeout?: number): Promise<void>;
7
7
  //# sourceMappingURL=expectVisible.d.ts.map
@@ -10,7 +10,7 @@ const fixtures_1 = require("../utils/fixtures");
10
10
  /**
11
11
  * Asserts that a specific element is visible on the page.
12
12
  * Supports fixtures for reusable selectors.
13
- * @example When I expect the element "header.logo" to be visible
13
+ * @example When I pw expect the element "header.logo" to be visible
14
14
  */
15
15
  async function expectVisible(page, selectorKey, timeout = 2000) {
16
16
  const selectors = (0, fixtures_1.loadFixture)("selectors.json");
@@ -29,4 +29,4 @@ async function expectVisible(page, selectorKey, timeout = 2000) {
29
29
  // ==================================================
30
30
  // GLUE STEPS
31
31
  // ==================================================
32
- (0, registry_1.Step)("I expect the element {string} to be visible", expectVisible, "Then");
32
+ (0, registry_1.Step)("I pw expect the element {string} to be visible", expectVisible, "Then");