fix(thumbnail): Avoid multiple promise creations for thumbnails (#3756)
This commit is contained in:
1 parent
09ff293f5f
commit
b23eeff937
6 files changed
+30
-6
No files matched your search
+12
-1
@@ -442,7 +442,18 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
cy.waitDicomImage();
|
||||
|
||||
// Now navigate down once and check that the left hand pane navigated
|
||||
cy.get('body').type('{downarrow}');
|
||||
cy.get('body').focus().type('{downarrow}');
|
||||
|
||||
// The following lines assist in troubleshooting when/if this test were to fail.
|
||||
cy.get('[data-cy="viewport-pane"]')
|
||||
.eq(0)
|
||||
.find('[data-cy="viewport-overlay-top-right"]')
|
||||
.should('contains.text', 'I:2 (2/20)');
|
||||
cy.get('[data-cy="viewport-pane"]')
|
||||
.eq(1)
|
||||
.find('[data-cy="viewport-overlay-top-right"]')
|
||||
.should('contains.text', 'I:2 (2/20)');
|
||||
|
||||
cy.get('body').type('{leftarrow}');
|
||||
cy.setLayout(1, 1);
|
||||
cy.get('@viewportInfoTopRight').should('contains.text', 'I:2 (2/20)');
|
||||
|
||||
@@ -181,7 +181,7 @@ Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => {
|
||||
//Command to wait DICOM image to load into the viewport
|
||||
Cypress.Commands.add('waitDicomImage', (mode = '/basic-test', timeout = 50000) => {
|
||||
cy.window()
|
||||
.its('cornerstone')
|
||||
.its('cornerstone', { timeout: 30000 })
|
||||
.should($cornerstone => {
|
||||
const enabled = $cornerstone.getEnabledElements();
|
||||
if (enabled?.length) {
|
||||
|
||||
@@ -187,6 +187,10 @@ const BaseImplementation = {
|
||||
});
|
||||
},
|
||||
addSeriesMetadata(seriesSummaryMetadata, madeInClient = false) {
|
||||
if (!seriesSummaryMetadata || !seriesSummaryMetadata.length || !seriesSummaryMetadata[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { StudyInstanceUID } = seriesSummaryMetadata[0];
|
||||
let study = _getStudy(StudyInstanceUID);
|
||||
if (!study) {
|
||||
|
||||
Reference in new issue
Block a user