From 558181d1af3b74761cb8e1808a71409441930606 Mon Sep 17 00:00:00 2001 From: jhuerta Date: Fri, 13 Jun 2025 14:01:50 -0700 Subject: [PATCH] Initial script check in --- frameworkPublishingPageResults.xlsx | Bin 0 -> 102949 bytes tests/ExACT_frameworkPublishingPage.js | 3248 ++++++++++++++++++++++++ 2 files changed, 3248 insertions(+) create mode 100644 frameworkPublishingPageResults.xlsx create mode 100644 tests/ExACT_frameworkPublishingPage.js diff --git a/frameworkPublishingPageResults.xlsx b/frameworkPublishingPageResults.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..03e73b91da6aad8bc38e712fa8090bb2c30822e1 GIT binary patch literal 102949 zcmeI5U5q44c97@V3qp%l#ge*^}Z2g?!?51jbR zjPnzjk$p!Xz}KFgoUDkG5nrB&I42@9&hsyS?`MASp8M}t-}{B{{MPr}yQlvA2;6+T zKAac%x;%WdEnc5(x3BweuhxBa=i%q!s&|tYIxR z_V)aIwaA}r7uQ$$W-mNK*T1~X^F0X7ii>>z=s+RSx5`8PSEAS)9Lj}B-(_L;04c8v zqW^iQ|F^LWgLhema(}yqH(Jp!|87Dse5a3B@8ZLJpDnX}R+r++-f`tPM9Oyj94Y(J z_kHX2@BHY!d+N^*7-gp@@2=(911-zw_k%1(3ztRq23pV6+9=>vw%Q!@HrW-Z@K>~g z_Fn22fBeu2f4T-e*z8MnW3et?sK%3{9MCkf2g}!q`m4MxPuE57CR>B4ztePfy1vy-sA(k6HR>li7HP)9XZ+>(%BpORZk$vu9R% zmE?T8{-T(C3dyHOHhG;2w4u^2^@#KBW*^eEtL&3)@eC5EgsP9;^!CsRpJxlu;?wNv ztXO600oj8*^L{b67A3o-p4BTC#cBsV?w58Mw1`^XAN}^f{G;Fgjou&q_OE~Uo4@(p zZ~mL_{`}8>_nZIP$U+&vm~AfnjDPrR|KPv=$~SudAAb8E$?2hMs~_}x|LT{1 z_uu_PIU%&5I^pmC<6r-S-~9F8|0jR%KmUtw3&|fB*_ogG*(JypL_ghMqJ$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?&+#u_v~;R@`e^^a*Wauv?5b_CJtO4%0bzMNwRrNvN9 z4s~D7aj`lVbEx}rj{Hi_@%Fy@Mb7gkm`D90=lNtO*X5I49;%G~NveNCo_zoS+z*vZ z|0F%8AO~vF)Fg`CD7)KV}=^S7553SS|CO8rzJKen>4J zT(g#^kyeA|2yDYujWpuu)^aHt1$up-_A z*Px!s`_=b;;XA(tchsLB0XqW!2W2#FtM7zp7naI7`o3?y{+%DacTfFM_DKETe*?)N zhbl1@@YO&5%(uV(8L%wj&*$pgaP>cXT0pIoG;9A)`oH)?uim?-{`@e?`g4C#XRR7q z={003h0bZ#g8swLzDH*`X=XaNQfL0Tzo|3(0BL4AQ&4CA@85XOpEsZxskc{W%zyqp z=KImy)RwPv|NFn?<#v`m%}y=QI{Qa|`#s4Xeg5S?^Ji6}&%*!xEGWgd|2{Yo_x=~p CYaEaO literal 0 HcmV?d00001 diff --git a/tests/ExACT_frameworkPublishingPage.js b/tests/ExACT_frameworkPublishingPage.js new file mode 100644 index 0000000..41bdcda --- /dev/null +++ b/tests/ExACT_frameworkPublishingPage.js @@ -0,0 +1,3248 @@ +import { Builder, By, Key, until } from 'selenium-webdriver'; +import fs from 'fs'; +import XLSX from 'xlsx'; +import path from 'path'; + +const ExACT_frameworkPublishingPage = (req, res) => { + res.send('

ExACT Automated Test Script: Framework Publishing Page(ExACT_frameworkPublishingPage); Initiated

