-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize test timers for all users (#7896)
* Add custom started at time for test timer * Add update timer started at mutation * Add comment for timer reset useEffect * Remove deletion of empty line * Remove timer useEffect for refactor * Move scroll useEffect back to original position * Linting fix * Fix timer reset when result ready * Update gql codegen * Handle null timerStartedAt number * Add test order service timer test * Add test card timer test * Add queue mutation resolver test * Add null test for test card timer * Update TestOrderServiceTest * Fix comment on reset logic * Add illegal gql exception to update test timer * Ensure single invocation * Remove explicit truthy cast
- Loading branch information
Showing
12 changed files
with
372 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
backend/src/test/java/gov/cdc/usds/simplereport/api/queue/QueueMutationResolverTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package gov.cdc.usds.simplereport.api.queue; | ||
|
||
import static org.mockito.ArgumentMatchers.any; | ||
import static org.mockito.ArgumentMatchers.eq; | ||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.verify; | ||
|
||
import gov.cdc.usds.simplereport.service.PersonService; | ||
import gov.cdc.usds.simplereport.service.TestOrderService; | ||
import java.util.UUID; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
class QueueMutationResolverTest { | ||
@Test | ||
void updateTestTimer() { | ||
// GIVEN | ||
TestOrderService testOrderService = mock(TestOrderService.class); | ||
PersonService personService = mock(PersonService.class); | ||
|
||
long currentTime = System.currentTimeMillis(); | ||
String currentTimeString = Long.toString(currentTime); | ||
|
||
var sut = new QueueMutationResolver(testOrderService, personService); | ||
|
||
// WHEN | ||
sut.updateTestOrderTimerStartedAt(UUID.randomUUID(), currentTimeString); | ||
|
||
// THEN | ||
verify(testOrderService).updateTimerStartedAt(any(UUID.class), eq(currentTimeString)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.