diff --git a/e2e/src/layout/viewerCtxMenu.prod.e2e-spec.js b/e2e/src/layout/viewerCtxMenu.prod.e2e-spec.js index 71aceb252fb67f1eaa618ba860ab43dd159a018b..ec5a2c032ecae45662c57ac50615b627ff710e8f 100644 --- a/e2e/src/layout/viewerCtxMenu.prod.e2e-spec.js +++ b/e2e/src/layout/viewerCtxMenu.prod.e2e-spec.js @@ -10,6 +10,17 @@ const dict = { } ] } + }, + "Big Brain (Histology)": { + "Cytoarchitectonic Maps": { + tests:[ + { + position: [440,200], + expectedLabelName: 'Area hOc1 (V1, 17, CalcS)', + expectedLabelStatus: '(fully mapped)' + } + ] + } } } @@ -41,6 +52,28 @@ describe('> viewerCtxMenu', () => { expect(visible).toBeTrue() }) + it('> Title includes region status', async () => { + const { tests } = dict[templateName][parcellationName] + const { expectedLabelStatus, expectedLabelName } = tests[0] + await iavPage.wait(500) + if (expectedLabelStatus) { + const fullMenuText = await iavPage.getText(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`) + const titleStatusText = await fullMenuText.substr(0, fullMenuText.indexOf('Brain region')) + expect(titleStatusText.trim()).toEqual(`${expectedLabelName} ${expectedLabelStatus}`) + } + }) + + it('> Title do not includes region status', async () => { + const { tests } = dict[templateName][parcellationName] + const { expectedLabelStatus, expectedLabelName } = tests[0] + await iavPage.wait(500) + if (!expectedLabelStatus) { + const fullMenuText = await iavPage.getText(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`) + const titleStatusText = await fullMenuText.substr(0, fullMenuText.indexOf('Brain region')) + expect(titleStatusText.trim()).toEqual(expectedLabelName) + } + }) + it('> pos does not change when click inside', async () => { const { x: xBefore, y: yBefore, height: hBefore } = await iavPage.isAt(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`) await iavPage.click(`[aria-label="${ARIA_LABELS.SHOW_IN_OTHER_REF_SPACE}"]`) diff --git a/src/ui/parcellationRegion/regionMenu/regionMenu.template.html b/src/ui/parcellationRegion/regionMenu/regionMenu.template.html index e79f273f0567b7c1c86e0bbc54435594ee28f7bb..43a93fd3b27f406a1adcbafca44039f822ce7905 100644 --- a/src/ui/parcellationRegion/regionMenu/regionMenu.template.html +++ b/src/ui/parcellationRegion/regionMenu/regionMenu.template.html @@ -2,7 +2,7 @@ <mat-card-title> <div class="position-relative region-name"> {{ region.name }} - <small *ngIf="region.status">({{region.status}})</small> + <small *ngIf="region.status"> ({{region.status}})</small> </div> </mat-card-title> <mat-card-subtitle>