'); + (async function example() { + let driver = await new Builder().forBrowser('chrome').build(); + let testStatus = 'Failed'; + let workbook; + let worksheet; + const startTime = new Date().toISOString(); + +const steps = [ + { description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://stage.edgate.com/exact/login.php') }, //PROD - https://correlation.edgate.com/exact/login.php + { description: 'Expand browser', action: async () => await driver.manage().window().maximize() }, + + //LOGIN + { description: 'Enter username', action: async () => await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan') }, + { description: 'Enter password', action: async () => await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!') }, + { description: 'Click Login button', action: async () => await driver.findElement(By.css('.login')).click() }, + { description: 'Wait for login process to complete', action: async () => await driver.sleep(10000) }, + + //Wait for dashboard to load - Correlation Coverages View Details button + { + description: 'Wait for dashboard load to completely', + action: async () => { + return await driver.wait(until.elementLocated(By.linkText('View Details')), 10000).catch(() => false); + } + }, + + //Dashboard title + { + description: 'Validate dashboard title', + action: async () => { + const elementText = await driver.findElement(By.css('.e-heading')).getText(); + if (elementText !== 'Correlation Dashboard') { + throw new Error(`Expected: "Correlation Dashboard"; Actual: "${elementText}"`); + } + console.log('Passed: Dashboard title matched as expected'); + } + }, + + //Align icon color -gray + { + description: 'Validate Align icon color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.fb-align')).getCssValue('color'); + if (elementStyle !== 'rgba(99, 99, 99, 1)') { + throw new Error(`Align icon color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Align icon color matched as expected'); + } + }, + + //NEXT ACTION - Navigate to Framework Management page + { description: 'Click Frameworks navigation link', action: async () => await driver.findElement(By.linkText('Frameworks')).click() }, + + //Wait for page to load - Correlation Coverages View Details button + { + description: 'Wait for page to load', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('h2')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Framework Management page did not load'); + } + console.log('Passed: Framework Management page loaded'); + } + }, + + //Framework Management page title + { + description: 'Validate Framework Management page title', + action: async () => { + const elementText = await driver.findElement(By.css('h2')).getText(); + if (elementText !== 'Framework Management') { + throw new Error(`Expected: "Framework Management" page title; Actual: "${elementText}"`); + } + console.log('Passed: Framework Management page title matched as expected'); + } + }, + + //Framework Management page title text color -dark blue + { + description: 'Validate Framework Management page title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color'); + if (elementStyle !== 'rgba(40, 39, 90, 1)') { + throw new Error(`Framework Management page title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Framework Management page title text color matched as expected'); + } + }, + + //Framework Management page title text font + { + description: 'Validate Framework Management page title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size'); + if (elementStyle !== '32px') { + throw new Error(`Framework Management page title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Framework Management page title text font-size matched as expected'); + } + }, + + //Publishing button icon + { + description: 'Verify Publishing buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.btn > .fa-cloud-upload')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Publishing button icon not found'); + } + console.log('Passed: Publishing button icon present'); + } + }, + + //Publishing button text + { + description: 'Validate Publishing button text', + action: async () => { + const elementText = await driver.findElement(By.linkText('Publishing')).getText(); + if (elementText !== 'Publishing') { + throw new Error(`Expected: "Publishing" button text; Actual: "${elementText}"`); + } + console.log('Passed: Publishing button text matched as expected'); + } + }, + + //Publishing button color -green + { + description: 'Validate Publishing button color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Publishing')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Publishing button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Publishing button color matched as expected'); + } + }, + + //Import Framework button icon + { + description: 'Verify Import Framework buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-upload')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Import Framework button icon not found'); + } + console.log('Passed: Import Framework button icon present'); + } + }, + + //Import Framework button text + { + description: 'Validate Import Framework button text', + action: async () => { + const elementText = await driver.findElement(By.linkText('Import Framework')).getText(); + if (elementText !== 'Import Framework') { + throw new Error(`Expected: "Import Framework" button text; Actual: "${elementText}"`); + } + console.log('Passed: Import Framework button text matched as expected'); + } + }, + + //Import Framework button color -green + { + description: 'Validate Import Framework button color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Import Framework')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Import Framework button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Import Framework button color matched as expected'); + } + }, + + //Create button icon + { + description: 'Verify Create buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-plus-circle')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Create button icon not found'); + } + console.log('Passed: Create button icon present'); + } + }, + + //Create button text + { + description: 'Validate Create button text', + action: async () => { + const elementText = await driver.findElement(By.linkText('Create')).getText(); + if (elementText !== 'Create') { + throw new Error(`Expected: "Create" button text; Actual: "${elementText}"`); + } + console.log('Passed: Create button text matched as expected'); + } + }, + + //Create button color -green + { + description: 'Validate Create button color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Create')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Create button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Create button color matched as expected'); + } + }, + + //NEXT ACTION - Click Publishing button + { description: 'Click Publishing button', action: async () => await driver.findElement(By.linkText('Publishing')).click() }, + + //Publishing Page + { + description: 'Wait for Publishing page to load', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('h2')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Publishing page did not load'); + } + console.log('Passed: Publishing page loaded'); + } + }, + + //Framework Publishing page title + { + description: 'Validate Framework Publishing page title', + action: async () => { + const elementText = await driver.findElement(By.css('h2')).getText(); + if (elementText !== 'Framework Publishing') { + throw new Error(`Expected: "Framework Publishing" page title text; Actual: "${elementText}"`); + } + console.log('Passed: Framework Publishing page title text matched as expected'); + } + }, + + //Framework Publishing page title text color -dark blue + { + description: 'Validate Framework Publishing page title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('h2')).getCssValue('color'); + if (elementStyle !== 'rgba(40, 39, 90, 1)') { + throw new Error(`Framework Publishing page title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Framework Publishing page title text color matched as expected'); + } + }, + + //Framework Publishing page title text font + { + description: 'Validate Framework Publishing page title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size'); + if (elementStyle !== '32px') { + throw new Error(`Framework Publishing page title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Framework Publishing page title text font-size matched as expected'); + } + }, + + //Publish Framework button icon + { + description: 'Verify Publish Framework buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-cloud-upload')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Publish Framework button icon not found'); + } + console.log('Passed: Publish Framework button icon present'); + } + }, + + //Publish Framework button text + { + description: 'Validate Publish Framework button text', + action: async () => { + const elementText = await driver.findElement(By.linkText('Publish Framework')).getText(); + if (elementText !== 'Publish Framework') { + throw new Error(`Expected: "Publish Framework" button text; Actual: "${elementText}"`); + } + console.log('Passed: Publish Framework button text matched as expected'); + } + }, + + //Publish Framework button color -green + { + description: 'Validate Publish Framework button color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Publish Framework')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Publish Framework button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Publish Framework button color matched as expected'); + } + }, + + //Groups button icon + { + description: 'Verify Groups buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-th-list')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Groups button icon not found'); + } + console.log('Passed: Groups button icon present'); + } + }, + + //Groups button text + { + description: 'Validate Groups button text', + action: async () => { + const elementText = await driver.findElement(By.linkText('Groups')).getText(); + if (elementText !== 'Groups') { + throw new Error(`Expected: "Groups" button text; Actual: "${elementText}"`); + } + console.log('Passed: Groups button text matched as expected'); + } + }, + + //Groups button color -navy blue + { + description: 'Validate Groups button color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Groups')).getCssValue('background-color'); + if (elementStyle !== 'rgba(40, 39, 90, 1)') { + throw new Error(`Groups button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Groups button color matched as expected'); + } + }, + + //Settings button icon + { + description: 'Verify Settings buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-cog')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Settings button icon not found'); + } + console.log('Passed: Settings button icon present'); + } + }, + + //Settings button text + { + description: 'Validate Settings button text', + action: async () => { + const elementText = await driver.findElement(By.linkText('Settings')).getText(); + if (elementText !== 'Settings') { + throw new Error(`Expected: "Settings" button text; Actual: "${elementText}"`); + } + console.log('Passed: Settings button text matched as expected'); + } + }, + + //Settings button color -green + { + description: 'Validate Settings button color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Settings')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Settings button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Settings button color matched as expected'); + } + }, + + //Publishing History sub title + { + description: 'Validate Publishing History sub title', + action: async () => { + const elementText = await driver.findElement(By.css('h4')).getText(); + if (elementText !== 'Publishing History http://qaclient.esp.edgate.com') { + throw new Error(`Expected: "Publishing History" sub title text; Actual: "${elementText}"`); + } + console.log('Passed: Publishing History sub title text matched as expected'); + } + }, + + //Publishing History sub title text color -navy blue + { + description: 'Validate Publishing History sub title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('h4')).getCssValue('color'); + if (elementStyle !== 'rgba(40, 39, 90, 1)') { + throw new Error(`Publishing History sub title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Publishing History sub title text color matched as expected'); + } + }, + + //Publishing History Sub title text font + { + description: 'Validate Publishing History sub title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('h4')).getCssValue('font-size'); + if (elementStyle !== '24px') { + throw new Error(`Publishing History sub title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Publishing History sub title text font-size matched as expected'); + } + }, + + //Publishing History button text + { + description: 'Validate Publish History button text', + action: async () => { + const elementText = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > h4 > a')).getText(); + if (elementText !== 'http://qaclient.esp.edgate.com') { + throw new Error(`Expected: "http://qaclient.esp.edgate.com" button text; Actual: "${elementText}"`); + } + console.log('Passed: http://qaclient.esp.edgate.com button text matched as expected'); + } + }, + + //Publishing History button color -green + { + description: 'Validate Publishing History button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.btn-sm')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Publishing History button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Publishing History button color matched as expected'); + } + }, + + //Publishing History button icon + { + description: 'Verify Publishing History buttion icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.btn-sm > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Publishing History button icon not found'); + } + console.log('Passed: Publishing History button icon present'); + } + }, + + //Framework column title + { + description: 'Validate Framework column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(1)')).getText(); + if (elementText !== 'Framework') { + throw new Error(`Expected: "Framework" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Framework column title text matched as expected'); + } + }, + + //Framework column title text color -dark blue + { + description: 'Validate Framework column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(1)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Framework column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Framework column title text color matched as expected'); + } + }, + + //Framework column title text font + { + description: 'Validate Framework column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(1)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Framework column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Framework column title text font-size matched as expected'); + } + }, + + //Version column title + { + description: 'Validate Version column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(2)')).getText(); + if (elementText !== 'Version') { + throw new Error(`Expected: "Version" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Version column title text matched as expected'); + } + }, + + //Version column title text color -dark blue + { + description: 'Validate Version column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(2)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Version column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Version column title text color matched as expected'); + } + }, + + //Version column title text font + { + description: 'Validate Version column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(2)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Version column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Version column title text font-size matched as expected'); + } + }, + + //Revision column title + { + description: 'Validate Revision column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(3)')).getText(); + if (elementText !== 'Revision') { + throw new Error(`Expected: "Revision" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Revision column title text matched as expected'); + } + }, + + //Revision column title text color -dark blue + { + description: 'Validate Revision column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(3)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Revision column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Revision column title text color matched as expected'); + } + }, + + //Revision column title text font + { + description: 'Validate Revision column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(3)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Revision column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Revision column title text font-size matched as expected'); + } + }, + + //Status column title + { + description: 'Validate Status column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(4)')).getText(); + if (elementText !== 'Status') { + throw new Error(`Expected: "Status" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Status column title text matched as expected'); + } + }, + + //Status column title text color -dark blue + { + description: 'Validate Status column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(4)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Status column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Status column title text color matched as expected'); + } + }, + + //Status column title text font + { + description: 'Validate Status column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(4)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Status column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Status column title text font-size matched as expected'); + } + }, + + //Visibility column title + { + description: 'Validate Visibility column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(5)')).getText(); + if (elementText !== 'Visibility') { + throw new Error(`Expected: "Visibility" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Visibility column title text matched as expected'); + } + }, + + //Visibility column title text color -dark blue + { + description: 'Validate Visibility column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(5)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Visibility column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Visibility column title text color matched as expected'); + } + }, + + //Visibility column title text font + { + description: 'Validate Visibility column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(5)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Visibility column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Visibility column title text font-size matched as expected'); + } + }, + + //Group column title + { + description: 'Validate Group column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(6)')).getText(); + if (elementText !== 'Group') { + throw new Error(`Expected: "Group" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Group column title text matched as expected'); + } + }, + + //Group column title text color -dark blue + { + description: 'Validate Group column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(6)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Group column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Group column title text color matched as expected'); + } + }, + + //Group column title text font + { + description: 'Validate Group column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(6)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Group column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Group column title text font-size matched as expected'); + } + }, + + //Published At column title + { + description: 'Validate Published At column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(7)')).getText(); + if (elementText !== 'Published At') { + throw new Error(`Expected: "Published At" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Published At column title text matched as expected'); + } + }, + + //Published At column title text color -dark blue + { + description: 'Validate Published At column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(7)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Published At column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Published At column title text color matched as expected'); + } + }, + + //Published At column title text font + { + description: 'Validate Published At column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(7)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Published At column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Published At column title text font-size matched as expected'); + } + }, + + //By column title + { + description: 'Validate By column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(8)')).getText(); + if (elementText !== 'By') { + throw new Error(`Expected: "By" column title text; Actual: "${elementText}"`); + } + console.log('Passed: By column title text matched as expected'); + } + }, + + //By column title text color -dark blue + { + description: 'Validate By column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(8)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`By column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: By column title text color matched as expected'); + } + }, + + //By column title text font + { + description: 'Validate By column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(8)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`By column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: By column title text font-size matched as expected'); + } + }, + + //Comments column title + { + description: 'Validate Comments column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(9)')).getText(); + if (elementText !== 'Comments') { + throw new Error(`Expected: "Comments" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Comments column title text matched as expected'); + } + }, + + //Comments column title text color -dark blue + { + description: 'Validate Comments column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(9)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Comments column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Comments column title text color matched as expected'); + } + }, + + //Comments column title text font + { + description: 'Validate Comments column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(9)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Comments column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Comments column title text font-size matched as expected'); + } + }, + + //Action column title + { + description: 'Validate Action column title', + action: async () => { + const elementText = await driver.findElement(By.css('th:nth-child(10)')).getText(); + if (elementText !== 'Action') { + throw new Error(`Expected: "Action" column title text; Actual: "${elementText}"`); + } + console.log('Passed: Action column title text matched as expected'); + } + }, + + //Action column title text color -dark blue + { + description: 'Validate Action column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(10)')).getCssValue('color'); + if (elementStyle !== 'rgba(33, 37, 41, 1)') { + throw new Error(`Action column title text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Action column title text color matched as expected'); + } + }, + + //Action column title text font + { + description: 'Validate Action column title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('th:nth-child(10)')).getCssValue('font-size'); + if (elementStyle !== '14.3px') { + throw new Error(`Action column title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Action column title text font-size matched as expected'); + } + }, + + //Published Framework 1 display title [ORIGINAL] + { + description: 'Validate Published Framework 1 display title', + action: async () => { + try { + const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(1)')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Try XPath approach + let xpathText; + try { + xpathText = await driver.findElement( + By.xpath('//*[contains(@class, "card")][6]//*[contains(@class, "lo-descr")]/text()[normalize-space()]') + ).getText(); + } catch (e) { + xpathText = "XPath method failed: " + e.message; + } + + //Check for the expected text in different ways + const expectedText = 'Painting Done Today'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Framework title row 1 "${expectedText}" text in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Framework title row 1 "${expectedText}" text within full text`); + } else if (xpathText.includes(expectedText)) { + console.log('Passed: Found expected text via XPath method'); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + + `XPath result: "${xpathText}"` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Published Framework 1 Notes icon + { + description: 'Verify Published Framework 1 notes icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-sticky-note-o')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework 1 Notes icon not found'); + } + console.log('Passed: Published Framework 1 Notes icon present'); + } + }, + + //Published Framework 1 title + { + description: 'Validate Published Framework 1 title', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) em')).getText(); + if (elementText !== 'Juan Testing Again & Again') { + throw new Error(`Expected: "Juan Testing Again & Again" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Juan Testing Again & Again row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Version + { + description: 'Validate Published Framework 1 version', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(2)')).getText(); + if (elementText !== '1.1') { + throw new Error(`Expected: Version "1.1" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Version 1.1 row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Revision + { + description: 'Validate Published Framework 1 revision', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(3)')).getText(); + if (elementText !== '5') { + throw new Error(`Expected: Revision "5" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Revision 5 row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Status button text + { + description: 'Validate Published Framework 1 status button text', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td > .badge')).getText(); + if (elementText !== 'Implemented') { + throw new Error(`Expected: "Implemented" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Implemented row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Status button color -green + { + description: 'Validate Action column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('tr:nth-child(2) > td > .badge')).getCssValue('background-color'); + if (elementStyle !== 'rgba(40, 167, 69, 1)') { + throw new Error(`Published Framework row 1 Status button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Published Framework row 1 Status button color matched as expected'); + } + }, + + //Published Framework 1 Visibility + { + description: 'Validate Published Framework 1 visibility', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(5)')).getText(); + if (elementText !== 'Public') { + throw new Error(`Expected: "Public" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Public row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Group + { + description: 'Validate Published Framework 1 group', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(6)')).getText(); + if (elementText !== 'Initial Framework Group for Testing') { + throw new Error(`Expected: "Initial Framework Group for Testing" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Initial Framework Group for Testing row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Published At + { + description: 'Validate Published Framework 1 published at', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(7) > small')).getText(); + if (elementText !== 'Apr 15, 2025 10:29pm PDT') { + throw new Error(`Expected: "Apr 15, 2025 10:29pm PDT" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Apr 15, 2025 10:29pm PDT row 1 title text matched as expected'); + } + }, + + //Published Framework 1 By + { + description: 'Validate Published Framework 1 by', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(8)')).getText(); + if (elementText !== 'exact_juan') { + throw new Error(`Expected: "exact_juan" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: exact_juan row 1 title text matched as expected'); + } + }, + + //Published Framework 1 Comments icon + { + description: 'Verify Published Framework 1 comments icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('tr:nth-child(2) .fa-check-circle')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework row 1 comments icon not found'); + } + console.log('Passed: Published Framework row 1 comments icon present'); + } + }, + + //Published Framework 1 Comments Count icon + { + description: 'Validate Published Framework 1 comments count icon', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(2) a > .badge')).getText(); + if (elementText !== '3') { + throw new Error(`Expected: Comments count "3" row 1 title text; Actual: "${elementText}"`); + } + console.log('Passed: Comments count 3 row 1 title text matched as expected'); + } + }, + + //Published Framework 1 ellipsis icon + { + description: 'Verify Published Framework 1 ellipsis icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#dropdownMenu17 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework row 1 ellipsis icon not found'); + } + console.log('Passed: Published Framework row 1 ellipsis icon present'); + } + }, + + //Published Framework 2 display title + { + description: 'Validate Published Framework 2 display title', + action: async () => { + try { + const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(1)')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'KathleenTest DontBringBack Comments'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Framework title row 2 "${expectedText}" text found in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Framework title row 2 "${expectedText}" text found within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Published Framework 2 title + { + description: 'Validate Published Framework 2 title', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) em')).getText(); + if (elementText !== 'Kathleen Test') { + throw new Error(`Expected: "Kathleen Test" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Kathleen Test row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Version + { + description: 'Validate Published Framework 2 version', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(2)')).getText(); + if (elementText !== '10.1') { + throw new Error(`Expected: Version "10.1" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Version 10.1 row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Revision + { + description: 'Validate Published Framework 2 revision', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(3)')).getText(); + if (elementText !== '2') { + throw new Error(`Expected: Revision "2" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Revision 2 row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Status button text + { + description: 'Validate Published Framework 2 status button text', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td > .badge')).getText(); + if (elementText !== 'Adopted') { + throw new Error(`Expected: "Adopted" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Adopted row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Status button color -teal + { + description: 'Validate Action column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('tr:nth-child(3) > td > .badge')).getCssValue('background-color'); + if (elementStyle !== 'rgba(23, 162, 184, 1)') { + throw new Error(`Published Framework row 2 Status button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Published Framework row 2 Status button color matched as expected'); + } + }, + + //Published Framework 2 Visibility + { + description: 'Validate Published Framework 2 visibility', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(5)')).getText(); + if (elementText !== 'Hidden') { + throw new Error(`Expected: "Hidden" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Hidden row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Group + { + description: 'Validate Published Framework 2 group', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(6)')).getText(); + if (elementText !== 'Another Group To Use') { + throw new Error(`Expected: "Another Group To Use" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Another Group To Use row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Published At + { + description: 'Validate Published Framework 2 published at', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(7) > small')).getText(); + if (elementText !== 'Mar 01, 2025 09:56pm PST') { + throw new Error(`Expected: "Apr 15, 2025 10:29pm PDT" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Apr 15, 2025 10:29pm PDT row 2 title text matched as expected'); + } + }, + + //Published Framework 2 By + { + description: 'Validate Published Framework 2 by', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(8)')).getText(); + if (elementText !== 'exact_juan') { + throw new Error(`Expected: "exact_juan" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: exact_juan row 2 title text matched as expected'); + } + }, + + //Published Framework 2 Comments icon + { + description: 'Verify Published Framework 2 comments icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('tr:nth-child(3) > td > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework row 2 comments icon not found'); + } + console.log('Passed: Published Framework row 2 comments icon present'); + } + }, + + //Published Framework 2 Comments Count icon + { + description: 'Validate Published Framework 2 comments count icon', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(3) a > .badge')).getText(); + if (elementText !== '4') { + throw new Error(`Expected: Comments count "4" row 2 title text; Actual: "${elementText}"`); + } + console.log('Passed: Comments count 4 row 2 title text matched as expected'); + } + }, + + //Published Framework 2 ellipsis icon + { + description: 'Verify Published Framework 2 ellipsis icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#dropdownMenu14 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework row 2 ellipsis icon not found'); + } + console.log('Passed: Published Framework row 2 ellipsis icon present'); + } + }, + + //Published Framework 3 display title + { + description: 'Validate Published Framework 3 display title', + action: async () => { + try { + const element = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(1)')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'JuanTestingAgain III'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Framework title row 3 "${expectedText}" text found in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Framework title row 3 "${expectedText}" text found within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Published Framework 3 title + { + description: 'Validate Published Framework 3 title', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) em')).getText(); + if (elementText !== 'Juan Testing Again & Again') { + throw new Error(`Expected: "Juan Testing Again & Again" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Juan Testing Again & Again row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Version + { + description: 'Validate Published Framework 3 version', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(2)')).getText(); + if (elementText !== '1') { + throw new Error(`Expected: Version "1" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Version 1 row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Revision + { + description: 'Validate Published Framework 3 revision', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(3)')).getText(); + if (elementText !== '4') { + throw new Error(`Expected: Revision "4" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Revision 4 row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Status button text + { + description: 'Validate Published Framework 3 status button text', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td > .badge')).getText(); + if (elementText !== 'Implemented') { + throw new Error(`Expected: "Implemented" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Implemented row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Status button color -teal + { + description: 'Validate Action column title text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('tr:nth-child(4) > td > .badge')).getCssValue('background-color'); + if (elementStyle !== 'rgba(40, 167, 69, 1)') { + throw new Error(`Published Framework row 3 Status button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Published Framework row 3 Status button color matched as expected'); + } + }, + + //Published Framework 3 Visibility + { + description: 'Validate Published Framework 3 visibility', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(5)')).getText(); + if (elementText !== 'Public') { + throw new Error(`Expected: "Public" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Public row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Group + { + description: 'Validate Published Framework 3 group', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(6)')).getText(); + if (elementText !== 'Initial Framework Group for Testing') { + throw new Error(`Expected: "Initial Framework Group for Testing" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Initial Framework Group for Testing row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Published At + { + description: 'Validate Published Framework 3 published at', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(7) > small')).getText(); + if (elementText !== 'Feb 28, 2025 06:19pm PST') { + throw new Error(`Expected: "Feb 28, 2025 06:19pm PST" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Feb 28, 2025 06:19pm PST row 3 title text matched as expected'); + } + }, + + //Published Framework 3 By + { + description: 'Validate Published Framework 3 by', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) > td:nth-child(8)')).getText(); + if (elementText !== 'exact_juan') { + throw new Error(`Expected: "exact_juan" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: exact_juan row 3 title text matched as expected'); + } + }, + + //Published Framework 3 Comments icon + { + description: 'Verify Published Framework 3 comments icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('tr:nth-child(4) > td > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework row 3 comments icon not found'); + } + console.log('Passed: Published Framework row 3 comments icon present'); + } + }, + + //Published Framework 3 Comments Count icon + { + description: 'Validate Published Framework 3 comments count icon', + action: async () => { + const elementText = await driver.findElement(By.css('tr:nth-child(4) .badge-primary')).getText(); + if (elementText !== '0') { + throw new Error(`Expected: Comments count "0" row 3 title text; Actual: "${elementText}"`); + } + console.log('Passed: Comments count 0 row 3 title text matched as expected'); + } + }, + + //Published Framework 3 ellipsis icon + { + description: 'Verify Published Framework 3 ellipsis icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#dropdownMenu13 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Published Framework row 3 ellipsis icon not found'); + } + console.log('Passed: Published Framework row 3 ellipsis icon present'); + } + }, + + //NEXT ACTION - Click Comments icon for Framework row 2 + { description: 'Click Framework row 2 Comments icon', action: async () => await driver.findElement(By.css('tr:nth-child(3) a > .badge')).click() }, + + //Wait for DIV to load - Framework Comments + { + description: 'Wait for DIV to load', + action: async () => { + return await driver.wait(until.elementLocated(By.css('.modal-title')), 10000).catch(() => false); + } + }, + + //Framework Comments DIV title + { + description: 'Validate Framework Comments DIV title', + action: async () => { + const elementText = await driver.findElement(By.css('.modal-title')).getText(); + if (elementText !== 'Framework Comments') { + throw new Error(`Expected: Framework Comments DIV title text; Actual: "${elementText}"`); + } + console.log('Passed: Framework Comments DIV title text matched as expected'); + } + }, + + //DIV X icon color -red + { + description: 'Validate DIV X icon color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.close > span')).getCssValue('color'); + if (elementStyle !== 'rgba(246, 60, 40, 1)') { + throw new Error(`DIV X icon color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: DIV X icon color matched as expected'); + } + }, + + //Framework Comments DIV Framework title + { + description: 'Validate Framework Comments DIV Framework title', + action: async () => { + const elementText = await driver.findElement(By.css('.form-label')).getText(); + if (elementText !== 'KathleenTest DontBringBack Comments') { + throw new Error(`Expected: Framework Comments DIV Framework title text; Actual: "${elementText}"`); + } + console.log('Passed: Framework Comments DIV Framework title text matched as expected'); + } + }, + + //Framework Comments DIV Filter textbox placeholder + { + description: 'Validate Filter textbox placeholder', + action: async () => { + const elementValue = await driver.findElement(By.css('#itemfilter')).getAttribute('placeholder'); + if (elementValue !== 'filter...') { + throw new Error(`Expected: "filter..." placeholder text; Actual: "${elementValue}"`); + } + console.log('Passed: "filter..." placeholder text, matched as expected'); + } + }, + + //Framework Comments DIV Framework Item column header + { + description: 'Validate Framework Comments DIV Framework Item column header', + action: async () => { + const elementText = await driver.findElement(By.css('thead th:nth-child(1)')).getText(); + if (elementText !== 'Framework Item') { + throw new Error(`Expected: Framework Item column header text; Actual: "${elementText}"`); + } + console.log('Passed: Framework Item column header text matched as expected'); + } + }, + + //Framework Comments DIV Last Comment column header + { + description: 'Validate Framework Comments DIV Last Comment column header', + action: async () => { + const elementText = await driver.findElement(By.css('thead th:nth-child(2)')).getText(); + if (elementText !== 'Last Comment') { + throw new Error(`Expected: Last Comment column header text; Actual: "${elementText}"`); + } + console.log('Passed: Last Comment column header text matched as expected'); + } + }, + + //Framework Comments DIV Comments column header + { + description: 'Validate Framework Comments DIV Comments column header', + action: async () => { + const elementText = await driver.findElement(By.css('thead th:nth-child(3)')).getText(); + if (elementText !== 'Comments') { + throw new Error(`Expected: Comments column header text; Actual: "${elementText}"`); + } + console.log('Passed: Comments column header text matched as expected'); + } + }, + + //Framework Comments DIV Framework Item column data + { + description: 'Validate Framework Comments DIV Framework Item column data', + action: async () => { + const elementText = await driver.findElement(By.css('.itemtext')).getText(); + if (elementText !== '111.39. Algebra I, Adopted 2012 (One Credit).') { + throw new Error(`Expected: Framework Item column data text; Actual: "${elementText}"`); + } + console.log('Passed: Framework Item column data text matched as expected'); + } + }, + + //Framework Comments DIV Last Comment column data + { + description: 'Validate Framework Comments DIV Last Comment column data', + action: async () => { + const elementText = await driver.findElement(By.css('td:nth-child(2) > small')).getText(); + if (elementText !== 'June 05, 2025 10:09pm PDT') { + throw new Error(`Expected: Last Comment column data text; Actual: "${elementText}"`); + } + console.log('Passed: Last Comment column data text matched as expected'); + } + }, + + //Framework Comments DIV Comments column data + { + description: 'Validate Framework Comments DIV Comments column data', + action: async () => { + const elementText = await driver.findElement(By.css('td:nth-child(3) .badge')).getText(); + if (elementText !== '4') { + throw new Error(`Expected: Comments column data text; Actual: "${elementText}"`); + } + console.log('Passed: Comments column data text matched as expected'); + } + }, + + //Framework Comments DIV Close button text + { + description: 'Validate Close button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalclose')).getText(); + if (elementText !== 'Close') { + throw new Error(`Expected: "Close" button text; Actual: "${elementText}"`); + } + console.log('Passed: Close button text matched as expected'); + } + }, + + //Framework Comments DIV Close button color -white + { + description: 'Validate Close button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); + if (elementStyle !== 'rgba(0, 0, 0, 0)') { + throw new Error(`Close button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Close button color matched as expected'); + } + }, + + //NEXT ACTION + { description: 'Click Framework row 2 Comments icon', action: async () => await driver.findElement(By.css('td:nth-child(3) .badge')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + + //Framework Comments DIV add comment textbox placeholder + { + description: 'Validate Add Comment textbox placeholder', + action: async () => { + const elementValue = await driver.findElement(By.css('#comtextcom3826')).getAttribute('placeholder'); + if (elementValue !== 'add comment...') { + throw new Error(`Expected: "add comment..." placeholder text; Actual: "${elementValue}"`); + } + console.log('Passed: "add comment..." placeholder text, matched as expected'); + } + }, + + //Internal checkbox icon + { + description: 'Verify Internal checkbox icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#privatecom3826')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Internal checkbox icon not found'); + } + console.log('Passed: Internal checkbox icon present'); + } + }, + + //Internal label text + { + description: 'Validate Internal label text', + action: async () => { + const elementText = await driver.findElement(By.css('.form-check-label')).getText(); + if (elementText !== 'Internal') { + throw new Error(`Expected: "Internal" label text; Actual: "${elementText}"`); + } + console.log('Passed: Internal label text matched as expected'); + } + }, + + //Comment button text + { + description: 'Validate Comment button text', + action: async () => { + const elementText = await driver.findElement(By.css('.ml-1:nth-child(3)')).getText(); + if (elementText !== 'Comment') { + throw new Error(`Expected: "Comment" button text; Actual: "${elementText}"`); + } + console.log('Passed: Comment button text matched as expected'); + } + }, + + //Comment button color -green + { + description: 'Validate Comment button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.ml-1:nth-child(3)')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Comment button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Comment button color matched as expected'); + } + }, + + //Text thread 1 background color -white + { + description: 'Validate text thread 1 background color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#comcard27')).getCssValue('background-color'); + if (elementStyle !== 'rgba(255, 255, 255, 1)') { + throw new Error(`Text thread 1 background color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Text thread 1 background color matched as expected'); + } + }, + + //Text thread 1 text + { + description: 'Validate Text thread 1 text', + action: async () => { + try { + const element = await driver.findElement(By.css('#comcard27 > .card-body')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'Nothing to see here.'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Text thread comment 1 "${expectedText}" text found in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Text thread comment 1 "${expectedText}" text found within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Text thread 1 timestamp + { + description: 'Validate Text thread 1 timestamp', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard27 small')).getText(); + if (elementText !== 'December 31, 1969 04:33pm PST - JuanJuan') { + throw new Error(`Expected: Text thread 1 timestamp "December 31, 1969 04:33pm PST - JuanJuan" text; Actual: "${elementText}"`); + } + console.log('Passed: Text thread 1 timestamp December 31, 1969 04:33pm PST - JuanJuan text matched as expected'); + } + }, + + //Text thread 1 author + { + description: 'Validate Text thread 1 author', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard27 small > a')).getText(); + if (elementText !== 'JuanJuan') { + throw new Error(`Expected: Text thread 1 author "JuanJuan" text; Actual: "${elementText}"`); + } + console.log('Passed: Text thread 1 author JuanJuan text matched as expected'); + } + }, + + //Reply thread 1 icon + { + description: 'Verify Reply thread icon 1 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comreply27 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread icon 1 not found'); + } + console.log('Passed: Reply thread icon 1 present'); + } + }, + + //Delete thread 1 icon + { + description: 'Verify Delete thread icon 1 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard27 .fa-trash')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Delete thread icon 1 not found'); + } + console.log('Passed: Delete thread icon 1 present'); + } + }, + + //Text thread 2 background color -light blue + { + description: 'Validate text thread 2 background color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#comcard28')).getCssValue('background-color'); + if (elementStyle !== 'rgba(173, 216, 230, 1)') { + throw new Error(`Text thread 2 background color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Text thread 2 background color matched as expected'); + } + }, + + //Text thread 2 text + { + description: 'Validate Text thread 2 text', + action: async () => { + try { + const element = await driver.findElement(By.css('#comcard28 > .card-body')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'New comment to check timestamp 12:04pm'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Text thread comment 2 "${expectedText}" text found in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Text thread comment 2 "${expectedText}" text found within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Text thread 2 timestamp + { + description: 'Validate Text thread 2 timestamp', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard28 small')).getText(); + if (elementText !== 'December 31, 1969 04:33pm PST - exact_juan') { + throw new Error(`Expected: Text thread 2 timestamp "December 31, 1969 04:33pm PST - exact_juan" text; Actual: "${elementText}"`); + } + console.log('Passed: Text thread 2 timestamp December 31, 1969 04:33pm PST - exact_juan text matched as expected'); + } + }, + + //Text thread 2 author + { + description: 'Validate Text thread 2 author', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard28 small > a')).getText(); + if (elementText !== 'exact_juan') { + throw new Error(`Expected: Text thread 2 author "exact_juan" text; Actual: "${elementText}"`); + } + console.log('Passed: Text thread 2 author exact_juan text matched as expected'); + } + }, + + //Text thread 2 internal icon + { + description: 'Verify Reply thread internal icon 2 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard28 small > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread internal icon 2 not found'); + } + console.log('Passed: Reply thread internal icon 2 present'); + } + }, + + //Reply thread 2 icon + { + description: 'Verify Reply thread icon 2 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comreply28 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread icon 2 not found'); + } + console.log('Passed: Reply thread icon 2 present'); + } + }, + + //Delete thread 2 icon + { + description: 'Verify Delete thread icon 2 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard28 .fa-trash')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Delete thread icon 2 not found'); + } + console.log('Passed: Delete thread icon 2 present'); + } + }, + + //Text thread 3 background color -light blue + { + description: 'Validate text thread 3 background color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#comcard37')).getCssValue('background-color'); + if (elementStyle !== 'rgba(173, 216, 230, 1)') { + throw new Error(`Text thread 3 background color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Text thread 3 background color matched as expected'); + } + }, + + //Text thread 3 text + { + description: 'Validate Text thread 3 text', + action: async () => { + try { + const element = await driver.findElement(By.css('#comcard37 > .card-body')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'The time is...9:21am'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Text thread comment 3 "${expectedText}" text found in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Text thread comment 3 "${expectedText}" text found within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Text thread 3 timestamp + { + description: 'Validate Text thread 3 timestamp', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard37 small')).getText(); + if (elementText !== 'December 31, 1969 04:33pm PST - exact_juan') { + throw new Error(`Expected: Text thread 3 timestamp "December 31, 1969 04:33pm PST - exact_juan" text; Actual: "${elementText}"`); + } + console.log('Passed: Text thread 3 timestamp December 31, 1969 04:33pm PST - exact_juan text matched as expected'); + } + }, + + //Text thread 3 author + { + description: 'Validate Text thread 3 author', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard37 small > a')).getText(); + if (elementText !== 'exact_juan') { + throw new Error(`Expected: Text thread 3 author "exact_juan" text; Actual: "${elementText}"`); + } + console.log('Passed: Text thread 3 author exact_juan text matched as expected'); + } + }, + + //Text thread 3 internal icon + { + description: 'Verify Reply thread internal icon 3 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard37 small > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread internal icon 3 not found'); + } + console.log('Passed: Reply thread internal icon 3 present'); + } + }, + + //Reply thread 3 icon + { + description: 'Verify Reply thread icon 3 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comreply37 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread icon 3 not found'); + } + console.log('Passed: Reply thread icon 3 present'); + } + }, + + //Delete thread 3 icon + { + description: 'Verify Delete thread icon 3 is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard37 .fa-trash')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Delete thread icon 3 not found'); + } + console.log('Passed: Delete thread icon 3 present'); + } + }, + + //Reply Text thread 1a deleted text color -white + { + description: 'Validate text thread 1 background color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#comcard27')).getCssValue('background-color'); + if (elementStyle !== 'rgba(255, 255, 255, 1)') { + throw new Error(`Text thread 1 background color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Text thread 1 background color matched as expected'); + } + }, + + //Reply Text thread 1a text + { + description: 'Validate Reply Text thread 1a text', + action: async () => { + try { + const element = await driver.findElement(By.css('#comcard41 > .card-body')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'My automated reply to be deleted.'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: Reply Text thread comment 1a "${expectedText}" text found in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: Reply Text thread comment 1a "${expectedText}" text found within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //Reply Text thread 1a timestamp + { + description: 'Validate Reply Text thread 1a timestamp', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard41 small')).getText(); + if (elementText !== 'December 31, 1969 04:33pm PST - exact_juan (This comment has been removed.)') { + throw new Error(`Expected: Reply Text thread 1a timestamp "December 31, 1969 04:33pm PST - exact_juan (This comment has been removed.)" text; Actual: "${elementText}"`); + } + console.log('Passed: Reply Text thread 1a timestamp December 31, 1969 04:33pm PST - exact_juan (This comment has been removed.) text matched as expected'); + } + }, + + //Reply Text thread 1a author + { + description: 'Validate Reply Text thread 1a author', + action: async () => { + const elementText = await driver.findElement(By.css('#comcard41 small > a')).getText(); + if (elementText !== 'exact_juan') { + throw new Error(`Expected: Reply Text thread 1a author "exact_juan" text; Actual: "${elementText}"`); + } + console.log('Passed: Reply Text thread 1a author exact_juan text matched as expected'); + } + }, + + //Reply Text thread 1a internal icon + { + description: 'Verify Reply thread internal icon 1a is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard41 small > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread internal icon 1a not found'); + } + console.log('Passed: Reply thread internal icon 1a present'); + } + }, + + //Reply Text thread 1a deleted text + { + description: 'Validate Reply Text thread 1a deleted text', + action: async () => { + const elementText = await driver.findElement(By.css('#delspan41')).getText(); + if (elementText !== '(This comment has been removed.)') { + throw new Error(`Expected: Reply Text thread 1a author "(This comment has been removed.)" deleted text; Actual: "${elementText}"`); + } + console.log('Passed: Reply Text thread 1a author (This comment has been removed.) deleted text matched as expected'); + } + }, + + //Reply Text thread 1a deleted text color -red + { + description: 'Validate Reply Text thread 1a deleted text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#delspan41')).getCssValue('color'); + if (elementStyle !== 'rgba(220, 53, 69, 1)') { + throw new Error(`Reply thread 1a deleted text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Reply thread 1a deleted text color matched as expected'); + } + }, + + //Reply, Reply thread 1a icon + { + description: 'Verify Reply, Reply thread icon 1a is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comreply41 > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply, Reply thread icon 1a not found'); + } + console.log('Passed: Reply, Reply thread icon 1a present'); + } + }, + + //Reply Delete thread 1a icon + { + description: 'Verify Reply Delete thread icon 1a is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#comcard41 .fa-trash')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply Delete thread icon 1a not found'); + } + console.log('Passed: Reply Delete thread icon 1a present'); + } + }, + + //NEXT ACTION + { description: 'Click thread comment 1 reply icon', action: async () => await driver.findElement(By.css('#comreply27 > .fa')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + + //Reply text thread 1 placeholder + { + description: 'Validate Reply text thread 1 placeholder', + action: async () => { + const elementValue = await driver.findElement(By.css('#comtext27')).getAttribute('placeholder'); + if (elementValue !== 'add comment...') { + throw new Error(`Expected: "add comment..." Reply text thread 1 placeholder text; Actual: "${elementValue}"`); + } + console.log('Passed: "add comment..." Reply text thread 1 placeholder text, matched as expected'); + } + }, + + //Reply thread 1 Internal checkbox icon + { + description: 'Verify Reply thread 1 Internal checkbox icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#private27')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Reply thread 1 Internal checkbox icon not found'); + } + console.log('Passed: Reply thread 1 Internal checkbox icon present'); + } + }, + + //Reply thread 1 Internal label text + { + description: 'Validate Reply thread 1 Internal label text', + action: async () => { + const elementText = await driver.findElement(By.css('#replyform27 .form-check-label')).getText(); + if (elementText !== 'Internal') { + throw new Error(`Expected: Reply thread 1 "Internal" label text; Actual: "${elementText}"`); + } + console.log('Passed: Reply thread 1 Internal label text matched as expected'); + } + }, + + //Reply thread 1 Reply button text + { + description: 'Validate Reply thread 1 Reply button text', + action: async () => { + const elementText = await driver.findElement(By.css('#replyform27 > .btn-primary')).getText(); + if (elementText !== 'Reply') { + throw new Error(`Expected: Reply thread 1 "Reply" button text; Actual: "${elementText}"`); + } + console.log('Passed: Reply thread 1 Reply button text matched as expected'); + } + }, + + //Reply thread 1 Reply button color -green + { + description: 'Validate Reply thread 1 Reply button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#replyform27 > .btn-primary')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Reply thread 1 Reply button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Reply thread 1 Reply button color matched as expected'); + } + }, + + //Reply thread 1 Cancel button text + { + description: 'Validate Reply thread 1 Cancel button text', + action: async () => { + const elementText = await driver.findElement(By.css('#replyform27 > .btn-secondary')).getText(); + if (elementText !== 'Cancel') { + throw new Error(`Expected: Reply thread 1 "Cancel" button text; Actual: "${elementText}"`); + } + console.log('Passed: Reply thread 1 Cancel button text matched as expected'); + } + }, + + //Reply thread 1 Cancel button color -green + { + description: 'Validate Reply thread 1 Cancel button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#replyform27 > .btn-secondary')).getCssValue('background-color'); + if (elementStyle !== 'rgba(108, 117, 125, 1)') { + throw new Error(`Reply thread 1 Cancel button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Reply thread 1 Cancel button color matched as expected'); + } + }, + + //Next Action - Enter reply and click reply button + { description: 'Enter reply text', action: async () => await driver.findElement(By.css('#comtext27')).sendKeys('My automated reply to be deleted.') }, + { description: 'Browser sleep', action: async () => await driver.sleep(2000) }, + { description: 'Click Cancel button', action: async () => await driver.findElement(By.css('#replyform27 > .btn-secondary')).click() }, + { description: 'Browser sleep', action: async () => await driver.sleep(2000) }, + { description: 'Click Close button', action: async () => await driver.findElement(By.css('#modalclose')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + //NEXT ACTION - Click ellipsis icon + { description: 'Click ellipsis for 2nd framework', action: async () => await driver.findElement(By.css('#dropdownMenu14 > .fa')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + + //Ellipsis menu - View text + { + description: 'Validate ellipsis menu option View text label', + action: async () => { + const elementText = await driver.findElement(By.linkText('View')).getText(); + if (elementText !== 'View') { + throw new Error(`Expected: Ellisis menu option "View" label text; Actual: "${elementText}"`); + } + console.log('Passed: Ellipsis menu option View label text matched as expected'); + } + }, + + //Ellipsis menu - View icon + { + description: 'Verify ellipsis menu option View icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > .dropdown-item > .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Ellipsis view icon not found'); + } + console.log('Passed: Ellipsis view icon present'); + } + }, + + //Ellipsis menu - Edit text + { + description: 'Validate ellipsis menu option Edit text label', + action: async () => { + const elementText = await driver.findElement(By.linkText('Edit')).getText(); + if (elementText !== 'Edit') { + throw new Error(`Expected: Ellisis menu option "Edit" label text; Actual: "${elementText}"`); + } + console.log('Passed: Ellipsis menu option Edit label text matched as expected'); + } + }, + + //Ellipsis menu - Archive text + { + description: 'Validate ellipsis menu option Archive text label', + action: async () => { + const elementText = await driver.findElement(By.linkText('Archive')).getText(); + if (elementText !== 'Archive') { + throw new Error(`Expected: Ellisis menu option "Archive" label text; Actual: "${elementText}"`); + } + console.log('Passed: Ellipsis menu option Archive label text matched as expected'); + } + }, + + //Ellipsis menu - Delete text + { + description: 'Validate ellipsis menu option Delete text label', + action: async () => { + const elementText = await driver.findElement(By.linkText('Delete')).getText(); + if (elementText !== 'Delete') { + throw new Error(`Expected: Ellisis menu option "Delete" label text; Actual: "${elementText}"`); + } + console.log('Passed: Ellipsis menu option Delete label text matched as expected'); + } + }, + + //Ellipsis menu - Delete text color -red + { + description: 'Validate ellipsis Delete text color', + action: async () => { + const elementStyle = await driver.findElement(By.linkText('Delete')).getCssValue('color'); + if (elementStyle !== 'rgba(220, 53, 69, 1)') { + throw new Error(`Delete text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Delete text color matched as expected'); + } + }, + + /*NEXT ACTION - Click View link + { description: 'Click View link', action: async () => await driver.findElement(By.linkText('View')).click() }, + + //Wait for login screen to load + { + description: 'Wait for log out process to complete', + action: async () => { + return await driver.wait(until.elementLocated(By.css('.login')), 10000).catch(() => false); + } + },*/ + + //NEXT ACTION - Click Edit link + { description: 'Click Edit link', action: async () => await driver.findElement(By.linkText('Edit')).click() }, + + //Wait for DIV to open + { + description: 'Wait for DIV to open', + action: async () => { + return await driver.wait(until.elementLocated(By.css('.modal-title')), 10000).catch(() => false); + } + }, + + //DIV title text + { + description: 'Validate title', + action: async () => { + const elementText = await driver.findElement(By.css('.modal-title')).getText(); + if (elementText !== 'Edit Published Framework') { + throw new Error(`Expected: "Edit Published Framework" title text; Actual: "${elementText}"`); + } + console.log('Passed: Edit Published Framework title text matched as expected'); + } + }, + + //DIV X icon color -red + { + description: 'Validate X icon color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.close > span')).getCssValue('color'); + if (elementStyle !== 'rgba(246, 60, 40, 1)') { + throw new Error(`DIV X icon color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: DIV X icon color matched as expected'); + } + }, + + //DIV Framework label + { + description: 'Validate Framework label', + action: async () => { + const elementText = await driver.findElement(By.css('#divtype > .form-label')).getText(); + if (elementText !== 'Framework') { + throw new Error(`Expected: "Framework" label text; Actual: "${elementText}"`); + } + console.log('Passed: Framework title text matched as expected'); + } + }, + + //DIV Framework data + { + description: 'Validate Framework data', + action: async () => { + try { + const element = await driver.findElement(By.css('#divtype')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'Kathleen Test'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: "${expectedText}" text in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: "${expectedText}" text within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //DIV Display Title label + { + description: 'Validate Display Title label', + action: async () => { + const elementText = await driver.findElement(By.css('#divname > .form-label')).getText(); + if (elementText !== 'Display Title') { + throw new Error(`Expected: "Display Title" label text; Actual: "${elementText}"`); + } + console.log('Passed: Display Title label text matched as expected'); + } + }, + + //DIV Display Title - info icon + { + description: 'Verify Display Title info icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#divname .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Display Title info icon not found'); + } + console.log('Passed: Display Title info icon present'); + } + }, + + //DIV Display Title - value + { + description: 'Validate Display Title value', + action: async () => { + const elementValue = await driver.findElement(By.css('#title')).getAttribute('value'); + if (elementValue !== 'KathleenTest DontBringBack Comments') { + throw new Error(`Expected: "KathleenTest DontBringBack Comments" value text; Actual: "${elementValue}"`); + } + console.log('Passed: KathleenTest DontBringBack Comments value text, matched as expected'); + } + }, + + //DIV Version label + { + description: 'Validate Version label', + action: async () => { + const elementText = await driver.findElement(By.css('#divsource > .form-label')).getText(); + if (elementText !== 'Version') { + throw new Error(`Expected: "Version" label text; Actual: "${elementText}"`); + } + console.log('Passed: Version label text matched as expected'); + } + }, + + //DIV Version - info icon + { + description: 'Verify Version info icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#divsource .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Version info icon not found'); + } + console.log('Passed: Version info icon present'); + } + }, + + //DIV Version - value + { + description: 'Validate Version value', + action: async () => { + const elementValue = await driver.findElement(By.css('#version')).getAttribute('value'); + if (elementValue !== '10.1') { + throw new Error(`Expected: "10.1" value text; Actual: "${elementValue}"`); + } + console.log('Passed: 10.1 value text, matched as expected'); + } + }, + + //DIV Display Status label + { + description: 'Validate Display Status label', + action: async () => { + const elementText = await driver.findElement(By.css('#divpublisher > .form-label')).getText(); + if (elementText !== 'Display Status') { + throw new Error(`Expected: "Display Status" label text; Actual: "${elementText}"`); + } + console.log('Passed: Display Status label text matched as expected'); + } + }, + + //DIV Display Status - info icon + { + description: 'Verify Display Status info icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#divpublisher .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Display Status info icon not found'); + } + console.log('Passed: Display Status info icon present'); + } + }, + + //DIV Display Status - value + { + description: 'Validate Display dropdown selection', + action: async () => { + const elementOption = await driver.findElement(By.css('#status')).getAttribute('value'); + if (elementOption !== 'Adopted') { + throw new Error(`Expected: "Adopted" dropdown selection; Actual: "${elementOption}"`); + } + console.log('Passed: Adopted dropdown option matched as expected'); + } + }, + + //DIV Group label + { + description: 'Validate Group label', + action: async () => { + const elementText = await driver.findElement(By.css('#divparent > .form-label')).getText(); + if (elementText !== 'Group') { + throw new Error(`Expected: "Group" label text; Actual: "${elementText}"`); + } + console.log('Passed: Group label text matched as expected'); + } + }, + + //DIV Group - info icon + { + description: 'Verify Group info icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#divparent .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Group info icon not found'); + } + console.log('Passed: Group info icon present'); + } + }, + + //DIV Group - value {9=Another Group To Use} + { + description: 'Validate Group dropdown selection', + action: async () => { + const elementOption = await driver.findElement(By.css('#group')).getAttribute('value'); + if (elementOption !== '9') { + throw new Error(`Expected: "Another Group To Use" dropdown selection; Actual: "${elementOption}"`); + } + console.log('Passed: Another Group To Use dropdown option matched as expected'); + } + }, + + //DIV Download Formats label + { + description: 'Validate Download Formats label', + action: async () => { + const elementText = await driver.findElement(By.css('#divcreator > .form-label')).getText(); + if (elementText !== 'Download Formats') { + throw new Error(`Expected: "Download Formats" label text; Actual: "${elementText}"`); + } + console.log('Passed: Download Formats label text matched as expected'); + } + }, + + //DIV Download Formats - info icon + { + description: 'Verify Download Formats info icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#divcreator .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Download Formats info icon not found'); + } + console.log('Passed: Download Formats info icon present'); + } + }, + + //DIV Download Formats: CSV checkbox -active + { + description: 'Validate CSV checkbox option enabled', + action: async () => { + const elementStyle = await driver.findElement(By.css('#formatcsv')).getAttribute('checked'); + if (elementStyle !== 'true') { + throw new Error(`CSV checkbox option value checked did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: CSV checkbox option value matched as expected'); + } + }, + + //DIV Download Formats: CSV handle + { + description: 'Validate CSV label', + action: async () => { + const elementText = await driver.findElement(By.css('#divcreator > .form-check:nth-child(4) > .form-check-label')).getText(); + if (elementText !== 'CSV') { + throw new Error(`Expected: "CSV" label text; Actual: "${elementText}"`); + } + console.log('Passed: CSV label text matched as expected'); + } + }, + + //DIV Download Formats: PDF checkbox -null + { + description: 'Validate PDF checkbox option enabled', + action: async () => { + const elementStyle = await driver.findElement(By.css('#formatpdf')).getAttribute('type'); + if (elementStyle !== 'checkbox') { + throw new Error(`PDF checkbox type does not match; Actual: "${elementStyle}"`); + } + console.log('Passed: PDF checkbox type matched as expected'); + } + }, + + //DIV Download Formats: PDF handle + { + description: 'Validate PDF label', + action: async () => { + const elementText = await driver.findElement(By.css('.form-check:nth-child(5) > .form-check-label')).getText(); + if (elementText !== 'PDF') { + throw new Error(`Expected: "PDF" label text; Actual: "${elementText}"`); + } + console.log('Passed: PDF label text matched as expected'); + } + }, + + //DIV Download Formats: JSON checkbox -null + { + description: 'Validate JSON checkbox option enabled', + action: async () => { + const elementStyle = await driver.findElement(By.css('#formatcase')).getAttribute('type'); + if (elementStyle !== 'checkbox') { + throw new Error(`JSON checkbox type does not match; Actual: "${elementStyle}"`); + } + console.log('Passed: JSON checkbox type matched as expected'); + } + }, + + //DIV Download Formats: JSON handle + { + description: 'Validate JSON label', + action: async () => { + const elementText = await driver.findElement(By.css('.form-check:nth-child(6) > .form-check-label')).getText(); + if (elementText !== 'CASE JSON/API*') { + throw new Error(`Expected: "CASE JSON/API*" label text; Actual: "${elementText}"`); + } + console.log('Passed: CASE JSON/API* label text matched as expected'); + } + }, + + //DIV Download Formats: Required text + { + description: 'Validate Required text', + action: async () => { + const elementText = await driver.findElement(By.css('em > small')).getText(); + if (elementText !== 'This option also allows access to this framework via CASE compliant API') { + throw new Error(`Expected: "This option also allows access to this framework via CASE compliant API" text; Actual: "${elementText}"`); + } + console.log('Passed: This option also allows access to this framework via CASE compliant API text matched as expected'); + } + }, + + //DIV Comment Settings text + { + description: 'Validate Comment Settings text', + action: async () => { + const elementText = await driver.findElement(By.css('#divstatus > .form-label')).getText(); + if (elementText !== 'Comment Settings') { + throw new Error(`Expected: "Comment Settings" text; Actual: "${elementText}"`); + } + console.log('Passed: Comment Settings text matched as expected'); + } + }, + + //DIV Comment Settings: Allow Comments checkbox -active + { + description: 'Validate Allow Comments checkbox option enabled', + action: async () => { + const elementStyle = await driver.findElement(By.css('#comments')).getAttribute('checked'); + if (elementStyle !== 'true') { + throw new Error(`Allow Comments checkbox option value checked did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Allow Comments checkbox option value matched as expected'); + } + }, + + //DIV Comment Settings: Allow Comments handle + { + description: 'Validate Allow Comments label', + action: async () => { + const elementText = await driver.findElement(By.css('.form-check:nth-child(3) > .form-check-label')).getText(); + if (elementText !== 'Allow Comments') { + throw new Error(`Expected: "Allow Comments" label text; Actual: "${elementText}"`); + } + console.log('Passed: Allow Comments label text matched as expected'); + } + }, + + //DIV Comment Settings: Comments are private checkbox -null + { + description: 'Validate Allow Comments checkbox option enabled', + action: async () => { + const elementStyle = await driver.findElement(By.css('#private')).getAttribute('type'); + if (elementStyle !== 'checkbox') { + throw new Error(`Allow Comments checkbox type does not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Allow Comments checkbox type matched as expected'); + } + }, + + //DIV Comment Settings: Comments are private handle + { + description: 'Validate Comments are private label', + action: async () => { + const elementText = await driver.findElement(By.css('#divstatus > .form-check:nth-child(4) > .form-check-label')).getText(); + if (elementText !== 'Comments are private') { + throw new Error(`Expected: "Comments are private" label text; Actual: "${elementText}"`); + } + console.log('Passed: Comments are private label text matched as expected'); + } + }, + + //DIV Publishers Notes label + { + description: 'Validate Publishers Notes label', + action: async () => { + const elementText = await driver.findElement(By.css('#divpubnotes > .form-label')).getText(); + if (elementText !== `Publisher's Notes`) { + throw new Error(`Expected: "Publisher's Notes" label text; Actual: "${elementText}"`); + } + console.log(`Passed: Publisher's Notese label text matched as expected`); + } + }, + + //DIV Publishers Notes textbox placeholder + { + description: 'Validate Publishers Notes textbox placeholder', + action: async () => { + const elementValue = await driver.findElement(By.css('#pubnotes')).getAttribute('placeholder'); + if (elementValue !== '') { + throw new Error(`Expected: "blank" placeholder text; Actual: "${elementValue}"`); + } + console.log('Passed: "blank" placeholder text, matched as expected'); + } + }, + + //DIV Visibility label + { + description: 'Validate Visibility label', + action: async () => { + const elementText = await driver.findElement(By.css('#devvisible > .form-label')).getText(); + if (elementText !== 'Visibility') { + throw new Error(`Expected: "Visibility" label text; Actual: "${elementText}"`); + } + console.log('Passed: Visibility label text matched as expected'); + } + }, + + //DIV Visibility - info icon + { + description: 'Verify Visibility info icon', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('#devvisible .fa')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Visibility info icon not found'); + } + console.log('Passed: Visibility info icon present'); + } + }, + + //DIV Visibility dropdown - value + { + description: 'Validate Visibility dropdown selection', + action: async () => { + const elementOption = await driver.findElement(By.css('#visible')).getAttribute('value'); + if (elementOption !== 'Hidden') { + throw new Error(`Expected: "Hidden" dropdown selection; Actual: "${elementOption}"`); + } + console.log('Passed: Hidden dropdown option matched as expected'); + } + }, + + //DIV Save button text + { + description: 'Validate Save button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalop')).getAttribute('value'); + if (elementText !== 'Save') { + throw new Error(`Expected: "Save" button text; Actual: "${elementText}"`); + } + console.log('Passed: Save button text matched as expected'); + } + }, + + //DIV Save button color -white + { + description: 'Validate Save button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalop')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Save button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Save button color matched as expected'); + } + }, + + //DIV Close button text + { + description: 'Validate Close button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalclose')).getText(); + if (elementText !== 'Close') { + throw new Error(`Expected: "Close" button text; Actual: "${elementText}"`); + } + console.log('Passed: Close button text matched as expected'); + } + }, + + //DIV Close button color -white + { + description: 'Validate Close button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); + if (elementStyle !== 'rgba(0, 0, 0, 0)') { + throw new Error(`Close button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Close button color matched as expected'); + } + }, + + //NEXT ACTION - Close Edit DIV + { description: 'Click Close button', action: async () => await driver.findElement(By.css('#modalclose')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + //NEXT ACTION - Click ellipsis icon + { description: 'Click ellipsis for 2nd framework', action: async () => await driver.findElement(By.css('#dropdownMenu14 > .fa')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + //NEXT ACTION - Click Archive link + { description: 'Click Framework row 2 Archive link', action: async () => await driver.findElement(By.linkText('Archive')).click() }, + + //Wait for DIV to load - Framework Comments + { + description: 'Wait for DIV to load', + action: async () => { + return await driver.wait(until.elementLocated(By.css('.modal-title')), 10000).catch(() => false); + } + }, + + //DIV Archive Published Framework title text + { + description: 'Validate Archive Published Framework title text', + action: async () => { + const elementText = await driver.findElement(By.css('.modal-title')).getText(); + if (elementText !== 'Archive Published Framework') { + throw new Error(`Expected: "Archive Published Framework" title text; Actual: "${elementText}"`); + } + console.log('Passed: Archive Published Framework title text matched as expected'); + } + }, + + //DIV X icon color -red + { + description: 'Validate X icon color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.close > span')).getCssValue('color'); + if (elementStyle !== 'rgba(246, 60, 40, 1)') { + throw new Error(`DIV X icon color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: DIV X icon color matched as expected'); + } + }, + + //DIV info icon + { + description: 'Verify Archive Info icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-info-circle')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Info icon not found'); + } + console.log('Passed: Info button icon present'); + } + }, + + //DIV Archive description text + { + description: 'Validate Archive description text', + action: async () => { + const elementText = await driver.findElement(By.css('.alert')).getText(); + if (elementText !== 'Archiving will set the display status of this framework to "Deprecated". It is alo recommended to place it in a group designated for archived frameworks.') { + throw new Error(`Expected: "Archiving descriptive" text; Actual: "${elementText}"`); + } + console.log('Passed: Archiving descriptive text matched as expected'); + } + }, + + //DIV Archive description text background color -light blue + { + description: 'Validate Archive description background text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.alert')).getCssValue('background-color'); + if (elementStyle !== 'rgba(52, 152, 219, 0.88)') { + throw new Error(`Archive background text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Archive background text color matched as expected'); + } + }, + + //DIV Framework label + { + description: 'Validate Framework label', + action: async () => { + const elementText = await driver.findElement(By.css('#divtype > .form-label')).getText(); + if (elementText !== 'Framework') { + throw new Error(`Expected: "Framework" label text; Actual: "${elementText}"`); + } + console.log('Passed: Framework label text matched as expected'); + } + }, + + //DIV Framework value text + { + description: 'Validate Framework value text', + action: async () => { + try { + const element = await driver.findElement(By.css('#divtype')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'KathleenTest DontBringBack Comments'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: "${expectedText}" text in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: "${expectedText}" text within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //DIV Group label + { + description: 'Validate Group label', + action: async () => { + const elementText = await driver.findElement(By.css('#divparent > .form-label')).getText(); + if (elementText !== 'Group') { + throw new Error(`Expected: "Group" label text; Actual: "${elementText}"`); + } + console.log('Passed: Group label text matched as expected'); + } + }, + + //DIV Group info icon + { + description: 'Verify Group Info icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('a:nth-child(2) > .fa-question-circle')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Group info icon not found'); + } + console.log('Passed: Group info icon present'); + } + }, + + //DIV Group dropdown value {9=Another Group To Use} + { + description: 'Validate Group dropdown value', + action: async () => { + const elementText = await driver.findElement(By.css('#group')).getAttribute('value'); + if (elementText !== '9') { + throw new Error(`Expected: "Another Group To Use" dropdown option text; Actual: "${elementText}"`); + } + console.log('Passed: Another Group To Use dropdown option text matched as expected'); + } + }, + + //DIV Visibility label + { + description: 'Validate Visibility label', + action: async () => { + const elementText = await driver.findElement(By.css('#devvisible > .form-label')).getText(); + if (elementText !== 'Visibility') { + throw new Error(`Expected: "Visibility" label text; Actual: "${elementText}"`); + } + console.log('Passed: Visibility label text matched as expected'); + } + }, + + //DIV Visibility dropdown value + { + description: 'Validate Visibility dropdown value', + action: async () => { + const elementText = await driver.findElement(By.css('#visible')).getAttribute('value'); + if (elementText !== 'Hidden') { + throw new Error(`Expected: "Hidden" dropdown option text; Actual: "${elementText}"`); + } + console.log('Passed: Hidden dropdown option text matched as expected'); + } + }, + + //DIV Archive button text + { + description: 'Validate Archive button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalop')).getAttribute('value'); + if (elementText !== 'Archive') { + throw new Error(`Expected: "Archive" button text; Actual: "${elementText}"`); + } + console.log('Passed: Archive button text matched as expected'); + } + }, + + //DIV Archive button color -white + { + description: 'Validate Archive button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalop')).getCssValue('background-color'); + if (elementStyle !== 'rgba(48, 200, 172, 1)') { + throw new Error(`Archive button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Archive button color matched as expected'); + } + }, + + //DIV Close button text + { + description: 'Validate Close button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalclose')).getText(); + if (elementText !== 'Close') { + throw new Error(`Expected: "Close" button text; Actual: "${elementText}"`); + } + console.log('Passed: Close button text matched as expected'); + } + }, + + //DIV Close button color -white + { + description: 'Validate Close button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); + if (elementStyle !== 'rgba(0, 0, 0, 0)') { + throw new Error(`Close button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Close button color matched as expected'); + } + }, + + //NEXT ACTION - Close Edit DIV + { description: 'Click Close button', action: async () => await driver.findElement(By.css('#modalclose')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + //NEXT ACTION - Click ellipsis icon + { description: 'Click ellipsis for 2nd framework', action: async () => await driver.findElement(By.css('#dropdownMenu14 > .fa')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + //NEXT ACTION - Click Delete link + { description: 'Click Framework row 2 Delete link', action: async () => await driver.findElement(By.linkText('Delete')).click() }, + + //Wait for DIV to load - Framework Comments + { + description: 'Wait for DIV to load', + action: async () => { + return await driver.wait(until.elementLocated(By.css('.modal-title')), 10000).catch(() => false); + } + }, + + //DIV Delete Published Framework title text + { + description: 'Validate Delete Published Framework title text', + action: async () => { + const elementText = await driver.findElement(By.css('.modal-title')).getText(); + if (elementText !== 'Delete Published Framework') { + throw new Error(`Expected: "Delete Published Framework" title text; Actual: "${elementText}"`); + } + console.log('Passed: Delete Published Framework title text matched as expected'); + } + }, + + //DIV X icon color -red + { + description: 'Validate X icon color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.close > span')).getCssValue('color'); + if (elementStyle !== 'rgba(246, 60, 40, 1)') { + throw new Error(`DIV X icon color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: DIV X icon color matched as expected'); + } + }, + + //DIV info icon + { + description: 'Verify Delete Info icon is present', + action: async () => + { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-info-circle')), 5000).catch(() => false); + if (!expectedIcon) { + throw new Error('Info icon not found'); + } + console.log('Passed: Info button icon present'); + } + }, + + //DIV Delete description text + { + description: 'Validate Delete description text', + action: async () => { + const elementText = await driver.findElement(By.css('.alert')).getText(); + if (elementText !== 'You are about to delete this framework revision from the system. Its data will no longer be accesible and this action is not recoverable.') { + throw new Error(`Expected: "Deleting descriptive" text; Actual: "${elementText}"`); + } + console.log('Passed: Deleting descriptive text matched as expected'); + } + }, + + //DIV Delete description text background color -red + { + description: 'Validate Delete description background text color', + action: async () => { + const elementStyle = await driver.findElement(By.css('.alert')).getCssValue('background-color'); + if (elementStyle !== 'rgba(231, 76, 60, 0.88)') { + throw new Error(`Delete background text color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Delete background text color matched as expected'); + } + }, + + //DIV Framework label + { + description: 'Validate Framework label', + action: async () => { + const elementText = await driver.findElement(By.css('#divtype > .form-label')).getText(); + if (elementText !== 'Framework') { + throw new Error(`Expected: "Framework" label text; Actual: "${elementText}"`); + } + console.log('Passed: Framework label text matched as expected'); + } + }, + + //DIV Framework value text + { + description: 'Validate Framework value text', + action: async () => { + try { + const element = await driver.findElement(By.css('#divtype')); + + //Get different versions of the text for debugging + const fullText = await element.getText(); + + //Check for the expected text in different ways + const expectedText = 'KathleenTest DontBringBack Comments'; + const trimmedFullText = fullText.trim(); + const firstLine = trimmedFullText.split('\n')[0].trim(); + + //Try multiple matching strategies + if (firstLine.includes(expectedText)) { + console.log(`Passed: "${expectedText}" text in first line`); + } else if (trimmedFullText.includes(expectedText)) { + console.log(`Passed: "${expectedText}" text within full text`); + } else { + throw new Error( + `Text validation failed.\nExpected: "${expectedText}"\n` + + `Full text: "${fullText}"\n` + + `First line: "${firstLine}"\n` + ); + } + + } catch (error) { + console.error('Detailed error during validation:', error); + throw error; //Re-throw after logging + } + } + }, + + //DIV Retain comments checkbox -null + { + description: 'Validate Retain comments checkbox option enabled', + action: async () => { + const elementStyle = await driver.findElement(By.css('#retain')).getAttribute('type'); + if (elementStyle !== 'checkbox') { + throw new Error(`Retain comments checkbox type does not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Retain comments checkbox type matched as expected'); + } + }, + + //DIV Retain comments label + { + description: 'Validate Retain comments label', + action: async () => { + const elementText = await driver.findElement(By.css('.form-check-label')).getText(); + if (elementText !== 'Retain comments') { + throw new Error(`Expected: "Retain comments" label text; Actual: "${elementText}"`); + } + console.log('Passed: Retain comments label text matched as expected'); + } + }, + + //DIV Delete button text + { + description: 'Validate Delete button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalop')).getAttribute('value'); + if (elementText !== 'Delete') { + throw new Error(`Expected: "Delete" button text; Actual: "${elementText}"`); + } + console.log('Passed: Delete button text matched as expected'); + } + }, + + //DIV Delete button color -red + { + description: 'Validate Delete button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalop')).getCssValue('background-color'); + if (elementStyle !== 'rgba(220, 53, 69, 1)') { + throw new Error(`Delete button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Delete button color matched as expected'); + } + }, + + //DIV Close button text + { + description: 'Validate Close button text', + action: async () => { + const elementText = await driver.findElement(By.css('#modalclose')).getText(); + if (elementText !== 'Close') { + throw new Error(`Expected: "Close" button text; Actual: "${elementText}"`); + } + console.log('Passed: Close button text matched as expected'); + } + }, + + //DIV Close button color -white + { + description: 'Validate Close button color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); + if (elementStyle !== 'rgba(0, 0, 0, 0)') { + throw new Error(`Close button color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Close button color matched as expected'); + } + }, + + //NEXT ACTION - Close Edit DIV + { description: 'Click Close button', action: async () => await driver.findElement(By.css('#modalclose')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + + //LOG OUT + //NEXT ACTION - Log out + { description: 'Click Username dropdown', action: async () => await driver.findElement(By.css('#navbarDropdown > span')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + { description: 'Click Log Out link', action: async () => await driver.findElement(By.linkText('Log Out')).click() }, + { description: 'Wait for action to complete', action: async () => await driver.sleep(2000) }, + + //Wait for login screen to load + { + description: 'Wait for log out process to complete', + action: async () => { + return await driver.wait(until.elementLocated(By.css('.login')), 10000).catch(() => false); + } + }, +]; + +const logStep = (worksheet, stepDescription, status, stepIndex, timestamp, screenshotPath) => { + const json_data = XLSX.utils.sheet_to_json(worksheet, { header: 1 }); + json_data.push([stepIndex, stepDescription, status, timestamp, screenshotPath]); + return XLSX.utils.aoa_to_sheet(json_data); +}; + +const takeScreenshot = async (driver, stepIndex, stepDescription) => { + const screenshot = await driver.takeScreenshot(); + + const dir = path.join('screenshots', 'frameworkPublishingPage'); + + const screenshotFileName = `step_${stepIndex}_${stepDescription.replace(/\s+/g, '_')}.png`; + const screenshotPath = path.join(dir, screenshotFileName); + fs.writeFileSync(screenshotPath, screenshot, 'base64'); + return screenshotPath; +}; + +const clearOldResults = () => { + // Remove old screenshots + const screenshotDir = path.join('screenshots', 'frameworkPublishingPage'); + if (fs.existsSync(screenshotDir)) { + fs.rmSync(screenshotDir, { recursive: true, force: true }); + } + fs.mkdirSync(screenshotDir, { recursive: true }); + + // Remove old Excel file + if (fs.existsSync('frameworkPublishingPageResults.xlsx')) { + fs.unlinkSync('frameworkPublishingPageResults.xlsx'); + } +}; + +try { + // Initialize workbook and worksheet + clearOldResults(); + + // Initialize workbook and worksheet + workbook = XLSX.utils.book_new(); + worksheet = XLSX.utils.aoa_to_sheet([ + ['Step Number', 'Step Description', 'Status', 'Timestamp', 'Screenshot'] + ]); + XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1'); + + // Log test start time + worksheet = logStep(worksheet, 'Test Start', 'Started', '', startTime, ''); + + let allStepsPassed = true; + + for (const step of steps) { + const stepIndex = steps.indexOf(step) + 1; + const timestamp = new Date().toISOString(); + + try { + await step.action(); + const screenshotPath = await takeScreenshot(driver, stepIndex, step.description); + worksheet = logStep(worksheet, step.description, 'Passed', stepIndex, timestamp, screenshotPath); + } catch (error) { + const screenshotPath = await takeScreenshot(driver, stepIndex, `${step.description}_Failed`); + worksheet = logStep(worksheet, step.description, 'Failed', stepIndex, timestamp, screenshotPath); + console.error(`Step ${stepIndex} FAILED: ${error.message}`); + testStatus = 'Failed'; + allStepsPassed = false; + } + } + + //Check if log out was successful + const loginButton = await driver.wait(until.elementLocated(By.css('.login')), 5000).catch(() => false); + + if (loginButton && allStepsPassed) { + console.log('PASSED: Framework Publishing Page(ExACT_frameworkPublishingPage); All test steps completed successfully'); + testStatus = 'Passed'; + } else { + console.log('FAILED: Framework Publishing Page(ExACT_frameworkPublishingPage); One or more test steps failed'); + testStatus = 'Failed'; + } + + // Log test end time + const endTime = new Date().toISOString(); + worksheet = logStep(worksheet, 'Test End', testStatus, '', endTime, ''); + + // Write the updated worksheet back to the workbook and save it + workbook.Sheets['Sheet1'] = worksheet; + XLSX.writeFile(workbook, 'frameworkPublishingPageResults.xlsx'); +} finally { + await driver.quit(); +} +})(); +} + +export default ExACT_frameworkPublishingPage;