Skip to content

Commit 7845c24

Browse files
delete message update and CSS selector update
1 parent 3b40526 commit 7845c24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/RPM/utils/uploadDataStructureFunctions.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async function deleteDataStructure(page) {
307307

308308
// Check the modal title and body text
309309
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`);
311311

312312
// Click the confirm button in the modal footer
313313
await page.locator('.modal-footer button.variant-filled').click();
@@ -323,7 +323,7 @@ async function checkAndCloseToast(page) {
323323

324324
// Check the toast message
325325
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`);
327327

328328
// Close the toast
329329
await toast.locator('button').click();
@@ -360,19 +360,19 @@ async function editDataStructure(page) {
360360
await page.click('xpath=//*[@id="0"]/div[2]/div[2]/div[2]/label/div');
361361

362362
// Click the on template data dropdown
363-
await page.click('#variableTemplate');
363+
await page.click('#variableTemplate-0');
364364
await page.waitForTimeout(500);
365365
const template = await page.waitForSelector('.list-item .item:text("percentage")', { visible: true, enabled: true });
366366
await template.click()
367367

368368
// Click the on data type dropdown
369-
await page.click('#dataType');
369+
await page.click('#dataType-0');
370370
await page.waitForTimeout(500);
371371
const dataType = await page.waitForSelector('.list-item .item:text("number")', { visible: true, enabled: true });
372372
await dataType.click()
373373

374374
// Click the on unit dropdown
375-
await page.click('#unit');
375+
await page.click('#unit-0');
376376
await page.waitForTimeout(500);
377377
const unit = await page.waitForSelector('.list-item .item:text("%")', { visible: true, enabled: true });
378378
await unit.click()
@@ -420,4 +420,4 @@ module.exports = {
420420
findEditedDataStructure,
421421
checkUploadDataStructure
422422

423-
};
423+
};

0 commit comments

Comments
 (0)