Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

resolves #5524

Sequential single submission in integration tests is inefficient. Added completeBulkSubmission helper to BulkSubmissionPage and refactored tests to use bulk submission where repeated identical data is acceptable.

Changes

  • New completeBulkSubmission helper in BulkSubmissionPage:

    • Supports replicated submissions via count + single metadata/sequence
    • Supports diverse submissions via arrays of metadata/sequences
    • Auto-appends index to submission IDs when replicating
    • Handles single and multi-segment organisms
  • Updated tests:

    • revise-sequence.spec.ts: Replaced 3 sequential submissions with one bulk call
    • review-page.spec.ts: Updated bulk approval/discard tests to use bulk submission
  • Single submission coverage preserved: single-submit.spec.ts continues to test the single submission flow

Example Usage

// Replicated submissions (same data, count times)
await submissionPage.completeBulkSubmission({
    count: 3,
    metadata: createTestMetadata({ submissionId: 'bulk-test' }),
    sequenceData: createTestSequenceData(),
    groupId,
});

// Diverse submissions (different data per sequence)
await submissionPage.completeBulkSubmission({
    metadata: [metadata1, metadata2],
    sequenceData: [seq1, seq2],
});

Screenshot

N/A - no UI changes

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

No manual testing performed - changes are to test infrastructure itself. TypeScript compilation and linting pass.

Original prompt

This section details on the original issue you should resolve

<issue_title>Optimize integration tests by using bulk submission instead of sequential single submission</issue_title>
<issue_description>Sequential single submission is very inefficient, we should use bulk submission instead

for (let i = 0; i < SEQUENCES_TO_REVISE; i++) {
await submissionPage.completeSubmission(
createTestMetadata({ submissionId: `bulk-revise-${timestamp}-${i}` }),
createTestSequenceData(),
);
}
</issue_description>

<agent_instructions>Let's add a helper function to submissionPage to submit sequences in bulk. To keep it simple let's start by just replicating the test sequence/metadata N times (parametrizable). Let the helper function return the accessions so they can be used downstream.

Then use this helper function where possible to repeated individual submission into bulk submission (whereever it's fine that the content is repeated).

Then, as a next step, modify bulk submission to allow uploading different metadata/sequence data for each of the submitted sequences - and use this where we require the setup to have different data for the individual sequences.

Goal is to speed up tests by using bulk instead of repeated single submission. We need to ensure that the single submission remains tested - but it should be tested in one place, doesn't need to be done all over the place, e.g. in revise test as mentioned in this issue.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Optimize integration tests with bulk submission method feat(integration-tests): optimize integration tests by using bulk submission Jan 3, 2026
Copilot AI requested a review from corneliusroemer January 3, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize integration tests by using bulk submission instead of sequential single submission

2 participants