From e3008ec3471bc0ce2a52c669d336df69324abe9d Mon Sep 17 00:00:00 2001 From: jhuerta Date: Wed, 12 Feb 2025 15:37:23 -0800 Subject: [PATCH] Added reset alert validation check --- tests/ExACT_alignConceptsPage.js | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/ExACT_alignConceptsPage.js b/tests/ExACT_alignConceptsPage.js index 119e4a9..39f8861 100644 --- a/tests/ExACT_alignConceptsPage.js +++ b/tests/ExACT_alignConceptsPage.js @@ -2496,6 +2496,18 @@ const steps = [ } }, + //Items Related path label font size + { + description: 'Validate Items Related path label font size', + action: async () => { + const elementText = await driver.findElement(By.css('div > b')).getCssValue('font-size'); + if (elementText !== '14.3px') { + throw new Error(`Expected: Items Related path label font size to be "14.3px"; Actual: "${elementText}"`); + } + console.log('Passed: Items Related path label font size matched as expected'); + } + }, + //Sort label { description: 'Validate Sort label', @@ -2820,6 +2832,42 @@ const steps = [ } }, + //NEXT ACTION -Click Direct Variation reset link + { + description: 'Validate reset assert message', + action: async () => { + await driver.sleep(2000); + + const resetLink = await driver.wait( + until.elementLocated(By.css('#alignstatuslink874414465 > div > a > b')), + 5000 + ); + await resetLink.click(); + await driver.sleep(2000); + + const alert = await driver.wait( + until.alertIsPresent(), + 5000 + ); + + const alertText = await alert.getText(); + + try { + if (alertText !== 'Are you sure you want to reset the alignment?') { + throw new Error('Expected: "Are you sure you want to reset the alignment?"'); + } + console.log('Passed: Reset Alert DIV text matched as expected'); + } catch (error) { + console.error('FAILED: Reset Alert DIV, unable to validate text; Error Message: ', error.message); + await alert.dismiss(); + throw error; + } + + await alert.dismiss(); + await driver.sleep(2000); + } + }, + ]; const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => {