{ "stats": { "suites": 12, "tests": 12, "passes": 11, "pending": 0, "failures": 1, "testsRegistered": 12, "passPercent": 91.66666666666667, "pendingPercent": 0, "other": 0, "hasOther": false, "skipped": 0, "hasSkipped": false, "start": "2025-11-11T22:20:27.541Z", "end": "2025-11-20T02:54:13.525Z", "duration": 707625984 }, "results": [ { "uuid": "dbe51b45-9e98-4b29-aaa3-d5a20425e993", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8bd6e409-6339-4874-8fce-155e2ed3c253", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 60217, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n //cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n }\n },\n });\n let mockClipboardText = '';\n cy.window().then((win) => {\n cy.stub(win.navigator.clipboard, 'writeText').callsFake((text) => {\n mockClipboardText = text;\n return Promise.resolve();\n });\n cy.stub(win.navigator.clipboard, 'readText').callsFake(() => {\n return Promise.resolve(mockClipboardText);\n });\n win.mockClipboardText = mockClipboardText;\n win.setMockClipboardText = (text) => {\n mockClipboardText = text;\n win.mockClipboardText = text;\n };\n });\n cy.document().then((doc) => {\n cy.wrap(doc).as('document');\n });\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\n //Wait for curie response\n cy.wait('@curieResponse', {timeout: 20000});\n //Check if mapcontent is mounted correctly\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should(\n 'have.attr', 'style', 'height: 880px');\n //Loading mask should exist at the beginning\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('exist');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n //Only three visible button on the toolbar at the start\n cy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n //Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n //Wait for curie response\n cy.wait('@featuredDatasetResponse', {timeout: 20000});\n //Wait for curie response\n cy.wait('@anatomyResponse', {timeout: 20000});\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('be.visible');\n //the following attempt to workaround it.\n function is_high_resolution_screen() {\n // retina display has a devicePixelRatio of 2\n return window.devicePixelRatio > 1;\n }\n let snapshot = 'minimap_lr'\n if (is_high_resolution_screen()) {\n snapshot = 'minimap_hr'\n }\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(5000);\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > [style=\"height: 100%; width: 100%;\"] > :nth-child(2) > :nth-child(2) > #maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').compareSnapshot(snapshot).then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.wait(1000);\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_1pane')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_1pane')\n Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent_1pane', setting, index);\n })\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\n // Test loading different species, Rat\n cy.testSetCurrentEntry({\n \"type\": \"MultiFlatmap\",\n \"taxo\": \"NCBITaxon:10114\"\n }, 'Rat');\n //Search for non existance feature, expect not-found text\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('exist');\n //Search for Vague nerve, expect not-found text to be gone\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('not.exist');\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"UBERON:0018675\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.maplibregl-popup-content').should('exist').contains('Pelvic splanchnic nerve');\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\n //Open a new flatmap\n cy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\n //Switch back to the original viewer\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 2);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > :nth-child(1)', {timeout: 60000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').clear();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').type(\"heart\");\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info', {timeout: 45000}).should('contain', 'Neuron type aacar');\n cy.get('.sidebar-container .el-card.content-card:visible .header .is-link').click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseleave'); // close\n // dataset explorer\n cy.get('.tabs-container > :nth-child(1)').click();\n //Type in 76 generic\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-button--primary').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').filter(':visible').should('have.length', 1);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Check how many tags in the dataset\n cy.get('.box-card .container button').should('have.length', 6);\n //Intercept the request and stub it with preloaded fixture\n cy.get('@metadata').then((metadata) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: metadata});\n })\n //Intercept the request and stub it with preloaded fixture\n cy.get('@primitive').then((primitive) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: primitive}).as(\"scaffoldResponse\");\n })\n //Check for scaffolds and open it, should have three items in select now\n cy.get('.box-card .container button').contains('Scaffolds (2)').click();\n cy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1.contentvuer').should('have.length', 1);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 3);\n //Check for plot and open it, should have four items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Segmentations (1)').click();\n cy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\n cy.get('.box-card .container button').filter(':visible').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 4);\n cy.get('@simulation_ui').then((simulation_ui) => {\n cy.intercept('/sparc-api//sim/dataset/999',\n {statusCode: 200, body: simulation_ui});\n })\n //Check for simulations and open it, should have five items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 5);\n //Close the sidebar\n cy.get('.open-tab > .el-icon').click();\n cy.get('.close-tab').should('exist').click();\n cy.get('.sidebar-container').should('not.be.visible');\n //Change from single panel to four panels and check for it\n cy.get('.icon-group > .splitscreen-icon').should('exist').click();\n cy.get('.icon-group.el-row .el-popover:visible').should('exist');\n cy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\n cy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\n cy.get('.content-container:visible').should('have.length', 4);\n // Switch to Annotation viewing mode\n cy.get('.viewing-mode-selector > .toolbar-dropdown').as('changeViewingMode').trigger('mouseenter')\n cy.get('.toolbar-dropdown-popper .el-dropdown-menu__item > h5').as('viewingModes').contains('Annotation').click()\n cy.get('@changeViewingMode').trigger('mouseleave')\n // All available maps should show to annotation tools\n cy.get('.toolbar-container > .toolbar-icons').should('have.length', 3)\n cy.wait(1000);\n cy.get('.viewer-container > .flatmap-container > [style=\"height: 100%; width: 100%; position: relative;\"] > .pathway-location > .drawer-button').click({force: true});\n cy.get('.tree-controls > .drawer-button').click({force: true});\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_4panes')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_4panes')\n Object.entries(settings).forEach(([setting, index]) => {\n if (setting === 'Flight path display' || setting === 'Change background') {\n cy.checkGlobalSettings('MapContent_4panes', setting, index);\n }\n })", "err": { "message": "Error: queue.insert must be called with a valid index - the index (58) is out of bounds", "estack": "Error: queue.insert must be called with a valid index - the index (58) is out of bounds\n at CommandQueue.insert (http://localhost:8081/__cypress/runner/cypress_runner.js:144211:13)\n at CommandQueue.insert (http://localhost:8081/__cypress/runner/cypress_runner.js:143827:11)\n at CommandQueue.enqueue (http://localhost:8081/__cypress/runner/cypress_runner.js:143824:10)\n at $Cy.enqueue (http://localhost:8081/__cypress/runner/cypress_runner.js:138411:16)\n at callback (http://localhost:8081/__cypress/runner/cypress_runner.js:138008:10)\n at $Chainer. [as then] (http://localhost:8081/__cypress/runner/cypress_runner.js:118723:7)\n at compareScreenshots (http://localhost:8081/__cypress/src/node_modules/.vite/deps/cypress-visual-regression_dist_command.js?v=9f21fd5b:103:63)\n at Context. (http://localhost:8081/__cypress/src/node_modules/.vite/deps/cypress-visual-regression_dist_command.js?v=9f21fd5b:22:22)\n at getRet (http://localhost:8081/__cypress/runner/cypress_runner.js:118826:20)\n at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)\n at Promise.attempt.Promise.try (http://localhost:8081/__cypress/runner/cypress_runner.js:4315:29)\n at Context.thenFn (http://localhost:8081/__cypress/runner/cypress_runner.js:118837:66)\n at Context.then (http://localhost:8081/__cypress/runner/cypress_runner.js:119088:21)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137994:19)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:143915:15)\n at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)\n at Promise._settlePromiseFromHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:1519:31)\n at Promise._settlePromise (http://localhost:8081/__cypress/runner/cypress_runner.js:1576:18)\n at Promise._settlePromiseCtx (http://localhost:8081/__cypress/runner/cypress_runner.js:1613:10)\n at _drainQueueStep (http://localhost:8081/__cypress/runner/cypress_runner.js:2411:12)\n at _drainQueue (http://localhost:8081/__cypress/runner/cypress_runner.js:2400:9)", "diff": null }, "uuid": "04e03351-1baa-41b0-8f6f-effe2f84740d", "parentUUID": "8bd6e409-6339-4874-8fce-155e2ed3c253", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "04e03351-1baa-41b0-8f6f-effe2f84740d" ], "pending": [], "skipped": [], "duration": 60217, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c3104829-283b-43f4-b3a7-e0ddaf4bfde7", "title": "", "fullFile": "cypress/component/NeuronConnection.cy.js", "file": "cypress/component/NeuronConnection.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5727d9e6-a228-43a7-a465-1828b7f24d5a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Neuron connection mode testing", "fullTitle": "MapContent Neuron connection mode testing", "timedOut": null, "duration": 207783, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n },\n },\n global: {\n stubs: {\n transition: false, // Disable transition to avoid el-tag issue - PR #432 for more details\n }\n },\n });\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n // Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n cy.get('.maplibregl-canvas-container > .maplibregl-canvas').should('be.visible');\n cy.get('#maplibre-minimap .maplibregl-canvas-container > .maplibregl-canvas', { timeout: 60000 }).should('be.visible');\n // Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.connectivitySearch('heart');\n cy.connectivitySearch('132');\n // Compare connectivity search results for different search terms\n cy.wrap(searchTermPairs).each(({terms, isSame}) => {\n cy.compareConnectivitySearchResults(terms, isSame);\n });\n // clear search\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }", "err": {}, "uuid": "ef0826fb-29d3-49c7-aa72-b1cd5e6c4c8f", "parentUUID": "5727d9e6-a228-43a7-a465-1828b7f24d5a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ef0826fb-29d3-49c7-aa72-b1cd5e6c4c8f" ], "failures": [], "pending": [], "skipped": [], "duration": 207783, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d57a0c14-3aab-43e4-bfc8-148147f17c14", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "94bf8cf4-163c-421c-a762-06ae3d3929d5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 462657, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n //cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n }\n },\n });\n let mockClipboardText = '';\n cy.window().then((win) => {\n cy.stub(win.navigator.clipboard, 'writeText').callsFake((text) => {\n mockClipboardText = text;\n return Promise.resolve();\n });\n cy.stub(win.navigator.clipboard, 'readText').callsFake(() => {\n return Promise.resolve(mockClipboardText);\n });\n win.mockClipboardText = mockClipboardText;\n win.setMockClipboardText = (text) => {\n mockClipboardText = text;\n win.mockClipboardText = text;\n };\n });\n cy.document().then((doc) => {\n cy.wrap(doc).as('document');\n });\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\n //Wait for curie response\n cy.wait('@curieResponse', {timeout: 20000});\n //Check if mapcontent is mounted correctly\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should(\n 'have.attr', 'style', 'height: 880px');\n //Loading mask should exist at the beginning\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('exist');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n //Only three visible button on the toolbar at the start\n cy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n //Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n //Wait for curie response\n cy.wait('@featuredDatasetResponse', {timeout: 20000});\n //Wait for curie response\n cy.wait('@anatomyResponse', {timeout: 20000});\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('be.visible');\n //the following attempt to workaround it.\n function is_high_resolution_screen() {\n // retina display has a devicePixelRatio of 2\n return window.devicePixelRatio > 1;\n }\n let snapshot = 'minimap_lr'\n if (is_high_resolution_screen()) {\n snapshot = 'minimap_hr'\n }\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(5000);\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > [style=\"height: 100%; width: 100%;\"] > :nth-child(2) > :nth-child(2) > #maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').compareSnapshot(snapshot).then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.wait(1000);\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_1pane')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_1pane')\n Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent_1pane', setting, index);\n })\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\n // Test loading different species, Rat\n cy.testSetCurrentEntry({\n \"type\": \"MultiFlatmap\",\n \"taxo\": \"NCBITaxon:10114\"\n }, 'Rat');\n //Search for non existance feature, expect not-found text\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('exist');\n //Search for Vague nerve, expect not-found text to be gone\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('not.exist');\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"UBERON:0018675\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.maplibregl-popup-content').should('exist').contains('Pelvic splanchnic nerve');\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\n //Open a new flatmap\n cy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\n //Switch back to the original viewer\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 2);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > :nth-child(1)', {timeout: 60000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').clear();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').type(\"heart\");\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info', {timeout: 45000}).should('contain', 'Neuron type aacar');\n cy.get('.sidebar-container .el-card.content-card:visible .header .is-link').click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseleave'); // close\n // dataset explorer\n cy.get('.tabs-container > :nth-child(1)').click();\n //Type in 76 generic\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-button--primary').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').filter(':visible').should('have.length', 1);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Check how many tags in the dataset\n cy.get('.box-card .container button').should('have.length', 6);\n //Intercept the request and stub it with preloaded fixture\n cy.get('@metadata').then((metadata) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: metadata});\n })\n //Intercept the request and stub it with preloaded fixture\n cy.get('@primitive').then((primitive) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: primitive}).as(\"scaffoldResponse\");\n })\n //Check for scaffolds and open it, should have three items in select now\n cy.get('.box-card .container button').contains('Scaffolds (2)').click();\n cy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1.contentvuer').should('have.length', 1);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 3);\n //Check for plot and open it, should have four items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Segmentations (1)').click();\n cy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\n cy.get('.box-card .container button').filter(':visible').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 4);\n cy.get('@simulation_ui').then((simulation_ui) => {\n cy.intercept('/sparc-api//sim/dataset/999',\n {statusCode: 200, body: simulation_ui});\n })\n //Check for simulations and open it, should have five items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 5);\n //Close the sidebar\n cy.get('.open-tab > .el-icon').click();\n cy.get('.close-tab').should('exist').click();\n cy.get('.sidebar-container').should('not.be.visible');\n //Change from single panel to four panels and check for it\n cy.get('.icon-group > .splitscreen-icon').should('exist').click();\n cy.get('.icon-group.el-row .el-popover:visible').should('exist');\n cy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\n cy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\n cy.get('.content-container:visible').should('have.length', 4);\n // Switch to Annotation viewing mode\n cy.get('.viewing-mode-selector > .toolbar-dropdown').as('changeViewingMode').trigger('mouseenter')\n cy.get('.toolbar-dropdown-popper .el-dropdown-menu__item > h5').as('viewingModes').contains('Annotation').click()\n cy.get('@changeViewingMode').trigger('mouseleave')\n // All available maps should show to annotation tools\n cy.get('.toolbar-container > .toolbar-icons').should('have.length', 3)\n cy.wait(1000);\n cy.get('.viewer-container > .flatmap-container > [style=\"height: 100%; width: 100%; position: relative;\"] > .pathway-location > .drawer-button').click({force: true});\n cy.get('.tree-controls > .drawer-button').click({force: true});\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_4panes')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_4panes')\n Object.entries(settings).forEach(([setting, index]) => {\n if (setting === 'Flight path display' || setting === 'Change background') {\n cy.checkGlobalSettings('MapContent_4panes', setting, index);\n }\n })", "err": {}, "uuid": "0a0584ca-05d0-411f-8d75-218aef9f8751", "parentUUID": "94bf8cf4-163c-421c-a762-06ae3d3929d5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0a0584ca-05d0-411f-8d75-218aef9f8751" ], "failures": [], "pending": [], "skipped": [], "duration": 462657, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c0a70a35-0849-472c-b440-bf80cee2276a", "title": "", "fullFile": "cypress/component/NeuronConnection.cy.js", "file": "cypress/component/NeuronConnection.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1bd40f12-d7e5-449d-8acf-114a84bf5285", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Neuron connection mode testing", "fullTitle": "MapContent Neuron connection mode testing", "timedOut": null, "duration": 252076, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n },\n },\n global: {\n stubs: {\n transition: false, // Disable transition to avoid el-tag issue - PR #432 for more details\n }\n },\n });\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n // Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n cy.get('.maplibregl-canvas-container > .maplibregl-canvas').should('be.visible');\n cy.get('#maplibre-minimap .maplibregl-canvas-container > .maplibregl-canvas', { timeout: 60000 }).should('be.visible');\n // Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.connectivitySearch('heart');\n cy.connectivitySearch('132');\n // Compare connectivity search results for different search terms\n cy.wrap(searchTermPairs).each(({terms, isSame}) => {\n cy.compareConnectivitySearchResults(terms, isSame);\n });\n // clear search\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }", "err": {}, "uuid": "35723fa4-6681-4354-901f-757351b01392", "parentUUID": "1bd40f12-d7e5-449d-8acf-114a84bf5285", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "35723fa4-6681-4354-901f-757351b01392" ], "failures": [], "pending": [], "skipped": [], "duration": 252076, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3d8e246a-9d83-4aaa-bcfd-b67707e74724", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c1de2ef3-cee1-4887-844c-8bb0f56dd0e0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 489726, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n //cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n }\n },\n });\n let mockClipboardText = '';\n cy.window().then((win) => {\n cy.stub(win.navigator.clipboard, 'writeText').callsFake((text) => {\n mockClipboardText = text;\n return Promise.resolve();\n });\n cy.stub(win.navigator.clipboard, 'readText').callsFake(() => {\n return Promise.resolve(mockClipboardText);\n });\n win.mockClipboardText = mockClipboardText;\n win.setMockClipboardText = (text) => {\n mockClipboardText = text;\n win.mockClipboardText = text;\n };\n });\n cy.document().then((doc) => {\n cy.wrap(doc).as('document');\n });\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\n //Wait for curie response\n cy.wait('@curieResponse', {timeout: 20000});\n //Check if mapcontent is mounted correctly\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should(\n 'have.attr', 'style', 'height: 880px');\n //Loading mask should exist at the beginning\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('exist');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n //Only three visible button on the toolbar at the start\n cy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n //Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n //Wait for curie response\n cy.wait('@featuredDatasetResponse', {timeout: 20000});\n //Wait for curie response\n cy.wait('@anatomyResponse', {timeout: 20000});\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('be.visible');\n //the following attempt to workaround it.\n function is_high_resolution_screen() {\n // retina display has a devicePixelRatio of 2\n return window.devicePixelRatio > 1;\n }\n let snapshot = 'minimap_lr'\n if (is_high_resolution_screen()) {\n snapshot = 'minimap_hr'\n }\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(5000);\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > [style=\"height: 100%; width: 100%;\"] > :nth-child(2) > :nth-child(2) > #maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').compareSnapshot(snapshot).then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.wait(1000);\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_1pane')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_1pane')\n Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent_1pane', setting, index);\n })\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\n // Test loading different species, Rat\n cy.testSetCurrentEntry({\n \"type\": \"MultiFlatmap\",\n \"taxo\": \"NCBITaxon:10114\"\n }, 'Rat');\n //Search for non existance feature, expect not-found text\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('exist');\n //Search for Vague nerve, expect not-found text to be gone\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('not.exist');\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"UBERON:0018675\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.maplibregl-popup-content').should('exist').contains('Pelvic splanchnic nerve');\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\n //Open a new flatmap\n cy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\n //Switch back to the original viewer\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 2);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > :nth-child(1)', {timeout: 60000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').clear();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').type(\"heart\");\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info', {timeout: 45000}).should('contain', 'Neuron type aacar');\n cy.get('.sidebar-container .el-card.content-card:visible .header .is-link').click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseleave'); // close\n // dataset explorer\n cy.get('.tabs-container > :nth-child(1)').click();\n //Type in 76 generic\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-button--primary').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').filter(':visible').should('have.length', 1);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Check how many tags in the dataset\n cy.get('.box-card .container button').should('have.length', 6);\n //Intercept the request and stub it with preloaded fixture\n cy.get('@metadata').then((metadata) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: metadata});\n })\n //Intercept the request and stub it with preloaded fixture\n cy.get('@primitive').then((primitive) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: primitive}).as(\"scaffoldResponse\");\n })\n //Check for scaffolds and open it, should have three items in select now\n cy.get('.box-card .container button').contains('Scaffolds (2)').click();\n cy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1.contentvuer').should('have.length', 1);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 3);\n //Check for plot and open it, should have four items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Segmentations (1)').click();\n cy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\n cy.get('.box-card .container button').filter(':visible').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 4);\n cy.get('@simulation_ui').then((simulation_ui) => {\n cy.intercept('/sparc-api//sim/dataset/999',\n {statusCode: 200, body: simulation_ui});\n })\n //Check for simulations and open it, should have five items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 5);\n //Close the sidebar\n cy.get('.open-tab > .el-icon').click();\n cy.get('.close-tab').should('exist').click();\n cy.get('.sidebar-container').should('not.be.visible');\n //Change from single panel to four panels and check for it\n cy.get('.icon-group > .splitscreen-icon').should('exist').click();\n cy.get('.icon-group.el-row .el-popover:visible').should('exist');\n cy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\n cy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\n cy.get('.content-container:visible').should('have.length', 4);\n // Switch to Annotation viewing mode\n cy.get('.viewing-mode-selector > .toolbar-dropdown').as('changeViewingMode').trigger('mouseenter')\n cy.get('.toolbar-dropdown-popper .el-dropdown-menu__item > h5').as('viewingModes').contains('Annotation').click()\n cy.get('@changeViewingMode').trigger('mouseleave')\n // All available maps should show to annotation tools\n cy.get('.toolbar-container > .toolbar-icons').should('have.length', 3)\n cy.wait(1000);\n cy.get('.viewer-container > .flatmap-container > [style=\"height: 100%; width: 100%; position: relative;\"] > .pathway-location > .drawer-button').click({force: true});\n cy.get('.tree-controls > .drawer-button').click({force: true});\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_4panes')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_4panes')\n Object.entries(settings).forEach(([setting, index]) => {\n if (setting === 'Flight path display' || setting === 'Change background') {\n cy.checkGlobalSettings('MapContent_4panes', setting, index);\n }\n })", "err": {}, "uuid": "0c0c20f1-693d-4cf2-b9be-5e1f166cbfed", "parentUUID": "c1de2ef3-cee1-4887-844c-8bb0f56dd0e0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0c0c20f1-693d-4cf2-b9be-5e1f166cbfed" ], "failures": [], "pending": [], "skipped": [], "duration": 489726, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fe2625f6-0cb2-42b4-ad61-9f985bf21425", "title": "", "fullFile": "cypress/component/NeuronConnection.cy.js", "file": "cypress/component/NeuronConnection.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fbac8846-78e4-4907-bbe0-a21876f05517", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Neuron connection mode testing", "fullTitle": "MapContent Neuron connection mode testing", "timedOut": null, "duration": 221013, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n },\n },\n global: {\n stubs: {\n transition: false, // Disable transition to avoid el-tag issue - PR #432 for more details\n }\n },\n });\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n // Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n cy.get('.maplibregl-canvas-container > .maplibregl-canvas').should('be.visible');\n cy.get('#maplibre-minimap .maplibregl-canvas-container > .maplibregl-canvas', { timeout: 60000 }).should('be.visible');\n // Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.connectivitySearch('heart');\n cy.connectivitySearch('132');\n // Compare connectivity search results for different search terms\n cy.wrap(searchTermPairs).each(({terms, isSame}) => {\n cy.compareConnectivitySearchResults(terms, isSame);\n });\n // clear search\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }", "err": {}, "uuid": "af525a2c-9b2d-4f90-a004-571286390ff3", "parentUUID": "fbac8846-78e4-4907-bbe0-a21876f05517", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "af525a2c-9b2d-4f90-a004-571286390ff3" ], "failures": [], "pending": [], "skipped": [], "duration": 221013, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "267e65aa-ece8-4a80-92da-89b378100750", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c062b5e0-e4a2-4df9-84cd-1762b656102e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 521970, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n //cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n }\n },\n });\n let mockClipboardText = '';\n cy.window().then((win) => {\n cy.stub(win.navigator.clipboard, 'writeText').callsFake((text) => {\n mockClipboardText = text;\n return Promise.resolve();\n });\n cy.stub(win.navigator.clipboard, 'readText').callsFake(() => {\n return Promise.resolve(mockClipboardText);\n });\n win.mockClipboardText = mockClipboardText;\n win.setMockClipboardText = (text) => {\n mockClipboardText = text;\n win.mockClipboardText = text;\n };\n });\n cy.document().then((doc) => {\n cy.wrap(doc).as('document');\n });\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\n //Wait for curie response\n cy.wait('@curieResponse', {timeout: 20000});\n //Check if mapcontent is mounted correctly\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should(\n 'have.attr', 'style', 'height: 880px');\n //Loading mask should exist at the beginning\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('exist');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n //Only three visible button on the toolbar at the start\n cy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n //Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n //Wait for curie response\n cy.wait('@featuredDatasetResponse', {timeout: 20000});\n //Wait for curie response\n cy.wait('@anatomyResponse', {timeout: 20000});\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('be.visible');\n //the following attempt to workaround it.\n function is_high_resolution_screen() {\n // retina display has a devicePixelRatio of 2\n return window.devicePixelRatio > 1;\n }\n let snapshot = 'minimap_lr'\n if (is_high_resolution_screen()) {\n snapshot = 'minimap_hr'\n }\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(5000);\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > [style=\"height: 100%; width: 100%;\"] > :nth-child(2) > :nth-child(2) > #maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').compareSnapshot(snapshot).then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.wait(1000);\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_1pane')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_1pane')\n Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent_1pane', setting, index);\n })\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\n // Test loading different species, Rat\n cy.testSetCurrentEntry({\n \"type\": \"MultiFlatmap\",\n \"taxo\": \"NCBITaxon:10114\"\n }, 'Rat');\n //Search for non existance feature, expect not-found text\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('exist');\n //Search for Vague nerve, expect not-found text to be gone\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('not.exist');\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"UBERON:0018675\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.maplibregl-popup-content').should('exist').contains('Pelvic splanchnic nerve');\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\n //Open a new flatmap\n cy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\n //Switch back to the original viewer\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 2);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > :nth-child(1)', {timeout: 60000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').clear();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').type(\"heart\");\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info', {timeout: 45000}).should('contain', 'Neuron type aacar');\n cy.get('.sidebar-container .el-card.content-card:visible .header .is-link').click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseleave'); // close\n // dataset explorer\n cy.get('.tabs-container > :nth-child(1)').click();\n //Type in 76 generic\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-button--primary').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').filter(':visible').should('have.length', 1);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Check how many tags in the dataset\n cy.get('.box-card .container button').should('have.length', 6);\n //Intercept the request and stub it with preloaded fixture\n cy.get('@metadata').then((metadata) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: metadata});\n })\n //Intercept the request and stub it with preloaded fixture\n cy.get('@primitive').then((primitive) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: primitive}).as(\"scaffoldResponse\");\n })\n //Check for scaffolds and open it, should have three items in select now\n cy.get('.box-card .container button').contains('Scaffolds (2)').click();\n cy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1.contentvuer').should('have.length', 1);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 3);\n //Check for plot and open it, should have four items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Segmentations (1)').click();\n cy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\n cy.get('.box-card .container button').filter(':visible').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 4);\n cy.get('@simulation_ui').then((simulation_ui) => {\n cy.intercept('/sparc-api//sim/dataset/999',\n {statusCode: 200, body: simulation_ui});\n })\n //Check for simulations and open it, should have five items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 5);\n //Close the sidebar\n cy.get('.open-tab > .el-icon').click();\n cy.get('.close-tab').should('exist').click();\n cy.get('.sidebar-container').should('not.be.visible');\n //Change from single panel to four panels and check for it\n cy.get('.icon-group > .splitscreen-icon').should('exist').click();\n cy.get('.icon-group.el-row .el-popover:visible').should('exist');\n cy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\n cy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\n cy.get('.content-container:visible').should('have.length', 4);\n // Switch to Annotation viewing mode\n cy.get('.viewing-mode-selector > .toolbar-dropdown').as('changeViewingMode').trigger('mouseenter')\n cy.get('.toolbar-dropdown-popper .el-dropdown-menu__item > h5').as('viewingModes').contains('Annotation').click()\n cy.get('@changeViewingMode').trigger('mouseleave')\n // All available maps should show to annotation tools\n cy.get('.toolbar-container > .toolbar-icons').should('have.length', 3)\n cy.wait(1000);\n cy.get('.viewer-container > .flatmap-container > [style=\"height: 100%; width: 100%; position: relative;\"] > .pathway-location > .drawer-button').click({force: true});\n cy.get('.tree-controls > .drawer-button').click({force: true});\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_4panes')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_4panes')\n Object.entries(settings).forEach(([setting, index]) => {\n if (setting === 'Flight path display' || setting === 'Change background') {\n cy.checkGlobalSettings('MapContent_4panes', setting, index);\n }\n })", "err": {}, "uuid": "1d61a943-e622-4ce9-8750-75e4a2b92e6e", "parentUUID": "c062b5e0-e4a2-4df9-84cd-1762b656102e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1d61a943-e622-4ce9-8750-75e4a2b92e6e" ], "failures": [], "pending": [], "skipped": [], "duration": 521970, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f58f05ab-d50b-464f-842b-c471dd237f05", "title": "", "fullFile": "cypress/component/NeuronConnection.cy.js", "file": "cypress/component/NeuronConnection.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7b2f2d30-4eba-49e9-8d68-72441d2d9bb8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Neuron connection mode testing", "fullTitle": "MapContent Neuron connection mode testing", "timedOut": null, "duration": 228459, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n },\n },\n global: {\n stubs: {\n transition: false, // Disable transition to avoid el-tag issue - PR #432 for more details\n }\n },\n });\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n // Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n cy.get('.maplibregl-canvas-container > .maplibregl-canvas').should('be.visible');\n cy.get('#maplibre-minimap .maplibregl-canvas-container > .maplibregl-canvas', { timeout: 60000 }).should('be.visible');\n // Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.connectivitySearch('heart');\n cy.connectivitySearch('132');\n // Compare connectivity search results for different search terms\n cy.wrap(searchTermPairs).each(({terms, isSame}) => {\n cy.compareConnectivitySearchResults(terms, isSame);\n });\n // clear search\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }", "err": {}, "uuid": "43a17d9b-7821-466d-a2a9-77a78acef05b", "parentUUID": "7b2f2d30-4eba-49e9-8d68-72441d2d9bb8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "43a17d9b-7821-466d-a2a9-77a78acef05b" ], "failures": [], "pending": [], "skipped": [], "duration": 228459, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c625796c-0128-4d7d-9708-f68df1ec58c6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fe1eaa91-8f9b-4a7e-b6e8-0ba3ce0a8963", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 449973, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n //cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n }\n },\n });\n let mockClipboardText = '';\n cy.window().then((win) => {\n cy.stub(win.navigator.clipboard, 'writeText').callsFake((text) => {\n mockClipboardText = text;\n return Promise.resolve();\n });\n cy.stub(win.navigator.clipboard, 'readText').callsFake(() => {\n return Promise.resolve(mockClipboardText);\n });\n win.mockClipboardText = mockClipboardText;\n win.setMockClipboardText = (text) => {\n mockClipboardText = text;\n win.mockClipboardText = text;\n };\n });\n cy.document().then((doc) => {\n cy.wrap(doc).as('document');\n });\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\n //Wait for curie response\n cy.wait('@curieResponse', {timeout: 20000});\n //Check if mapcontent is mounted correctly\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should(\n 'have.attr', 'style', 'height: 880px');\n //Loading mask should exist at the beginning\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('exist');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n //Only three visible button on the toolbar at the start\n cy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n //Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n //Wait for curie response\n cy.wait('@featuredDatasetResponse', {timeout: 20000});\n //Wait for curie response\n cy.wait('@anatomyResponse', {timeout: 20000});\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('be.visible');\n //the following attempt to workaround it.\n function is_high_resolution_screen() {\n // retina display has a devicePixelRatio of 2\n return window.devicePixelRatio > 1;\n }\n let snapshot = 'minimap_lr'\n if (is_high_resolution_screen()) {\n snapshot = 'minimap_hr'\n }\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(5000);\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > [style=\"height: 100%; width: 100%;\"] > :nth-child(2) > :nth-child(2) > #maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').compareSnapshot(snapshot).then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.wait(1000);\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_1pane')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_1pane')\n Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent_1pane', setting, index);\n })\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\n // Test loading different species, Rat\n cy.testSetCurrentEntry({\n \"type\": \"MultiFlatmap\",\n \"taxo\": \"NCBITaxon:10114\"\n }, 'Rat');\n //Search for non existance feature, expect not-found text\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('exist');\n //Search for Vague nerve, expect not-found text to be gone\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('not.exist');\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"UBERON:0018675\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.maplibregl-popup-content').should('exist').contains('Pelvic splanchnic nerve');\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\n //Open a new flatmap\n cy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\n //Switch back to the original viewer\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 2);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > :nth-child(1)', {timeout: 60000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').clear();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').type(\"heart\");\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info', {timeout: 45000}).should('contain', 'Neuron type aacar');\n cy.get('.sidebar-container .el-card.content-card:visible .header .is-link').click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseleave'); // close\n // dataset explorer\n cy.get('.tabs-container > :nth-child(1)').click();\n //Type in 76 generic\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-button--primary').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').filter(':visible').should('have.length', 1);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Check how many tags in the dataset\n cy.get('.box-card .container button').should('have.length', 6);\n //Intercept the request and stub it with preloaded fixture\n cy.get('@metadata').then((metadata) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: metadata});\n })\n //Intercept the request and stub it with preloaded fixture\n cy.get('@primitive').then((primitive) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: primitive}).as(\"scaffoldResponse\");\n })\n //Check for scaffolds and open it, should have three items in select now\n cy.get('.box-card .container button').contains('Scaffolds (2)').click();\n cy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1.contentvuer').should('have.length', 1);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 3);\n //Check for plot and open it, should have four items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Segmentations (1)').click();\n cy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\n cy.get('.box-card .container button').filter(':visible').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 4);\n cy.get('@simulation_ui').then((simulation_ui) => {\n cy.intercept('/sparc-api//sim/dataset/999',\n {statusCode: 200, body: simulation_ui});\n })\n //Check for simulations and open it, should have five items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 5);\n //Close the sidebar\n cy.get('.open-tab > .el-icon').click();\n cy.get('.close-tab').should('exist').click();\n cy.get('.sidebar-container').should('not.be.visible');\n //Change from single panel to four panels and check for it\n cy.get('.icon-group > .splitscreen-icon').should('exist').click();\n cy.get('.icon-group.el-row .el-popover:visible').should('exist');\n cy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\n cy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\n cy.get('.content-container:visible').should('have.length', 4);\n // Switch to Annotation viewing mode\n cy.get('.viewing-mode-selector > .toolbar-dropdown').as('changeViewingMode').trigger('mouseenter')\n cy.get('.toolbar-dropdown-popper .el-dropdown-menu__item > h5').as('viewingModes').contains('Annotation').click()\n cy.get('@changeViewingMode').trigger('mouseleave')\n // All available maps should show to annotation tools\n cy.get('.toolbar-container > .toolbar-icons').should('have.length', 3)\n cy.wait(1000);\n cy.get('.viewer-container > .flatmap-container > [style=\"height: 100%; width: 100%; position: relative;\"] > .pathway-location > .drawer-button').click({force: true});\n cy.get('.tree-controls > .drawer-button').click({force: true});\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_4panes')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_4panes')\n Object.entries(settings).forEach(([setting, index]) => {\n if (setting === 'Flight path display' || setting === 'Change background') {\n cy.checkGlobalSettings('MapContent_4panes', setting, index);\n }\n })", "err": {}, "uuid": "b9836166-967e-496b-9874-4881d5f86220", "parentUUID": "fe1eaa91-8f9b-4a7e-b6e8-0ba3ce0a8963", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b9836166-967e-496b-9874-4881d5f86220" ], "failures": [], "pending": [], "skipped": [], "duration": 449973, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ab7f3295-7ec3-4972-8c71-7af18242143f", "title": "", "fullFile": "cypress/component/NeuronConnection.cy.js", "file": "cypress/component/NeuronConnection.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b7d932a6-335e-47fb-81d4-b01ddaf7af11", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Neuron connection mode testing", "fullTitle": "MapContent Neuron connection mode testing", "timedOut": null, "duration": 256885, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n },\n },\n global: {\n stubs: {\n transition: false, // Disable transition to avoid el-tag issue - PR #432 for more details\n }\n },\n });\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n // Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n cy.get('.maplibregl-canvas-container > .maplibregl-canvas').should('be.visible');\n cy.get('#maplibre-minimap .maplibregl-canvas-container > .maplibregl-canvas', { timeout: 60000 }).should('be.visible');\n // Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.connectivitySearch('heart');\n cy.connectivitySearch('132');\n // Compare connectivity search results for different search terms\n cy.wrap(searchTermPairs).each(({terms, isSame}) => {\n cy.compareConnectivitySearchResults(terms, isSame);\n });\n // clear search\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }", "err": {}, "uuid": "7af9b417-225b-4120-bc1e-2e01eb95b484", "parentUUID": "b7d932a6-335e-47fb-81d4-b01ddaf7af11", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7af9b417-225b-4120-bc1e-2e01eb95b484" ], "failures": [], "pending": [], "skipped": [], "duration": 256885, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ed09e9f9-b921-4250-9481-125896be97a9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4fd1e10c-c407-4590-99ed-b124ce6bef7d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 549331, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n //cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n }\n },\n });\n let mockClipboardText = '';\n cy.window().then((win) => {\n cy.stub(win.navigator.clipboard, 'writeText').callsFake((text) => {\n mockClipboardText = text;\n return Promise.resolve();\n });\n cy.stub(win.navigator.clipboard, 'readText').callsFake(() => {\n return Promise.resolve(mockClipboardText);\n });\n win.mockClipboardText = mockClipboardText;\n win.setMockClipboardText = (text) => {\n mockClipboardText = text;\n win.mockClipboardText = text;\n };\n });\n cy.document().then((doc) => {\n cy.wrap(doc).as('document');\n });\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\n //Wait for curie response\n cy.wait('@curieResponse', {timeout: 20000});\n //Check if mapcontent is mounted correctly\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should(\n 'have.attr', 'style', 'height: 880px');\n //Loading mask should exist at the beginning\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('exist');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n //Only three visible button on the toolbar at the start\n cy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n //Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n //Wait for curie response\n cy.wait('@featuredDatasetResponse', {timeout: 20000});\n //Wait for curie response\n cy.wait('@anatomyResponse', {timeout: 20000});\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('be.visible');\n //the following attempt to workaround it.\n function is_high_resolution_screen() {\n // retina display has a devicePixelRatio of 2\n return window.devicePixelRatio > 1;\n }\n let snapshot = 'minimap_lr'\n if (is_high_resolution_screen()) {\n snapshot = 'minimap_hr'\n }\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(5000);\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > [style=\"height: 100%; width: 100%;\"] > :nth-child(2) > :nth-child(2) > #maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').compareSnapshot(snapshot).then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.wait(1000);\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_1pane')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_1pane')\n Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent_1pane', setting, index);\n })\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\n // Test loading different species, Rat\n cy.testSetCurrentEntry({\n \"type\": \"MultiFlatmap\",\n \"taxo\": \"NCBITaxon:10114\"\n }, 'Rat');\n //Search for non existance feature, expect not-found text\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('exist');\n //Search for Vague nerve, expect not-found text to be gone\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.not-found-text').should('not.exist');\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(\"UBERON:0018675\");\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.get('.maplibregl-popup-content').should('exist').contains('Pelvic splanchnic nerve');\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\n //Test searching with uberon id wich should display a pop up with anatomical name\n cy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\n //Open a new flatmap\n cy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\n //Switch back to the original viewer\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 2);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > :nth-child(1)', {timeout: 60000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').clear();\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-input .el-input__inner').type(\"heart\");\n cy.get('.sidebar-container .el-card.content-card:visible .header .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info', {timeout: 45000}).should('contain', 'Neuron type aacar');\n cy.get('.sidebar-container .el-card.content-card:visible .header .is-link').click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseleave'); // close\n // dataset explorer\n cy.get('.tabs-container > :nth-child(1)').click();\n //Type in 76 generic\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get('.sidebar-content-container > .el-card__header > .header > .el-button--primary').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').filter(':visible').should('have.length', 1);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Check how many tags in the dataset\n cy.get('.box-card .container button').should('have.length', 6);\n //Intercept the request and stub it with preloaded fixture\n cy.get('@metadata').then((metadata) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: metadata});\n })\n //Intercept the request and stub it with preloaded fixture\n cy.get('@primitive').then((primitive) => {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json?s3BucketName=pennsieve-prod-discover-publish-use1',\n {statusCode: 200, body: primitive}).as(\"scaffoldResponse\");\n })\n //Check for scaffolds and open it, should have three items in select now\n cy.get('.box-card .container button').contains('Scaffolds (2)').click();\n cy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1.contentvuer').should('have.length', 1);\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 3);\n //Check for plot and open it, should have four items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Segmentations (1)').click();\n cy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\n cy.get('.box-card .container button').filter(':visible').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 4);\n cy.get('@simulation_ui').then((simulation_ui) => {\n cy.intercept('/sparc-api//sim/dataset/999',\n {statusCode: 200, body: simulation_ui});\n })\n //Check for simulations and open it, should have five items in select now\n cy.get('.open-tab > .el-icon').click();\n cy.get('.box-card .container button').filter(':visible').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').filter(':visible').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-select__wrapper').should('exist').click();\n cy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select .viewer_dropdown ul > li').should('have.length', 5);\n //Close the sidebar\n cy.get('.open-tab > .el-icon').click();\n cy.get('.close-tab').should('exist').click();\n cy.get('.sidebar-container').should('not.be.visible');\n //Change from single panel to four panels and check for it\n cy.get('.icon-group > .splitscreen-icon').should('exist').click();\n cy.get('.icon-group.el-row .el-popover:visible').should('exist');\n cy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\n cy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\n cy.get('.content-container:visible').should('have.length', 4);\n // Switch to Annotation viewing mode\n cy.get('.viewing-mode-selector > .toolbar-dropdown').as('changeViewingMode').trigger('mouseenter')\n cy.get('.toolbar-dropdown-popper .el-dropdown-menu__item > h5').as('viewingModes').contains('Annotation').click()\n cy.get('@changeViewingMode').trigger('mouseleave')\n // All available maps should show to annotation tools\n cy.get('.toolbar-container > .toolbar-icons').should('have.length', 3)\n cy.wait(1000);\n cy.get('.viewer-container > .flatmap-container > [style=\"height: 100%; width: 100%; position: relative;\"] > .pathway-location > .drawer-button').click({force: true});\n cy.get('.tree-controls > .drawer-button').click({force: true});\n // CLI\n cy.get('html').screenshot('base/cypress/component/MapContent.cy.js/MapContent_4panes')\n // UI\n cy.get('html').screenshot('MapContent.cy.js/base/cypress/component/MapContent.cy.js/MapContent_4panes')\n Object.entries(settings).forEach(([setting, index]) => {\n if (setting === 'Flight path display' || setting === 'Change background') {\n cy.checkGlobalSettings('MapContent_4panes', setting, index);\n }\n })", "err": {}, "uuid": "fa088bb8-558b-4b89-a0a1-1180baa5ad9b", "parentUUID": "4fd1e10c-c407-4590-99ed-b124ce6bef7d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fa088bb8-558b-4b89-a0a1-1180baa5ad9b" ], "failures": [], "pending": [], "skipped": [], "duration": 549331, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "19dc0ada-ae72-4889-816d-774c38fb37a5", "title": "", "fullFile": "cypress/component/NeuronConnection.cy.js", "file": "cypress/component/NeuronConnection.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ffed917a-c0b8-4fb3-88e6-5587f4bb94ef", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Neuron connection mode testing", "fullTitle": "MapContent Neuron connection mode testing", "timedOut": null, "duration": 233315, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\n cy.get('@stub').then((stub) => {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {statusCode: 200, body: stub.noResponse});\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {statusCode: 200, body: stub.resultResponse}).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {statusCode: 200, body: stub.curiesResponse}).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {statusCode: 200, body: stub.featuredDatasetResponse}).as(\"featuredDatasetResponse\");\n const anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {statusCode: 200, body: anatomy_dataset}).as(\"anatomyResponse\");\n })\n cy.mount(MapContent, {\n props: {\n options: {\n sparcApi: \"https://mock-test/sparc-api/\",\n flatmapAPI: \"https://mapcore-demo.org/current/flatmap/v3/\",\n algoliaKey: Cypress.env('ALGOLIA_KEY'),\n algoliaId: Cypress.env('ALGOLIA_ID'),\n },\n },\n global: {\n stubs: {\n transition: false, // Disable transition to avoid el-tag issue - PR #432 for more details\n }\n },\n });\n cy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n cy.get('.header').should('be.visible');\n cy.get('.toolbar-title').should('exist');\n // Sidebar should not be visbile\n cy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n cy.get('.maplibregl-canvas-container > .maplibregl-canvas').should('be.visible');\n cy.get('#maplibre-minimap .maplibregl-canvas-container > .maplibregl-canvas', { timeout: 60000 }).should('be.visible');\n // Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n // connectivity explorer\n cy.get('.tabs-container > :nth-child(2)').click();\n cy.connectivitySearch('heart');\n cy.connectivitySearch('132');\n // Compare connectivity search results for different search terms\n cy.wrap(searchTermPairs).each(({terms, isSame}) => {\n cy.compareConnectivitySearchResults(terms, isSame);\n });\n // clear search\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }", "err": {}, "uuid": "1b5f2ca1-3644-44aa-b8f5-581129825909", "parentUUID": "ffed917a-c0b8-4fb3-88e6-5587f4bb94ef", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1b5f2ca1-3644-44aa-b8f5-581129825909" ], "failures": [], "pending": [], "skipped": [], "duration": 233315, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 } ], "meta": { "mocha": { "version": "7.0.1" }, "mochawesome": { "options": { "quiet": false, "reportFilename": "mochawesome", "saveHtml": false, "saveJson": true, "consoleReporter": "spec", "useInlineDiffs": false, "code": true }, "version": "7.1.4" }, "marge": { "options": { "id": "default", "reportDir": "cypress/results/json", "overwrite": false, "html": false, "json": true }, "version": "6.3.0" } } }