Class TicketsWebServiceTargetLabelsTest
java.lang.Object
ubic.gemma.rest.TicketsWebServiceTargetLabelsTest
@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)
public class TicketsWebServiceTargetLabelsTest
extends Object
displayLabel / displayName on ticket targets.
Both fields have been on TicketTargetValueObject since Phase B-2, documented as
"populated by the resource layer via a side-join", and nothing ever populated them — so every
target of every ticket arrived as a bare id and the curation UI's ticket navigator rendered
"31491 (no title)" for every row. The UI resolved them itself at five requests per ticket.
- Author:
- gembro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidloadIdentifiers is ACL-filtered, so an id the caller cannot read simply does not come back.void🛑 The point of the fix.voidNo EE targets at all must not cost a query.voidA preboarded target is labelled by its accession — the batch triage ticket carries every candidate from a scrape, and a curator opening it should see GSE numbers rather than bare ids.void
-
Constructor Details
-
TicketsWebServiceTargetLabelsTest
public TicketsWebServiceTargetLabelsTest()
-
-
Method Details
-
targetsCarryTheirDatasetsNames
@Test @DisplayName("a target carries its dataset's short name and title, not just an id") public void targetsCarryTheirDatasetsNames() -
everyTargetAcrossEveryTicketResolvesInOneCall
@Test @DisplayName("a page of tickets resolves every target in ONE query") public void everyTargetAcrossEveryTicketResolvesInOneCall()🛑 The point of the fix. Resolving per ticket would move uib's N+1 onto the server; the dashboard renders a page of tickets at once, so every target across all of them resolves in one call. -
anUnresolvableTargetStaysNull
@Test @DisplayName("an unresolvable target keeps its null rather than borrowing another row's name") public void anUnresolvableTargetStaysNull()loadIdentifiers is ACL-filtered, so an id the caller cannot read simply does not come back. The target keeps its null — the documented fallback — rather than the resolution failing or, worse, the name of an unreadable dataset appearing on a ticket. -
noDatasetTargetsAsksNothing
@Test @DisplayName("a ticket with no dataset targets asks nothing") public void noDatasetTargetsAsksNothing()No EE targets at all must not cost a query. -
preboardedTargetsAreLabelledByAccession
@Test @DisplayName("preboarded targets are labelled by accession, in one query") public void preboardedTargetsAreLabelledByAccession()A preboarded target is labelled by its accession — the batch triage ticket carries every candidate from a scrape, and a curator opening it should see GSE numbers rather than bare ids.A preboarded row has no name of its own; it is an accession Gemma has not loaded, so only
displayLabelis set. Resolved in ONE query for the whole page, like the EE targets.
-