@@ -144,12 +144,12 @@ Validation with auto-retries
144
144
const { getPollValidation } = require (' @qavajs/validation' );
145
145
146
146
Then (' I expect the answer {validation} {string}' , async function (validate , expected ) {
147
- const answer = getAnswer ();
147
+ const answer = async () => this . page . locator ( ' answer ' ). innerText ();
148
148
await validate .poll (answer, expected, { timeout: 2000 , interval: 500 });
149
149
});
150
150
151
151
Then (' I expect the answer {} {string}' , async function (validationType , expected ) {
152
- const answer = getAnswer ();
152
+ const answer = async () => this . page . locator ( ' answer ' ). innerText ();
153
153
const validate = getPollValidation (validationType);
154
154
await validate (getAnswer, expected, { timeout: 2000 , interval: 500 });
155
155
});
@@ -161,12 +161,12 @@ Validation with auto-retries
161
161
import { getPollValidation } from ' @qavajs/validation' ;
162
162
163
163
Then (' I expect the answer {validation} {string}' , async function (validate : Validation , expected : string ) {
164
- const answer = getAnswer ();
165
- await validate .poll (answer , expected );
164
+ const answer = async () => this . page . locator ( ' answer ' ). innerText ();
165
+ await validate .poll (answer , expected , { timeout: 2000 , interval: 500 } );
166
166
});
167
167
168
168
Then (' I expect the answer {} {string}' , async function (validationType : string , expected : string ) {
169
- const answer = getAnswer ();
169
+ const answer = async () => this . page . locator ( ' answer ' ). innerText ();
170
170
const validate = getPollValidation (validationType );
171
171
await validate (getAnswer , expected , { timeout: 2000 , interval: 500 });
172
172
});
0 commit comments