Skip to content

Commit

Permalink
Updated Test Queue and Candidate Tests Page (#715)
Browse files Browse the repository at this point in the history
* initial model, migration, and seeder

* seeders test plan ids

* test plan service

* fixing migration

* updating migrations to have foreign keys

* Implementing Howard's feedback

* Start to migrations and functions to support the DB change for further support of 648

* Update migrations and resolvers to update the individual test plan reports so they can be a part of the same testplanversion going through the candidate phase

* Add phase to TestPlanVersion

* Update resolver and logic for providing content on the reports page

* Update query and resolvers for single report pages

* Update query and resolvers for test plan version mutations

* Support for CandidateTests functionality and returned other basic functionality which will be removed in the future such as individual test plan report updating

* Restored viewing of CandidateTestPlanRun

* Fix graphql.schema

* Update migrations

* Remove unused references

* Update tests

* Rename TestPlanVersion date fields with 'status' in name to 'phase'

* Add approvedAt column to TestPlanReport

* Rename candidateStatusReachedAt to approvedAt

* Update migration to not use server specific function

* Update migration to be more clear and help in functional priority of following migrations

* Start draft of new Data Management page

* Add links to single-page view of the plans

* Update migration to prevent testPlanVersions not in the DRAFT phase having a draftPhaseReachedAt value

* Update migration to prevent testPlanVersions not in the DRAFT phase having a draftPhaseReachedAt value and set the phase to RD if not

* Update content of cells

* Show remaining data content for the Data Management Row

* Update the updatePhaseResolver

* Added checks to account for how the phase promotions will be done

* Making changes to account for using data from earlier runs when promoting a test plan version

* Implementation of preserving data with earlier version of test plan when the runs for a target doesn't exist

* Cleanup, comments and refactoring

* Sunset earlier test plan version during phase update

* Update TestManagement references to DataManagement

* Update Test Plan, Covered At and Overall Status columns based on latest mockups

* Implemented P0 styling items from latest mockups

* Styling updates

* Remove old version of test management content

* Add proptypes check

* Update Data Management page to allow access without being an admin

* Hide admin actions on data management page

* Adjust column sizes

* Update tests

* Update condition for when 'Advance to Recommended' button is shown

* Restrict condition for phase transition

* Editorial changes

* Editorial changes

* Cleanup TODOs

* Address rare error condition

* Add confirmation dialog when advancing test plan version; reduce values being requested

* Unique test plan report combinations shown in advance confirmation dialog

* Update test

* Update tests

* Update focus points when advancing phases

* Update migration to make purpose clearer

* Add validation for candidate phase

* Set default sorting for data management table

* Create /test-review endpoint for displaying what's available at aria-at.netlify in-app

* Update Data Management VERSION_STRING link to point to template generated at /test-review

* Fix sorting related bug with ManageTestQueue component

* Remove required reports logic from updatePhaseResolver; needs to be moved to its own PR

* Update test

* Stop checks to see if testPlanReports exist which use an AT. Instead, show all currently known ats in this Covered ATs column

* Reverse logic for showing the latest versions for a test plan

* Re-evaluate sorting logic for DataManagement default phase sorting and applicable Test Plan Versions shown for ManageTestQueue component

* Fix issue where latest version not being shown in row

* Update mock data

* Add note to docs

* Move Candidate Phase Start Date and Target Completion Date into dedicated columns on Candidate Tests page (#730)

* Move Candidate Phase Start Date and Target Completion Date into dedicated columns on Candidate Tests page

* Change page title from Candidate Tests to Candidate Review

* Update URL from '/candidate-tests' to `/candidate-review'

* Rename relevant variables and components

* Rename client/components/CandidateTests/ to client/components/CandidateReview

* Add version string to candidate tests page (#729)

* Start to revised Test Queue page

* Do checks for isApproved testPlanReports

* Removed 'Mark as ...' and 'Change Target Date' buttons from Candidate Test Plans

* Update .status references

* Update Sequelize model tests

* Update embed.js to check for 'TestPlanVersion.phase' instead of 'TestPlanReport.status'

* When setting to DRAFT, set the attached TestPlanReports approvedAt to null (this functionality may not be specified as yet but just in case)

* Update Test Queue Run and Candidate Test Run to remove references to testPlanReport.status

* Add visual detail when representing candidate phase start and completion dates

* Show time to target date on Data Management Row

* Added functionality for changing the recommended phase target date on data management page

* Make recommended phase target date modal admin specific

* Update tests

* Update TestPlanReportService.test.js

* Update TestPlanVersionService.test.js

* Make 'can be finalized' test more predictable

* Cleanup

* Update migrations to support future migrations when migrating from this as the initial point

* Update TestQueue/queries.js to only check for reports which don't have an approvedAt date

* Addressing minor feedback comments

* Cleanup

* Update tests

* Add checks when updating a TestPlanVersion phase which has no TestPlanReports which have been marked as final; also check if TestPlanVersions which do not have final reports aren't shown on /reports

* Update tests

* Re-use hashTests util

* Partially address #723

* Address feedback comments

* Update markAsFinalResolver.js to check if report can be finalized

* Add check for conflicts when marking report as final

* Rename approvedAt to markedFinalAt for consistency based on #632 comment

* Update test

* Add unmarkAsFinalResolver.js

* Update CandidateReview after rebase

* Resolve #740

* Remove unnecessary console.log

* Cleanup files after merge

---------

Co-authored-by: Erika Miguel <[email protected]>
Co-authored-by: Paul Clue <[email protected]>
Co-authored-by: alflennik <[email protected]>
Co-authored-by: Stalgia Grigg <[email protected]>
  • Loading branch information
5 people authored Aug 15, 2023
1 parent 9152a80 commit daae648
Show file tree
Hide file tree
Showing 50 changed files with 1,779 additions and 3,612 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const CANDIDATE_REPORTS_QUERY = gql`
}
testPlanReports(
atId: $atId
statuses: [CANDIDATE]
testPlanVersionPhases: [CANDIDATE]
testPlanVersionId: $testPlanVersionId
testPlanVersionIds: $testPlanVersionIds
) {
Expand Down Expand Up @@ -65,6 +65,7 @@ export const CANDIDATE_REPORTS_QUERY = gql`
testPlanVersion {
id
title
phase
gitSha
testPlan {
directory
Expand Down Expand Up @@ -142,7 +143,6 @@ export const CANDIDATE_REPORTS_QUERY = gql`
}
testPlanReport {
id
status
}
testResults {
test {
Expand Down
621 changes: 222 additions & 399 deletions client/components/CandidateReview/TestPlans/index.jsx

Large diffs are not rendered by default.

16 changes: 4 additions & 12 deletions client/components/CandidateReview/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import TestPlans from './TestPlans';
import { CANDIDATE_REVIEW_PAGE_QUERY } from './queries';

const CandidateReview = () => {
const { loading, data, error, refetch } = useQuery(
CANDIDATE_REVIEW_PAGE_QUERY,
{
fetchPolicy: 'cache-and-network'
}
);
const { loading, data, error } = useQuery(CANDIDATE_REVIEW_PAGE_QUERY, {
fetchPolicy: 'cache-and-network'
});

if (error) {
return (
Expand All @@ -36,12 +33,7 @@ const CandidateReview = () => {

const testPlanVersions = data.testPlanVersions;

return (
<TestPlans
testPlanVersions={testPlanVersions}
triggerPageUpdate={refetch}
/>
);
return <TestPlans testPlanVersions={testPlanVersions} />;
};

export default CandidateReview;
24 changes: 1 addition & 23 deletions client/components/CandidateReview/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ export const CANDIDATE_REVIEW_PAGE_QUERY = gql`
updatedAt
candidatePhaseReachedAt
recommendedPhaseTargetDate
testPlanReports(isCurrentPhase: true) {
testPlanReports(isFinal: true) {
id
status
metrics
at {
id
Expand Down Expand Up @@ -51,24 +50,3 @@ export const CANDIDATE_REVIEW_PAGE_QUERY = gql`
}
}
`;

export const UPDATE_TEST_PLAN_VERSION_RECOMMENDED_TARGET_DATE_MUTATION = gql`
mutation UpdateTestPlanReportRecommendedTargetDate(
$testPlanVersionId: ID!
$recommendedPhaseTargetDate: Timestamp!
) {
testPlanVersion(id: $testPlanVersionId) {
updateRecommendedPhaseTargetDate(
recommendedPhaseTargetDate: $recommendedPhaseTargetDate
) {
testPlanVersion {
phase
testPlanReports {
id
status
}
}
}
}
}
`;
Loading

0 comments on commit daae648

Please sign in to comment.