Test: Playwright tests for tmtv (#4331)
Co-authored-by: Ibrahim <93064150+IbrahimCSAE@users.noreply.github.com> Co-authored-by: Ibrahim <ibrahim.mdev@gmail.com>
This commit is contained in:
13 files changed
+294
-13
No files matched your search
@@ -0,0 +1,54 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { visitStudy, scrollVolumeViewport } from './utils';
|
||||
|
||||
test('PT should show slice closest to CT', async ({ page }) => {
|
||||
const studyInstanceUID = '1.2.840.113619.2.290.3.3767434740.226.1600859119.501';
|
||||
const mode = 'Total Metabolic Tumor Volume';
|
||||
await visitStudy(page, studyInstanceUID, mode);
|
||||
|
||||
const vp = page.getByTestId('viewport-pane');
|
||||
|
||||
// Sagittal
|
||||
await expect(vp.nth(1)).toContainText('257/512', { useInnerText: true }); // Should default i 257
|
||||
await expect.soft(vp.nth(4)).toContainText('97/192');
|
||||
await scrollVolumeViewport(page, 'ctSAGITTAL', -1); // CT i 256
|
||||
await expect(vp.nth(1)).toContainText('256/512');
|
||||
await expect.soft(vp.nth(4)).toContainText('96/192');
|
||||
await scrollVolumeViewport(page, 'ctSAGITTAL', -1); // CT i 255
|
||||
await expect(vp.nth(1)).toContainText('255/512');
|
||||
await expect.soft(vp.nth(4)).toContainText('95/192');
|
||||
await scrollVolumeViewport(page, 'ctSAGITTAL', -1); // CT i 254
|
||||
await expect(vp.nth(1)).toContainText('254/512');
|
||||
await expect.soft(vp.nth(4)).toContainText('95/192');
|
||||
await scrollVolumeViewport(page, 'ctSAGITTAL', -1); // CT i 253
|
||||
await expect(vp.nth(1)).toContainText('253/512');
|
||||
await expect.soft(vp.nth(4)).toContainText('94/192');
|
||||
await scrollVolumeViewport(page, 'ctSAGITTAL', -1); // CT i 252
|
||||
await expect(vp.nth(1)).toContainText('252/512');
|
||||
await expect.soft(vp.nth(4)).toContainText('94/192');
|
||||
await scrollVolumeViewport(page, 'ctSAGITTAL', -1); // CT i 251
|
||||
await expect(vp.nth(1)).toContainText('251/512');
|
||||
await expect.soft(vp.nth(4)).toContainText('93/192');
|
||||
|
||||
// Coronal
|
||||
await expect(vp.nth(2)).toContainText('256/512'); // Should default i 256
|
||||
await expect.soft(vp.nth(5)).toContainText('96/192');
|
||||
await scrollVolumeViewport(page, 'ctCORONAL', -1); // CT i 255
|
||||
await expect(vp.nth(2)).toContainText('255/512');
|
||||
await expect.soft(vp.nth(5)).toContainText('96/192');
|
||||
await scrollVolumeViewport(page, 'ctCORONAL', -1); // CT i 254
|
||||
await expect(vp.nth(2)).toContainText('254/512');
|
||||
await expect.soft(vp.nth(5)).toContainText('95/192');
|
||||
await scrollVolumeViewport(page, 'ctCORONAL', -1); // CT i 253
|
||||
await expect(vp.nth(2)).toContainText('253/512');
|
||||
await expect.soft(vp.nth(5)).toContainText('95/192');
|
||||
await scrollVolumeViewport(page, 'ctCORONAL', -1); // CT i 252
|
||||
await expect(vp.nth(2)).toContainText('252/512');
|
||||
await expect.soft(vp.nth(5)).toContainText('94/192');
|
||||
await scrollVolumeViewport(page, 'ctCORONAL', -1); // CT i 251
|
||||
await expect(vp.nth(2)).toContainText('251/512');
|
||||
await expect.soft(vp.nth(5)).toContainText('94/192');
|
||||
await scrollVolumeViewport(page, 'ctCORONAL', -1); // CT i 250
|
||||
await expect(vp.nth(2)).toContainText('250/512');
|
||||
await expect.soft(vp.nth(5)).toContainText('93/192');
|
||||
});
|
||||
Reference in new issue
Block a user