Skip to content

Commit 3b40526

Browse files
Updated the deleted messages
1 parent 9d99ad8 commit 3b40526

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

tests/RPM/utils/dataStructureFunctions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ async function deleteDataStructure(page) {
220220
await page.waitForSelector('.modal');
221221

222222
// Check the modal title and body text
223-
await expect(page.locator('.modal-header')).toHaveText('Delete Structure');
224-
await expect(page.locator('.modal-body')).toContainText(`Are you sure you wish to delete structure with id`);
223+
await expect(page.locator('.modal-header')).toContainText('Delete Structure');
224+
await expect(page.locator('.modal-body')).toContainText(`Are you sure you wish to delete structure`);
225225

226226
// Click the confirm button in the modal footer
227227
await page.locator('.modal-footer button.variant-filled').click();
@@ -237,7 +237,7 @@ async function checkAndCloseToast(page) {
237237

238238
// Check the toast message
239239
const toast = await page.locator('.toast[data-testid=toast]');
240-
await expect(await toast.locator('.text-base')).toHaveText(`Structure deleted.`);
240+
await expect(await toast.locator('.text-base')).toContainText(`Structure`);
241241

242242
// Close the toast
243243
await toast.locator('button').click();

tests/RPM/utils/externalLinkFunctions.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async function checkExternalLink(page, linkName, hasType, hasPrefix, hasURI) {
1111
if (linkName) {
1212
await page.locator('input[id=name]').fill(linkName);
1313
}
14-
14+
1515
if (hasType) {
1616

1717
// Click the input element
@@ -21,10 +21,10 @@ async function checkExternalLink(page, linkName, hasType, hasPrefix, hasURI) {
2121
}
2222

2323
if (hasPrefix) {
24-
// Click the input element
25-
await page.click('#prefix');
26-
await page.waitForTimeout(500);
27-
await page.locator('.list-item .item:text("dwc")').click();
24+
// Click the input element
25+
await page.click('#prefix');
26+
await page.waitForTimeout(500);
27+
await page.locator('.list-item .item:text("dwc")').click();
2828

2929
}
3030
if (hasURI) {
@@ -41,15 +41,15 @@ async function checkExternalLink(page, linkName, hasType, hasPrefix, hasURI) {
4141
await page.reload()
4242
}
4343

44-
else if (linkName && hasType && hasPrefix && !hasURI) {
44+
else if (linkName && hasType && hasPrefix && !hasURI) {
4545
await page.waitForLoadState('load');
4646
await page.waitForTimeout(1500);
4747
// Check if the save button is disabled and reload the page
4848
const saveButton = page.locator('button#save');
4949
await expect(saveButton).toBeDisabled();
5050
await page.reload()
5151
}
52-
else if (linkName && !hasType && !hasPrefix && hasURI) {
52+
else if (linkName && !hasType && !hasPrefix && hasURI) {
5353
await page.waitForLoadState('load');
5454
await page.waitForTimeout(1500);
5555
// Check if the save button is enable and reload the page
@@ -65,11 +65,11 @@ async function checkExternalLink(page, linkName, hasType, hasPrefix, hasURI) {
6565
await page.reload();
6666
}
6767

68-
68+
6969
}
7070

7171
async function findExternalLink(page, linkName) {
72-
72+
7373
await page.waitForLoadState('load');
7474
// Wait for 500 milliseconds
7575
await page.waitForTimeout(500);
@@ -104,8 +104,8 @@ async function deleteExternalLink(page) {
104104
await page.waitForSelector('.modal');
105105

106106
// Check the modal title and body text
107-
await expect(page.locator('.modal-header')).toHaveText('Delete External Link');
108-
await expect(page.locator('.modal-body')).toContainText(`Are you sure you wish to delete external link ?`);
107+
await expect(page.locator('.modal-header')).toContainText('Delete External Link');
108+
await expect(page.locator('.modal-body')).toContainText(`Are you sure you wish to delete external link`);
109109

110110
// Click the confirm button in the modal footer
111111
await page.locator('.modal-footer button.variant-filled').click();
@@ -121,8 +121,8 @@ async function createExternalLink(page, linkName) {
121121

122122
await page.locator('#create').click();
123123
await page.waitForTimeout(1000);
124-
// Fill in the name and description if provided
125-
124+
// Fill in the name and description if provided
125+
126126
await page.locator('input[id=name]').fill(linkName);
127127

128128
await page.click('#type');
@@ -169,7 +169,7 @@ async function editExternalLink(page, linkName) {
169169
await expect(await toast.locator('.text-base')).toHaveText(expectedMessage);
170170
await toast.locator('button').click(); // Close the toast
171171
await page.reload();
172-
172+
173173
}
174174

175175
async function findEditedExternalLink(page, linkName) {
@@ -210,4 +210,4 @@ module.exports = {
210210
createExternalLink,
211211
editExternalLink,
212212
findEditedExternalLink
213-
};
213+
};

tests/RPM/utils/prefixFunctions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ async function deletePrefix(page) {
8282
await page.waitForSelector('.modal');
8383

8484
// Check the modal title and body text
85-
await expect(page.locator('.modal-header')).toHaveText('Delete Prefix Category');
86-
await expect(page.locator('.modal-body')).toContainText(`Are you sure you wish to delete Prefix Category ?`);
85+
await expect(page.locator('.modal-header')).toContainText('Delete Prefix Category');
86+
await expect(page.locator('.modal-body')).toContainText(`Are you sure you wish to delete Prefix Category`);
8787

8888
// Click the confirm button in the modal footer
8989
await page.locator('.modal-footer button.variant-filled').click();

0 commit comments

Comments
 (0)