Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create August 26, 2024 Release #1198

Merged
merged 19 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
84e269d
fix: Basic snapshot testing (#1175)
stalgiag Jul 29, 2024
8e328c5
Decompose and organize `import-tests` script (#1165)
stalgiag Jul 29, 2024
abe3086
fix: Update and expand `/client` tests (#1169)
howard-e Jul 29, 2024
7f6d795
Ensure that "Target Days X Past" is not included in snapshot (#1181)
stalgiag Jul 30, 2024
85d5e63
Add Dean Hamack (@tactics2) as a tester (#1185)
jscholes Jul 31, 2024
945d875
Filter Days Away in snapshots (#1183)
stalgiag Jul 31, 2024
3192435
Improved `atVersion.supportedByAutomation` field handling (#1182)
stalgiag Jul 31, 2024
dd4b8c2
feat: Use standardized gql fragments in queries.js files (#1147)
howard-e Jul 31, 2024
f9e90a5
Flatten migrations (#1187)
howard-e Aug 5, 2024
9013e81
Move date related functions to @shared/dates (#1191)
howard-e Aug 6, 2024
b2b0560
feat: Test navigation via URI fragment (#1188)
stalgiag Aug 6, 2024
b0d91ba
Reusable proptypes (#1189)
stalgiag Aug 8, 2024
c64e584
feat: Content updates to Candidate Review page (#1186)
stalgiag Aug 14, 2024
3694a16
Update snapshot
stalgiag Aug 14, 2024
5f2de7a
Upgrade puppeteer to v23 and fix intermittent CI issues (#1193)
stalgiag Aug 15, 2024
721d04e
Update cleaner to account for dynamic Run History date (#1194)
howard-e Aug 15, 2024
39033e6
Address sandbox deployment issue (#1190)
howard-e Aug 19, 2024
a80b80b
fix: Only match with single alphanumeric keys in "Assign Testers" dro…
stalgiag Aug 19, 2024
eb8f9ea
fix: Radio buttons for assertion verdicts (#1161)
stalgiag Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ deploy/provision.retry
# Migration generated files
server/migrations/pg_dump_test_plan_target.sql
server/migrations/test_plan_target_id.csv
server/migrations/dumps/dumpDatabase_*.sql
server/migrations/dumps/dumpTable_*.sql

# Private Key files (installed by deploy)
jwt-signing-key.pem

client/resources

#temp files for import-tests
server/scripts/import-tests/tmp
8 changes: 7 additions & 1 deletion client/components/AddTestToQueueWithConfirmation/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ function AddTestToQueueWithConfirmation({
);

const existingTestPlanReports =
existingTestPlanReportsData?.existingTestPlanVersion?.testPlanReports;
existingTestPlanReportsData?.existingTestPlanVersion?.testPlanReports.filter(
tpr =>
tpr.at?.id === at?.id &&
tpr.browser?.id === browser?.id &&
tpr.minimumAtVersion?.id === minimumAtVersion?.id &&
tpr.exactAtVersion?.id === exactAtVersion?.id
);

let latestOldVersion;
let oldReportToCopyResultsFrom;
Expand Down
6 changes: 3 additions & 3 deletions client/components/AddTestToQueueWithConfirmation/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export const EXISTING_TEST_PLAN_REPORTS = gql`
query ExistingTestPlanReports($testPlanVersionId: ID!, $directory: String!) {
existingTestPlanVersion: testPlanVersion(id: $testPlanVersionId) {
id
metadata
testPlanReports {
id
markedFinalAt
isFinal
markedFinalAt
draftTestPlanRuns {
initiatedByAutomation
}
Expand All @@ -27,14 +28,14 @@ export const EXISTING_TEST_PLAN_REPORTS = gql`
id
}
}
metadata
}
oldTestPlanVersions: testPlanVersions(
phases: [CANDIDATE, RECOMMENDED]
directory: $directory
) {
id
updatedAt
metadata
testPlanReports {
id
at {
Expand All @@ -44,7 +45,6 @@ export const EXISTING_TEST_PLAN_REPORTS = gql`
id
}
}
metadata
}
}
`;
Expand Down
6 changes: 3 additions & 3 deletions client/components/App/queries.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { gql } from '@apollo/client';
import { ME_FIELDS } from '@components/common/fragments';

export const ME_QUERY = gql`
${ME_FIELDS}
query Me {
me {
id
username
roles
...MeFields
}
}
`;
39 changes: 26 additions & 13 deletions client/components/CandidateReview/CandidateTestPlanRun/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ import Col from 'react-bootstrap/Col';
import Button from 'react-bootstrap/Button';
import { useParams, useNavigate, Navigate } from 'react-router-dom';
import { Helmet } from 'react-helmet';
import { getMetrics } from 'shared';
import { getMetrics, dates } from 'shared';
import './CandidateTestPlanRun.css';
import '../../TestRun/TestRun.css';
import '../../App/App.css';
import { useMediaQuery } from 'react-responsive';
import { convertDateToString } from '../../../utils/formatter';
import TestPlanResultsTable from '../../common/TestPlanResultsTable';
import ProvideFeedbackModal from '../CandidateModals/ProvideFeedbackModal';
import ThankYouModal from '../CandidateModals/ThankYouModal';
Expand All @@ -31,6 +30,8 @@ import DisclosureComponent from '../../common/DisclosureComponent';
import createIssueLink, {
getIssueSearchLink
} from '../../../utils/createIssueLink';
import RunHistory from '../../common/RunHistory';
import { useUrlTestIndex } from '../../../hooks/useUrlTestIndex';

const CandidateTestPlanRun = () => {
const { atId, testPlanVersionId } = useParams();
Expand All @@ -56,14 +57,16 @@ const CandidateTestPlanRun = () => {
const [reviewStatus, setReviewStatus] = useState('');
const [firstTimeViewing, setFirstTimeViewing] = useState(false);
const [viewedTests, setViewedTests] = useState([]);
const [currentTestIndex, setCurrentTestIndex] = useState(0);
const [testsLength, setTestsLength] = useState(0);
const [currentTestIndex, setCurrentTestIndex] = useUrlTestIndex(testsLength);
const [showTestNavigator, setShowTestNavigator] = useState(true);
const [isFirstTest, setIsFirstTest] = useState(true);
const [isLastTest, setIsLastTest] = useState(false);
const [feedbackModalShowing, setFeedbackModalShowing] = useState(false);
const [thankYouModalShowing, setThankYouModalShowing] = useState(false);
const [showInstructions, setShowInstructions] = useState(false);
const [showBrowserBools, setShowBrowserBools] = useState([]);
const [showRunHistory, setShowRunHistory] = useState(false);
const [showBrowserClicks, setShowBrowserClicks] = useState([]);

const isLaptopOrLarger = useMediaQuery({
Expand Down Expand Up @@ -182,7 +185,7 @@ const CandidateTestPlanRun = () => {
return bools;
});
});

setTestsLength(tests.length);
setShowBrowserClicks(browserClicks);
}
}, [data]);
Expand Down Expand Up @@ -282,7 +285,7 @@ const CandidateTestPlanRun = () => {

const reviewStatusText = vendorReviewStatusMap[reviewStatus];

const targetCompletionDate = convertDateToString(
const targetCompletionDate = dates.convertDateToString(
new Date(recommendedPhaseTargetDate),
'MMMM D, YYYY'
);
Expand Down Expand Up @@ -376,7 +379,8 @@ const CandidateTestPlanRun = () => {
</span>
<h1>
{`${currentTest.seq}. ${currentTest.title}`}{' '}
<span className="using">using</span> {`${at}`}
<span className="using">using</span> {`${at}`}{' '}
{`${testPlanReport?.latestAtVersionReleasedAt?.name ?? ''}`}
{viewedTests.includes(currentTest.id) && !firstTimeViewing && ' '}
{viewedTests.includes(currentTest.id) && !firstTimeViewing && (
<Badge className="viewed-badge" pill variant="secondary">
Expand All @@ -392,9 +396,11 @@ const CandidateTestPlanRun = () => {
<div className="test-info-entity apg-example-name">
<div className="info-label">
<b>Candidate Test Plan:</b>{' '}
{`${
testPlanVersion.title || testPlanVersion.testPlan?.directory || ''
}`}
<a href={`/test-review/${testPlanVersion.id}`}>
{`${
testPlanVersion.title || testPlanVersion.testPlan?.directory || ''
} ${testPlanVersion.versionString}`}
</a>
</div>
</div>
<div className="test-info-entity review-status">
Expand Down Expand Up @@ -461,13 +467,15 @@ const CandidateTestPlanRun = () => {
'Test Instructions',
...testPlanReports.map(
testPlanReport => `Test Results for ${testPlanReport.browser.name}`
)
),
'Run History'
]}
onClick={[
() => setShowInstructions(!showInstructions),
...showBrowserClicks
...showBrowserClicks,
() => setShowRunHistory(!showRunHistory)
]}
expanded={[showInstructions, ...showBrowserBools]}
expanded={[showInstructions, ...showBrowserBools, showRunHistory]}
disclosureContainerView={[
<InstructionsRenderer
key={`instructions-${currentTest.id}`}
Expand Down Expand Up @@ -498,7 +506,12 @@ const CandidateTestPlanRun = () => {
/>
</>
);
})
}),
<RunHistory
key="run-history"
testPlanReports={testPlanReports}
testId={currentTest.id}
/>
]}
stacked
></DisclosureComponent>
Expand Down
117 changes: 38 additions & 79 deletions client/components/CandidateReview/CandidateTestPlanRun/queries.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { gql } from '@apollo/client';
import {
AT_FIELDS,
AT_VERSION_FIELDS,
BROWSER_FIELDS,
BROWSER_VERSION_FIELDS,
ISSUE_FIELDS,
ME_FIELDS,
SCENARIO_RESULT_FIELDS,
TEST_FIELDS,
TEST_RESULT_FIELDS
} from '@components/common/fragments';

export const ADD_VIEWER_MUTATION = gql`
mutation AddViewerMutation($testPlanVersionId: ID!, $testId: ID!) {
Expand All @@ -25,15 +36,22 @@ export const PROMOTE_VENDOR_REVIEW_STATUS_REPORT_MUTATION = gql`
`;

export const CANDIDATE_REPORTS_QUERY = gql`
${AT_FIELDS}
${AT_VERSION_FIELDS}
${BROWSER_FIELDS}
${BROWSER_VERSION_FIELDS}
${ISSUE_FIELDS('all')}
${ME_FIELDS}
${TEST_FIELDS()}
${TEST_RESULT_FIELDS}
${SCENARIO_RESULT_FIELDS('all')}
query CandidateReportsQuery(
$atId: ID!
$testPlanVersionId: ID
$testPlanVersionIds: [ID]
) {
me {
id
roles
username
...MeFields
}
testPlanReports(
atId: $atId
Expand All @@ -45,104 +63,47 @@ export const CANDIDATE_REPORTS_QUERY = gql`
id
vendorReviewStatus
issues {
author
isCandidateReview
feedbackType
testNumberFilteredByAt
link
...IssueFieldsAll
}
at {
id
name
...AtFields
}
latestAtVersionReleasedAt {
id
name
releasedAt
...AtVersionFields
}
browser {
id
name
...BrowserFields
}
testPlanVersion {
id
title
phase
gitSha
testPlan {
directory
}
metadata
testPageUrl
updatedAt
versionString
updatedAt
candidatePhaseReachedAt
recommendedPhaseTargetDate
testPageUrl
metadata
testPlan {
directory
}
}
runnableTests {
id
title
rowNumber
renderedUrl
...TestFieldsSimple
renderableContent
viewers {
username
}
}
finalizedTestResults {
id
completedAt
...TestResultFields
test {
id
rowNumber
title
renderedUrl
...TestFieldsSimple
renderableContent
}
scenarioResults {
id
scenario {
commands {
id
text
}
}
output
assertionResults {
id
assertion {
text
phrase
}
passed
}
mustAssertionResults: assertionResults(priority: MUST) {
assertion {
text
phrase
}
passed
}
shouldAssertionResults: assertionResults(priority: SHOULD) {
assertion {
text
phrase
}
passed
}
mayAssertionResults: assertionResults(priority: MAY) {
assertion {
text
phrase
}
passed
}
unexpectedBehaviors {
id
text
impact
details
}
...ScenarioResultFieldsAll
}
}
draftTestPlanRuns {
Expand All @@ -153,18 +114,16 @@ export const CANDIDATE_REPORTS_QUERY = gql`
id
}
testResults {
...TestResultFields
test {
id
}
atVersion {
id
name
...AtVersionFields
}
browserVersion {
id
name
...BrowserVersionFields
}
completedAt
}
}
}
Expand Down
Loading