Skip to content
Snippets Groups Projects
Commit 67ada81f authored by fsdavid's avatar fsdavid
Browse files

change #520 bug fix

parent ac27c152
No related branches found
No related tags found
No related merge requests found
...@@ -58,8 +58,11 @@ describe('> viewerCtxMenu', () => { ...@@ -58,8 +58,11 @@ describe('> viewerCtxMenu', () => {
await iavPage.wait(500) await iavPage.wait(500)
if (expectedLabelStatus) { if (expectedLabelStatus) {
const fullMenuText = await iavPage.getText(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`) const fullMenuText = await iavPage.getText(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`)
const titleStatusText = await fullMenuText.substr(0, fullMenuText.indexOf('Brain region')) if (fullMenuText.includes(`${expectedLabelName} ${expectedLabelStatus}`)) {
expect(titleStatusText.trim()).toEqual(`${expectedLabelName} ${expectedLabelStatus}`) expect(true).toBe(true)
} else {
expect(true).toBe(false)
}
} }
}) })
...@@ -69,8 +72,11 @@ describe('> viewerCtxMenu', () => { ...@@ -69,8 +72,11 @@ describe('> viewerCtxMenu', () => {
await iavPage.wait(500) await iavPage.wait(500)
if (!expectedLabelStatus) { if (!expectedLabelStatus) {
const fullMenuText = await iavPage.getText(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`) const fullMenuText = await iavPage.getText(`[aria-label="${ARIA_LABELS.CONTEXT_MENU}"]`)
const titleStatusText = await fullMenuText.substr(0, fullMenuText.indexOf('Brain region')) if (fullMenuText.includes(expectedLabelName)) {
expect(titleStatusText.trim()).toEqual(expectedLabelName) expect(true).toBe(true)
} else {
expect(true).toBe(false)
}
} }
}) })
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment