Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d6b3a22
Remove rest results from test queue query
stalgiag Oct 22, 2025
e42d1bc
server side caching for test plans
stalgiag Oct 22, 2025
3c97ada
fix: remove unneeded draftTestPlanRuns from query
stalgiag Oct 22, 2025
e375069
Delayed report rerun load with caching
stalgiag Oct 22, 2025
431f1cd
Unnecessary fetch in test plan report status dialog
stalgiag Oct 22, 2025
9a38970
cache-first TestQueue
stalgiag Oct 23, 2025
7e681e3
Aggressive Apollo caching
stalgiag Oct 23, 2025
2b9ed8d
code splitting, lazy loading, don't query tests when not needed
stalgiag Oct 23, 2025
702be8d
remove query of User.at in TestQueue
stalgiag Oct 23, 2025
a2d4426
do not query collection job for percent poll
stalgiag Oct 23, 2025
a6d4d03
don't query testPlanReportStatuses, TestQueue
stalgiag Oct 23, 2025
e14bb64
Cache first TestQueue
stalgiag Oct 23, 2025
05cdb03
webpack prefetching
stalgiag Oct 23, 2025
de075c8
report level fetch/refetch, TestQueue
stalgiag Oct 23, 2025
fbdb219
report level fetch/refetch, TestQueue
stalgiag Oct 23, 2025
53354b6
style update
stalgiag Oct 23, 2025
75b3da2
Cleanup, lint
stalgiag Oct 23, 2025
206453e
Delay git property load until disclosure open
stalgiag Oct 23, 2025
cd56416
Handle cache resolution on report rows
stalgiag Oct 23, 2025
62f49ef
Better total scenario count resolver
stalgiag Oct 23, 2025
440c0f7
Update snapshots
stalgiag Oct 23, 2025
ecbe06e
Delay fetching full testPlanReports
stalgiag Oct 23, 2025
a8488aa
Use dataloader, honor attributes in test plan resolver
stalgiag Oct 23, 2025
175dfa5
Fix TestQueue.test
stalgiag Oct 24, 2025
d9a4c28
Adjust assigntesterdropdown
stalgiag Oct 24, 2025
490f966
Fix on hold
stalgiag Oct 25, 2025
a08970e
Refetch report rows on assign tester through ManageBotRunDialog, grap…
stalgiag Oct 27, 2025
c1433ab
Wait for refetch in TestRun e2e test
stalgiag Oct 27, 2025
d2b3739
Update snapshots
stalgiag Oct 27, 2025
f11b8c0
More waits for secondary load in the TestRun.e2e
stalgiag Oct 27, 2025
d92b4e9
Refetch collection job on cancel
stalgiag Oct 27, 2025
97ae008
Handle delayed row fetch in conditional render for feature table
stalgiag Oct 27, 2025
dda7698
Don't use eval click in TestRun.e2e.
stalgiag Oct 27, 2025
ab50926
TestRun.e2e don't attempt click if el not found
stalgiag Oct 28, 2025
3a1de57
ReportRerun, wait for table with tab loads
stalgiag Oct 28, 2025
fdf790e
Update webpack.prod.js
stalgiag Oct 28, 2025
e80d1e5
Correct version sorting
stalgiag Oct 29, 2025
774ec5d
Add atversion to row query
stalgiag Oct 30, 2025
6a65f4f
refetch row after delay on start bot run in report
stalgiag Oct 30, 2025
64bb71b
Merge branch 'development' into performance-updates
stalgiag Oct 30, 2025
26364c6
Update snaps
stalgiag Oct 30, 2025
2bd0766
Merge branch 'development' into performance-updates
stalgiag Nov 5, 2025
63fc121
Update snapshots
stalgiag Nov 5, 2025
10f56e8
Handle reload at subroute with Tab better
stalgiag Nov 5, 2025
2d075a6
Fix tests after merge, update snaps
stalgiag Nov 5, 2025
77ae54a
Merge branch 'development' into performance-updates
stalgiag Nov 12, 2025
3b2e44b
Update snapshots
stalgiag Nov 12, 2025
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
33 changes: 30 additions & 3 deletions client/components/AddTestToQueueWithConfirmation/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useMemo, useRef, useState } from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-bootstrap';
import BasicModal from '../common/BasicModal';
import { useMutation, useQuery } from '@apollo/client';
import { useMutation, useQuery, useApolloClient } from '@apollo/client';
import { LoadingStatus, useTriggerLoad } from '../common/LoadingStatus';
import {
getBotUsernameFromAtBrowser,
Expand All @@ -14,7 +14,10 @@ import {
EXISTING_TEST_PLAN_REPORTS,
ADD_TEST_QUEUE_MUTATION
} from './queries';
import { TEST_QUEUE_PAGE_QUERY } from '../TestQueue/queries';
import {
TEST_QUEUE_PAGE_QUERY,
TEST_QUEUE_EXPANDED_ROW_QUERY
} from '../TestQueue/queries';
import { TEST_PLAN_REPORT_STATUS_DIALOG_QUERY } from '../TestPlanReportStatusDialog/queries';
import { ME_QUERY } from '../App/queries';

Expand All @@ -28,6 +31,7 @@ function AddTestToQueueWithConfirmation({
buttonText = 'Add to Test Queue',
triggerUpdate = () => {}
}) {
const client = useApolloClient();
const [showPreserveReportDataMessage, setShowPreserveReportDataMessage] =
useState(false);
const [showConfirmation, setShowConfirmation] = useState(false);
Expand Down Expand Up @@ -61,6 +65,7 @@ function AddTestToQueueWithConfirmation({
directory: testPlanVersion?.testPlan?.directory
},
fetchPolicy: 'cache-and-network',
nextFetchPolicy: 'cache-first',
skip: !testPlanVersion?.id
}
);
Expand Down Expand Up @@ -296,8 +301,30 @@ function AddTestToQueueWithConfirmation({
await scheduleCollection({
variables: {
testPlanReportId: testPlanReport.id
}
},
refetchQueries: [
ME_QUERY,
EXISTING_TEST_PLAN_REPORTS,
TEST_QUEUE_PAGE_QUERY,
TEST_PLAN_REPORT_STATUS_DIALOG_QUERY
],
awaitRefetchQueries: true
});

// Wait a moment for React to re-render and mount the new row component
await new Promise(resolve => setTimeout(resolve, 100));

// Manually fetch the expanded row query to update the cache
// This ensures the run appears immediately
try {
await client.query({
query: TEST_QUEUE_EXPANDED_ROW_QUERY,
variables: { testPlanReportId: testPlanReport.id },
fetchPolicy: 'network-only'
});
} catch (error) {
// If the query fails, that's okay - it will load when the component mounts
}
}, 'Scheduling Collection Job');
setShowConfirmation(true);
};
Expand Down
1 change: 1 addition & 0 deletions client/components/BotRunTestStatusList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const BotRunTestStatusList = ({ testPlanReportId }) => {
} = useQuery(TEST_PLAN_RUNS_TEST_RESULTS_QUERY, {
variables: { testPlanReportId },
fetchPolicy: 'cache-and-network',
nextFetchPolicy: 'cache-first',
pollInterval
});

Expand Down
8 changes: 6 additions & 2 deletions client/components/CandidateReview/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ import { ME_QUERY } from '../App/queries';

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

const { data: meData } = useQuery(ME_QUERY);
const { data: meData } = useQuery(ME_QUERY, {
fetchPolicy: 'cache-and-network',
nextFetchPolicy: 'cache-first'
});
const { me } = meData;

if (error) {
Expand Down
5 changes: 4 additions & 1 deletion client/components/DataManagement/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import styles from './DataManagement.module.css';
const DataManagement = () => {
const { loading, data, error, refetch } = useQuery(
DATA_MANAGEMENT_PAGE_QUERY,
{ fetchPolicy: 'cache-and-network' }
{
fetchPolicy: 'cache-and-network',
nextFetchPolicy: 'cache-first'
}
);

const [pageReady, setPageReady] = useState(false);
Expand Down
26 changes: 1 addition & 25 deletions client/components/DataManagement/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,21 @@ import {
AT_FIELDS,
AT_VERSION_FIELDS,
BROWSER_FIELDS,
BROWSER_VERSION_FIELDS,
ISSUE_FIELDS,
ME_FIELDS,
TEST_PLAN_FIELDS,
TEST_PLAN_REPORT_FIELDS,
TEST_PLAN_VERSION_FIELDS,
TEST_RESULT_FIELDS
TEST_PLAN_VERSION_FIELDS
} from '@components/common/fragments';

export const DATA_MANAGEMENT_PAGE_QUERY = gql`
${AT_FIELDS}
${AT_VERSION_FIELDS}
${BROWSER_FIELDS}
${BROWSER_VERSION_FIELDS}
${ISSUE_FIELDS()}
${ME_FIELDS}
${TEST_PLAN_FIELDS}
${TEST_PLAN_REPORT_FIELDS}
${TEST_RESULT_FIELDS}
query DataManagementPage {
me {
...MeFields
Expand Down Expand Up @@ -87,26 +83,6 @@ export const DATA_MANAGEMENT_PAGE_QUERY = gql`
browser {
...BrowserFields
}
draftTestPlanRuns {
tester {
username
}
testPlanReport {
id
}
testResults {
...TestResultFields
test {
id
}
atVersion {
...AtVersionFields
}
browserVersion {
...BrowserVersionFields
}
}
}
}
}
}
Expand Down
55 changes: 44 additions & 11 deletions client/components/GraphQLProvider/GraphQLProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
concat
} from '@apollo/client';

