-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
This test reproduced it
import { volViewPage } from '../pageobjects/volview.page';
describe('Image Reload Bug', () => {
it('should properly render when loading the same image twice', async () => {
await volViewPage.open();
// First click on prostate sample
await volViewPage.downloadProstateSample();
await volViewPage.waitForViews();
const layoutContainer = await $('.layout-container');
const firstLoadResult = await browser.checkElement(
layoutContainer,
'first_load_rendering'
);
const THRESHOLD = 11;
expect(firstLoadResult).toBeLessThan(THRESHOLD);
// Second click on prostate sample
// Need to reopen the samples panel first since it closes after selection
// Look for the Sample Data expansion panel title and click it
const sampleDataPanelTitle = await $('span=Sample Data').parentElement();
await sampleDataPanelTitle.click();
// Wait for the samples list to be visible
await browser.waitUntil(
async () => {
const samplesList = await volViewPage.samplesList;
return samplesList.isDisplayed();
},
{
timeout: 5000,
timeoutMsg: 'Expected samples list to be visible after reopening panel',
}
);
// Click prostate sample again
await volViewPage.downloadProstateSample();
await volViewPage.waitForViews();
await browser.pause(2000);
const secondLoadResult = await browser.checkElement(
layoutContainer,
'second_load_rendering'
);
expect(secondLoadResult).toBeLessThan(THRESHOLD);
});
});
Metadata
Metadata
Assignees
Labels
No labels