diff --git a/tests/ExACT_dashboardMyContent.js b/tests/ExACT_dashboardMyContent.js index 8effd97..7fadc96 100644 --- a/tests/ExACT_dashboardMyContent.js +++ b/tests/ExACT_dashboardMyContent.js @@ -51,19 +51,19 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.e-heading')).getCssValue('color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`Dashboard title text color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Dashboard title text color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Dashboard title text color matched as expected'); } }, - //Dashboard title text font + //Dashboard title text font size { description: 'Validate dashboard title text font size', action: async () => { const elementStyle = await driver.findElement(By.css('.e-heading')).getCssValue('font-size'); if (elementStyle !== '32px') { - throw new Error(`Dashboard title text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Dashboard title text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: Dashboard title text font-size matched as expected'); } @@ -88,19 +88,19 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.h-100 h2:nth-child(2)')).getCssValue('color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`Dashboard - My Content Widget title text color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Dashboard - My Content Widget title text color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Dashboard - My Content Widget title text color matched as expected'); } }, - //Dashboard My Content Widget title text font + //Dashboard My Content Widget title text font size { description: 'Validate dashboard My Content widget title text font size', action: async () => { const elementStyle = await driver.findElement(By.css('.h-100 h2:nth-child(2)')).getCssValue('font-size'); if (elementStyle !== '18px') { - throw new Error(`Dashboard - My Content Widget title text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Dashboard - My Content Widget title text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: Dashboard - My Content Widget title text font-size matched as expected'); } @@ -124,7 +124,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#badge_content_total')).getCssValue('background-color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`Dashboard - My Content Item Count button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Dashboard - My Content Item Count button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Dashboard - My Content Item Count button color matched as expected'); } @@ -136,19 +136,31 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#badge_content_total')).getCssValue('color'); if (elementStyle !== 'rgba(255, 255, 255, 1)') { - throw new Error(`Dashboard - My Content Item Count font color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Dashboard - My Content Item Count font color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Dashboard - My Content Item Count font color matched as expected'); } }, + //Dashboard My Content Item Count text font size + { + description: 'Validate Dashboard My Content Item count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('#badge_content_total')).getCssValue('font-size'); + if (elementStyle !== '13.5px') { + throw new Error(`Expected: Dashboard - Dashboard My Content Item count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - Dashboard My Content Item count text font-size matched as expected'); + } + }, + //Ellipsis icon color -dark blue { description: 'Validate ellipsis icon color', action: async () => { const elementStyle = await driver.findElement(By.css('.fa-ellipsis-h')).getCssValue('color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`Ellipsis icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Ellipsis icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Ellipsis icon color matched as expected'); } @@ -160,7 +172,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.col-12 > .fa')).getCssValue('color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`Search icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Search icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Search icon color matched as expected'); } @@ -219,7 +231,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#mycontentlist > #content-org-list > .content-org .fa')).getCssValue('color'); if (elementStyle !== 'rgba(73, 80, 87, 1)') { - throw new Error(`Biology-QA edit icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Biology-QA edit icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Biology-QA edit icon color matched as expected'); } @@ -232,9 +244,21 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.xpath('//li/div/span')).getText(); if (elementText !== '1046') { - throw new Error(`Expected: Default content set order: Biology - QA count "1046" not listed in 1st place; Actual: "${elementText}"`); + throw new Error(`Expected: Dashboard default content set order: Biology - QA count "1046" not listed in 1st place; Actual: "${elementText}"`); } - console.log('Passed: Default content set order: Biology - QA count 1046 listed in 1st place'); + console.log('Passed: Dashboard default content set order: Biology - QA count 1046 listed in 1st place'); + } + }, + + //Biology - QA = 1046 count text font size + { + description: 'Validate Biology - QA = 1046 count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.xpath('//li/div/span')).getCssValue('font-size'); + if (elementStyle !== '12.87px') { + throw new Error(`Expected: Dashboard - Biology - QA = 1046 count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - Biology - QA = 1046 count text font-size matched as expected'); } }, @@ -244,9 +268,21 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.xpath('//ul/ul/li/div/span')).getText(); if (elementText !== '981') { - throw new Error(`Expected: Default content set order: Geometry - QA count "981" not listed in 2nd place; Actual: "${elementText}"`); + throw new Error(`Expected: Dashboard default content set order: Geometry - QA count "981" not listed in 2nd place; Actual: "${elementText}"`); } - console.log('Passed: Default content set order: Geometry - QA count 981 listed in 2nd place'); + console.log('Passed: Dashboard default content set order: Geometry - QA count 981 listed in 2nd place'); + } + }, + + //Geometry - QA = 981 count text font size + { + description: 'Validate Geometry - QA = 981 count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.xpath('//ul/ul/li/div/span')).getCssValue('font-size'); + if (elementStyle !== '12.87px') { + throw new Error(`Expected: Dashboard - Geometry - QA = 981 count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - Geometry - QA = 981 count text font-size matched as expected'); } }, @@ -256,9 +292,21 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.xpath('//ul/ul/ul/li/div/span')).getText(); if (elementText !== '730') { - throw new Error(`Expected: Default content set order: Math Alignment Import Testcount "730" not listed in 3rd place; Actual: "${elementText}"`); + throw new Error(`Expected: Dashboard default content set order: Math Alignment Import Testcount "730" not listed in 3rd place; Actual: "${elementText}"`); } - console.log('Passed: Default content set order: Math Alignment Import Test count 730 listed in 3rd place'); + console.log('Passed: Dashboard default content set order: Math Alignment Import Test count 730 listed in 3rd place'); + } + }, + + //Math Alignment Import Test = 730 count text font size + { + description: 'Validate Math Alignment Import Test = 730 count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.xpath('//ul/ul/ul/li/div/span')).getCssValue('font-size'); + if (elementStyle !== '12.87px') { + throw new Error(`Expected: Dashboard - Math Alignment Import Test = 7301 count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - Math Alignment Import Test = 730 count text font-size matched as expected'); } }, @@ -268,9 +316,21 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.xpath('//ul/ul/ul/ul/li/div/span')).getText(); if (elementText !== '409') { - throw new Error(`Expected: Default content set order: English - QA count "409" not listed in 4th place; Actual: "${elementText}"`); + throw new Error(`Expected: Dashboard default content set order: English - QA count "409" not listed in 4th place; Actual: "${elementText}"`); } - console.log('Passed: Default content set order: English - QA count 409 listed in 4th place'); + console.log('Passed: Dashboard default content set order: English - QA count 409 listed in 4th place'); + } + }, + + //English - QA = 409 count text font size + { + description: 'Validate English - QA = 409 count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.xpath('//ul/ul/ul/ul/li/div/span')).getCssValue('font-size'); + if (elementStyle !== '12.87px') { + throw new Error(`Expected: Dashboard - English - QA = 409 count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - English - QA = 409 count text font-size matched as expected'); } }, @@ -280,9 +340,21 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.xpath('//ul/ul/ul/ul/ul/li/div/span')).getText(); if (elementText !== '188') { - throw new Error(`Expected: Default content set order: Algebra - QA count "1882" not listed in 5th place; Actual: "${elementText}"`); + throw new Error(`Expected: Dashboard default content set order: Algebra - QA count "1882" not listed in 5th place; Actual: "${elementText}"`); } - console.log('Passed: Default content set order: Algebra - QA count 188 listed in 5th place'); + console.log('Passed: Dashboard default content set order: Algebra - QA count 188 listed in 5th place'); + } + }, + + //Algebra - QA = 188 count text font size + { + description: 'Validate Algebra - QA = 188 count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.xpath('//ul/ul/ul/ul/ul/li/div/span')).getCssValue('font-size'); + if (elementStyle !== '12.87px') { + throw new Error(`Expected: Dashboard - Algebra - QA = 188 count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - Algebra - QA = 188 count text font-size matched as expected'); } }, @@ -292,9 +364,21 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.xpath('//ul/ul/ul/ul/ul/ul/li/div/span')).getText(); if (elementText !== '62') { - throw new Error(`Expected: Default content set order: US History - QA count "62" not listed in 6th place; Actual: "${elementText}"`); + throw new Error(`Expected: Dashboard default content set order: US History - QA count "62" not listed in 6th place; Actual: "${elementText}"`); } - console.log(`Passed: Default content set order: US History - QA count 62 listed in 6th place`); + console.log(`Passed: Dashboard default content set order: US History - QA count 62 listed in 6th place`); + } + }, + + //US History - QA = 62 count text font size + { + description: 'Validate US History - QA = 62 count text font size', + action: async () => { + const elementStyle = await driver.findElement(By.xpath('//ul/ul/ul/ul/ul/ul/li/div/span')).getCssValue('font-size'); + if (elementStyle !== '12.87px') { + throw new Error(`Expected: Dashboard - US History - QA = 62 count text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Dashboard - US History - QA = 62 count text font-size matched as expected'); } }, @@ -329,13 +413,25 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.content_modal_title')).getCssValue('color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`My Content Totals DIV title font color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: My Content Totals DIV title font color did not match; Actual: "${elementStyle}"`); } console.log('Passed: My Content Totals DIV title font color matched as expected'); } }, - //Total Items label + //My Content Totals DIV title text font size + { + description: 'Validate My Content Totals DIV title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.content_modal_title')).getCssValue('font-size'); + if (elementStyle !== '18px') { + throw new Error(`Expected: My Content Totals DIV title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV title text font-size matched as expected'); + } + }, + + //My Content Totals DIV - Total Items label { description: 'Validate My Content Totals DIV - Total Items label', action: async () => { @@ -347,7 +443,31 @@ const steps = [ } }, - //Total Items Count + //My Content Totals DIV - Total Items label text background color -gray + { + description: 'Validate My Content Totals DIV - Total Items label text background font color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#total > p')).getCssValue('background-color'); + if (elementStyle !== 'rgba(238, 238, 242, 1)') { + throw new Error(`Expected: My Content Totals DIV - Total Items label text background font color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Total Items label text background font color matched as expected'); + } + }, + + //My Content Totals DIV - Total Items label text background text font size + { + description: 'Validate My Content Totals DIV - Total Items label text background text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('#total > p')).getCssValue('font-size'); + if (elementStyle !== '14px') { + throw new Error(`Expected: My Content Totals DIV - Total Items label text background text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Total Items label text background text font-size matched as expected'); + } + }, + + //My Content Totals DIV - Total Items Count { description: 'Validate My Content Totals DIV - Total Items Count', action: async () => { @@ -359,19 +479,19 @@ const steps = [ } }, - //My Content Total Items Count font size + //My Content Totals DIV - Total Items Count text font size size { description: 'Validate My Content Totals DIV - Total Items Count text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#total > b')).getCssValue('font-size'); if (elementStyle !== '36px') { - throw new Error(`My Content Totals DIV - Items Count text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: My Content Totals DIV - Items Count text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: My Content Totals DIV - Items Count text font-size matched as expected'); } }, - //My Content Unique Titles label + //My Content Totals DIV - Unique Titles label { description: 'Validate My Content Totals DIV - Unique Titles label', action: async () => { @@ -383,7 +503,31 @@ const steps = [ } }, - //My Content Unique Titles Count + //My Content Totals DIV - Unique Titles label text background color -gray + { + description: 'Validate My Content Totals DIV - Unique Titles label text background font color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#total_titles > p')).getCssValue('background-color'); + if (elementStyle !== 'rgba(238, 238, 242, 1)') { + throw new Error(`Expected: My Content Totals DIV - Unique Titles label text background font color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Unique Titles label text background font color matched as expected'); + } + }, + + //My Content Totals DIV - Unique Titles label text background text font size + { + description: 'Validate My Content Totals DIV - Unique Titles label text background text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('#total_titles > p')).getCssValue('font-size'); + if (elementStyle !== '14px') { + throw new Error(`Expected: My Content Totals DIV - Unique Titles label text background text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Unique Titles label text background text font-size matched as expected'); + } + }, + + //My Content Totals DIV - Unique Titles Count { description: 'Validate My Content Totals DIV - Unique Titles Count', action: async () => { @@ -395,13 +539,13 @@ const steps = [ } }, - //My Content Unique Titles Count font size + //My Content Unique Titles Count text font size { description: 'Validate My Content Totals DIV - Unique Titles Count text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#total_titles > b')).getCssValue('font-size'); if (elementStyle !== '36px') { - throw new Error(`My Content Totals DIV - Unique Titles Count text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: My Content Totals DIV - Unique Titles Count text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: My Content Totals DIV - Unique Titles Count text font-size matched as expected'); } @@ -419,9 +563,33 @@ const steps = [ } }, + //My Content Totals DIV - Unique IDs label text background color -gray + { + description: 'Validate My Content Totals DIV - Unique IDs label text background font color', + action: async () => { + const elementStyle = await driver.findElement(By.css('#total_titles > p')).getCssValue('background-color'); + if (elementStyle !== 'rgba(238, 238, 242, 1)') { + throw new Error(`Expected: My Content Totals DIV - Unique IDs label text background font color did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Unique IDs label text background font color matched as expected'); + } + }, + + //My Content Totals DIV - Unique IDs label text background text font size + { + description: 'Validate My Content Totals DIV - Unique IDs label text background text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('#total_titles > p')).getCssValue('font-size'); + if (elementStyle !== '14px') { + throw new Error(`Expected: My Content Totals DIV - Unique IDs label text background text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Unique IDs label text background text font-size matched as expected'); + } + }, + //My Content Unique IDs Count { - description: 'Validate My Content Totals DIV - Unique Titles Count', + description: 'Validate My Content Totals DIV - Unique IDs Count', action: async () => { const elementText = await driver.findElement(By.css('#total_pubtotalids > b')).getText(); if (elementText !== '5531') { @@ -431,31 +599,43 @@ const steps = [ } }, - //My Content Unique IDs Count font size + //My Content Unique IDs Count text font size { description: 'Validate My Content Totals DIV - Unique IDs Count text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#total_pubtotalids > b')).getCssValue('font-size'); if (elementStyle !== '36px') { - throw new Error(`My Content Totals DIV - Unique IDs Count text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: My Content Totals DIV - Unique IDs Count text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: My Content Totals DIV - Unique IDs Count text font-size matched as expected'); } }, - //My Content; Content Set column label + //My Content Totals DIV - Content Set column label { description: 'Validate My Content Totals DIV - Content Set column label', action: async () => { const elementText = await driver.findElement(By.css('.card-body > .table-sm th:nth-child(1)')).getText(); if (elementText !== 'Content Set') { - throw new Error(`Expected: "Content Set"; Actual: "${elementText}"`); + throw new Error(`Expected: My Content Totals DIV - "Content Set"; Actual: "${elementText}"`); } console.log('Passed: My Content Totals DIV - Content Set column label matched as expected'); } }, - //My Content; Total Items column label + //My Content Totals DIV - Content Set column label text font size + { + description: 'Validate My Content Totals DIV - Content Set column label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.card-body > .table-sm th:nth-child(1)')).getCssValue('font-size'); + if (elementStyle !== '10px') { + throw new Error(`Expected: My Content Totals DIV - Content Set column label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Content Set column label text background text font-size matched as expected'); + } + }, + + //My Content Total Items column label { description: 'Validate My Content Totals DIV - Total Items column label', action: async () => { @@ -467,7 +647,19 @@ const steps = [ } }, - //My Content; Unique Titles column label + //My Content Totals DIV - Total Items column label text font size + { + description: 'Validate My Content Totals DIV - Total Items column label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.card-body > .table-sm th:nth-child(2)')).getCssValue('font-size'); + if (elementStyle !== '10px') { + throw new Error(`Expected: My Content Totals DIV - Total Items column label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Total Items column label text background text font-size matched as expected'); + } + }, + + //My Content Unique Titles column label { description: 'Validate My Content Totals DIV - Unique Titles column label', action: async () => { @@ -479,7 +671,19 @@ const steps = [ } }, - //My Content; Unique IDs column label + //My Content Totals DIV - Unique Titles column label text font size + { + description: 'Validate My Content Totals DIV - Unique Titles column label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.card-body > .table-sm th:nth-child(3)')).getCssValue('font-size'); + if (elementStyle !== '10px') { + throw new Error(`Expected: My Content Totals DIV - Unique Titles column label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Unique Titles column label text background text font-size matched as expected'); + } + }, + + //My Content Unique IDs column label { description: 'Validate My Content Totals DIV - Unique IDs column label', action: async () => { @@ -491,6 +695,18 @@ const steps = [ } }, + //My Content Totals DIV - Unique IDs column label text font size + { + description: 'Validate My Content Totals DIV - Unique IDs column label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.card-body > .table-sm th:nth-child(4)')).getCssValue('font-size'); + if (elementStyle !== '10px') { + throw new Error(`Expected: My Content Totals DIV - Unique IDs column label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: My Content Totals DIV - Unique IDs column label text background text font-size matched as expected'); + } + }, + //My Content; Biology - QA label { description: 'Validate My Content Totals DIV - Biology - QA label', @@ -557,7 +773,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#all_content_modal .btn-secondary')).getCssValue('background-color'); if (elementStyle !== 'rgba(0, 0, 0, 0)') { - throw new Error(`Close button background color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Close button background color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Close button background color matched as expected'); } @@ -581,7 +797,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#export_btn')).getCssValue('background-color'); if (elementStyle !== 'rgba(48, 200, 172, 1)') { - throw new Error(`Export button background color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export button background color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export button background color matched as expected'); } @@ -609,21 +825,45 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.css('.modal-lg .modal-title')).getText(); if (elementText !== 'Edit Content Set') { - throw new Error(`Edit DIV title did not match; Actual: "${elementText}"`); + throw new Error(`Expected: Edit DIV title did not match; Actual: "${elementText}"`); } console.log('Passed: Edit DIV title matched as expected'); } }, - //Edit Content Set DIV - label + //Edit Content Set DIV title text font size { - description: 'Validate Edit DIV label', + description: 'Validate Edit Content Set DIV title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.modal-lg .modal-title')).getCssValue('font-size'); + if (elementStyle !== '18px') { + throw new Error(`Expected: Edit Content Set DIV title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Edit Content Set DIV title text background text font-size matched as expected'); + } + }, + + //Edit Content Set DIV - Content Set Name label + { + description: 'Validate Edit Content Set DIV - Content Set Name label', action: async () => { const elementText = await driver.findElement(By.css('.modal-lg .form-label')).getText(); if (elementText !== 'Content Set Name') { - throw new Error(`Expected: "Content Set Name"; Actual: "${elementText}"`); + throw new Error(`Expected: Edit Content Set DIV - "Content Set Name"; Actual: "${elementText}"`); } - console.log('Passed: Edit DIV label matched as expected'); + console.log('Passed: Edit Content Set DIV - Content Set Name label matched as expected'); + } + }, + + //Content Set Name label text font size + { + description: 'Validate Content Set Name label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.modal-lg .form-label')).getCssValue('font-size'); + if (elementStyle !== '15px') { + throw new Error(`Expected: Content Set Name label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Content Set Name label text background text font-size matched as expected'); } }, @@ -633,7 +873,7 @@ const steps = [ action: async () => { const elementValue = await driver.findElement(By.css('#orgname')).getAttribute('value'); if (elementValue !== 'Biology - QA') { - throw new Error(`Edit DIV textbox Expected: "Biology - QA"; Actual: "${elementValue}"`); + throw new Error(`Expected: Edit DIV textbox Expected: "Biology - QA"; Actual: "${elementValue}"`); } console.log('Passed: Edit DIV textbox matched as expected'); } @@ -657,7 +897,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.modal-lg #orgdelete')).getCssValue('background-color'); if (elementStyle !== 'rgba(220, 53, 69, 1)') { - throw new Error(`Edit DIV delete button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV delete button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV delete button color matched as expected'); } @@ -669,7 +909,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.modal-lg #orgdelete')).getAttribute('disabled'); if (elementStyle !== 'true') { - throw new Error(`Edit DIV delete button should be disabled; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV delete button should be disabled; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV delete button disabled as expected'); } @@ -705,7 +945,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#modalop')).getCssValue('background-color'); if (elementStyle !== 'rgba(48, 200, 172, 1)') { - throw new Error(`Edit DIV save button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV save button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV save button color matched as expected'); } @@ -729,7 +969,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); if (elementStyle !== 'rgba(0, 0, 0, 0)') { - throw new Error(`Edit DIV close button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV close button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV close button color matched as expected'); } @@ -770,12 +1010,24 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.content_modal_title')).getCssValue('color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`My Content Totals DIV title font color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: My Content Totals DIV title font color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Biology - QA Totals DIV title font color matched as expected'); } }, + //Biology - QA Totals DIV title text font size + { + description: 'Validate Biology - QA Totals DIV title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.content_modal_title')).getCssValue('font-size'); + if (elementStyle !== '18px') { + throw new Error(`Expected: Biology - QA Totals DIV title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Biology - QA Totals DIV title background text font-size matched as expected'); + } + }, + //Biology - QA Total Items label { description: 'Validate Biology - QA Totals DIV - Total Items label', @@ -788,7 +1040,7 @@ const steps = [ } }, - //Biology - QA Total Items Count ">"? + //Biology - QA Total Items Count "1046"? { description: 'Validate Biology - QA Totals DIV - Total Items Count', action: async () => { @@ -800,13 +1052,13 @@ const steps = [ } }, - //Biology - QA Total Items Count font size + //Biology - QA Total Items Count text font size { description: 'Validate Biology - QA Totals DIV - Total Items Count text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#total > b')).getCssValue('font-size'); if (elementStyle !== '36px') { - throw new Error(`Biology - QA Totals DIV - Items Count text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Biology - QA Totals DIV - Items Count text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: Biology - QA Totals DIV - Items Count text font-size matched as expected'); } @@ -836,13 +1088,13 @@ const steps = [ } }, - //Biology - QA Unique Titles Count font size + //Biology - QA Unique Titles Count text font size { description: 'Validate Biology - QA Totals DIV - Unique Titles Count text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#total_titles > b')).getCssValue('font-size'); if (elementStyle !== '36px') { - throw new Error(`Biology - QA Total DIV - Unique Titles Count text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Biology - QA Total DIV - Unique Titles Count text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: Biology - QA Totals DIV - Unique Titles Count text font-size matched as expected'); } @@ -872,13 +1124,13 @@ const steps = [ } }, - //Biology - QA Unique IDs Count font size + //Biology - QA Unique IDs Count text font size { description: 'Validate Biology - QA Totals DIV - Unique IDs Count text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#total_pubtotalids > b')).getCssValue('font-size'); if (elementStyle !== '36px') { - throw new Error(`Biology - QA Totals DIV - Unique IDs Count text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Biology - QA Totals DIV - Unique IDs Count text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: Biology - QA Totals DIV - Count text font-size matched as expected'); } @@ -902,7 +1154,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#all_content_modal .btn-secondary')).getCssValue('background-color'); if (elementStyle !== 'rgba(0, 0, 0, 0)') { - throw new Error(`Close button background color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Close button background color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Close button background color matched as expected'); } @@ -926,7 +1178,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#export_btn')).getCssValue('background-color'); if (elementStyle !== 'rgba(48, 200, 172, 1)') { - throw new Error(`Export button background color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export button background color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export button background color matched as expected'); } @@ -946,7 +1198,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.fa-plus')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Create Content Set icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create Content Set icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create Content Set icon color matched as expected'); } @@ -970,7 +1222,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.linkText('Create Content Set')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Create Content Set link text color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create Content Set link text color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create Content Set link text color matched as expected'); } @@ -982,7 +1234,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.fa-download')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Export Content icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export Content icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export Content icon color matched as expected'); } @@ -1006,7 +1258,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.linkText('Export Content Set')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Export Content Set icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export Content Set icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export Content Set icon color matched as expected'); } @@ -1030,13 +1282,25 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.css('.modal-lg .modal-title')).getText(); if (elementText !== 'Create Content Set') { - throw new Error(`Content set DIV title did not match; Actual: "${elementText}"`); + throw new Error(`Expected: Content set DIV title did not match; Actual: "${elementText}"`); } console.log('Passed: Create Content Set DIV title matched as expected'); } }, - //Create Content Set DIV - label + //Create Content Set DIV title text font size + { + description: 'Validate Create Content Set DIV title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.modal-lg .modal-title')).getCssValue('font-size'); + if (elementStyle !== '18px') { + throw new Error(`Expected: Create Content Set DIV title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Create Content Set DIV title text background text font-size matched as expected'); + } + }, + + //Create Content Set DIV - Content Set Name label { description: 'Validate create DIV label', action: async () => { @@ -1048,6 +1312,18 @@ const steps = [ } }, + //Create Content Set DIV - Content Set Name label text font size + { + description: 'Validate Create Content Set DIV - Content Set Name label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.form-row:nth-child(2) .form-label')).getCssValue('font-size'); + if (elementStyle !== '15px') { + throw new Error(`Expected: Create Content Set DIV - Content Set Name label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Create Content Set DIV - Content Set Name label text background text font-size matched as expected'); + } + }, + //Create Content Set DIV - Create button text { description: 'Validate create DIV - Create button text', @@ -1066,7 +1342,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.modal-lg #modalop')).getCssValue('background-color'); if (elementStyle !== 'rgba(48, 200, 172, 1)') { - throw new Error(`Create button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create button color matched as expected'); } @@ -1090,7 +1366,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); if (elementStyle !== 'rgba(0, 0, 0, 0)') { - throw new Error(`Close button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Close button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Close button color matched as expected'); } @@ -1118,7 +1394,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#metawarn > b')).getCssValue('color'); if (elementStyle !== 'rgba(220, 53, 69, 1)') { - throw new Error(`Create Content Set validation text color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create Content Set validation text color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create Content Set validation text color matched as expected'); } @@ -1147,7 +1423,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#namewarn')).getCssValue('color'); if (elementStyle !== 'rgba(220, 53, 69, 1)') { - throw new Error(`Create Content Set validation text color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create Content Set validation text color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create Content Set validation text color matched as expected'); } @@ -1228,6 +1504,18 @@ const steps = [ } }, + //Validate content item page - Filter Results label text font size + { + description: 'Validate Validate content item page - Filter Results label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.well > b')).getCssValue('font-size'); + if (elementStyle !== '13px') { + throw new Error(`Expected: Content item page - Filter Results label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Content item page - Filter Results label text background text font-size matched as expected'); + } + }, + //Validate content item page - Grade label { description: 'Validate filter - Grade label', @@ -1240,6 +1528,18 @@ const steps = [ } }, + //Validate content item page - Grade label text font size + { + description: 'Validate Validate content item page - Grade label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.form-group:nth-child(1) > b')).getCssValue('font-size'); + if (elementStyle !== '13px') { + throw new Error(`Expected: Content item page - Grade label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Content item page - Grade label text background text font-size matched as expected'); + } + }, + //Validate content item page - Subject label { description: 'Validate filter - Subject label', @@ -1252,6 +1552,18 @@ const steps = [ } }, + //Validate content item page - Subject label text font size + { + description: 'Validate Validate content item page - Subject label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.form-group:nth-child(3) > b')).getCssValue('font-size'); + if (elementStyle !== '13px') { + throw new Error(`Expected: Content item page - Subject label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Content item page - Subject label text background text font-size matched as expected'); + } + }, + //Validate content item page - Reset All link { description: 'Validate filter - Reset All link', @@ -1264,21 +1576,33 @@ const steps = [ } }, - //Validate content item page - Results text + //Validate content item page - Search Results text { - description: 'Validate Item - Results text', + description: 'Validate Item - Search Results text', action: async () => { const elementText = await driver.findElement(By.css('b:nth-child(2)')).getText(); if (elementText !== 'There are no items that match your search criteria.') { - throw new Error(`Expected: Item - Results text did not match; Actual: "${elementText}"`); + throw new Error(`Expected: "There are no items that match your search criteria." text did not match; Actual: "${elementText}"`); } - console.log('Passed: Item - Results text matched as expected'); + console.log('Passed: Item - Search Results text matched as expected'); + } + }, + + //Validate content item page - Search Results text font size + { + description: 'Validate content item page - Search Results text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('b:nth-child(2)')).getCssValue('font-size'); + if (elementStyle !== '13px') { + throw new Error(`Expected: Content item page - Search Results text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Content item page - Search Results text background text font-size matched as expected'); } }, //NEXT ACTION -NAVIGATE BACK TO DASHBOARD { description: 'Click Dashboard navigation link', action: async () => await driver.findElement(By.linkText('Dashboard')).click() }, - { description: 'Wait for login process to complete', action: async () => await driver.sleep(10000) }, + { description: 'Browser sleep', action: async () => await driver.sleep(10000) }, //Wait for dashboard to load - Correlation Coverages View Details button { @@ -1298,7 +1622,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.fa-plus')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Create Content Set icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create Content Set icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create Content Set icon color matched as expected'); } @@ -1322,7 +1646,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.linkText('Create Content Set')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Create Content Set link text color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Create Content Set link text color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Create Content Set link text color matched as expected'); } @@ -1334,7 +1658,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.fa-download')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Export Content icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export Content icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export Content icon color matched as expected'); } @@ -1358,7 +1682,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.linkText('Export Content Set')).getCssValue('color'); if (elementStyle !== 'rgba(33, 37, 41, 1)') { - throw new Error(`Export Content Set icon color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export Content Set icon color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export Content Set icon color matched as expected'); } @@ -1382,33 +1706,45 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.css('.modal-header:nth-child(4) > .modal-title')).getText(); if (elementText !== 'Export Content') { - throw new Error(`Export set DIV title did not match; Actual: "${elementText}"`); + throw new Error(`Expected: Export set DIV title did not match; Actual: "${elementText}"`); } console.log('Passed: Export Content DIV title matched as expected'); } }, - //Export Content Set DIV - title + //Export Content Set DIV Title text font size { - description: 'Validate export DIV title text', + description: 'Validate Export Content Set DIV Title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.modal-header:nth-child(4) > .modal-title')).getCssValue('font-size'); + if (elementStyle !== '18px') { + throw new Error(`Expected: Export Content Set DIV Title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Export Content Set DIV Title text background text font-size matched as expected'); + } + }, + + //Export Content Set DIV - label + { + description: 'Validate export DIV label text', action: async () => { const elementText = await driver.findElement(By.css('#content-export-container > h5')).getText(); if (elementText !== 'Please select one or more content sets to export:') { - throw new Error(`Expected: "Please select one or more content sets to export:"; Actual: "${elementText}"`); + throw new Error(`Expected: "Please select one or more content sets to export:" label; Actual: "${elementText}"`); } - console.log('Passed: Export Content DIV title matched as expected'); + console.log('Passed: Export Content DIV label matched as expected'); } }, - //Export Content Set DIV - title + //Export Content Set DIV - label text font size { - description: 'Validate export DIV title text font size', + description: 'Validate export DIV label text font size', action: async () => { const elementStyle = await driver.findElement(By.css('#content-export-container > h5')).getCssValue('font-size'); if (elementStyle !== '20px') { - throw new Error(`Export Content title text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export Content label text font-size did not match; Actual: "${elementStyle}"`); } - console.log('Passed: Export Content title text font-size matched as expected'); + console.log('Passed: Export Content label text font-size matched as expected'); } }, @@ -1454,7 +1790,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.modal-footer:nth-child(6) > .btn-primary')).getCssValue('background-color'); if (elementStyle !== 'rgba(48, 200, 172, 1)') { - throw new Error(`Export button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export button color matched as expected'); } @@ -1478,7 +1814,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.btn:nth-child(3)')).getCssValue('background-color'); if (elementStyle !== 'rgba(0, 0, 0, 0)') { - throw new Error(`Close button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Close button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Close button color matched as expected'); } @@ -1494,7 +1830,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show .input-group-prepend img')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export search icon not found'); + throw new Error('Expected: Export search icon not found'); } console.log('Passed: Export search icon present'); } @@ -1518,7 +1854,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.form-group:nth-child(1) .input-group-append img')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export search X icon not found'); + throw new Error('Expected: Export search X icon not found'); } console.log('Passed: Export search X icon present'); } @@ -1531,7 +1867,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show .multiselect-all input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export selectd all checkbox icon not found'); + throw new Error('Expected: Export selectd all checkbox icon not found'); } console.log('Passed: Export select all checkbox icon present'); } @@ -1549,6 +1885,18 @@ const steps = [ } }, + //Select all search text font size + { + description: 'Validate Select all search text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.show > .multiselect-item .checkbox')).getCssValue('font-size'); + if (elementStyle !== '13.2px') { + throw new Error(`Expected: Select all search text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Select all search text font-size matched as expected'); + } + }, + //NEXT ACTION -Filter content list by QA { description: 'Filter Content Set Search list by QA', action: async () => await driver.findElement(By.css('.show > .multiselect-item .form-control')).sendKeys('QA') }, { description: 'Driver sleep', action: async () => await driver.sleep(2000) }, @@ -1560,7 +1908,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show .multiselect-all input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export selectd all checkbox icon not found'); + throw new Error('Expected: Export selectd all checkbox icon not found'); } console.log('Passed: Export select all checkbox icon present'); } @@ -1584,7 +1932,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(8) input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export Algebra - QA checkbox icon not found'); + throw new Error('Expected: Export Algebra - QA checkbox icon not found'); } console.log('Passed: Export Algebra - QA checkbox icon present'); } @@ -1608,7 +1956,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(9) input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export Biology - QA checkbox icon not found'); + throw new Error('Expected: Export Biology - QA checkbox icon not found'); } console.log('Passed: Export Biology - QA checkbox icon present'); } @@ -1632,7 +1980,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(10) input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export English II - QA checkbox icon not found'); + throw new Error('Expected: Export English II - QA checkbox icon not found'); } console.log('Passed: Export English II - QA checkbox icon present'); } @@ -1656,7 +2004,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(11) input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export Geometry - QA checkbox icon not found'); + throw new Error('Expected: Export Geometry - QA checkbox icon not found'); } console.log('Passed: Export Geometry - QA checkbox icon present'); } @@ -1680,7 +2028,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(12) input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Export US History - QA checkbox icon not found'); + throw new Error('Expected: Export US History - QA checkbox icon not found'); } console.log('Passed: Export US History - QA checkbox icon present'); } @@ -1704,7 +2052,7 @@ const steps = [ action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.show > li:nth-child(19) input')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error(`Export "${createContentSetName}" checkbox icon not found`); + throw new Error(`Expected: Export "${createContentSetName}" checkbox icon not found`); } console.log(`Passed: Export "${createContentSetName}" checkbox icon present`); } @@ -1724,7 +2072,7 @@ const steps = [ //NEXT ACTION -Select created content set to export { description: 'Click Automated QA checkbox', action: async () => await driver.findElement(By.css('.show > li:nth-child(19) input')).click() }, - { description: 'Wait for login process to complete', action: async () => await driver.sleep(2000) }, + { description: 'Browser sleep', action: async () => await driver.sleep(2000) }, { description: 'Click Export button', action: async () => await driver.findElement(By.css('.modal-footer:nth-child(6) > .btn-primary')).click() }, { description: 'Wait for export page to load', action: async () => await driver.sleep(5000) }, @@ -1752,13 +2100,13 @@ const steps = [ } }, - //Export page title text size + //Export page title text font size { description: 'Validate Export page title text font size', action: async () => { const elementStyle = await driver.findElement(By.css('h2')).getCssValue('font-size'); if (elementStyle !== '32px') { - throw new Error(`Export page title text font-size did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Export page title text font-size did not match; Actual: "${elementStyle}"`); } console.log('Passed: Export page title text font-size matched as expected'); } @@ -1776,13 +2124,25 @@ const steps = [ } }, + //Export complete label text font size + { + description: 'Validate Export complete label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('b')).getCssValue('font-size'); + if (elementStyle !== '13px') { + throw new Error(`Expected:Export complete label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Export complete label text font-size matched as expected'); + } + }, + //Download Export button icon { description: 'Verify Download Export button icon is present', action: async () => { const expectedIcon = await driver.wait(until.elementLocated(By.css('.fa-download')), 5000).catch(() => false); if (!expectedIcon) { - throw new Error('Download Export button icon not found'); + throw new Error('Expected: Download Export button icon not found'); } console.log('Passed: Download Export button icon present'); } @@ -1806,7 +2166,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.linkText('Download Export')).getCssValue('background-color'); if (elementStyle !== 'rgba(40, 39, 90, 1)') { - throw new Error(`Download Export button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Download Export button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Download Export button color matched as expected'); } @@ -1814,7 +2174,7 @@ const steps = [ //NEXT ACTION -NAVIGATE BACK TO DASHBOARD { description: 'Click Dashboard navigation link', action: async () => await driver.findElement(By.linkText('Dashboard')).click() }, - { description: 'Wait for login process to complete', action: async () => await driver.sleep(10000) }, + { description: 'Browser sleep', action: async () => await driver.sleep(10000) }, //Wait for dashboard to load - Correlation Coverages View Details button { @@ -2071,21 +2431,45 @@ const steps = [ action: async () => { const elementText = await driver.findElement(By.css('.modal-lg .modal-title')).getText(); if (elementText !== 'Edit Content Set') { - throw new Error(`Edit DIV title did not match; Actual: "${elementText}"`); + throw new Error(`Expected: Edit DIV title did not match; Actual: "${elementText}"`); } console.log('Passed: Edit DIV title matched as expected'); } }, - //Edit Content Set DIV - label + //Edit Content Set DIV title text font size { - description: 'Validate Edit DIV label', + description: 'Validate Edit Content Set DIV title text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.modal-lg .modal-title')).getCssValue('font-size'); + if (elementStyle !== '18px') { + throw new Error(`Expected: Edit Content Set DIV title text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Edit Content Set DIV title text background text font-size matched as expected'); + } + }, + + //Edit Content Set DIV - Content Set Name label + { + description: 'Validate Edit DIV - Content Set Name label', action: async () => { const elementText = await driver.findElement(By.css('.modal-lg .form-label')).getText(); if (elementText !== 'Content Set Name') { - throw new Error(`Expected: "Content Set Name"; Actual: "${elementText}"`); + throw new Error(`Expected: "Content Set Name" label; Actual: "${elementText}"`); } - console.log('Passed: Edit DIV label matched as expected'); + console.log('Passed: Content Set Name label matched as expected'); + } + }, + + //Edit Content Set DIV - Content Set Name label text font size + { + description: 'Validate Edit Content Set DIV - Content Set Name label text font size', + action: async () => { + const elementStyle = await driver.findElement(By.css('.modal-lg .form-label')).getCssValue('font-size'); + if (elementStyle !== '15px') { + throw new Error(`Expected: Edit Content Set DIV - Content Set Name label text font-size did not match; Actual: "${elementStyle}"`); + } + console.log('Passed: Edit Content Set DIV - Content Set Name label text background text font-size matched as expected'); } }, @@ -2095,7 +2479,7 @@ const steps = [ action: async () => { const elementValue = await driver.findElement(By.css('#orgname')).getAttribute('value'); if (elementValue !== createContentSetName) { - throw new Error(`Edit DIV textbox Expected: "${createContentSetName}"; Actual: "${elementValue}"`); + throw new Error(`Expected: Edit DIV textbox Expected: "${createContentSetName}"; Actual: "${elementValue}"`); } console.log('Passed: Edit DIV textbox matched as expected'); } @@ -2119,7 +2503,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('.modal-lg #orgdelete')).getCssValue('background-color'); if (elementStyle !== 'rgba(220, 53, 69, 1)') { - throw new Error(`Edit DIV delete button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV delete button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV delete button color matched as expected'); } @@ -2143,7 +2527,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#modalop')).getCssValue('background-color'); if (elementStyle !== 'rgba(48, 200, 172, 1)') { - throw new Error(`Edit DIV save button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV save button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV save button color matched as expected'); } @@ -2167,7 +2551,7 @@ const steps = [ action: async () => { const elementStyle = await driver.findElement(By.css('#modalclose')).getCssValue('background-color'); if (elementStyle !== 'rgba(0, 0, 0, 0)') { - throw new Error(`Edit DIV close button color did not match; Actual: "${elementStyle}"`); + throw new Error(`Expected: Edit DIV close button color did not match; Actual: "${elementStyle}"`); } console.log('Passed: Edit DIV close button color matched as expected'); }