@@ -146,6 +146,8 @@ async function createRangeConstraint(page, constraint) {
146
146
async function findRangeConstraint ( page , constraint ) {
147
147
// Search for the constraint
148
148
await page . locator ( '#constraints-search' ) . fill ( constraint ) ;
149
+ // Click on the Search button
150
+ await page . click ( '#constraints-searchSubmit' ) ;
149
151
// Get the row
150
152
const row = page . locator ( '[id^=constraints-row-]' ) ;
151
153
await expect ( row ) . toHaveCount ( 1 ) ;
@@ -165,7 +167,7 @@ async function editRangeDescription(page, constraint) {
165
167
await page . waitForLoadState ( 'load' ) ;
166
168
await page
167
169
. locator ( 'textarea[id=description]' )
168
- . fill ( 'Test constraint edited ' ) ;
170
+ . fill ( 'Test constraint' ) ;
169
171
// Wait for 500 milliseconds
170
172
await page . waitForTimeout ( 500 ) ;
171
173
await page . locator ( 'input[id=name]' ) . fill ( constraint ) ;
@@ -194,6 +196,8 @@ async function findEditedRangeConstraint(page, constraint) {
194
196
195
197
// Search for the constraint
196
198
await page . locator ( '#constraints-search' ) . fill ( constraint ) ;
199
+ // Click on the Search button
200
+ await page . click ( '#constraints-searchSubmit' ) ;
197
201
// Get the row
198
202
const row = page . locator ( '[id^=constraints-row-]' ) ;
199
203
await expect ( row ) . toHaveCount ( 1 ) ;
@@ -203,7 +207,7 @@ async function findEditedRangeConstraint(page, constraint) {
203
207
// Check the values
204
208
await expect ( page . locator ( `#constraints-name-${ index } ` ) ) . toHaveText ( constraint ) ;
205
209
await expect ( page . locator ( `#constraints-description-${ index } ` ) ) . toHaveText (
206
- 'Test constraint edited '
210
+ 'Test constraint'
207
211
) ;
208
212
await expect ( page . locator ( `#constraints-formalDescription-${ index } ` ) ) . toHaveText (
209
213
'The value must be between 5 (including) and 10 (including).' ) ;
@@ -218,4 +222,3 @@ module.exports = {
218
222
editRangeDescription,
219
223
findEditedRangeConstraint
220
224
} ;
221
-
0 commit comments