fix: A couple of changes to enable cs3d integration build (#5944)
* fix: A couple of changes to enable cs3d integration build * Bun update * fix: Crosshairs tests due to order changes * Fix a race in DicomTagBrowser.spec.ts and update the comparison for the screenshot for seg hydration. * Fix sorting issues by using consistent sort * fix: Inconsistency in scoord loader. Will need an update to screenshot * Fix crosshairs stability issues and random order issues in Scoord * Update the comparison image * Update navigate image * fix: Axios issue * Update to current CS3D
This commit is contained in:
1 parent
66c8e0c195
commit
f6bbd5c779
29 files changed
+565
-295
No files matched your search
@@ -1,11 +1,29 @@
|
||||
import { checkForScreenshot, screenShotPaths, test, visitStudy, expect } from './utils';
|
||||
import { assertBoundingBoxIsContainedWithin } from './utils/assertions';
|
||||
|
||||
async function expectSelectedSeriesExistsInOptions(seriesSelect) {
|
||||
const selectedSeriesLabel = (await seriesSelect.value.innerText()).trim();
|
||||
await seriesSelect.click();
|
||||
const optionCount = await seriesSelect.options.count();
|
||||
let hasMatchingOption = false;
|
||||
|
||||
for (let index = 0; index < optionCount; index++) {
|
||||
const optionText = (await seriesSelect.options.nth(index).innerText()).split('\n')[0].trim();
|
||||
if (optionText === selectedSeriesLabel) {
|
||||
hasMatchingOption = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
await expect(hasMatchingOption).toBeTruthy();
|
||||
}
|
||||
|
||||
test('should display the dicom tag browser', async ({ page, mainToolbarPageObject }) => {
|
||||
const studyInstanceUID = '1.3.6.1.4.1.25403.345050719074.3824.20170125095438.5';
|
||||
const mode = 'viewer';
|
||||
await visitStudy(page, studyInstanceUID, mode, 2000);
|
||||
|
||||
await mainToolbarPageObject.waitForVolumeLoad();
|
||||
await mainToolbarPageObject.moreTools.tagBrowser.click();
|
||||
await checkForScreenshot(
|
||||
page,
|
||||
@@ -22,6 +40,7 @@ test('should render the scroll bar with the correct look-and-feel', async ({
|
||||
const mode = 'viewer';
|
||||
await visitStudy(page, studyInstanceUID, mode, 2000);
|
||||
|
||||
await mainToolbarPageObject.waitForVolumeLoad();
|
||||
await mainToolbarPageObject.moreTools.tagBrowser.click();
|
||||
await checkForScreenshot({
|
||||
page,
|
||||
@@ -75,6 +94,7 @@ test('should open DICOM Tag Browser from empty viewport and show default series'
|
||||
// Switch to 3x3 layout
|
||||
await mainToolbarPageObject.layoutSelection.click();
|
||||
await page.getByTestId('Layout-2-2').click();
|
||||
await mainToolbarPageObject.waitForVolumeLoad();
|
||||
|
||||
await viewportPageObject.getNthLocator(6).click();
|
||||
|
||||
@@ -84,9 +104,7 @@ test('should open DICOM Tag Browser from empty viewport and show default series'
|
||||
await dicomTagBrowser.waitVisible();
|
||||
|
||||
const seriesSelect = dicomTagBrowser.seriesSelect;
|
||||
const optionText = await seriesSelect.getOptionText(0);
|
||||
|
||||
await expect(seriesSelect.value).toContainText(optionText);
|
||||
await expectSelectedSeriesExistsInOptions(seriesSelect);
|
||||
});
|
||||
|
||||
test('should open DICOM Tag Browser with active viewport series when viewport has display set', async ({
|
||||
@@ -101,6 +119,7 @@ test('should open DICOM Tag Browser with active viewport series when viewport ha
|
||||
|
||||
await mainToolbarPageObject.layoutSelection.click();
|
||||
await page.getByTestId('Layout-2-2').click();
|
||||
await mainToolbarPageObject.waitForVolumeLoad();
|
||||
|
||||
await (await viewportPageObject.getNth(2)).pane.click();
|
||||
|
||||
@@ -110,7 +129,5 @@ test('should open DICOM Tag Browser with active viewport series when viewport ha
|
||||
await dicomTagBrowser.waitVisible();
|
||||
|
||||
const seriesSelect = dicomTagBrowser.seriesSelect;
|
||||
const optionText = await seriesSelect.getOptionText(2);
|
||||
|
||||
await expect(seriesSelect.value).toContainText(optionText);
|
||||
await expectSelectedSeriesExistsInOptions(seriesSelect);
|
||||
});
|
||||
Reference in new issue
Block a user