// Dynamically set GraphQL request headers
// See https://www.apollographql.com/docs/react/networking/advanced-http-networking#customizing-request-logic
const headerMiddleware = new ApolloLink((operation, forward) => {
const currentTransactionId = sessionStorage.getItem('currentTransactionId');
if (currentTransactionId) {
Expand All @@ -33,25 +31,60 @@ const client = new ApolloClient({
fields: {
me: { merge: true },
testPlanVersion: { merge: true },
testPlanVersions: { merge: false },
testPlanReport: { merge: true },
testPlanReports: { merge: false },
collectionJobByTestPlanRunId: {
merge(existing, incoming) {
return { ...existing, ...incoming };
}
}
}
},
Mutation: {
fields: {
testPlanReport: { merge: false },
testPlanRun: { merge: false },
testPlanVersion: { merge: false }
}
At: {
keyFields: ['id']
},
AtVersion: {
keyFields: ['id']
},
Browser: {
keyFields: ['id']
},
BrowserVersion: {
keyFields: ['id']
},
TestPlan: {
keyFields: ['id']
},
TestPlanVersion: {
keyFields: ['id']
},
TestPlanReport: {
keyFields: ['id']
},
TestPlanRun: {
keyFields: ['id']
},
TestResult: {
keyFields: ['id']
},
CollectionJob: {
keyFields: ['id']
},
User: {
keyFields: ['id']
},
AriaHtmlFeaturesMetrics: {
keyFields: false
}
}
})
}),
defaultOptions: {
query: {
errorPolicy: 'all'
},
watchQuery: {
errorPolicy: 'all'
}
}
});

const resetCache = async () => {
Expand Down
11 changes: 9 additions & 2 deletions client/components/ManageBotRunDialog/StartBotRunButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import useConfirmationModal from '../../../hooks/useConfirmationModal';
import { useTriggerLoad } from '../../common/LoadingStatus';
import BasicModal from '../../common/BasicModal';
import { SCHEDULE_COLLECTION_JOB_MUTATION } from '../../AddTestToQueueWithConfirmation/queries';
import { TEST_QUEUE_PAGE_QUERY } from '../../TestQueue/queries';
import {
TEST_QUEUE_PAGE_QUERY,
TEST_QUEUE_EXPANDED_ROW_QUERY
} from '../../TestQueue/queries';
import { TEST_PLAN_REPORT_STATUS_DIALOG_QUERY } from '../../TestPlanReportStatusDialog/queries';

const StartBotRunButton = ({ testPlanReport, onChange }) => {
Expand Down Expand Up @@ -62,7 +65,11 @@ const StartBotRunButton = ({ testPlanReport, onChange }) => {
variables: { testPlanReportId: testPlanReport.id },
refetchQueries: [
TEST_QUEUE_PAGE_QUERY,
TEST_PLAN_REPORT_STATUS_DIALOG_QUERY
TEST_PLAN_REPORT_STATUS_DIALOG_QUERY,
{
query: TEST_QUEUE_EXPANDED_ROW_QUERY,
variables: { testPlanReportId: testPlanReport.id }
}
],
awaitRefetchQueries: true
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const StopRunningCollectionButton = ({ collectionJob, onClick = () => {} }) => {
variables: {
collectionJobId: collectionJob.id
},
skip: !collectionJob
skip: !collectionJob,
refetchQueries: ['CollectionJobIdByTestPlanRunId']
});

if (!collectionJob) {
Expand Down
12 changes: 8 additions & 4 deletions client/components/ManageBotRunDialog/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const ManageBotRunDialog = ({
variables: {
testPlanRunId: testPlanRun.id
},
fetchPolicy: 'cache-and-network'
fetchPolicy: 'cache-first'
}
);

Expand All @@ -57,7 +57,7 @@ const ManageBotRunDialog = ({
variables: {
testPlanReportId
},
fetchPolicy: 'cache-and-network'
fetchPolicy: 'cache-only'
}
);

Expand All @@ -75,7 +75,9 @@ const ManageBotRunDialog = ({

const { isAdmin, isTester } = evaluateAuth(me);

const [assignTester] = useMutation(ASSIGN_TESTER_MUTATION);
const [assignTester] = useMutation(ASSIGN_TESTER_MUTATION, {
refetchQueries: ['TestQueueExpandedRow']
});

const isBotRunFinished = useMemo(() => {
const status = collectionJobQuery?.collectionJobByTestPlanRunId?.status;
Expand Down Expand Up @@ -187,7 +189,9 @@ const ManageBotRunDialog = ({
collectionJobQuery,
isAdmin,
isTester,
isBotRunFinished
isBotRunFinished,
me?.id,
assignTester
]);

const deleteConfirmationContent = (
Expand Down
3 changes: 3 additions & 0 deletions client/components/ManageBotRunDialog/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ export const TEST_PLAN_REPORT_ASSIGNED_TESTERS_QUERY = gql`
testPlanReport(id: $testPlanReportId) {
id
draftTestPlanRuns {
id
tester {
id
username
isBot
}
}
}
Expand Down
Loading
Loading