From 8e77e7f62231a107cd60cca1ff7f204e455d2078 Mon Sep 17 00:00:00 2001 From: jhuerta Date: Fri, 16 Oct 2026 09:05:35 -0700 Subject: [PATCH] Completed Dashboard script --- correlationsDashboard.xlsx | Bin 36461 -> 35744 bytes tests/correlationsDashboard.js | 345 ++++++++++++++++++++------------- 2 files changed, 208 insertions(+), 137 deletions(-) diff --git a/correlationsDashboard.xlsx b/correlationsDashboard.xlsx index 2dcb73f30b02db01f089e0d9b9b2e7db6177fc34..a05d5e36f43efd294e04da11dcdf37aace57fdd2 100644 GIT binary patch delta 3069 zcmZXWS!|S56vvw>w2FlSkut5?medIp+S|GJ+q*zpXz4;XXrWNLeC^E8WjfQ&OiS5O zfhs9WIf@d|@SyR<2M8``6hcfPHAZdJ;3Ep*!8ODfUNG_A?~eWM=gi~$&bjB@|5?8K z`$gBK*Ik#-coz9PzQ{P+l$3O~>FNc~hpxqHD^`jXT#Qv@=+Lp|%m4lJu-FZC`Nx;c z+Zo8KNw8|G8~)BeU>h3kwRDlL}MoOb1oKEOf*2 z0tB@MJLUs1KOIBMs2gq-6vE?zb`j}bndYz(_7&n~jp5ipV4%;84TM9vmHuE5ZWJ~< zj1|Q)mJwdi7WGG980~g&-LUu{h(LbP>h!*FFdQk!HABAK{)j&SJB#W?b3@lG^VuS@ zs5)W}`}c+;Ls4jwvlBcOui&X8ufel^*Gu58H!s0F4cFVs=!jsdOeP${cwyT}Fl+)Y z%1Q9Kj~yW-!b7wY0%u5Jg82+_n9DM&M9cA5;_JKu@h$KGdGaH#-He_$|iIiT9jrn_bS1qR< zwLZ~V_VS$WQ=C)xl86*9@6g+IB(-`V81qM>aI+-?a_URP^A**S>S#SX;5qoQeo&+; zr+cwtNN+x9BN=%yTODq=(v0EP=9qmr-J95I^J6UpZnU(DM3Swr`c?v? z4cRcg)t+)mMzX|i;fB@QUKJxLUe>X0_-Px4Z`<4;wGP{7sz{M6-DX$~`-Xg+JR76tNK>tA=)l-EgVh zo>WPrYVqAB@8o!LXVmuA5ccx=T=|)#y_fOx;g&2J0xC- zeU9gRZW!;uaJffNT0@$uS*X)wC=0Hbj;wXXuy9Q;#}|7YSsV0H>|oS~p}+62tp@#K z@Ud_phi2-9|(^VLG0|Acr5{g=)8*M0)wfmN_J;CE0i_y++3e+Gmx z*O5%WQ7o@F_F(V~<-xTL`HevRWB@}Ce%9`OaN z6k5W9KJ2XsFN|cu)iAcCUov8U&L#F_=6tgdQouz-uSO(O@1O+HHG?v1asTGIUQ@dPxTDsc_%hpAJV>+V6AIaTT^ VKLW|8%UrWZq4KmRCH)m<{VyNzmN@_b delta 3751 zcmZXXX-rgC6vuHsG!~FVTH%egfNimY@Ob;eCMd`z$Sw+qGYkWxz`%gfYS9+!hStWO zRAWmUNfZ6hB{pttn#O9ACT+FLhi-{Y~aE~nuuC)koGCTLtR$qT8;2Z79fX}i!ql$_y8X8d) zpnR2xn2}X|m@#Eo>=Rzi!HAf%F&c}=n7Rp55dq%G!LfeIX~Q~}6RRaxUJ~_F7ak1- zL*2g7PLDL#fz-7nQ~HOh%b+q|YDrMPRR-4*9hL z*m;HSONJxlchq}gdr-V&PKxu!dcM$f;Y3zmH`4=>e zRtqX*EdHGQ3}Zi*IdOwk7M3ZPty6Ltds^XKo0`pB-{;^Q)e#<4IoOsA27jYs5l2gDypM0Y~e_6Td4g^QFE9K z8#9e|7Y?M8UZ-jOXyddN=5N7}$%-q$v3v}DlE0gS6qPA;7GUUjfxB}_^m2ojik1Jk?l*eM%%Tf1PqU~(?s&%p4 z>2-cLS6h^HC)bRMSa7HUwV^G_b9?>ohrqJRfSZUdDi&Lbo0V8_wsJp?s;N%Yb5$7n zxoQ&@(iL{Hv{mCqoUMEk&Q@=8SHTty_|@=&UW27(D^p;srVYn5i7~pW_iNte9vjZ% zuh!%DAFMwSg;ZIz$o8Vg*~MDy<+s`~4l+#!9j?RBM|IC*$R=ZfDz$IG(6J4p(acpv zl$;@zS+68S2T(;AZdav1xZa)Cgrr9SIV-=d=gp@#5d34B0A$1i0La4N`EnHS88a7fB+tSgeH*JayJh_PrJa_0wn_~rcZ{`B45;K_G9?NyKbAeUUU>V7iKv|@@KIQ-RXC42`ag1 zkuJFA$1N4#eb5y%M0VPE;c_<)*fp>mRuyM~9N@$hvVmy25WsNJU>Yn8WJ6+4fm=jF zRLKCM@IViS(<4ta_|KjK>_R0yNP4vRd zuuqukAq>&tO%4U)=da6j{1rU`&kpmh(qQK>7m-|%XdBFMTzUkZJmgkO&s+gMj9{%h z5%=b+62?}TtAP>sOec>u(q{B~D`j*dnu8{h8=iFG{ZV~My!&+tGe=rIkMDx=i2~0T odtjXWv&P`+gz0&2AKaTL^eh?&<7koR { //CONSTANTS //My Content Widget -const myContentItemTotals = '5038 items'; +const myContentItemTotals = '5040 items'; const steps = [ { description: 'Navigate to ExACT Landing Page', action: async () => await driver.navigate().to('https://correlation.edgate.com/exact/login.php') }, @@ -36,6 +36,7 @@ const steps = [ description: 'Login', action: async () => { const multipleChecks = 'Log In'; + console.log('------------->| CORRELATION DASHBOARD |<-------------'); const errors = []; @@ -110,9 +111,10 @@ const steps = [ //DASHBOARD HEADER //ExACT Dashboard Logo { - description: 'Validate ExACT Dashboard Logo', + description: 'ExACT Dashboard Logo', action: async () => { const multipleChecks = 'ExACT Dashboard Logo'; + const element = await driver.findElement(By.css('span > img')); const expectedSrc = 'https://correlation.edgate.com/exact/images/exact.svg'; @@ -129,9 +131,9 @@ const steps = [ //image src const actualSrc = await element.getAttribute('src'); if (actualSrc && actualSrc === expectedSrc) { - console.log(`Passed: Logo src "${actualSrc}" matched expected`); + console.log('Passed: ExACT by edgate logo src matched expected'); } else { - errors.push(`Expected: Logo src: "${expectedSrc}"; but found "${actualSrc}"`); + errors.push(`Expected: ExACT by edgate logo src: "${expectedSrc}"; but found "${actualSrc}"`); } //Throw summary if any validation failed @@ -149,9 +151,10 @@ const steps = [ //Navigation show/hide icon { - description: 'Validate Navigation panel show/hide icon', + description: 'Navigation panel show/hide icon', action: async () => { const multipleChecks = 'Navigation panel show/hide icon'; + const element = await driver.findElement(By.css('.fa-bars')); //Track all errors @@ -179,9 +182,10 @@ const steps = [ //Search textbox { - description: 'Validate Search textbox', + description: 'Search textbox', action: async () => { const multipleChecks = 'Search textbox'; + const element = await driver.findElement(By.css('.searchbar-input')); const elementIcon = await driver.findElement(By.css('.searchbar-submit > .fa')).getCssValue('color'); @@ -237,9 +241,9 @@ const steps = [ //search icon color if (elementIcon === 'rgba(255, 255, 255, 1)') { - console.log('Passed: Search icon color matched as expected'); + console.log('Passed: Search textbox icon color matched as expected'); } else { - errors.push(`Expected: Search icon color did not match; Actual: "${elementIcon}"`); + errors.push(`Expected: Search textbox icon color did not match; Actual: "${elementIcon}"`); } //Throw summary if any validation failed @@ -256,9 +260,10 @@ const steps = [ //ExACT Help Icon { - description: 'Validate ExACT Help Icon', + description: 'ExACT Help Icon', action: async () => { const multipleChecks = 'ExACT Help Icon'; + const element = await driver.findElement(By.css('.e-help path')); const link = await driver.findElement(By.css('.e-help a.user-profile')); const expectedHref = 'https://correlation.edgate.com/exact/help.php'; @@ -276,7 +281,7 @@ const steps = [ //href const actualHref = await link.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Help icon href "${actualHref}" matched as expected`); + console.log('Passed: Help icon href matched as expected'); } else { errors.push(`Expected: Help icon href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -294,11 +299,12 @@ const steps = [ } }, - //Notification Icon + //Notification bell Icon { - description: 'Validate Notification Icon', + description: 'Notification Bell Icon', action: async () => { - const multipleChecks = 'Notification Icon'; + const multipleChecks = 'Notification Bell Icon'; + const element = await driver.findElement(By.css('#navbarDropdown > svg')); //Track all errors @@ -306,9 +312,9 @@ const steps = [ //icon present if (await element.isDisplayed()) { - console.log('Passed: Notification icon was displayed as expected'); + console.log('Passed: Notification bell icon was displayed as expected'); } else { - errors.push('Expected: Notification icon was not displayed'); + errors.push('Expected: Notification bell icon was not displayed'); } //Throw summary if any validation failed @@ -324,11 +330,12 @@ const steps = [ } }, - //Profile dropdown + //User profile dropdown { - description: 'Validate Profile Dropdown', + description: 'User Profile Dropdown', action: async () => { - const multipleChecks = 'Profile Dropdown'; + const multipleChecks = 'User Profile Dropdown'; + const element = await driver.findElement(By.css('#navbarDropdown > span')).getText(); const userIcon = await driver.findElement(By.css('.fa-user')); const downCarrotIcon = await driver.findElement(By.css('.nav-item:nth-child(1) > #navbarDropdown')); @@ -338,7 +345,7 @@ const steps = [ //text if (element === 'Juan Huerta') { - console.log('Passed: Profile dropdown text matched as expected'); + console.log('Passed: User profile dropdown text matched as expected'); } else { errors.push(`Expected: "Juan Huerta"; Actual: "${element}"`); } @@ -352,9 +359,9 @@ const steps = [ //Down carrot icon if (await downCarrotIcon.isDisplayed()) { - console.log('Passed: Profile down carrot icon was displayed as expected'); + console.log('Passed: User profile down carrot icon was displayed as expected'); } else { - errors.push('Expected: Profile down carrot icon was not displayed'); + errors.push('Expected: User profile down carrot icon was not displayed'); } //Throw summary if any validation failed @@ -373,9 +380,10 @@ const steps = [ //NAVIGATION PANEL //Dashboard { - description: 'Validate Dashboard Navigation title text, size, and color', + description: 'Dashboard Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Dashboard Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-dashboard')); const element = await driver.findElement(By.linkText('Dashboard')); const expectedHref = 'https://correlation.edgate.com/exact/'; @@ -407,7 +415,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Dashboard Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Dashboard Navigation href matched as expected'); } else { errors.push(`Expected: Dashboard Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -455,9 +463,10 @@ const steps = [ //Frameworks { - description: 'Validate Frameworks Navigation title text, size, and color', + description: 'Frameworks Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Frameworks Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-framework')); const element = await driver.findElement(By.linkText('Frameworks')); const expectedHref = 'https://correlation.edgate.com/exact/frameworks.php'; @@ -489,7 +498,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Frameworks Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Frameworks Navigation href matched as expected'); } else { errors.push(`Expected: Frameworks Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -537,9 +546,10 @@ const steps = [ //Align { - description: 'Validate Align Navigation title text, size, and color', + description: 'Align Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Align Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-align')); const element = await driver.findElement(By.linkText('Align')); const expectedHref = 'https://correlation.edgate.com/exact/browse.php'; @@ -571,7 +581,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Align Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Align Navigation href matched as expected'); } else { errors.push(`Expected: Align Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -619,9 +629,10 @@ const steps = [ //Upload { - description: 'Validate Upload Navigation title text, size, and color', + description: 'Upload Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Upload Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-upload')); const element = await driver.findElement(By.linkText('Upload')); const expectedHref = 'https://correlation.edgate.com/exact/submit.php'; @@ -653,7 +664,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Upload Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Upload Navigation href matched as expected'); } else { errors.push(`Expected: Upload Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -701,9 +712,10 @@ const steps = [ //Activity Report { - description: 'Validate Activity Report Navigation title text, size, and color', + description: 'Activity Report Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Activity Report Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-upload')); const element = await driver.findElement(By.linkText('Activity Report')); const expectedHref = 'https://correlation.edgate.com/exact/activity_reporting.php'; @@ -735,7 +747,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Activity Report Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Activity Report Navigation href matched as expected'); } else { errors.push(`Expected: Activity Report Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -783,9 +795,10 @@ const steps = [ //Report { - description: 'Validate Report Navigation title text, size, and color', + description: 'Report Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Report Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-upload')); const element = await driver.findElement(By.linkText('Report')); const expectedHref = 'https://correlation.edgate.com/exact/reports.php'; @@ -817,7 +830,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Report Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Report Navigation href matched as expected'); } else { errors.push(`Expected: Report Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -865,9 +878,10 @@ const steps = [ //Approve { - description: 'Validate Approve Navigation title text, size, and color', + description: 'Approve Navigation title text, size, color, and href', action: async () => { const multipleChecks = 'Approve Navigation title'; + const elementIcon = await driver.findElement(By.css('.fb-upload')); const element = await driver.findElement(By.linkText('Approve')); const expectedHref = 'https://correlation.edgate.com/exact/approvecontent.php'; @@ -899,7 +913,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Approve Navigation href "${actualHref}" matched as expected`); + console.log('Passed: Approve Navigation href matched as expected'); } else { errors.push(`Expected: Approve Navigation href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -948,9 +962,10 @@ const steps = [ //DASHBOARD //Dashboard title { - description: 'Validate dashboard title text, size, and color', + 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 @@ -1006,9 +1021,10 @@ const steps = [ //MY CONTENT WIDGET //My Content Widget title { - description: 'Validate My Content widget title text, color, and size', + description: 'My Content widget title text, color, and size', action: async () => { const multipleChecks = 'My Content widget title'; + const element = await driver.findElement(By.css('.h-100 h2:nth-child(2)')); //Get text, font, size, and color @@ -1063,9 +1079,10 @@ const steps = [ //My Content total item Count { - description: 'Validate My Content total item count', + description: 'My Content total item count', action: async () => { const multipleChecks = 'My Content total item count'; + const element = await driver.findElement(By.css('#badge_content_total')); //Get button text, text font, text size, text color, and button color @@ -1126,15 +1143,15 @@ const steps = [ } }, - //Ellipsis icon color + //My Content - Ellipsis icon color { - description: 'Validate ellipsis icon color', + description: 'My Content Ellipsis icon color', action: async () => { const elementStyle = await driver.findElement(By.css('.fa-ellipsis-h')).getCssValue('color'); if (elementStyle === 'rgba(40, 39, 90, 1)') { - console.log('Passed: Ellipsis icon color matched as expected'); + console.log('Passed: My Content Ellipsis icon color matched as expected'); } else { - errors.push(`Expected: Ellipsis icon color did not match; Actual: "${elementStyle}"`); + errors.push(`Expected: My Content Ellipsis icon color did not match; Actual: "${elementStyle}"`); } } }, @@ -1142,9 +1159,10 @@ const steps = [ //My Content - filter row //Filter textbox placeholder { - description: 'Validate Filter placeholder text', + description: 'Filter placeholder text', action: async () => { const multipleChecks = 'Filter textbox'; + const elementIcon = await driver.findElement(By.css('.col-12 > .fa')).getCssValue('color'); const element = await driver.findElement(By.css('#content-org-filter')); @@ -1219,9 +1237,10 @@ const steps = [ //Sort label { - description: 'Validate My Sort label', + description: 'My Sort label', action: async () => { const multipleChecks = 'Sort label'; + const element = await driver.findElement(By.css('.col-4')); //Get text, font, size, and color @@ -1276,9 +1295,10 @@ const steps = [ //Sort dropdown values { - description: 'Validate Sort dropdown values', + description: 'Sort dropdown values', action: async () => { const multipleChecks = 'Sort dropdown values'; + const dropdown = await driver.wait(until.elementLocated(By.css('#orgsort')), 5000); //Wrap with Select class for full dropdown functionality @@ -1327,9 +1347,10 @@ const steps = [ //My Content - Sort by Count (default) { - description: 'Validate sort order by Count', + description: 'sort order by Count', action: async () => { const multipleChecks = 'My Content - Sort order by Count'; + const errors = []; const rows = await driver.executeScript(` @@ -1356,7 +1377,7 @@ const steps = [ { position: 6, name: 'Post NIght July26', count: '278', href: '/exact/contentset_edit_modal.php?id=1476789487' }, { position: 7, name: 'Algebra', count: '194', href: '/exact/contentset_edit_modal.php?id=585821586' }, { position: 8, name: 'seesaw test', count: '156', href: '/exact/contentset_edit_modal.php?id=1476742363' }, - { position: 9, name: 'US History III', count: '67', href: '/exact/contentset_edit_modal.php?id=585821589' }, + { position: 9, name: 'US History III', count: '68', href: '/exact/contentset_edit_modal.php?id=585821589' }, { position: 10, name: 'Import Align - Concept Based 1', count: '44', href: '/exact/contentset_edit_modal.php?id=1323320445' }, { position: 11, name: 'Import Align - Concept Based 2', count: '44', href: '/exact/contentset_edit_modal.php?id=1323322624' }, { position: 12, name: 'Import Align - Direct Align 1', count: '44', href: '/exact/contentset_edit_modal.php?id=1323322921' }, @@ -1364,11 +1385,11 @@ const steps = [ { position: 14, name: 'Copy Move Delete Test 1', count: '35', href: '/exact/contentset_edit_modal.php?id=1228574323' }, { position: 15, name: 'ECS-3037 On Prod TC2', count: '26', href: '/exact/contentset_edit_modal.php?id=1473840373' }, { position: 16, name: 'ECS-3037 On Prod TC1', count: '24', href: '/exact/contentset_edit_modal.php?id=1473840197' }, - { position: 17, name: 'create me', count: '10', href: '/exact/contentset_edit_modal.php?id=1427607301' }, + { position: 17, name: 'create me', count: '9', href: '/exact/contentset_edit_modal.php?id=1427607301' }, { position: 18, name: 'Illustrative Math Test 1', count: '5', href: '/exact/contentset_edit_modal.php?id=1473839901' }, { position: 19, name: 'Illustrative Math Test 2', count: '5', href: '/exact/contentset_edit_modal.php?id=1473840078' }, { position: 20, name: 'webinar test', count: '5', href: '/exact/contentset_edit_modal.php?id=1476429225' }, - { position: 21, name: 'create import test', count: '1', href: '/exact/contentset_edit_modal.php?id=1478966441' }, + { position: 21, name: 'create import test', count: '3', href: '/exact/contentset_edit_modal.php?id=1478966441' }, { position: 22, name: 'New One For Agust Post Night', count: '0', href: '/exact/contentset_edit_modal.php?id=1478966652' } ]; @@ -1408,9 +1429,10 @@ const steps = [ //MY STANDARDS WIDGET //My Standards Widget title (active) { - description: 'Validate My Standards Widget title text, color, and size', + description: 'My Standards Widget title text, color, and size', action: async () => { const multipleChecks = 'My Standards Widget title (active)'; + const element = await driver.findElement(By.css('#mystd-tab')); //Get text, font, size, and color @@ -1465,9 +1487,10 @@ const steps = [ //My Standards - Other Available Standards tab title { - description: 'Validate Other Available Standards tab title text, color, and size', + description: 'Other Available Standards tab title text, color, and size', action: async () => { const multipleChecks = 'Other Available Standards tab title'; + const element = await driver.findElement(By.css('#availstd-tab')); //Get text, font, size, and color @@ -1522,9 +1545,10 @@ const steps = [ //My Standards dropdown { - description: 'Validate My Standards dropdown list and value', + description: 'My Standards dropdown list and value', action: async () => { const multipleChecks = 'My Standards dropdown list'; + const elementDropdown = await driver.findElement(By.css('#stdparent')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); @@ -1589,9 +1613,9 @@ const steps = [ } if (JSON.stringify(actual) === JSON.stringify(expected)) { - console.log('Passed: My Standards Dropdown list matched as expected'); + console.log('Passed: My Standards dropdown list matched as expected'); } else { - throw new Error(`Expected: My Standards Dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); + throw new Error(`Expected: My Standards dropdown list: ${JSON.stringify(expected)}, Actual: ${JSON.stringify(actual)}`); } //Throw summary if any validation failed @@ -1609,9 +1633,10 @@ const steps = [ //My Standards - Organization column title { - description: 'Validate My Standards - Organization column title, text, and font size', + description: 'My Standards - Organization column title, text, and font size', action: async () => { const multipleChecks = 'My Standards - Organization column title' + const element = await driver.findElement(By.css('.table:nth-child(2) th:nth-child(1)')); //Get text, font, size, and color @@ -1666,9 +1691,10 @@ const steps = [ //My Standards - Export column title { - description: 'Validate My Standards - Export column title, text, and font size', + description: 'My Standards - Export column title, text, and font size', action: async () => { const multipleChecks = 'My Standards - Export column title'; + const element = await driver.findElement(By.css('.table:nth-child(2) > thead .text-center:nth-child(2)')); //Get text, font, size, and color @@ -1723,9 +1749,10 @@ const steps = [ //My Standards - Manage column title { - description: 'Validate My Standards - Manage column title, text, and font size', + description: 'My Standards - Manage column title, text, and font size', action: async () => { const multipleChecks = 'My Standards - Manage column title'; + const element = await driver.findElement(By.css('.text-center:nth-child(3)')); //Get text, font, size, and color @@ -1780,9 +1807,10 @@ const steps = [ //My Standards - More Info column title { - description: 'Validate My Standards - More Info column title, text, and font size', + description: 'My Standards - More Info column title, text, and font size', action: async () => { const multipleChecks = 'My Standards - More Info column title'; + const element = await driver.findElement(By.css('.table-sm > thead .text-center:nth-child(4)')); //Get text, font, size, and color @@ -1837,9 +1865,10 @@ const steps = [ //My Standards - View column title { - description: 'Validate My Standards - View column title, text, and font size', + description: 'My Standards - View column title, text, and font size', action: async () => { const multipleChecks = 'My Standards - View column title'; + const element = await driver.findElement(By.css('thead .text-center:nth-child(5)')); //Get text, font, size, and color @@ -1894,9 +1923,10 @@ const steps = [ //My Standards = Alabama { - description: 'Validate My Standards - Organization = Alabama Standards text', + description: 'My Standards - Organization = Alabama Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Alabama'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(1) > td:nth-child(1)')); //Get text, font, color, and size @@ -1976,9 +2006,10 @@ const steps = [ //My Standards = Arizona { - description: 'Validate My Standards - Organization = Arizona Standards text', + description: 'My Standards - Organization = Arizona Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Arizona'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(2) > td:nth-child(1)')); //Get text, font, color, and size @@ -2058,9 +2089,10 @@ const steps = [ //My Standards = California { - description: 'Validate My Standards - Organization = California Standards text', + description: 'My Standards - Organization = California Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = California'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(3) > td:nth-child(1)')); //Get text, font, color, and size @@ -2140,9 +2172,10 @@ const steps = [ //My Standards = Florida { - description: 'Validate My Standards - Organization = Florida Standards text', + description: 'My Standards - Organization = Florida Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Florida'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(4) > td:nth-child(1)')); //Get text, font, color, and size @@ -2222,9 +2255,10 @@ const steps = [ //My Standards = Georgia { - description: 'Validate My Standards - Organization = Georgia Standards text', + description: 'My Standards - Organization = Georgia Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Georgia'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(5) > td:nth-child(1)')); //Get text, font, color, and size @@ -2304,9 +2338,10 @@ const steps = [ //My Standards = Illinois { - description: 'Validate My Standards - Organization = Illinois Standards text', + description: 'My Standards - Organization = Illinois Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Illinois'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(6) > td:nth-child(1)')); //Get text, font, color, and size @@ -2386,9 +2421,10 @@ const steps = [ //My Standards = New York { - description: 'Validate My Standards - Organization = New York Standards text', + description: 'My Standards - Organization = New York Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = New York'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(7) > td:nth-child(1)')); //Get text, font, color, and size @@ -2468,9 +2504,10 @@ const steps = [ //My Standards = Texas { - description: 'Validate My Standards - Organization = Texas Standards text', + description: 'My Standards - Organization = Texas Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Texas'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(8) > td:nth-child(1)')); //Get text, font, color, and size @@ -2550,9 +2587,10 @@ const steps = [ //My Standards = Washington { - description: 'Validate My Standards - Organization = Washington Standards text', + description: 'My Standards - Organization = Washington Standards text', action: async () => { const multipleChecks = 'My Standards - Organization = Washington'; + const element = await driver.findElement(By.css('#stdbody > tr:nth-child(9) > td:nth-child(1)')); //Get text, font, color, and size @@ -2633,9 +2671,10 @@ const steps = [ //CORRELATION COVERAGES WIDGET //Correlation Coverages Widget title { - description: 'Validate Correlation Coverages Widget title text, color, and size', + description: 'Correlation Coverages Widget title text, color, and size', action: async () => { const multipleChecks = 'Correlation Coverages Widget title'; + const element = await driver.findElement(By.css('.dash-gap-card h2')); //Get text, font, size, and color @@ -2690,9 +2729,10 @@ const steps = [ //Filters button { - description: 'Validate Filters button', + description: 'Filters button', action: async () => { const multipleChecks = 'Filters button'; + const element = await driver.findElement(By.css('.gap-filters-wrap > .btn')); const elementIcon = await element.findElement(By.css('.btn-primary > img')); @@ -2763,9 +2803,10 @@ const steps = [ //Correlation Coverages Widget sub-title { - description: 'Validate Correlation Coverages Widget sub-title text, color, and size', + description: 'Correlation Coverages Widget sub-title text, color, and size', action: async () => { const multipleChecks = 'Correlation Coverages Widget sub-title'; + const element = await driver.findElement(By.css('.gap-idle-text')); //Get text, font, size, and color @@ -2820,9 +2861,10 @@ const steps = [ //Correlation Coverages Default Image { - description: 'Validate Correlation Coverages Default Image', + description: 'Correlation Coverages Default Image', action: async () => { const multipleChecks = 'Correlation Coverages Default Image'; + const element = await driver.findElement(By.css('.gap-idle-wrap > img')); //Track all errors @@ -2861,7 +2903,7 @@ const steps = [ //Semantic Standards Comparison Widget title { - description: 'Validate Semantic Standards Comparison Widget title text, font, size, and color', + description: 'Semantic Standards Comparison Widget title text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.standards-compare h2')); @@ -2920,7 +2962,7 @@ const steps = [ //National Standards tab title, text, and font size (active) { - description: 'Validate National Standards tab title text, color, and size', + description: 'National Standards tab title text, color, and size', action: async () => { const element = await driver.findElement(By.css('#sscMap-tab')); @@ -2980,7 +3022,7 @@ const steps = [ //Custom Comparison tab title and color (dimmed) { - description: 'Validate Custom Comparison tab title, text color, and size', + description: 'Custom Comparison tab title, text color, and size', action: async () => { const element = await driver.findElement(By.css('#sscFilterLaunch-tab')); @@ -3040,7 +3082,7 @@ const steps = [ //Custom Comparison - State Dropdown values { - description: 'Validate Custom Comparison - State Dropdown values', + description: 'Custom Comparison - State Dropdown values', action: async () => { const elementDropdown = await driver.findElement(By.css('#compstate')); const selectedOption = await elementDropdown.findElement(By.css('option:checked')); @@ -3099,9 +3141,10 @@ const steps = [ //Custom Comparison - State dropdown Go button validation { - description: 'Validate Go button', + description: 'Go button', action: async () => { const multipleChecks = 'Go button'; + const element = await driver.findElement(By.css('#compbtn')); //Get button text, text font, text size, text color, and button color @@ -3164,7 +3207,7 @@ const steps = [ //Semantic Standards Comparison sub-title, text, font, size, and color { - description: 'Validate Semantic Standards Comparison sub-title text, font, size, and color', + description: 'Semantic Standards Comparison sub-title text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('#sscMapPane > p')); @@ -3235,7 +3278,7 @@ const steps = [ //Latest Standards Update Widget title, text, font, size, and color { - description: 'Validate Latest Standards Update Widget text, font, size, and color', + description: 'Latest Standards Update Widget text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.latest-standards h2')); @@ -3295,9 +3338,10 @@ const steps = [ //See More Button { - description: 'Validate See More button text, size, and color', + description: 'See More button text, size, color, and href', action: async () => { const multipleChecks = 'See More button'; + const element = await driver.findElement(By.linkText('See More')); const elementIcon = await driver.findElement(By.css('.e-btn:nth-child(1) > .icon-See-More')); const expectedHref = 'https://correlation.edgate.com/pic/standards-updates.html'; @@ -3322,7 +3366,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: See More href "${actualHref}" matched as expected`); + console.log('Passed: See More href matched as expected'); } else { errors.push(`Expected: See More button href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -3377,7 +3421,7 @@ const steps = [ //Latest Standards Update Update 1 title, text, font, size, and color { - description: 'Validate Latest Standards Update 1 title, text, font, size, and color', + description: 'Latest Standards Update 1 title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(1) > h4')); @@ -3437,7 +3481,7 @@ const steps = [ //Latest Standards Update Update 1 sub-title, text, font, size, and color { - description: 'Validate Latest Standards Update 1 sub-title, text, font, size, and color', + description: 'Latest Standards Update 1 sub-title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(1) > p')); @@ -3497,7 +3541,7 @@ const steps = [ //Latest Standards Update Update 1 date, text, font, size, and color { - description: 'Validate Latest Standards Update 1 date, text, font, size, and color', + description: 'Latest Standards Update 1 date, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(1) em')); @@ -3557,7 +3601,7 @@ const steps = [ //Latest Standards Update Update 2 title, text, font, size, and color { - description: 'Validate Latest Standards Update 2 title, text, font, size, and color', + description: 'Latest Standards Update 2 title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(2) > h4')); @@ -3617,7 +3661,7 @@ const steps = [ //Latest Standards Update Update 2 sub-title, text, font, size, and color { - description: 'Validate Latest Standards Update 2 sub-title, text, font, size, and color', + description: 'Latest Standards Update 2 sub-title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(2) > p')); @@ -3677,7 +3721,7 @@ const steps = [ //Latest Standards Update Update 2 date, text, font, size, and color { - description: 'Validate Latest Standards Update 2 date, text, font, size, and color', + description: 'Latest Standards Update 2 date, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(2) em')); @@ -3737,7 +3781,7 @@ const steps = [ //Latest Standards Update Update 3 title, text, font, size, and color { - description: 'Validate Latest Standards Update 3 title, text, font, size, and color', + description: 'Latest Standards Update 3 title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(3) > h4')); @@ -3797,7 +3841,7 @@ const steps = [ //Latest Standards Update Update 3 sub-title, text, font, size, and color { - description: 'Validate Latest Standards Update 3 sub-title, text, font, size, and color', + description: 'Latest Standards Update 3 sub-title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(3) > p')); @@ -3857,7 +3901,7 @@ const steps = [ //Latest Standards Update Update 3 date, text, font, size, and color { - description: 'Validate Latest Standards Update 3 date, text, font, size, and color', + description: 'Latest Standards Update 3 date, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(3) em')); @@ -3917,7 +3961,7 @@ const steps = [ //Latest Standards Update Update 4 title, text, font, size, and color { - description: 'Validate Latest Standards Update 4 title, text, font, size, and color', + description: 'Latest Standards Update 4 title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(4) > h4')); @@ -3977,7 +4021,7 @@ const steps = [ //Latest Standards Update Update 4 sub-title, text, font, size, and color { - description: 'Validate Latest Standards Update 4 sub-title, text, font, size, and color', + description: 'Latest Standards Update 4 sub-title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(4) > p')); @@ -4037,7 +4081,7 @@ const steps = [ //Latest Standards Update Update 4 date, text, font, size, and color { - description: 'Validate Latest Standards Update 4 date, text, font, size, and color', + description: 'Latest Standards Update 4 date, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(4) em')); @@ -4097,7 +4141,7 @@ const steps = [ //Latest Standards Update Update 5 title, text, font, size, and color { - description: 'Validate Latest Standards Update 5 title, text, font, size, and color', + description: 'Latest Standards Update 5 title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(5) > h4')); @@ -4157,7 +4201,7 @@ const steps = [ //Latest Standards Update Update 5 sub-title, text, font, size, and color { - description: 'Validate Latest Standards Update 5 sub-title, text, font, size, and color', + description: 'Latest Standards Update 5 sub-title, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(5) > p')); @@ -4217,7 +4261,7 @@ const steps = [ //Latest Standards Update Update 5 date, text, font, size, and color { - description: 'Validate Latest Standards Update 5 date, text, font, size, and color', + description: 'Latest Standards Update 5 date, text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('.mb-4:nth-child(5) em')); @@ -4278,7 +4322,7 @@ const steps = [ //FAVORITE REPORTS WIDGET //Favorite Reports Widget title, text, font, size, and color { - description: 'Validate Favorite Reports Widget text, font, size, and color', + description: 'Favorite Reports Widget text, font, size, and color', action: async () => { const element = await driver.findElement(By.css('h2:nth-child(3)')); @@ -4338,9 +4382,10 @@ const steps = [ //Manage Favorites Button { - description: 'Validate Manage Favorite button title text, size, and color', + description: 'Manage Favorite button title text, size, color, and href', action: async () => { const multipleChecks = 'Manage Favorites button'; + const element = await driver.findElement(By.linkText('Manage Favorites')); const elementIcon = await driver.findElement(By.css('.icon-Manage-Favorites')); const expectedHref = 'https://correlation.edgate.com/exact/add_favorite_report.php'; @@ -4365,7 +4410,7 @@ const steps = [ //href const actualHref = await element.getAttribute('href'); if (actualHref && actualHref === expectedHref) { - console.log(`Passed: Manage Favorites href "${actualHref}" matched as expected`); + console.log('Passed: Manage Favorites href matched as expected'); } else { errors.push(`Expected: Manage Favorites button href to be "${expectedHref}"; but found "${actualHref}"`); } @@ -4420,9 +4465,10 @@ const steps = [ //Favorite Reports - Format column title { - description: 'Validate Favorite Reports - Format column title, text, and font size', + description: 'Favorite Reports - Format column title, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Format column title' + const element = await driver.findElement(By.css('.table:nth-child(1) th:nth-child(1)')); //Get text, font, size, and color @@ -4477,9 +4523,10 @@ const steps = [ //Favorite Reports - Report column title { - description: 'Validate Favorite Reports - Report column title, text, and font size', + description: 'Favorite Reports - Report column title, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Report column title' + const element = await driver.findElement(By.css('.table:nth-child(1) th:nth-child(2)')); //Get text, font, size, and color @@ -4534,9 +4581,10 @@ const steps = [ //Favorite Reports - Run column title { - description: 'Validate Favorite Reports - Run column title, text, and font size', + description: 'Favorite Reports - Run column title, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Run column title' + const element = await driver.findElement(By.css('.table:nth-child(1) th:nth-child(3)')); //Get text, font, size, and color @@ -4591,9 +4639,10 @@ const steps = [ //Favorite Reports - Download column title { - description: 'Validate Favorite Reports - Download column title, text, and font size', + description: 'Favorite Reports - Download column title, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Download column title' + const element = await driver.findElement(By.css('.table:nth-child(1) > thead .text-center')); //Get text, font, size, and color @@ -4648,9 +4697,10 @@ const steps = [ //XLS button { - description: 'Validate XLS button', + description: 'XLS button', action: async () => { const multipleChecks = 'XLS button'; + const element = await driver.findElement(By.css('td:nth-child(1) > .xls')); //Track all errors @@ -4658,7 +4708,7 @@ const steps = [ //icon present if (await element.isDisplayed()) { - console.log('Passed: XLS button was displayed as expected'); + console.log('Passed: Format - XLS button was displayed as expected'); } else { errors.push('Expected: XLS button was not displayed'); } @@ -4678,9 +4728,10 @@ const steps = [ //Favorite Reports - Report 1 column data { - description: 'Validate Favorite Reports - Report column 1 data, text, and font size', + description: 'Favorite Reports - Report column 1 data, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Report column 1 data'; + const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > td:nth-child(2)')); //Get text, font, size, and color @@ -4735,9 +4786,10 @@ const steps = [ //Favorite Reports - Run column 1 data { - description: 'Validate Favorite Reports - Run column 1 data', + description: 'Favorite Reports - Run column 1 data', action: async () => { const multipleChecks = 'Favorite Reports - Run column 1 data'; + const link = await driver.findElement(By.css('tr:nth-child(1) a.reportrun')); const element = await link.findElement(By.css('img')); const expectedPath = '/exact/runreport.php'; @@ -4761,7 +4813,7 @@ const steps = [ const actualHref = await link.getAttribute('href'); const url = new URL(actualHref); if (url.pathname === expectedPath) { - console.log(`Passed: Run icon 1 href path "${url.pathname}" matched as expected`); + console.log('Passed: Run icon 1 href path matched as expected'); } else { errors.push(`Expected: Run icon 1 href path to be "${expectedPath}"; but found "${url.pathname}"`); } @@ -4770,7 +4822,7 @@ const steps = [ for (const [key, expectedValue] of Object.entries(expectedParams)) { const actualValue = url.searchParams.get(key); if (actualValue === expectedValue) { - console.log(`Passed: Run icon 1 href param "${key}" = "${actualValue}" as expected`); + console.log('Passed: Run icon 1 href param matched as expected'); } else { errors.push(`Expected: Run icon 1 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`); } @@ -4791,9 +4843,10 @@ const steps = [ //Favorite Reports - Download column 1 data { - description: 'Validate Favorite Reports - Download column 1 data', + description: 'Favorite Reports - Download column 1 data', action: async () => { const multipleChecks = 'Favorite Reports - Download column 1 data'; + const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(1) > .text-center a')); const element = await link.findElement(By.css('img')); const expectedHref = 'https://correlation.edgate.com/exact/reports/exact_juan/ThisBeMyFile.xls'; @@ -4811,7 +4864,7 @@ const steps = [ //href const actualHref = await link.getAttribute('href'); if (actualHref && actualHref.endsWith(expectedHref)) { - console.log(`Passed: Download icon 1 href "${actualHref}" matched expected`); + console.log('Passed: Download icon 1 href matched expected'); } else { errors.push(`Expected: Download icon 1 href to end with "${expectedHref}"; but found "${actualHref}"`); } @@ -4831,9 +4884,10 @@ const steps = [ //doc button { - description: 'Validate doc button', + description: 'doc button', action: async () => { const multipleChecks = 'doc button'; + const element = await driver.findElement(By.css('td:nth-child(1) > .doc')); //Track all errors @@ -4861,9 +4915,10 @@ const steps = [ //Favorite Reports - Report 2 column data { - description: 'Validate Favorite Reports - Report column 2 data, text, and font size', + description: 'Favorite Reports - Report column 2 data, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Report column 2 data'; + const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > td:nth-child(2)')); //Get text, font, size, and color @@ -4918,9 +4973,10 @@ const steps = [ //Favorite Reports - Run column 2 data { - description: 'Validate Favorite Reports - Run column 2 data', + description: 'Favorite Reports - Run column 2 data', action: async () => { const multipleChecks = 'Favorite Reports - Run column 2 data'; + const link = await driver.findElement(By.css('tr:nth-child(2) a.reportrun')); const element = await link.findElement(By.css('img')); const expectedPath = '/exact/runreport.php'; @@ -4944,7 +5000,7 @@ const steps = [ const actualHref = await link.getAttribute('href'); const url = new URL(actualHref); if (url.pathname === expectedPath) { - console.log(`Passed: Run icon 2 href path "${url.pathname}" matched as expected`); + console.log('Passed: Run icon 2 href path matched as expected'); } else { errors.push(`Expected: Run icon 2 href path to be "${expectedPath}"; but found "${url.pathname}"`); } @@ -4953,7 +5009,7 @@ const steps = [ for (const [key, expectedValue] of Object.entries(expectedParams)) { const actualValue = url.searchParams.get(key); if (actualValue === expectedValue) { - console.log(`Passed: Run icon 2 href param "${key}" = "${actualValue}" as expected`); + console.log('Passed: Run icon 2 href param matched as expected'); } else { errors.push(`Expected: Run icon 2 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`); } @@ -4974,9 +5030,10 @@ const steps = [ //Favorite Reports - Download column 2 data { - description: 'Validate Favorite Reports - Download column 2 data', + description: 'Favorite Reports - Download column 2 data', action: async () => { const multipleChecks = 'Favorite Reports - Download column 2 data'; + const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(2) > .text-center a')); const element = await link.findElement(By.css('img')); const expectedHref = '/exact/reports/exact_juan/WordToYa.doc'; @@ -4994,7 +5051,7 @@ const steps = [ //href const actualHref = await link.getAttribute('href'); if (actualHref && actualHref.endsWith(expectedHref)) { - console.log(`Passed: Download icon 2 href "${actualHref}" matched expected`); + console.log('Passed: Download icon 2 href matched expected'); } else { errors.push(`Expected: Download icon 2 href to end with "${expectedHref}"; but found "${actualHref}"`); } @@ -5014,9 +5071,10 @@ const steps = [ //pdf button { - description: 'Validate pdf button', + description: 'pdf button', action: async () => { const multipleChecks = 'pdf button'; + const element = await driver.findElement(By.css('td:nth-child(1) > .pdf')); //Track all errors @@ -5044,9 +5102,10 @@ const steps = [ //Favorite Reports - Report 3 column data { - description: 'Validate Favorite Reports - Report column 3 data, text, and font size', + description: 'Favorite Reports - Report column 3 data, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Report column 3 data'; + const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(3) > td:nth-child(2)')); //Get text, font, size, and color @@ -5101,9 +5160,10 @@ const steps = [ //Favorite Reports - Run column 3 data { - description: 'Validate Favorite Reports - Run column 3 data', + description: 'Favorite Reports - Run column 3 data', action: async () => { const multipleChecks = 'Favorite Reports - Run column 3 data'; + const link = await driver.findElement(By.css('tr:nth-child(3 ) a.reportrun')); const element = await link.findElement(By.css('img')); const expectedPath = '/exact/runreport.php'; @@ -5127,7 +5187,7 @@ const steps = [ const actualHref = await link.getAttribute('href'); const url = new URL(actualHref); if (url.pathname === expectedPath) { - console.log(`Passed: Run icon 3 href path "${url.pathname}" matched as expected`); + console.log('Passed: Run icon 3 href path matched as expected'); } else { errors.push(`Expected: Run icon 3 href path to be "${expectedPath}"; but found "${url.pathname}"`); } @@ -5136,7 +5196,7 @@ const steps = [ for (const [key, expectedValue] of Object.entries(expectedParams)) { const actualValue = url.searchParams.get(key); if (actualValue === expectedValue) { - console.log(`Passed: Run icon 3 href param "${key}" = "${actualValue}" as expected`); + console.log('Passed: Run icon 3 href param matched as expected'); } else { errors.push(`Expected: Run icon 3 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`); } @@ -5157,9 +5217,10 @@ const steps = [ //Favorite Reports - Download column 3 data { - description: 'Validate Favorite Reports - Download column 3 data', + description: 'Favorite Reports - Download column 3 data', action: async () => { const multipleChecks = 'Favorite Reports - Download column 3 data'; + const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(3) > .text-center a')); const element = await link.findElement(By.css('img')); const expectedHref = '/exact/reports/exact_juan/IDontThinkSo.pdf'; @@ -5177,7 +5238,7 @@ const steps = [ //href const actualHref = await link.getAttribute('href'); if (actualHref && actualHref.endsWith(expectedHref)) { - console.log(`Passed: Download icon 3 href "${actualHref}" matched expected`); + console.log('Passed: Download icon 3 href matched expected'); } else { errors.push(`Expected: Download icon 3 href to end with "${expectedHref}"; but found "${actualHref}"`); } @@ -5197,9 +5258,10 @@ const steps = [ //html button { - description: 'Validate html button', + description: 'html button', action: async () => { const multipleChecks = 'html button'; + const element = await driver.findElement(By.css('td:nth-child(1) > .html')); //Track all errors @@ -5227,9 +5289,10 @@ const steps = [ //Favorite Reports - Report 4 column data { - description: 'Validate Favorite Reports - Report column 4 data, text, and font size', + description: 'Favorite Reports - Report column 4 data, text, and font size', action: async () => { const multipleChecks = 'Favorite Reports - Report column 4 data'; + const element = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(4) > td:nth-child(2)')); //Get text, font, size, and color @@ -5284,9 +5347,10 @@ const steps = [ //Favorite Reports - Run column 4 data { - description: 'Validate Favorite Reports - Run column 4 data', + description: 'Favorite Reports - Run column 4 data', action: async () => { const multipleChecks = 'Favorite Reports - Run column 4 data'; + const link = await driver.findElement(By.css('tr:nth-child(4 ) a.reportrun')); const element = await link.findElement(By.css('img')); const expectedPath = '/exact/runreport.php'; @@ -5310,7 +5374,7 @@ const steps = [ const actualHref = await link.getAttribute('href'); const url = new URL(actualHref); if (url.pathname === expectedPath) { - console.log(`Passed: Run icon 4 href path "${url.pathname}" matched as expected`); + console.log('Passed: Run icon 4 href path matched as expected'); } else { errors.push(`Expected: Run icon 4 href path to be "${expectedPath}"; but found "${url.pathname}"`); } @@ -5319,7 +5383,7 @@ const steps = [ for (const [key, expectedValue] of Object.entries(expectedParams)) { const actualValue = url.searchParams.get(key); if (actualValue === expectedValue) { - console.log(`Passed: Run icon 4 href param "${key}" = "${actualValue}" as expected`); + console.log('Passed: Run icon 4 href param matched as expected'); } else { errors.push(`Expected: Run icon 4 href param "${key}" to be "${expectedValue}"; but found "${actualValue}"`); } @@ -5340,9 +5404,10 @@ const steps = [ //Favorite Reports - Download column 4 data { - description: 'Validate Favorite Reports - Download column 4 data', + description: 'Favorite Reports - Download column 4 data', action: async () => { const multipleChecks = 'Favorite Reports - Download column 4 data'; + const link = await driver.findElement(By.css('.table:nth-child(1) tr:nth-child(4) > .text-center a')); const element = await link.findElement(By.css('img')); const expectedHref = '/exact/reports/exact_juan/Checking.html'; @@ -5360,7 +5425,7 @@ const steps = [ //href const actualHref = await link.getAttribute('href'); if (actualHref && actualHref.endsWith(expectedHref)) { - console.log(`Passed: Download icon 4 href "${actualHref}" matched expected`); + console.log('Passed: Download icon 4 href matched expected'); } else { errors.push(`Expected: Download icon 4 href to end with "${expectedHref}"; but found "${actualHref}"`); } @@ -5381,9 +5446,10 @@ const steps = [ //FOOTER //EdGate Footer Logo { - description: 'Validate EdGate Footer Logo', + description: 'EdGate Footer Logo', action: async () => { const multipleChecks = 'EdGate Footer Logo'; + const element = await driver.findElement(By.css('.pull-right img')); const expectedSrc = 'https://correlation.edgate.com/exact/images/edgate_logo_new.png'; @@ -5400,7 +5466,7 @@ const steps = [ //image src const actualSrc = await element.getAttribute('src'); if (actualSrc && actualSrc === expectedSrc) { - console.log(`Passed: EdGate logo src "${actualSrc}" matched expected`); + console.log('Passed: EdGate logo src matched expected'); } else { errors.push(`Expected: EdGate logo src: "${expectedSrc}"; but found "${actualSrc}"`); } @@ -5519,17 +5585,21 @@ try { 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 + null //No screenshot for passed steps ); } catch (error) { + //Only take screenshot if the step fails const screenshotPath = await takeScreenshot( driver, stepIndex, @@ -5552,13 +5622,14 @@ try { } } + //Check if log out was successful if (allStepsPassed) { console.log('------------->| THE END |<-------------'); - console.log('PASSED: CORRELATIONS DASHBOARD (correlationsDashboard); All test steps completed successfully'); + console.log('PASSED: CORRELATIONS DASHBOARD(correlationsDashboard); All test steps completed successfully'); testStatus = 'Passed'; } else { console.log('------------->| THE END |<-------------'); - console.log('FAILED: CORRELATIONS DASHBOARD (correlationsDashboard); One or more test steps failed'); + console.log('FAILED: CORRELATIONS DASHBOARD(correlationsDashboard); One or more test steps failed'); console.log('FAILED STEPS:'); failedSteps.forEach(step => console.error(` ✗ ${step}`)); testStatus = 'Failed';