@@ -307,7 +307,7 @@ async function deleteDataStructure(page) {
307
307
308
308
// Check the modal title and body text
309
309
await expect ( page . locator ( '.modal-header' ) ) . toHaveText ( 'Delete Structure' ) ;
310
- await expect ( page . locator ( '.modal-body' ) ) . toContainText ( `Are you sure you wish to delete structure with id ` ) ;
310
+ await expect ( page . locator ( '.modal-body' ) ) . toContainText ( `Are you sure you wish to delete structure` ) ;
311
311
312
312
// Click the confirm button in the modal footer
313
313
await page . locator ( '.modal-footer button.variant-filled' ) . click ( ) ;
@@ -323,7 +323,7 @@ async function checkAndCloseToast(page) {
323
323
324
324
// Check the toast message
325
325
const toast = await page . locator ( '.toast[data-testid=toast]' ) ;
326
- await expect ( await toast . locator ( '.text-base' ) ) . toHaveText ( `Structure deleted. ` ) ;
326
+ await expect ( await toast . locator ( '.text-base' ) ) . toContainText ( `Structure` ) ;
327
327
328
328
// Close the toast
329
329
await toast . locator ( 'button' ) . click ( ) ;
@@ -360,19 +360,19 @@ async function editDataStructure(page) {
360
360
await page . click ( 'xpath=//*[@id="0"]/div[2]/div[2]/div[2]/label/div' ) ;
361
361
362
362
// Click the on template data dropdown
363
- await page . click ( '#variableTemplate' ) ;
363
+ await page . click ( '#variableTemplate-0 ' ) ;
364
364
await page . waitForTimeout ( 500 ) ;
365
365
const template = await page . waitForSelector ( '.list-item .item:text("percentage")' , { visible : true , enabled : true } ) ;
366
366
await template . click ( )
367
367
368
368
// Click the on data type dropdown
369
- await page . click ( '#dataType' ) ;
369
+ await page . click ( '#dataType-0 ' ) ;
370
370
await page . waitForTimeout ( 500 ) ;
371
371
const dataType = await page . waitForSelector ( '.list-item .item:text("number")' , { visible : true , enabled : true } ) ;
372
372
await dataType . click ( )
373
373
374
374
// Click the on unit dropdown
375
- await page . click ( '#unit' ) ;
375
+ await page . click ( '#unit-0 ' ) ;
376
376
await page . waitForTimeout ( 500 ) ;
377
377
const unit = await page . waitForSelector ( '.list-item .item:text("%")' , { visible : true , enabled : true } ) ;
378
378
await unit . click ( )
@@ -420,4 +420,4 @@ module.exports = {
420
420
findEditedDataStructure,
421
421
checkUploadDataStructure
422
422
423
- } ;
423
+ } ;
0 commit comments