From f0f40a6f07dfba8ee7f028b2c86f1e3377994748 Mon Sep 17 00:00:00 2001 From: Howard Edwards Date: Thu, 21 Nov 2024 12:19:51 -0500 Subject: [PATCH 01/17] Include link to Review Page from Test Run --- client/components/TestRun/Heading.js | 8 +++++++- client/components/TestRun/index.jsx | 9 ++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/client/components/TestRun/Heading.js b/client/components/TestRun/Heading.js index 9a25b6ac2..5ece8e9c6 100644 --- a/client/components/TestRun/Heading.js +++ b/client/components/TestRun/Heading.js @@ -24,6 +24,8 @@ const TestRunHeading = ({ openAsUser, showEditAtBrowser, testPlanTitle, + testPlanVersionString, + testPlanVersionReviewLink, testResults, testIndex, testCount, @@ -137,6 +139,7 @@ const TestRunHeading = ({ ); } + const testPlanName = `${testPlanTitle} ${testPlanVersionString}`; return ( <>
@@ -145,7 +148,8 @@ const TestRunHeading = ({ data-testid="apg-example-name" >
- Test Plan: {testPlanTitle} + Test Plan:  + {testPlanName}
@@ -177,6 +181,8 @@ const TestRunHeading = ({ TestRunHeading.propTypes = { testPlanTitle: PropTypes.string.isRequired, + testPlanVersionString: PropTypes.string.isRequired, + testPlanVersionReviewLink: PropTypes.string.isRequired, at: PropTypes.string.isRequired, browser: PropTypes.string.isRequired, showEditAtBrowser: PropTypes.bool.isRequired, diff --git a/client/components/TestRun/index.jsx b/client/components/TestRun/index.jsx index 144788fec..cefc80ff2 100644 --- a/client/components/TestRun/index.jsx +++ b/client/components/TestRun/index.jsx @@ -366,10 +366,7 @@ const TestRun = () => { issueLink = createIssueLink({ testPlanTitle: testPlanVersion.title, testPlanDirectory: testPlanVersion.testPlan.directory, - versionString: `V${dates.convertDateToString( - testPlanVersion.updatedAt, - 'YY.MM.DD' - )}`, + versionString: testPlanVersion.versionString, testTitle: currentTest.title, testRowNumber: currentTest.rowNumber, testSequenceNumber: currentTest.seq, @@ -969,7 +966,7 @@ const TestRun = () => {
@@ -277,7 +277,7 @@

- - + @@ -221,7 +221,7 @@

+ test + + + + {selectedIssueType === 'command' && ( + <> + Select command ... +
+ {currentTest.scenarios.map((scenario, index) => { + const commandKey = `${scenario.id}-${scenario.commands + .map(command => command.id) + .join('_')}`; + const commandText = scenario.commands + .map(command => command.text) + .join(' then '); + + return ( + + ); + })} +
+ + )} { if (!(testPlanDirectory || testPlanTitle || versionString || atName)) { throw new Error('Cannot create issue link due to missing parameters'); @@ -72,9 +74,15 @@ const createIssueLink = ({ titleStart = 'Feedback'; } - title = - `${titleStart}: "${testTitle}" (${testPlanTitle}, ` + - `Test ${testSequenceNumber}, ${versionString})`; + if (commandString) { + title = + `${titleStart}: "${testTitle}" (${testPlanTitle}, ` + + `Test ${testSequenceNumber}, Command "${commandString}", ${versionString})`; + } else { + title = + `${titleStart}: "${testTitle}" (${testPlanTitle}, ` + + `Test ${testSequenceNumber}, ${versionString})`; + } } else { title = `General Feedback: ${testPlanTitle} ${versionString}`; if (atName) title = `${atName} ${title}`; @@ -120,8 +128,13 @@ const createIssueLink = ({ `[${shortenedUrl}](${modifiedRenderedUrl})\n` + reportLinkFormatted + atFormatted + - browserFormatted + - '\n'; + browserFormatted; + + if (commandString) { + testSetupFormatted = `${testSetupFormatted}` + `- Command: ${commandString}\n`; + } + + testSetupFormatted = `${testSetupFormatted}\n`; } let metadataFormatted = ''; From f167097dd142d4735fe03d2919779fe9f7d440ac Mon Sep 17 00:00:00 2001 From: Howard Edwards Date: Mon, 16 Dec 2024 17:34:48 -0500 Subject: [PATCH 08/17] Update snapshots --- .../e2e/snapshots/saved/_data-management.html | 12 ++++++------ client/tests/e2e/snapshots/saved/_run_2.html | 19 ++++++++++++++++++- .../snapshots/saved/_test-plan-report_1.html | 19 ++++++++++++++++++- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/client/tests/e2e/snapshots/saved/_data-management.html b/client/tests/e2e/snapshots/saved/_data-management.html index fc0f5d489..5c2317902 100644 --- a/client/tests/e2e/snapshots/saved/_data-management.html +++ b/client/tests/e2e/snapshots/saved/_data-management.html @@ -259,7 +259,7 @@

-

R&D -

Complete Aug 23, 2023

+

Complete Dec 12, 2024

@@ -2363,7 +2363,7 @@

Test Plans Status Summary

V23.08.23V24.12.12