Skip to content

Commit 80e027c

Browse files
committed
Fix missing value fields not found
1 parent 1e6d6ee commit 80e027c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/RPM/utils/variableFunctions.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ async function checkVariables(page, variableName, hasDescription, hasUnit, hasDa
3737
}
3838
if (hasMissingValueName) {
3939
await page.waitForTimeout(250);
40-
await page.locator('input[id=missing-value-name]').fill('Test Missing Value');
40+
await page.locator('input[id=missing-value-name-0]').fill('Test Missing Value');
4141
}
4242
if (hasMissingValueDes) {
43-
await page.locator('input[id=missing-value-description]').fill('Test Missing value Des.');
43+
await page.locator('input[id=missing-value-description-0]').fill('Test Missing value Des.');
4444
}
4545
if (hasMeanings) {
4646
// Select Meanings
@@ -173,11 +173,11 @@ async function createVariable(page, variableName) {
173173
await page.locator('#create').click();
174174
await page.waitForTimeout(350);
175175

176-
// Adding name
176+
// Adding name
177177
await page.waitForTimeout(250);
178178
await page.locator('input[id=name]').fill(variableName);
179179

180-
// Adding description
180+
// Adding description
181181
await page.waitForTimeout(250);
182182
await page.locator('textarea[id=description]').fill('Test Variable');
183183

@@ -258,7 +258,7 @@ async function findVariable(page, variable) {
258258
async function editVariable(page) {
259259

260260
await page.locator('[id^=edit-]').click(); // Click on the edit button
261-
// Edit description
261+
// Edit description
262262
await page.waitForTimeout(1000);
263263
await page.locator('textarea[id=description]').fill('Test Edit Variable');
264264

@@ -335,7 +335,7 @@ async function checkConstraint(page) {
335335
await page.waitForTimeout(4250);
336336
await page.locator('#create').click();
337337
await page.waitForTimeout(300);
338-
338+
339339
try {
340340
// Click on the dropdown
341341
await page.locator('#constraints').click();
@@ -345,10 +345,10 @@ async function checkConstraint(page) {
345345
try {
346346
// Check if the "TestConstraint" exists
347347
await page.waitForSelector('.list-item .item:text("Test Constraint")', { visible: true, timeout: 500 });
348-
348+
349349

350350
} catch (error) {
351-
351+
352352
// Perform actions if the element is not found
353353
// Click on the SVG element
354354
await page.waitForSelector('div.hidden:nth-child(4)', { visible: true });
@@ -406,4 +406,3 @@ module.exports = {
406406
checkConstraint
407407

408408
};
409-

0 commit comments

Comments
 (0)