From a7e36560ee928967446e586a759b1249431b77af Mon Sep 17 00:00:00 2001 From: jhuerta Date: Mon, 26 Oct 2026 16:43:24 -0700 Subject: [PATCH] Completed AutoAlign Page script --- alignAutoAlignPageResults.xlsx | Bin 0 -> 23868 bytes tests/Align/alignAutoAlignPage.js | 2340 +++++++++++++++++++++++++++++ 2 files changed, 2340 insertions(+) create mode 100644 alignAutoAlignPageResults.xlsx create mode 100644 tests/Align/alignAutoAlignPage.js diff --git a/alignAutoAlignPageResults.xlsx b/alignAutoAlignPageResults.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..daa13e81e1e5bde50654573626e87871169e3b2d GIT binary patch literal 23868 zcmeHP-ES;MR(II&p`g_gEl4XQq-G>|+1N8ZAGXKXv$Dr_ZjyU%EZe!shDD~PyJx1a zd%AnOd&c(eB4x7(MMNO61hhOL@qn~QDPhDr+)LjzxuJICHnh$RGxeFlgRPn z`dJX24uarx<$U6;P|fC-P%>st6uW`HRWnx_HN)|(z;^x7R_&GJ{pIzV5hu*InHTuZ zR_(%xYhUVp_L-3*~VQGo}J}-=2RprgCoNaJg!oD}y zRjkmC*cnF8#1jTMVXj{@d^UjzzswEPIOZMS+f0e?d9VXNiK)W!q9YnSj)Z}s!8Ytu zlYZihxbH>AjCrtK*SCYSW9J<9?6Ek(i>+FN|04^o=SW^sfm_1c=l@c?6u~}i@;0N< zAaB&%Z+F*rbNU>>OXlJB_V)UFW=@X-Fw26Zf|oMQ_WruLlhG^ziQ+u%exuW9%kU-o ztvQ~%J3Bj_Zpw=w%7H|&JqN$uSZ!}NC3p@b;5&2h?Vas@e^r9#KmvYs4t{^FyV{oF zInda1{nI&U>d^iDlzI*_47__<@O6N%H&XBd3f7QY7d0^q{G`g(ChTz#?E`=S$w&J} z0w+9V7Oc3>CWFXj)BxLXSm}+Zvf{ZaYRibN$PM9fUkn*WL_zP9_y7Ep_rGs^^8UL| z-u%InH~;#{x4!k{&A$}1B*c5nAC(b5{_gMn>mR>i{LAdnC+O*s;|0c^ z?ZmMT=j90UmT14k;IFjZ{=mDK$dFOup6Y1cXF*Vg+zn3qV>StOut%;xF2lYMpTb0$ zaS$Nbm>;AM0(pecGx~w~mEHZwrAV^y8;c#mEAB{QsW1?FGmSKCJ?{jP{T^L-L*{TV z1D7s&>WS-L=C(Z-ep|HgsoUPFZDSJC4W4_7v#x^s5p>bJZ0a947!~u@|EY)m)I-<) z&wJ>qv3&P_xp2ks(iD)0Ser-Qlghw*=z87}t;z4lJob(;0onVgBs{*Y;^YglaEv02 zWHcbbjUvWzj3`K6b(8VYn9&A`$(NC%I3+!bjWEETO@mi!X;Y(!{S&d;?9e(yc#fDQ z4+2|Mx2QT>ZscS*S0lcr%^GSEfvYywT1$ySwwp9&5>r=h&E%|crzo|Si%cr!>vE_( z7Y&uUHWAqvh=-u%Rcvih(+I|x=U@{nTLWj^LR!trcics()IyLkvmMbzQgun2Chxn< zgy!TU@q~?BPn)^cptQwIaI>hkpDQXkBakVUcal1qJik1)Jl{Cms&zZfPR+1bxK$fs zrHkSuM5o0R3o>tnO;Ia}gw-w_i+qq45_k1hWn%N9V!%klIE>{1QsPCTZbFqkGzbTqcljDa_e z4jH;1Iwg5*H^znqAJFuG-8IrSefD>8Zh*t7_9s85BWN(97^OVkBu|!4onj39PX{hy zFheLMmLU7h^q;fHwIv5G0-vL2b7WZ%dQn74?QB#?lV7)+Hg!W5t}+3a=33#g<|J-* zGUm{W^Ae*nk7q*c0~z!`%ztiVc@8&Ynoy5}L-5ch~m zVN66ys5T8wNo(0;eaBHy-mao-;_NE@eNAQOL6qE_G#2kt*{OylU5mO(RikIsA&RPD zwhrMP!wi(V`yTw!&zh9OALKXitM zYoBN9k6aUC2#FJtEJWteghqyzBeryl1{pDhCsZ+8=E%*($T4}v+3BRa0WdagqpMh>%i zR)KsP%(EpnW^kN0OKPwK>mUlk_|Y*AUKb`DPlGw0}w?F)yx9T6f_cneEQ8ylo-;e(2O;MOk#P5f1{gx=ivH1Pr zcfXzD@X?U6(c7d!A#p<$z0LS*V$hrXXw?e5AToF#ri)}cB^MBV92KOS)k7Ryco(9Y z;|aqQ6=HyrHHa4Y4|W~MALI8}OK)Zt=vXM+v?g&xU+w`0vnJuEaG5sb%i2o0QBnc)c*e)9dKJ!qlXBcS# zWGyF+u3j5Tw9kj74#xaTN}#@`A{a`Gf}VIF`ekZ@_N~bp=fkuy7KYx%!|7z;-~gHO ze$u|>t)iWhFp?-aQ)%YILqf*UR8Dv>bv=Yx8ZkiAJ}(r*r}%^oJckFQc`HzgEhe+$ z{N+}yC_iv)cRK0jPzUZT5L4P#ttbnqHt+kwDJV{8^W(n@p8Lh6CHnh9sV!NPDDiJDpOC~-nV7~f`nMy8&^?P%b39g&d$PG#V}3e1ve zEQ9RIApGDDC#<0ih4dGRI}2+$B+La#4pxUixm4t*gj7ulFNfwYcjTAHPMjD=35yD% z9IP*caR|qjN$tuo%|>%|*=#H~SC5;m4YRS)SzTG{wqKW#_GF~|r6dZ4Y(f+&&3a}I zCS*VoTdCU~;*fvD630kzntZ<9KQ`_o;}B=X#sLoMWz@cmdcfj%PAnNjC)RqSB$mW^ zJLjBAvtCnfey1&QzITpf7TXx08)GMuLHjbOmQxu-;ndt{G*&uhtLOlU(@xGQm1ez` z-24ur<-WL|)^mGxD#LV&eg04mLT9l80PHL3Z&=US)6 zHnv@S%wgQ3$q7=9mW#fSo?;xeOr1w5z1|;Pfm@ze) z=UNvXFhJ_=C_;p(?+cl#Rwx-{PAIdn(&}_7`l6c)MWtD9O%V$7c1b9>J7gS1Hd4`U zDV9uEE0zqR6Kl2ItPsnjm74IByg2KvD}tfAEZO!n351Q^Rx*XKRx|}hC);|vs>{sM zG)=`>udB)?Pmt*d$|Wp~A_yzv_CdX@7d`tj%sl%@cyD#9x~7w63{ch{kPfPr*U}ltv`+SFqw5`MGt`#QT*P;na!QI7#I? zK_{GW=X}DQ^9gs(C&ERXV8EReE<)6v2-a6Zf0VN?&0%H{DDWb5tcD7xFYEa3Mz%s& zuVuOMc`Y|rn(fs&Ez4L}(z1DyOZMNP=OU~zMO5ebF8yVVRW+KaI->| zW)Va2BDzKmqEKI!r5{W}&$(IGD5SLFC@?y4nyspkuvvsnya;jBxC!-TaSojsHcxKQ zH3}WQEOJ{qSz67iHEOenp?DGNX*GsIy)4Tlm^n9*MW&;dMTXJI(ym;AG>ce;7a@xp ztDwFtOEHILj(XWBySYQ`W|_zf7&zXQoSZ^lFQUwXPQ*^N=@nr@Gu{4B!vxeX60vZ6 z*A`GFt`|^-(FuqYyed~wgbLWdr$ppqyk0~ZMkk`#sWQh_5qR(-I!+BdP`^k-*;q`;?g6B9G zIB^P;sZ>GHvn`X=vE6M|c195awZx%QOO1d~UuGLz8ZS>1l~EZ;&!`MD&uC|*QQm=- z=6sxpXZ!vrmKl;c*-_r|W0+Dd1&v?xtoiHwzVC!`T~riin7 zY##@aWA8;#5aHCm{76|UNC-K?W|d=a$8=)_9pW4DSCtfjdKn8uiW^&$42xfXW9gf3 zeP(Hi{yrx%EXucr+&r-&qjG0?73W@rj2tDkVv>DLzG5N$M_gP}SM$ZpwR+@QV{tc% z$Qe7g=kFl7DlPj0`BkpPB4jVsde0cfW+p37Bg2wAOCG~JzUB49`fJAMuaUj5ze%WZ&i4 z^LP;jXZ^rC8oNVbBgj2wX)2Mx?)o_|jBZt69&5D?+Mh2&Z!<7RIrrh`R5!yn9F^$}<+Sdp6V6bl4*7A^<&T_lE z>MXPM&f0RzY7JWrtI_OQt>54sAZP&@-MW!>&o*@rW%oJw1RmE)40lDhagm15jK@M` zJcus`istKRKjUVT9&+xGPsZ6siku`X7eCVx7yc4)Ba2)Vl$w6BAS@)OTqe_dW;55b zGH6GC^SH6|)Y20DrGqxh{<&RtW=7@C2JM|CLuH&DL>OPT^N`;IbUb$BSJSJw^2Det z(J8gTBg!>}!g(ST>i*7CvbT{3i^-O*$m{X3{NmAOy@3hjE)*@{#9 z`)_~a+1D|D(BHFV`=SwkyII5vH;72lw3tpdEPNY$O)r!M8uNZf7@BS6Btz^t@~aVT ztL~&%!PU(bvyR+nx>a$*wveYjDQ;IRBk(sRNE|qpFH0CZR`lEaIel^{yJ0X*ef9-Z% z!D(E5HkWRd#D*>aS?=93R?hQOEbOA^dl)GucBpfl_vVGmL2wxG+Q+| zz|14m=`E&k4c>sR3rtlxk2mw}l}WtpoFn2|;X{4}2rRl-nK0Z>wdYf2J3#2tK|TH1 zrF;>6*^Mp>7YaAdZ`E7@{;s&;u%ZF6T)9+&%UhTrPV&CU$>>EGOhQFPxVi;*ic-BE z1Nlc<464^-jNG9XgX;Ad&P0!KzD#fQIA@hO^hS^KIMmDXICQFn;jd()5*oV%C#g^X z>Z>^8uXN2^f)m=R*2=?#-s-i0j}9=luVZDYkD&0kxODc5=|FrLSKvl2?#rOLO$6z6 zHS)PuYs#pRmiFnur9pay_Qk|rzMS^%7@^3H(_g>`|46HRH|=d$;KUX*SbVZ~y-vPd z?fg5y%UaHZ)hw8}UhA2ODT|FOwFtB4@%3#qtBGtcYa0fh#VNOLT4UhZrb@;_olokB zBA&w1p!%|Egc7BH;IZQBYL$+94{$-`-_RcDs79<3P`?~42>hqP2^2=DqHZeRdljhP z{3VW>547?v(<&8pPqU!%WS>(h_m+yR?yVHa-+3`-A-nrqMOJqT3gn->FYOzsi0W#u zK>WtT`L&;lt;X^N_CFq!u(QFaqN@>Tf$kh?UZkm3 A8vp { + res.send('

ExACT Automated Test Script: Align - AutoAlign Page(alignAutoAlignPage); Initiated

'); + (async function example() { + let driver = await new Builder() + .forBrowser('chrome') + .setChromeOptions( + new ChromeOptions() + .addArguments('--disable-features=MediaRouter') + .addArguments('--disable-extensions') + .addArguments('--disable-background-networking') + .addArguments('--log-level=3') + ) + .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://correlation.edgate.com/exact/login.php') }, + { description: 'Expand browser', action: async () => await driver.manage().window().maximize() }, + + //Login + { + description: 'Login', + action: async () => { + const multipleChecks = 'Log In'; + + console.log('------------->| ALIGN - AUTOALIGN PAGE |<-------------'); + const errors = []; + + await driver.findElement(By.css('.form-control:nth-child(2)')).sendKeys('exact_juan'); + await driver.findElement(By.css('.passfield')).sendKeys('Edgate1!'); + await driver.findElement(By.css('.login')).click(); + console.log('----->| NEXT ACTION: Entered credentials and logged in'); + + //Wait for page readyState + await driver.wait(async () => { + const readyState = await driver.executeScript('return document.readyState'); + return readyState === 'complete'; + }, 30000, 'ExACT Dashboard did not fully load within 30 seconds'); + + //Wait for the dashboard container to exist in DOM + await driver.wait( + until.elementLocated(By.css('.gap-idle-wrap > img')), + 30000, + 'Dashboard image did not appear within 30 seconds' + ); + + //Wait for it to be: visible + await driver.wait(async () => { + try { + const img = await driver.findElement(By.css('.gap-idle-wrap > img')); + return await img.isDisplayed(); + } catch (e) { + return false; + } + }, 30000, 'Dashboard image did not become visible within 30 seconds'); + + //Wait for any loading spinners to disappear + await driver.wait(async () => { + try { + const spinners = await driver.findElements(By.css('.spinner-border')); + for (const spinner of spinners) { + if (await spinner.isDisplayed()) return false; + } + return true; + } catch (e) { + return true; + } + }, 30000, 'Loading spinners did not disappear within 30 seconds'); + + //Wait for the slowest resource to complete + await driver.wait(async () => { + const completed = await driver.executeScript(` + const entries = performance.getEntriesByType('resource'); + return entries.some(entry => + entry.name.includes('content_sets.php') && + entry.responseEnd > 0 + ); + `); + return completed; + }, 30000, 'My Content widget (content_sets.php) did not complete loading within 30 seconds'); + console.log('Passed: My Content widget (content_sets.php) loaded successfully - Dashboard fully loaded'); + + //Final sleep to allow any remaining dynamic content to settle + await driver.sleep(2000); + + console.log('Passed: ExACT Dashboard loaded successfully'); + + if (errors.length > 0) { + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + throw new Error(errors.join('\n')); + } + } + }, + + //Dashboard title + { + description: 'Dashboard title text, size, and color', + action: async () => { + const multipleChecks = 'Dashboard title'; + + const element = await driver.findElement(By.css('.e-heading')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Correlation Dashboard') { + console.log('Passed: Dashboard title text matched as expected'); + } else { + errors.push(`Expected: "Correlation Dashboard"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `"DM Serif Display", serif`) { + console.log('Passed: Dashboard title font-family matched as expected'); + } else { + errors.push(`Expected: Dashboard title font-family "DM Serif Display, serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '32px') { + console.log('Passed: Dashboard title text font-size matched as expected'); + } else { + errors.push(`Expected: Dashboard title text font-size "32px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: Dashboard title text color matched as expected'); + } else { + errors.push(`Expected: Dashboard title text color: "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //NEXT ACTION + { + description: 'Click Align navigation link', + action: async () => { + await driver.findElement(By.linkText('Align')).click(); + console.log('----->| NEXT ACTION: Clicked Align navigation link'); + + //Wait for page readyState + await driver.wait(async () => { + const readyState = await driver.executeScript('return document.readyState'); + return readyState === 'complete'; + }, 30000, 'Align page did not fully load within 30 seconds'); + + //Wait until the element exists in the DOM + const contentTab = await driver.wait( + until.elementLocated(By.css('#content-tab')), + 30000 + ); + + //Wait until it becomes visible + await driver.wait( + until.elementIsVisible(contentTab), + 30000 + ); + } + }, + + //Content tab + { + description: 'Content tab title text, size, color, and background color', + action: async () => { + const multipleChecks = 'Content tab title'; + + const element = await driver.findElement(By.linkText('Content')); + + //Get text, font, size, color, and background color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + const elementBgColor = await element.getCssValue('background-color'); + + //Tool-tip lives on the parent
  • ; Bootstrap moves "title" into "data-original-title" and blanks "title" + const tooltipHost = await element.findElement(By.xpath('./parent::li')); + const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title')); + const elementTitleFont = await element.getCssValue('font-family'); + const elementTitleSize = await element.getCssValue('font-size'); + const elementTitleColor = await element.getCssValue('color'); + const elementTitleBgColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //element text + if (elementText === 'Content') { + console.log('Passed: Content tab title text matched as expected'); + } else { + errors.push(`Expected: "Content"; Actual: "${elementText}"`); + } + + //element font + if (elementFont === 'Poppins, sans-serif') { + console.log('Passed: Content tab title font-family matched as expected'); + } else { + errors.push(`Expected: Content tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //element size + if (elementSize === '15px') { + console.log('Passed: Content tab title text font-size matched as expected'); + } else { + errors.push(`Expected: Content tab title text font-size "15px"; Actual: "${elementSize}"`); + } + + //element color + if (elementColor === 'rgba(255, 255, 255, 1)') { + console.log('Passed: Content tab title text color matched as expected'); + } else { + errors.push(`Expected: Content tab title text color: "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`); + } + + //element background color + if (elementBgColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: Content tab title background color matched as expected'); + } else { + errors.push(`Expected: Content tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`); + } + + //element tool-tip text + if (elementTitle === 'Browse content and align by tagging concepts') { + console.log('Passed: Content tab tool-tip text matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip "Browse content and align by tagging concepts"; Actual: "${elementTitle}"`); + } + + //element tool-tip font + if (elementTitleFont === 'Poppins, sans-serif') { + console.log('Passed: Content tab tool-tip font-family matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); + } + + //element tool-tip size + if (elementTitleSize === '15px') { + console.log('Passed: Content tab tool-tip text font-size matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); + } + + //element tool-tip color + if (elementTitleColor === 'rgba(255, 255, 255, 1)') { + console.log('Passed: Content tab tool-tip text color matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTitleColor}"`); + } + + //element tool-tip background color + if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: Content tab tool-tip background color matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Standards tab + { + description: 'Standards tab title text, size, color, and background color', + action: async () => { + const multipleChecks = 'Standards tab title'; + + const element = await driver.findElement(By.linkText('Standards')); + + //Get text, font, size, color, and background color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + const elementBgColor = await element.getCssValue('background-color'); + + //Tool-tip lives on the parent
  • ; Bootstrap moves "title" into "data-original-title" and blanks "title" + const tooltipHost = await element.findElement(By.xpath('./parent::li')); + const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title')); + const elementTitleFont = await element.getCssValue('font-family'); + const elementTitleSize = await element.getCssValue('font-size'); + const elementTitleColor = await element.getCssValue('color'); + const elementTitleBgColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //element text + if (elementText === 'Standards') { + console.log('Passed: Standards tab title text matched as expected'); + } else { + errors.push(`Expected: "Standards"; Actual: "${elementText}"`); + } + + //element font + if (elementFont === 'Poppins, sans-serif') { + console.log('Passed: Standards tab title font-family matched as expected'); + } else { + errors.push(`Expected: Standards tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //element size + if (elementSize === '15px') { + console.log('Passed: Standards tab title text font-size matched as expected'); + } else { + errors.push(`Expected: Standards tab title text font-size "15px"; Actual: "${elementSize}"`); + } + + //element color + if (elementColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: Standards tab title text color matched as expected'); + } else { + errors.push(`Expected: Standards tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`); + } + + //element background color + if (elementBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: Standards tab title background color matched as expected'); + } else { + errors.push(`Expected: Standards tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`); + } + + //element tool-tip text + if (elementTitle === 'Browse standards and align content using specific standards') { + console.log('Passed: Standards tab tool-tip text matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip "Browse standards and align content using specific standards"; Actual: "${elementTitle}"`); + } + + //element tool-tip font + if (elementTitleFont === 'Poppins, sans-serif') { + console.log('Passed: Standards tab tool-tip font-family matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); + } + + //element tool-tip size + if (elementTitleSize === '15px') { + console.log('Passed: Standards tab tool-tip text font-size matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); + } + + //element tool-tip color + if (elementTitleColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: Standards tab tool-tip text color matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTitleColor}"`); + } + + //element tool-tip background color + if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: Standards tab tool-tip background color matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign tab + { + description: 'AutoAlign tab title text, size, color, and background color', + action: async () => { + const multipleChecks = 'AutoAlign tab title'; + + const element = await driver.findElement(By.linkText('AutoAlign')); + + //Get text, font, size, color, and background color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + const elementBgColor = await element.getCssValue('background-color'); + + //Tool-tip lives on the parent
  • ; Bootstrap moves "title" into "data-original-title" and blanks "title" + const tooltipHost = await element.findElement(By.xpath('./parent::li')); + const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title')); + const elementTitleFont = await element.getCssValue('font-family'); + const elementTitleSize = await element.getCssValue('font-size'); + const elementTitleColor = await element.getCssValue('color'); + const elementTitleBgColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //element text + if (elementText === 'AutoAlign') { + console.log('Passed: AutoAlign tab title text matched as expected'); + } else { + errors.push(`Expected: "AutoAlign"; Actual: "${elementText}"`); + } + + //element font + if (elementFont === 'Poppins, sans-serif') { + console.log('Passed: AutoAlign tab title font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //element size + if (elementSize === '15px') { + console.log('Passed: AutoAlign tab title text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title text font-size "15px"; Actual: "${elementSize}"`); + } + + //element color + if (elementColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: AutoAlign tab title text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`); + } + + //element background color + if (elementBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: AutoAlign tab title background color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`); + } + + //element tool-tip text + if (elementTitle === 'AutoAlign a Content Set') { + console.log('Passed: AutoAlign tab tool-tip text matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip "AutoAlign a Content Set"; Actual: "${elementTitle}"`); + } + + //element tool-tip font + if (elementTitleFont === 'Poppins, sans-serif') { + console.log('Passed: AutoAlign tab tool-tip font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); + } + + //element tool-tip size + if (elementTitleSize === '15px') { + console.log('Passed: AutoAlign tab tool-tip text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); + } + + //element tool-tip color + if (elementTitleColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: AutoAlign tab tool-tip text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTitleColor}"`); + } + + //element tool-tip background color + if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: AutoAlign tab tool-tip background color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //NEXT ACTION + { + description: 'Click AutoAlign navigation tab', + action: async () => { + await driver.findElement(By.linkText('AutoAlign')).click(); + console.log('----->| NEXT ACTION: Clicked AutoAlign tab'); + + //Wait for page readyState + await driver.wait(async () => { + const readyState = await driver.executeScript('return document.readyState'); + return readyState === 'complete'; + }, 30000, 'AutoAlign page did not fully load within 30 seconds'); + + //Wait until the element exists in the DOM + const autoAlignTab = await driver.wait( + until.elementLocated(By.css('.card > h5')), + 30000 + ); + + //Wait until it becomes visible + await driver.wait( + until.elementIsVisible(autoAlignTab), + 30000 + ); + } + }, + + //Content tab + { + description: 'Content tab title text, size, color, and background color', + action: async () => { + const multipleChecks = 'Content tab title'; + + const element = await driver.findElement(By.linkText('Content')); + + //Get text, font, size, color, and background color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + const elementBgColor = await element.getCssValue('background-color'); + + //Tool-tip lives on the parent
  • ; Bootstrap moves "title" into "data-original-title" and blanks "title" + const tooltipHost = await element.findElement(By.xpath('./parent::li')); + const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title')); + const elementTitleFont = await element.getCssValue('font-family'); + const elementTitleSize = await element.getCssValue('font-size'); + const elementTitleColor = await element.getCssValue('color'); + const elementTitleBgColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //element text + if (elementText === 'Content') { + console.log('Passed: Content tab title text matched as expected'); + } else { + errors.push(`Expected: "Content"; Actual: "${elementText}"`); + } + + //element font + if (elementFont === 'Poppins, sans-serif') { + console.log('Passed: Content tab title font-family matched as expected'); + } else { + errors.push(`Expected: Content tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //element size + if (elementSize === '15px') { + console.log('Passed: Content tab title text font-size matched as expected'); + } else { + errors.push(`Expected: Content tab title text font-size "15px"; Actual: "${elementSize}"`); + } + + //element color + if (elementColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: Content tab title text color matched as expected'); + } else { + errors.push(`Expected: Content tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`); + } + + //element background color + if (elementBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: Content tab title background color matched as expected'); + } else { + errors.push(`Expected: Content tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`); + } + + //element tool-tip text + if (elementTitle === 'Browse content and align by tagging concepts') { + console.log('Passed: Content tab tool-tip text matched as expected'); + } else { + errors.push(`Expected: ECS-3171 | Content tab tool-tip "Browse content and align by tagging concepts"; Actual: "${elementTitle}"`); + } + + //element tool-tip font + if (elementTitleFont === 'Poppins, sans-serif') { + console.log('Passed: Content tab tool-tip font-family matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); + } + + //element tool-tip size + if (elementTitleSize === '15px') { + console.log('Passed: Content tab tool-tip text font-size matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); + } + + //element tool-tip color + if (elementTitleColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: Content tab tool-tip text color matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTitleColor}"`); + } + + //element tool-tip background color + if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: Content tab tool-tip background color matched as expected'); + } else { + errors.push(`Expected: Content tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Standards tab + { + description: 'Standards tab title text, size, color, and background color', + action: async () => { + const multipleChecks = 'Standards tab title'; + + const element = await driver.findElement(By.linkText('Standards')); + + //Get text, font, size, color, and background color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + const elementBgColor = await element.getCssValue('background-color'); + + //Tool-tip lives on the parent
  • ; Bootstrap moves "title" into "data-original-title" and blanks "title" + const tooltipHost = await element.findElement(By.xpath('./parent::li')); + const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title')); + const elementTitleFont = await element.getCssValue('font-family'); + const elementTitleSize = await element.getCssValue('font-size'); + const elementTitleColor = await element.getCssValue('color'); + const elementTitleBgColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //element text + if (elementText === 'Standards') { + console.log('Passed: Standards tab title text matched as expected'); + } else { + errors.push(`Expected: "Standards"; Actual: "${elementText}"`); + } + + //element font + if (elementFont === 'Poppins, sans-serif') { + console.log('Passed: Standards tab title font-family matched as expected'); + } else { + errors.push(`Expected: Standards tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //element size + if (elementSize === '15px') { + console.log('Passed: Standards tab title text font-size matched as expected'); + } else { + errors.push(`Expected: Standards tab title text font-size "15px"; Actual: "${elementSize}"`); + } + + //element color + if (elementColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: Standards tab title text color matched as expected'); + } else { + errors.push(`Expected: Standards tab title text color: "rgba(182, 186, 181, 1)"; Actual: "${elementColor}"`); + } + + //element background color + if (elementBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: Standards tab title background color matched as expected'); + } else { + errors.push(`Expected: Standards tab title background color: "rgba(0, 0, 0, 0)"; Actual: "${elementBgColor}"`); + } + + //element tool-tip text + if (elementTitle === 'Browse standards and align content using specific standards') { + console.log('Passed: Standards tab tool-tip text matched as expected'); + } else { + errors.push(`Expected: ECS-3171 | Standards tab tool-tip "Browse standards and align content using specific standards"; Actual: "${elementTitle}"`); + } + + //element tool-tip font + if (elementTitleFont === 'Poppins, sans-serif') { + console.log('Passed: Standards tab tool-tip font-family matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); + } + + //element tool-tip size + if (elementTitleSize === '15px') { + console.log('Passed: Standards tab tool-tip text font-size matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); + } + + //element tool-tip color + if (elementTitleColor === 'rgba(182, 186, 181, 1)') { + console.log('Passed: Standards tab tool-tip text color matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip text color: "rgba(182, 186, 181, 1)"; Actual: "${elementTitleColor}"`); + } + + //element tool-tip background color + if (elementTitleBgColor === 'rgba(0, 0, 0, 0)') { + console.log('Passed: Standards tab tool-tip background color matched as expected'); + } else { + errors.push(`Expected: Standards tab tool-tip background color: "rgba(0, 0, 0, 0)"; Actual: "${elementTitleBgColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign tab + { + description: 'AutoAlign tab title text, size, color, and background color', + action: async () => { + const multipleChecks = 'AutoAlign tab title'; + + const element = await driver.findElement(By.linkText('AutoAlign')); + + //Get text, font, size, color, and background color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + const elementBgColor = await element.getCssValue('background-color'); + + //Tool-tip lives on the parent
  • ; Bootstrap moves "title" into "data-original-title" and blanks "title" + const tooltipHost = await element.findElement(By.xpath('./parent::li')); + const elementTitle = (await tooltipHost.getAttribute('data-original-title')) || (await tooltipHost.getAttribute('title')); + const elementTitleFont = await element.getCssValue('font-family'); + const elementTitleSize = await element.getCssValue('font-size'); + const elementTitleColor = await element.getCssValue('color'); + const elementTitleBgColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //element text + if (elementText === 'AutoAlign') { + console.log('Passed: AutoAlign tab title text matched as expected'); + } else { + errors.push(`Expected: "AutoAlign"; Actual: "${elementText}"`); + } + + //element font + if (elementFont === 'Poppins, sans-serif') { + console.log('Passed: AutoAlign tab title font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //element size + if (elementSize === '15px') { + console.log('Passed: AutoAlign tab title text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title text font-size "15px"; Actual: "${elementSize}"`); + } + + //element color + if (elementColor === 'rgba(255, 255, 255, 1)') { + console.log('Passed: AutoAlign tab title text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title text color: "rgba(255, 255, 255, 1)"; Actual: "${elementColor}"`); + } + + //element background color + if (elementBgColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: AutoAlign tab title background color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab title background color: "rgba(40, 39, 90, 1)"; Actual: "${elementBgColor}"`); + } + + //element tool-tip text + if (elementTitle === 'AutoAlign a Content Set') { + console.log('Passed: AutoAlign tab tool-tip text matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip "AutoAlign a Content Set"; Actual: "${elementTitle}"`); + } + + //element tool-tip font + if (elementTitleFont === 'Poppins, sans-serif') { + console.log('Passed: AutoAlign tab tool-tip font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip font-family "Poppins, sans-serif"; Actual: ${elementTitleFont}`); + } + + //element tool-tip size + if (elementTitleSize === '15px') { + console.log('Passed: AutoAlign tab tool-tip text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip text font-size "15px"; Actual: "${elementTitleSize}"`); + } + + //element tool-tip color + if (elementTitleColor === 'rgba(255, 255, 255, 1)') { + console.log('Passed: AutoAlign tab tool-tip text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTitleColor}"`); + } + + //element tool-tip background color + if (elementTitleBgColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: AutoAlign tab tool-tip background color matched as expected'); + } else { + errors.push(`Expected: AutoAlign tab tool-tip background color: "rgba(40, 39, 90, 1)"; Actual: "${elementTitleBgColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign Content Set button + { + description: 'AutoAlign Content Set button', + action: async () => { + const multipleChecks = 'AutoAlign Content Set button'; + + const elementIcon = await driver.findElement(By.css('.fa-plus')); + const element = await driver.findElement(By.linkText('AutoAlign Content Set')); + + //Get button text, text font, text size, text color, and button color + const elementText = await element.getText(''); + const elementTextFont = await element.getCssValue('font-family'); + const elementTextSize = await element.getCssValue('font-size'); + const elementTextColor = await element.getCssValue('color'); + const elementButtonColor = await element.getCssValue('background-color'); + + //Track all errors + const errors = []; + + //icon present + if (await elementIcon.isDisplayed()) { + console.log('Passed: AutoAlign Content Set button icon was displayed as expected'); + } else { + errors.push('Expected: AutoAlign Content Set button icon was not displayed'); + } + + //text + if (elementText === 'AutoAlign Content Set') { + console.log('Passed: AutoAlign Content Set button text matched as expected'); + } else { + errors.push(`Expected: "AutoAlign Content Set"; Actual: "${elementText}"`); + } + + //font-family + if (elementTextFont === "Poppins, sans-serif") { + console.log('Passed: AutoAlign Content Set button text font matched as expected'); + } else { + errors.push(`Expected: AutoAlign Content Set button text font "Poppins, sans-serif"; Actual: ${elementTextFont}`); + } + + //font size + if (elementTextSize === '16px') { + console.log('Passed: AutoAlign Content Set button text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign Content Set button text font-size "16px"; Actual: "${elementTextSize}"`); + } + + //color + if (elementTextColor === 'rgba(255, 255, 255, 1)') { + console.log('Passed: AutoAlign Content Set button text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign Content Set button text color: "rgba(255, 255, 255, 1)"; Actual: "${elementTextColor}"`); + } + + //button color + if (elementButtonColor === 'rgba(48, 200, 172, 1)') { + console.log('Passed: AutoAlign Content Set button background color matched as expected'); + } else { + errors.push(`Expected: AutoAlign Content Set button background color: "rgba(48, 200, 172, 1)"; Actual: "${elementButtonColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History Widget title + { + description: 'AutoAlign History Widget title text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History Widget title'; + + const element = await driver.findElement(By.css('.card > h5')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'AutoAlign History') { + console.log('Passed: AutoAlign History Widget title matched as expected'); + } else { + errors.push(`Expected: AutoAlign History; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History Widget title font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History Widget title font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '20px') { + console.log('Passed: AutoAlign History Widget title text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History Widget title text font-size "20px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(40, 39, 90, 1)') { + console.log('Passed: AutoAlign History Widget title text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History Widget title text color "rgba(40, 39, 90, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Content Set column header + { + description: 'Content Set column header text, color, and size', + action: async () => { + const multipleChecks = 'Content Set column header'; + + const element = await driver.findElement(By.css('th:nth-child(1)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Content Set') { + console.log('Passed: Content Set column header matched as expected'); + } else { + errors.push(`Expected: Content Set; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: Content Set column header font-family matched as expected'); + } else { + errors.push(`Expected: Content Set column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: Content Set column header text font-size matched as expected'); + } else { + errors.push(`Expected: Content Set column header text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: Content Set column header text color matched as expected'); + } else { + errors.push(`Expected: Content Set column header text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Submitted column header + { + description: 'Submitted column header text, color, and size', + action: async () => { + const multipleChecks = 'Submitted column header'; + + const element = await driver.findElement(By.css('th:nth-child(2)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Submitted') { + console.log('Passed: Submitted column header matched as expected'); + } else { + errors.push(`Expected: Submitted; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: Submitted column header font-family matched as expected'); + } else { + errors.push(`Expected: Submitted column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: Submitted column header text font-size matched as expected'); + } else { + errors.push(`Expected: Submitted column header text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: Submitted column header text color matched as expected'); + } else { + errors.push(`Expected: Submitted column header text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Status column header + { + description: 'Status column header text, color, and size', + action: async () => { + const multipleChecks = 'Status column header'; + + const element = await driver.findElement(By.css('th:nth-child(3)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Status') { + console.log('Passed: Status column header matched as expected'); + } else { + errors.push(`Expected: Status; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: Status column header font-family matched as expected'); + } else { + errors.push(`Expected: Status column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: Status column header text font-size matched as expected'); + } else { + errors.push(`Expected: Status column header text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: Status column header text color matched as expected'); + } else { + errors.push(`Expected: Status column header text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Completed column header + { + description: 'Completed column header text, color, and size', + action: async () => { + const multipleChecks = 'Completed column header'; + + const element = await driver.findElement(By.css('th:nth-child(4)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Completed') { + console.log('Passed: Completed column header matched as expected'); + } else { + errors.push(`Expected: Completed; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: Completed column header font-family matched as expected'); + } else { + errors.push(`Expected: Completed column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: Completed column header text font-size matched as expected'); + } else { + errors.push(`Expected: Completed column header text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: Completed column header text color matched as expected'); + } else { + errors.push(`Expected: Completed column header text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Review column header + { + description: 'Review column header text, color, and size', + action: async () => { + const multipleChecks = 'Review column header'; + + const element = await driver.findElement(By.css('th:nth-child(5)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Review') { + console.log('Passed: Review column header matched as expected'); + } else { + errors.push(`Expected: Review; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: Review column header font-family matched as expected'); + } else { + errors.push(`Expected: Review column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: Review column header text font-size matched as expected'); + } else { + errors.push(`Expected: Review column header text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: Review column header text color matched as expected'); + } else { + errors.push(`Expected: Review column header text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //Remove column header + { + description: 'Remove column header text, color, and size', + action: async () => { + const multipleChecks = 'Remove column header'; + + const element = await driver.findElement(By.css('th:nth-child(6)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Remove') { + console.log('Passed: Remove column header matched as expected'); + } else { + errors.push(`Expected: Remove; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: Remove column header font-family matched as expected'); + } else { + errors.push(`Expected: Remove column header font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: Remove column header text font-size matched as expected'); + } else { + errors.push(`Expected: Remove column header text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: Remove column header text color matched as expected'); + } else { + errors.push(`Expected: Remove column header text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Content Set Row 1 label + { + description: 'AutoAlign History - Content Set Row 1 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Content Set Row 1 label'; + + const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(1) > a')); + const expectedHref = 'https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301'; + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'create me') { + console.log('Passed: AutoAlign History - Content Set Row 1 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 1 label to be: "create me"; Actual: "${elementText}"`); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: AutoAlign History - Content Set Row 1 label href matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 1 label href to be: "https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301"; actual: "${actualHref}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Content Set Row 1 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Content Set Row 1 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(73, 80, 87, 1)') { + console.log('Passed: AutoAlign History - Content Set Row 1 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 1 label text color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Submitted Row 1 label + { + description: 'AutoAlign History - Submitted Row 1 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Submitted Row 1 label'; + + const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(2)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Fri, Feb 27 2026 10:04AM PST') { + console.log('Passed: AutoAlign History - Submitted Row 1 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 1 label to be: "Fri, Feb 27 2026 10:04AM PST"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Submitted Row 1 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Submitted Row 1 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: AutoAlign History - Submitted Row 1 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 1 label text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Status Row 1 label + { + description: 'AutoAlign History - Status Row 1 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Status Row 1 label'; + + const elementicon = await driver.findElement(By.css('tr:nth-child(2) .glyphicon')); + const element = await driver.findElement(By.css('tr:nth-child(2) .text-success')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //icon present + if (await elementicon.isDisplayed()) { + console.log('Passed: AutoAlign History - Status Row 1 label icon was displayed as expected'); + } else { + errors.push('Expected: AutoAlign History - Status Row 1 label icon was not displayed'); + } + + //text + if (elementText === 'Completed') { + console.log('Passed: AutoAlign History - Status Row 1 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 1 label to be: "Completed"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Status Row 1 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Status Row 1 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(40, 167, 69, 1)') { + console.log('Passed: AutoAlign History - Status Row 1 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 1 label text color "rgba(40, 167, 69, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Completed Row 1 label + { + description: 'AutoAlign History - Completed Row 1 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Completed Row 1 label'; + + const element = await driver.findElement(By.css('tr:nth-child(2) > td:nth-child(4)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Fri, Feb 27 2026 10:05AM PST') { + console.log('Passed: AutoAlign History - Completed Row 1 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 1 label to be: "Fri, Feb 27 2026 10:05AM PST"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Completed Row 1 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Completed Row 1 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: AutoAlign History - Completed Row 1 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 1 label text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Review Row 1 icon + { + description: 'AutoAlign History - Review Row 1 icon title, and url', + action: async () => { + const multipleChecks = 'AutoAlign History - Review Row 1 icon title, and url'; + + const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(2) > td:nth-child(5) > a')); + const expectedHref = 'https://correlation.edgate.com/exact/autoalign_review.php?id=13'; + + //Get text, font, size, and color + const elementText = await element.getDomAttribute('title'); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Review Alignments') { + console.log('Passed: AutoAlign History - Review icon Row 1 title matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 1 title to be: "Review Alignments"; Actual: "${elementText}"`); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: AutoAlign History - Review icon Row 1 href matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 1 href to be: "https://correlation.edgate.com/exact/autoalign_review.php?id=13"; actual: "${actualHref}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Review icon Row 1 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Review icon Row 1 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(73, 80, 87, 1)') { + console.log('Passed: AutoAlign History - Review icon Row 1 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 1 label text color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Remove Row 1 icon + { + description: 'AutoAlign History - Remove Row 1 icon title, and url', + action: async () => { + const multipleChecks = 'AutoAlign History - Remove Row 1 icon title, and url'; + + const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(2) > td:nth-child(6) > a')); + const expectedHref = 'https://correlation.edgate.com/exact/autoalign.php?delid=13'; + + //Get text, font, size, and color + const elementText = await element.getDomAttribute('title'); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Remove from list') { + console.log('Passed: AutoAlign History - Remove icon Row 1 title matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 1 title to be: "Remove from list"; Actual: "${elementText}"`); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: AutoAlign History - Remove icon Row 1 href matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 1 href to be: "https://correlation.edgate.com/exact/autoalign.php?delid=13"; actual: "${actualHref}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Remove icon Row 1 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 1 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Remove icon Row 1 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 1 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(73, 80, 87, 1)') { + console.log('Passed: AutoAlign History - Remove icon Row 1 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 1 label text color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Content Set Row 2 label + { + description: 'AutoAlign History - Content Set Row 2 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Content Set Row 2 label'; + + const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(1) > a')); + const expectedHref = 'https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301'; + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'create me') { + console.log('Passed: AutoAlign History - Content Set Row 2 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 2 label to be: "create me"; Actual: "${elementText}"`); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: AutoAlign History - Content Set Row 2 label href matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 2 label href to be: "https://correlation.edgate.com/exact/?function=listUnits&iPublisherId=1427607301"; actual: "${actualHref}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Content Set Row 2 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Content Set Row 2 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(73, 80, 87, 1)') { + console.log('Passed: AutoAlign History - Content Set Row 2 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Content Set Row 2 label text color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Submitted Row 2 label + { + description: 'AutoAlign History - Submitted Row 2 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Submitted Row 2 label'; + + const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(2)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Wed, Feb 25 2026 07:16PM PST') { + console.log('Passed: AutoAlign History - Submitted Row 2 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 2 to be: "Wed, Feb 25 2026 07:16PM PST"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Submitted Row 2 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Submitted Row 2 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: AutoAlign History - Submitted Row 2 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Submitted Row 2 label text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Status Row 2 label + { + description: 'AutoAlign History - Status Row 2 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Status Row 2 label'; + + const elementicon = await driver.findElement(By.css('tr:nth-child(3) .glyphicon')); + const element = await driver.findElement(By.css('tr:nth-child(3) .text-success')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //icon present + if (await elementicon.isDisplayed()) { + console.log('Passed: AutoAlign History - Status Row 2 label icon was displayed as expected'); + } else { + errors.push('Expected: AutoAlign History - Status Row 2 label icon was not displayed'); + } + + //text + if (elementText === 'Completed') { + console.log('Passed: AutoAlign History - Status Row 2 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 2 to be: "Completed"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Status Row 2 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Status Row 2 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(40, 167, 69, 1)') { + console.log('Passed: AutoAlign History - Status Row 2 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Status Row 2 label text color "rgba(40, 167, 69, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Completed Row 2 label + { + description: 'AutoAlign History - Completed Row 2 label text, color, and size', + action: async () => { + const multipleChecks = 'AutoAlign History - Completed Row 2 label'; + + const element = await driver.findElement(By.css('tr:nth-child(3) > td:nth-child(4)')); + + //Get text, font, size, and color + const elementText = await element.getText(); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Wed, Feb 25 2026 07:20PM PST') { + console.log('Passed: AutoAlign History - Completed Row 2 label matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 2 label to be: "Wed, Feb 25 2026 07:20PM PST"; Actual: "${elementText}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Completed Row 2 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Completed Row 2 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(33, 37, 41, 1)') { + console.log('Passed: AutoAlign History - Completed Row 2 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Completed Row 2 label text color "rgba(33, 37, 41, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Review Row 2 icon + { + description: 'AutoAlign History - Review Row 2 icon title, and url', + action: async () => { + const multipleChecks = 'AutoAlign History - Review Row 2 icon title, and url'; + + const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(3) > td:nth-child(5) > a')); + const expectedHref = 'https://correlation.edgate.com/exact/autoalign_review.php?id=12'; + + //Get text, font, size, and color + const elementText = await element.getDomAttribute('title'); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Review Alignments') { + console.log('Passed: AutoAlign History - Review icon Row 2 title matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 2 title "Review Alignments"; Actual: "${elementText}"`); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: AutoAlign History - Review icon Row 2 href matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 2 href to be: "https://correlation.edgate.com/exact/autoalign_review.php?id=12"; actual: "${actualHref}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Review icon Row 2 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Review icon Row 2 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(73, 80, 87, 1)') { + console.log('Passed: AutoAlign History - Review icon Row 2 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Review icon Row 2 label text color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //AutoAlign History - Remove Row 2 icon + { + description: 'AutoAlign History - Remove Row 2 icon title, and url', + action: async () => { + const multipleChecks = 'AutoAlign History - Remove Row 2 icon title, and url'; + + const element = await driver.findElement(By.css('body > div.container.body > div > div.right_col > div > div > div > table > tbody > tr:nth-child(3) > td:nth-child(6) > a')); + const expectedHref = 'https://correlation.edgate.com/exact/autoalign.php?delid=12'; + + //Get text, font, size, and color + const elementText = await element.getDomAttribute('title'); + const elementFont = await element.getCssValue('font-family'); + const elementSize = await element.getCssValue('font-size'); + const elementColor = await element.getCssValue('color'); + + //Track all errors + const errors = []; + + //text + if (elementText === 'Remove from list') { + console.log('Passed: AutoAlign History - Remove icon Row 2 title matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 2 "Remove from list"; Actual: "${elementText}"`); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: AutoAlign History - Remove icon Row 2 href matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 2 href to be: "https://correlation.edgate.com/exact/autoalign.php?delid=12"; actual: "${actualHref}"`); + } + + //font + if (elementFont === `Poppins, sans-serif`) { + console.log('Passed: AutoAlign History - Remove icon Row 2 label font-family matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 2 label font-family "Poppins, sans-serif"; Actual: ${elementFont}`); + } + + //size + if (elementSize === '14.3px') { + console.log('Passed: AutoAlign History - Remove icon Row 2 label text font-size matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 2 label text font-size "14.3px"; Actual: "${elementSize}"`); + } + + //color + if (elementColor === 'rgba(73, 80, 87, 1)') { + console.log('Passed: AutoAlign History - Remove icon Row 2 label text color matched as expected'); + } else { + errors.push(`Expected: AutoAlign History - Remove icon Row 2 label text color "rgba(73, 80, 87, 1)"; Actual: "${elementColor}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + + + + + + + + + + + + + + + + + + //FOOTER + //EdGate Copyright Logo + { + description: 'EdGate Copyright Logo', + action: async () => { + const multipleChecks = 'EdGate Copyright Logo'; + + const element = await driver.findElement(By.css('footer .pull-right > a')); + const elementLogo = await element.findElement(By.css('img')); + const expectedHref = 'https://www.edgate.com/'; + + //Track all errors + const errors = []; + + //icon present + if (await elementLogo.isDisplayed()) { + console.log('Passed: EdGate Copyright Logo was displayed as expected'); + } else { + errors.push('Expected: EdGate Copyright Logo was not displayed'); + } + + //href - browser resolves the link with a trailing slash, so remove it before comparing + const actualHref = await element.getAttribute('href'); + if (actualHref && actualHref === expectedHref) { + console.log('Passed: EdGate Copyright Logo href matched as expected'); + } else { + errors.push(`Expected: EdGate Copyright Logo href to be: "https://www.edgate.com/"; actual: "${actualHref}"`); + } + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, + + //NEXT ACTION + { + description: 'Log Out', + action: async () => { + const multipleChecks = 'Log Out'; + + //Track all errors + const errors = []; + + await driver.findElement(By.css('#navbarDropdown > span')).click(); + await driver.sleep(2000); + await driver.findElement(By.linkText('Log Out')).click(); + console.log('----->| NEXT ACTION: Clicked User Profile and Logged Out'); + + //Wait until the element exists in the DOM + const exactLogo = await driver.wait( + until.elementLocated(By.css('.logo')), + 30000 + ); + + //Wait until it becomes visible + await driver.wait( + until.elementIsVisible(exactLogo), + 30000 + ); + + //Wait for page to load completely + await driver.wait(async () => { + const readyState = await driver.executeScript('return document.readyState'); + return readyState === 'complete'; + }, 30000, 'ExACT Langing page did not fully load within 30 seconds'); + console.log('Passed: ExACT Landing Page loaded successfully'); + + //Throw summary if any validation failed + if (errors.length > 0) { + //Add summary line only when multiple checks failed + if (errors.length > 1) { + errors.unshift(`${multipleChecks} - Multiple validation checks did not pass`); + } + + //Throw collected messages — catch() will prefix with "FAILED:" + throw new Error(errors.join('\n')); + } + } + }, +]; + +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', 'alignAutoAlignPage'); + + 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', 'alignAutoAlignPage'); + if (fs.existsSync(screenshotDir)) { + fs.rmSync(screenshotDir, { recursive: true, force: true }); + } + fs.mkdirSync(screenshotDir, { recursive: true }); + + //Remove old Excel file + if (fs.existsSync('alignAutoAlignPageResults.xlsx')) { + fs.unlinkSync('alignAutoAlignPageResults.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; + + const failedSteps = []; //Track failed steps + + for (const step of steps) { + const stepIndex = steps.indexOf(step) + 1; + const timestamp = new Date().toISOString(); + + try { + //Screenshot of failed step + await step.action(); + + //Log a successful step with no screenshot + worksheet = logStep( + worksheet, + step.description, + 'Passed', + stepIndex, + timestamp, + null //No screenshot for passed steps + ); + + } catch (error) { + //Only take screenshot if the step fails + 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}`); + failedSteps.push(`Step ${stepIndex}: ${step.description} - ${error.message}`); //Track failed step + testStatus = 'Failed'; + allStepsPassed = false; + } + } + + if (allStepsPassed) { + console.log('------------->| THE END |<-------------'); + console.log('PASSED: Align - AutoAlign Page(alignAutoAlignPage); All test steps completed successfully'); + testStatus = 'Passed'; + } else { + console.log('------------->| THE END |<-------------'); + console.log('FAILED: Align - AutoAlign Page(alignAutoAlignPage); One or more test steps failed'); + console.log('FAILED STEPS:'); + failedSteps.forEach(step => console.error(` ✗ ${step}`)); + 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, 'alignAutoAlignPageResults.xlsx'); +} finally { + await driver.quit(); +} +})(); +} + +export default alignAutoAlignPage;