{ "stats": { "suites": 538, "tests": 538, "passes": 357, "pending": 0, "failures": 174, "testsRegistered": 538, "passPercent": 66.35687732342008, "pendingPercent": 0, "other": 0, "hasOther": false, "skipped": 7, "hasSkipped": true, "start": "2023-05-21T01:59:55.048Z", "end": "2025-08-13T11:42:26.369Z", "duration": 70450951321 }, "results": [ { "uuid": "6c796ea4-7d98-44ba-8d12-374a9fb8755c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "25014dfd-f115-464a-b9af-16f56de53ac5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37654, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "91e384a5-8e13-4071-b23f-44a51403203c", "parentUUID": "25014dfd-f115-464a-b9af-16f56de53ac5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "91e384a5-8e13-4071-b23f-44a51403203c" ], "failures": [], "pending": [], "skipped": [], "duration": 37654, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "52360e36-bb16-4502-805e-6834627025bb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "20371d8c-955a-466c-a712-4e50e1fb1ed7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 43650, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '26', expected '3'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '26', expected '3'.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:152:51)\n at runnable.fn (http://localhost:42051/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:42051/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:42051/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:42051/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:42051/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:42051/__cypress/runner/cypress_runner.js:16679:31)", "diff": "- 26\n+ 3\n" }, "uuid": "a19d59f5-a99e-473e-a056-c0e1176dcd69", "parentUUID": "20371d8c-955a-466c-a712-4e50e1fb1ed7", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a19d59f5-a99e-473e-a056-c0e1176dcd69" ], "pending": [], "skipped": [], "duration": 43650, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9e1f6791-ce94-4eff-9043-f84257832a3b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "74e571cf-369a-4fe9-8e9d-f6b580d5a75f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42209, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '26', expected '3'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '26', expected '3'.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:152:51)\n at runnable.fn (http://localhost:36757/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:36757/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:36757/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:36757/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:36757/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:36757/__cypress/runner/cypress_runner.js:16679:31)", "diff": "- 26\n+ 3\n" }, "uuid": "3abf6546-89e5-4b26-bd0d-1f8ec23dff93", "parentUUID": "74e571cf-369a-4fe9-8e9d-f6b580d5a75f", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3abf6546-89e5-4b26-bd0d-1f8ec23dff93" ], "pending": [], "skipped": [], "duration": 42209, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8220da9a-b175-45d6-a705-7c3ccfe98784", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "02dfade4-24e0-434c-af16-c1d6171638c8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42108, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .el-scrollbar__view >').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '26', expected '3'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '26', expected '3'.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:152:51)\n at runnable.fn (http://localhost:38001/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:38001/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:38001/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:38001/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:38001/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:38001/__cypress/runner/cypress_runner.js:16679:31)", "diff": "- 26\n+ 3\n" }, "uuid": "6662736a-9068-4f15-b026-38d542027283", "parentUUID": "02dfade4-24e0-434c-af16-c1d6171638c8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "6662736a-9068-4f15-b026-38d542027283" ], "pending": [], "skipped": [], "duration": 42108, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9f4eeed1-b50e-4b78-af60-e626381c14f7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1fb640df-cf6a-4da5-8508-7552bac6c507", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38905, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "22e50b0c-5631-4118-abdb-5af8c2229cb6", "parentUUID": "1fb640df-cf6a-4da5-8508-7552bac6c507", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "22e50b0c-5631-4118-abdb-5af8c2229cb6" ], "failures": [], "pending": [], "skipped": [], "duration": 38905, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "97a99f77-ae48-4ed9-8fa4-a36dad977921", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5eb8b8c1-5fdf-44a6-8ee8-60f1a41a9abf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38022, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "dda66d66-9eb6-4ac7-8847-1b4db33f4613", "parentUUID": "5eb8b8c1-5fdf-44a6-8ee8-60f1a41a9abf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "dda66d66-9eb6-4ac7-8847-1b4db33f4613" ], "failures": [], "pending": [], "skipped": [], "duration": 38022, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f16de400-e928-4175-b7f7-1a0488f8b874", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2aebc36b-2897-4f8b-be96-fadcaf91c8ed", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39372, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "4c773512-a449-4000-b675-3381b5f9faf1", "parentUUID": "2aebc36b-2897-4f8b-be96-fadcaf91c8ed", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4c773512-a449-4000-b675-3381b5f9faf1" ], "failures": [], "pending": [], "skipped": [], "duration": 39372, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6b689c48-efab-40bd-baf5-a270e27d553c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fef09834-0090-498d-b059-98fc6ed62cbf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39925, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "3cd30b0c-e424-4b2f-b816-6fba2221318f", "parentUUID": "fef09834-0090-498d-b059-98fc6ed62cbf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3cd30b0c-e424-4b2f-b816-6fba2221318f" ], "failures": [], "pending": [], "skipped": [], "duration": 39925, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d29a463c-6759-4880-bc0d-be63eb8cca65", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7f3ee02b-64a1-4c78-8e09-c69157dd711c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36993, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "be3e106f-3a46-4181-9cb0-caf640080d8f", "parentUUID": "7f3ee02b-64a1-4c78-8e09-c69157dd711c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "be3e106f-3a46-4181-9cb0-caf640080d8f" ], "failures": [], "pending": [], "skipped": [], "duration": 36993, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "732c214c-3540-4c32-8e2c-0aa220ec050a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b1aed7c3-9e4a-403f-8fb3-f9387c1c5e48", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37672, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "abe32c02-4ba9-467f-9a8e-841b1f77ac57", "parentUUID": "b1aed7c3-9e4a-403f-8fb3-f9387c1c5e48", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "abe32c02-4ba9-467f-9a8e-841b1f77ac57" ], "failures": [], "pending": [], "skipped": [], "duration": 37672, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dfb98d60-4d76-4a32-a151-c3be85daeace", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ee2c95fa-dfbf-46a0-90d1-af9e27bbbd07", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39956, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "9ca81be7-aa75-4125-847f-e8579e35498a", "parentUUID": "ee2c95fa-dfbf-46a0-90d1-af9e27bbbd07", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9ca81be7-aa75-4125-847f-e8579e35498a" ], "failures": [], "pending": [], "skipped": [], "duration": 39956, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9b6ee154-8ffc-42b6-8330-cb7a1c2de485", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f0c267cc-12b8-4c66-9423-74c3016037a5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36503, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "4dd4a909-3438-4b74-aadc-1e6e2e58615b", "parentUUID": "f0c267cc-12b8-4c66-9423-74c3016037a5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4dd4a909-3438-4b74-aadc-1e6e2e58615b" ], "failures": [], "pending": [], "skipped": [], "duration": 36503, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "bc2abf9f-a2c7-4220-8005-b517ea1198c7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1e867fe9-73c5-407f-a467-37d7701454e9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39220, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "fa0440a4-8d26-44b8-98b5-48e40c528b9d", "parentUUID": "1e867fe9-73c5-407f-a467-37d7701454e9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fa0440a4-8d26-44b8-98b5-48e40c528b9d" ], "failures": [], "pending": [], "skipped": [], "duration": 39220, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "53a8e90d-73f9-475b-a668-de3eea937e9c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "084db8c2-052b-4ae6-bde1-b289a686efb9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39220, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "9e29acf9-dea4-4512-ac5d-4e76d1f8834c", "parentUUID": "084db8c2-052b-4ae6-bde1-b289a686efb9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9e29acf9-dea4-4512-ac5d-4e76d1f8834c" ], "failures": [], "pending": [], "skipped": [], "duration": 39220, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5a44b227-e788-4aa8-b2b3-3f5dba7ff0c3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fd3da3fb-99ba-408e-860f-1cd3f00c6973", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37761, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "0cfc5856-df5b-4437-bc7b-1eb96a736a56", "parentUUID": "fd3da3fb-99ba-408e-860f-1cd3f00c6973", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0cfc5856-df5b-4437-bc7b-1eb96a736a56" ], "failures": [], "pending": [], "skipped": [], "duration": 37761, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "acad37eb-e9f5-4038-a08a-9bf91ce38ce9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4b4198e5-7c77-42a5-8dc1-5e53550ffcdf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39761, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "920e5bfa-b6a4-4fb7-b5bf-fdbfdd8e7d02", "parentUUID": "4b4198e5-7c77-42a5-8dc1-5e53550ffcdf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "920e5bfa-b6a4-4fb7-b5bf-fdbfdd8e7d02" ], "failures": [], "pending": [], "skipped": [], "duration": 39761, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "836089e8-b44f-4012-9956-14e9ad840010", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6c07162d-05dc-4d67-9910-a7bb92afa20c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38563, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "00ffb895-de88-4fc2-a15e-fb2da9643e8e", "parentUUID": "6c07162d-05dc-4d67-9910-a7bb92afa20c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "00ffb895-de88-4fc2-a15e-fb2da9643e8e" ], "failures": [], "pending": [], "skipped": [], "duration": 38563, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "466d8360-2471-4de4-b0b5-44e7cb90542e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2a82454a-f789-4764-8427-d38c3ed0a36e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37950, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "d9f7e052-76de-48bf-abc4-4cac295b4cbc", "parentUUID": "2a82454a-f789-4764-8427-d38c3ed0a36e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d9f7e052-76de-48bf-abc4-4cac295b4cbc" ], "failures": [], "pending": [], "skipped": [], "duration": 37950, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6331346f-9146-46df-a492-64f364eb4ecf", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ea2408b4-e661-4f48-bb36-e36ab2d6ee2c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42056, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "ab480493-971c-467f-81a4-b8a2c668136c", "parentUUID": "ea2408b4-e661-4f48-bb36-e36ab2d6ee2c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ab480493-971c-467f-81a4-b8a2c668136c" ], "failures": [], "pending": [], "skipped": [], "duration": 42056, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6ef37e7c-d751-4d12-84dc-a57e4fecae07", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "baf0b6c4-fa1c-4baf-844e-312fb420962a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37178, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "5ccc4295-9511-465e-bc57-ba227d618f64", "parentUUID": "baf0b6c4-fa1c-4baf-844e-312fb420962a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5ccc4295-9511-465e-bc57-ba227d618f64" ], "failures": [], "pending": [], "skipped": [], "duration": 37178, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "afa8d0ff-c835-451d-8b5b-eaa1e47804ba", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ce4e95aa-f445-4e2c-86b9-ca2112278ed9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38302, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "b6adb44e-6b76-44c7-8f47-0a4e19a4e514", "parentUUID": "ce4e95aa-f445-4e2c-86b9-ca2112278ed9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b6adb44e-6b76-44c7-8f47-0a4e19a4e514" ], "failures": [], "pending": [], "skipped": [], "duration": 38302, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ee7fef10-9637-42eb-9d1c-464b50dc95ee", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9cd0e9ae-4acf-4371-bf86-94ac3f91e436", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 40663, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "24a2f792-5cca-4f19-9e9e-fa96a864aac3", "parentUUID": "9cd0e9ae-4acf-4371-bf86-94ac3f91e436", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "24a2f792-5cca-4f19-9e9e-fa96a864aac3" ], "failures": [], "pending": [], "skipped": [], "duration": 40663, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e51f86fe-026c-45bc-bdb5-566af5b3fe99", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f3a902b7-5878-4129-a3af-a4a40d42d63a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38925, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "64cc953e-48bb-4e64-b321-64b8b210ad58", "parentUUID": "f3a902b7-5878-4129-a3af-a4a40d42d63a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "64cc953e-48bb-4e64-b321-64b8b210ad58" ], "failures": [], "pending": [], "skipped": [], "duration": 38925, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c7ea8c59-2ce8-4bf4-b928-950e14a5a1ee", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5ff65bc8-3dc8-4126-a165-c7e981899ad1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39062, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "90885685-ad19-4888-ae32-e4bb0569ff65", "parentUUID": "5ff65bc8-3dc8-4126-a165-c7e981899ad1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "90885685-ad19-4888-ae32-e4bb0569ff65" ], "failures": [], "pending": [], "skipped": [], "duration": 39062, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b5eab164-0a8a-467c-b221-f3962e756b11", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dd7ea298-a20e-4922-8720-3b1a0a1f75cf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37017, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "2b5e017a-74c7-48b6-9b55-07eae7dfc95f", "parentUUID": "dd7ea298-a20e-4922-8720-3b1a0a1f75cf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2b5e017a-74c7-48b6-9b55-07eae7dfc95f" ], "failures": [], "pending": [], "skipped": [], "duration": 37017, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dc42d08e-0dad-4753-af60-5ebf0ca28f37", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a3653a45-d0f6-496e-b259-4efadddb5eee", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37360, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "c658194a-81b5-4703-9b01-97d4d1c02bd6", "parentUUID": "a3653a45-d0f6-496e-b259-4efadddb5eee", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c658194a-81b5-4703-9b01-97d4d1c02bd6" ], "failures": [], "pending": [], "skipped": [], "duration": 37360, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e0386572-03b8-4773-86b8-fbd3dd659fdf", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f996681e-7a9e-4ffb-ac14-f030d70cdd91", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38599, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "60b28943-71b4-4947-866c-fefe37c18ece", "parentUUID": "f996681e-7a9e-4ffb-ac14-f030d70cdd91", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "60b28943-71b4-4947-866c-fefe37c18ece" ], "failures": [], "pending": [], "skipped": [], "duration": 38599, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "eaef02ad-6e1a-43c1-bc3b-5616911fd4fe", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "419658c3-7b79-4016-82e7-5f5191c483bf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39690, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "dc06dca9-23e7-4474-a85f-b607d0beb406", "parentUUID": "419658c3-7b79-4016-82e7-5f5191c483bf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "dc06dca9-23e7-4474-a85f-b607d0beb406" ], "failures": [], "pending": [], "skipped": [], "duration": 39690, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dfada078-4b87-40ec-b133-102b8f591b7e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9d31e631-a981-44a1-94a6-33fe970676f5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 49967, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "abdeb97c-3ec8-44c9-902b-d59697cd2f0a", "parentUUID": "9d31e631-a981-44a1-94a6-33fe970676f5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "abdeb97c-3ec8-44c9-902b-d59697cd2f0a" ], "failures": [], "pending": [], "skipped": [], "duration": 49967, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "feac54f7-461c-4192-b924-5a8ec5ed1518", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "30e67f32-b348-4d35-bcc2-0ac92a192dde", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 49694, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "663305db-a7c7-426c-ba3d-b5463ee8b8af", "parentUUID": "30e67f32-b348-4d35-bcc2-0ac92a192dde", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "663305db-a7c7-426c-ba3d-b5463ee8b8af" ], "failures": [], "pending": [], "skipped": [], "duration": 49694, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b44f15d3-d5e2-4431-868d-791e19727c58", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fba9edb9-dafa-4125-be88-8fcfcffa0f01", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 51835, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "5dc59a76-d7eb-4a93-afa1-5145bf099183", "parentUUID": "fba9edb9-dafa-4125-be88-8fcfcffa0f01", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5dc59a76-d7eb-4a93-afa1-5145bf099183" ], "failures": [], "pending": [], "skipped": [], "duration": 51835, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ecd1befc-ed30-4fb2-b8be-152f8ad41cf2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "827f4aa1-ce88-42fc-8359-0d3232be5424", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 52182, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/54-8_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/sparc-api/s3-resource/999/1/files/derivative/sub-54-8/scaffold/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "6d7db611-6ced-4542-bc4a-d721733a69b3", "parentUUID": "827f4aa1-ce88-42fc-8359-0d3232be5424", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6d7db611-6ced-4542-bc4a-d721733a69b3" ], "failures": [], "pending": [], "skipped": [], "duration": 52182, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a165c4df-5aba-41c9-ac86-4872c8ecc8a5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "40de07b4-c328-49b4-af91-8d17406aad1b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 52723, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "2fdd9cdb-829a-4de1-a76c-c61b9a8fb1f1", "parentUUID": "40de07b4-c328-49b4-af91-8d17406aad1b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2fdd9cdb-829a-4de1-a76c-c61b9a8fb1f1" ], "failures": [], "pending": [], "skipped": [], "duration": 52723, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a705ead2-3fc3-4621-9f3d-725bd151e572", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2dc50b54-e7b7-4bcd-a4e1-7c40296b91d0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 53740, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "09f1d3d8-fa99-414f-aaf6-b7d3aaf02562", "parentUUID": "2dc50b54-e7b7-4bcd-a4e1-7c40296b91d0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "09f1d3d8-fa99-414f-aaf6-b7d3aaf02562" ], "failures": [], "pending": [], "skipped": [], "duration": 53740, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c400582f-be8a-49d3-8082-9610b77a65ef", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e12c5fbe-d103-4ec7-a310-c9ff79ab9320", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 53245, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "ef76ca2a-4191-43cf-b8cc-362409d87970", "parentUUID": "e12c5fbe-d103-4ec7-a310-c9ff79ab9320", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ef76ca2a-4191-43cf-b8cc-362409d87970" ], "failures": [], "pending": [], "skipped": [], "duration": 53245, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "800b6258-37a7-4607-a07f-f895a3fb9a90", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "01c5d484-c3fb-4e9f-94e3-6f0ff8ade6f4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 51321, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "94f7addd-64f4-48ee-9c93-e34e15a4b8f0", "parentUUID": "01c5d484-c3fb-4e9f-94e3-6f0ff8ade6f4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "94f7addd-64f4-48ee-9c93-e34e15a4b8f0" ], "failures": [], "pending": [], "skipped": [], "duration": 51321, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "071ef94e-216d-4c57-bbe0-7e50d3831e70", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a98f43f5-e7b3-426d-9554-41d9b6345835", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 51394, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "8d2ebea3-d22c-4766-ab9a-91dbca16ce6b", "parentUUID": "a98f43f5-e7b3-426d-9554-41d9b6345835", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8d2ebea3-d22c-4766-ab9a-91dbca16ce6b" ], "failures": [], "pending": [], "skipped": [], "duration": 51394, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ce158c9e-1501-461c-9283-4dd1b8b07809", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ef3c6c50-f534-4853-a29b-2fdcf55432fe", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 50797, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "3e661eae-b56a-4a4b-b7e6-0459c18d4fbf", "parentUUID": "ef3c6c50-f534-4853-a29b-2fdcf55432fe", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3e661eae-b56a-4a4b-b7e6-0459c18d4fbf" ], "failures": [], "pending": [], "skipped": [], "duration": 50797, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "54f906f6-af4d-4fd4-88ef-24f0b8ae7200", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "88015e48-7202-43c9-a21c-a1c82cb1b15b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 51367, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "e1cbc4b9-47dd-4dad-b5c0-203c24b98558", "parentUUID": "88015e48-7202-43c9-a21c-a1c82cb1b15b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e1cbc4b9-47dd-4dad-b5c0-203c24b98558" ], "failures": [], "pending": [], "skipped": [], "duration": 51367, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "102cfe2e-b26b-4cbb-ae1a-361b640ad183", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5a632b1b-00ba-4408-b24d-3d1076bced8b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 50702, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "9e2ebbed-0535-4afc-b30a-10a5496b13a2", "parentUUID": "5a632b1b-00ba-4408-b24d-3d1076bced8b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9e2ebbed-0535-4afc-b30a-10a5496b13a2" ], "failures": [], "pending": [], "skipped": [], "duration": 50702, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3a2181d8-56c9-4455-8341-b2189ebaf872", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1a50a169-8b0e-4613-b496-f19297bfe09e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 53091, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "c58d33d9-6467-474a-b35c-85bce9f62ed4", "parentUUID": "1a50a169-8b0e-4613-b496-f19297bfe09e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c58d33d9-6467-474a-b35c-85bce9f62ed4" ], "failures": [], "pending": [], "skipped": [], "duration": 53091, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "074a887d-772a-4ab2-9cd6-5830e65c4a71", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c6048af0-742e-4d95-949c-e2a223a50805", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 48633, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "8f69e88d-f3c0-458a-bfc7-2b81b963c6a6", "parentUUID": "c6048af0-742e-4d95-949c-e2a223a50805", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8f69e88d-f3c0-458a-bfc7-2b81b963c6a6" ], "failures": [], "pending": [], "skipped": [], "duration": 48633, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "243a1044-97d4-4659-8efd-a58ddf7b7748", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7b1eb824-6c76-4c8b-85ef-70f07ef68a8c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 49849, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "8cadca14-4b80-4e40-8ae1-a3349e30bb2a", "parentUUID": "7b1eb824-6c76-4c8b-85ef-70f07ef68a8c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8cadca14-4b80-4e40-8ae1-a3349e30bb2a" ], "failures": [], "pending": [], "skipped": [], "duration": 49849, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "944e18d1-c15b-4f1e-a6b7-ed63c06720f7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9a271768-13ac-4c7d-9b86-4d5c1ad0b1f2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 50814, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 20000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (metadata) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json', {\n statusCode: 200,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (primitive) {\n cy.intercept('/WholeBody/31-May-2021/ratBody/cube_2.json', {\n statusCode: 200,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Click on the Open 3D Scaffold button\ncy.get('.open-scaffold').should('be.visible').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "47d13173-bb97-46ea-b202-ea30348fcb1f", "parentUUID": "9a271768-13ac-4c7d-9b86-4d5c1ad0b1f2", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "47d13173-bb97-46ea-b202-ea30348fcb1f" ], "failures": [], "pending": [], "skipped": [], "duration": 50814, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a99c4951-ca27-4daf-b3b2-5966d6bac735", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7b09ae1a-0c08-4888-9203-7e6fb5ddbc14", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 58620, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "a32252ca-288d-4edc-9f26-cd0333815433", "parentUUID": "7b09ae1a-0c08-4888-9203-7e6fb5ddbc14", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a32252ca-288d-4edc-9f26-cd0333815433" ], "failures": [], "pending": [], "skipped": [], "duration": 58620, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "634a9731-b887-498d-9833-e024c11dbc77", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c7529cab-a7d3-4541-afe0-3ec90e9f16ee", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 59914, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "0a858878-04a6-4625-b327-e47d8dbf62d2", "parentUUID": "c7529cab-a7d3-4541-afe0-3ec90e9f16ee", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0a858878-04a6-4625-b327-e47d8dbf62d2" ], "failures": [], "pending": [], "skipped": [], "duration": 59914, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c8f92a1b-9d2f-40b6-b2e6-26ec75c86621", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dab4d6f8-32dc-4827-ab19-94d526b643c2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 57202, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "CypressError: `cy.click()` can only be called on a single element. Your subject contained 5 elements. Pass `{ multiple: true }` if you want to serially click each element.\n\nhttps://on.cypress.io/click", "estack": "CypressError: `cy.click()` can only be called on a single element. Your subject contained 5 elements. Pass `{ multiple: true }` if you want to serially click each element.\n\nhttps://on.cypress.io/click\n at mouseAction (http://localhost:43923/__cypress/runner/cypress_runner.js:142148:76)\n at Context.click (http://localhost:43923/__cypress/runner/cypress_runner.js:142312:14)\n at wrapped (http://localhost:43923/__cypress/runner/cypress_runner.js:161018:19)\nFrom Your Spec Code:\n at captureUserInvocationStack (http://localhost:43923/__cypress/runner/cypress_runner.js:141402:102)\n at $Cy.expect (http://localhost:43923/__cypress/runner/cypress_runner.js:141440:7)\n at Context.shouldFn (http://localhost:43923/__cypress/runner/cypress_runner.js:145103:18)\n at Context.should (http://localhost:43923/__cypress/runner/cypress_runner.js:145217:23)\n at (http://localhost:43923/__cypress/runner/cypress_runner.js:140730:39)\n at assertions (http://localhost:43923/__cypress/runner/cypress_runner.js:140979:16)\n at tryCatcher (http://localhost:43923/__cypress/runner/cypress_runner.js:18744:23)\n at Object.gotValue (http://localhost:43923/__cypress/runner/cypress_runner.js:17888:18)\n at Object.gotAccum (http://localhost:43923/__cypress/runner/cypress_runner.js:17875:25)\n at Object.tryCatcher (http://localhost:43923/__cypress/runner/cypress_runner.js:18744:23)", "diff": null }, "uuid": "2d078649-4bda-452f-b6cc-63011025f8b8", "parentUUID": "dab4d6f8-32dc-4827-ab19-94d526b643c2", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "2d078649-4bda-452f-b6cc-63011025f8b8" ], "pending": [], "skipped": [], "duration": 57202, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "05c07957-4ad3-497c-83f8-936775608b89", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a6fcd96f-deb5-4ec0-a1df-653d0c5fb518", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 59071, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2)').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "CypressError: `cy.click()` can only be called on a single element. Your subject contained 5 elements. Pass `{ multiple: true }` if you want to serially click each element.\n\nhttps://on.cypress.io/click", "estack": "CypressError: `cy.click()` can only be called on a single element. Your subject contained 5 elements. Pass `{ multiple: true }` if you want to serially click each element.\n\nhttps://on.cypress.io/click\n at mouseAction (http://localhost:35275/__cypress/runner/cypress_runner.js:142148:76)\n at Context.click (http://localhost:35275/__cypress/runner/cypress_runner.js:142312:14)\n at wrapped (http://localhost:35275/__cypress/runner/cypress_runner.js:161018:19)\nFrom Your Spec Code:\n at captureUserInvocationStack (http://localhost:35275/__cypress/runner/cypress_runner.js:141402:102)\n at $Cy.expect (http://localhost:35275/__cypress/runner/cypress_runner.js:141440:7)\n at Context.shouldFn (http://localhost:35275/__cypress/runner/cypress_runner.js:145103:18)\n at Context.should (http://localhost:35275/__cypress/runner/cypress_runner.js:145217:23)\n at (http://localhost:35275/__cypress/runner/cypress_runner.js:140730:39)\n at assertions (http://localhost:35275/__cypress/runner/cypress_runner.js:140979:16)\n at tryCatcher (http://localhost:35275/__cypress/runner/cypress_runner.js:18744:23)\n at Object.gotValue (http://localhost:35275/__cypress/runner/cypress_runner.js:17888:18)\n at Object.gotAccum (http://localhost:35275/__cypress/runner/cypress_runner.js:17875:25)\n at Object.tryCatcher (http://localhost:35275/__cypress/runner/cypress_runner.js:18744:23)", "diff": null }, "uuid": "d8df5642-ac83-46c7-8208-43d6ed89fb1f", "parentUUID": "a6fcd96f-deb5-4ec0-a1df-653d0c5fb518", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "d8df5642-ac83-46c7-8208-43d6ed89fb1f" ], "pending": [], "skipped": [], "duration": 59071, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5f2a6b9b-de0d-4d8f-896f-bf3b063fc7ca", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fc50a4fc-18bf-4dd9-85ef-101717254140", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 56588, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "413a63c6-a8ff-45f3-8bfa-6bc1d8848024", "parentUUID": "fc50a4fc-18bf-4dd9-85ef-101717254140", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "413a63c6-a8ff-45f3-8bfa-6bc1d8848024" ], "failures": [], "pending": [], "skipped": [], "duration": 56588, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b56ae09d-ae74-44a8-b9d6-e21417d217fa", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5de0092b-c113-4f29-a67c-dbe98ced58b4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 14732, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Failed to fetch\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Failed to fetch\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (webpack:///node_modules/@abi-software/flatmapvuer/src/components/MultiFlatmapVuer.vue:110:0)\n at new Promise ()\n at VueComponent.initialise (webpack:///node_modules/@abi-software/flatmapvuer/src/components/MultiFlatmapVuer.vue:106:0)\n at VueComponent.mounted (webpack:///node_modules/@abi-software/flatmapvuer/src/components/MultiFlatmapVuer.vue:99:0)\n at invokeWithErrorHandling (http://localhost:32861/__cypress/src/cypress-support-file~spec-0.js:3425:61)\n at callHook$1 (http://localhost:32861/__cypress/src/cypress-support-file~spec-0.js:4439:13)\n at Object.insert (http://localhost:32861/__cypress/src/cypress-support-file~spec-0.js:4829:13)\n at invokeInsertHook (http://localhost:32861/__cypress/src/cypress-support-file~spec-0.js:7344:38)\n at VueComponent.patch [as __patch__] (http://localhost:32861/__cypress/src/cypress-support-file~spec-0.js:7555:9)\n at Vue._update (http://localhost:32861/__cypress/src/cypress-support-file~spec-0.js:4177:25)", "diff": null }, "uuid": "aba82e6b-7c1d-4390-ae4e-076f385029e0", "parentUUID": "5de0092b-c113-4f29-a67c-dbe98ced58b4", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "aba82e6b-7c1d-4390-ae4e-076f385029e0" ], "pending": [], "skipped": [], "duration": 14732, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c1948c2c-b309-4d60-b349-21858a6d2954", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f3a10b33-5e98-4c4a-a55f-92cc8894e09e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 61363, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.singlepanel-1 > .toolbar-flex-container > .title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)').click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "fe08f279-8fb0-4e7c-b99e-59d13de5a1a1", "parentUUID": "f3a10b33-5e98-4c4a-a55f-92cc8894e09e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fe08f279-8fb0-4e7c-b99e-59d13de5a1a1" ], "failures": [], "pending": [], "skipped": [], "duration": 61363, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e93b84d1-2d95-4ebb-9250-d4f22f427ecb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a75e448e-0e3d-461d-9f2a-bb2c245e9bf7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 126145, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "f996ebad-e53c-45ab-91a7-b38afe792a7f", "parentUUID": "a75e448e-0e3d-461d-9f2a-bb2c245e9bf7", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f996ebad-e53c-45ab-91a7-b38afe792a7f" ], "failures": [], "pending": [], "skipped": [], "duration": 126145, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d9f2a470-e6dd-48e8-9ef7-48495b63a452", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "17356b54-2e5a-4bce-97ed-f0c828a6703f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 58636, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "8f6495e6-513b-4796-97ac-7eef85dadf0f", "parentUUID": "17356b54-2e5a-4bce-97ed-f0c828a6703f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8f6495e6-513b-4796-97ac-7eef85dadf0f" ], "failures": [], "pending": [], "skipped": [], "duration": 58636, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "04a5f82f-f373-4830-b914-36a4f8ae5b34", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "127b0c11-3ff0-4a3d-a5a4-9e2d06fc8cf7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 61373, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for segmentations and open it, should have four items in select now\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "CypressError: Timed out retrying after 10050ms: `cy.click()` failed because this element is not visible:\n\n`Segment...`\n\nThis element `` is not visible because its parent `` has CSS property: `display: none`\n\nFix this problem, or use `{force: true}` to disable error checking.\n\nhttps://on.cypress.io/element-cannot-be-interacted-with", "estack": "CypressError: Timed out retrying after 10050ms: `cy.click()` failed because this element is not visible:\n\n`Segment...`\n\nThis element `` is not visible because its parent `` has CSS property: `display: none`\n\nFix this problem, or use `{force: true}` to disable error checking.\n\nhttps://on.cypress.io/element-cannot-be-interacted-with\n at runVisibilityCheck (http://localhost:42421/__cypress/runner/cypress_runner.js:161795:66)\n at Object.isStrictlyVisible (http://localhost:42421/__cypress/runner/cypress_runner.js:161809:10)\n at runAllChecks (http://localhost:42421/__cypress/runner/cypress_runner.js:140393:26)\n at retryActionability (http://localhost:42421/__cypress/runner/cypress_runner.js:140461:16)\n at tryCatcher (http://localhost:42421/__cypress/runner/cypress_runner.js:18744:23)\n at Promise.attempt.Promise.try (http://localhost:42421/__cypress/runner/cypress_runner.js:16018:29)\n at whenStable (http://localhost:42421/__cypress/runner/cypress_runner.js:156574:65)\n at (http://localhost:42421/__cypress/runner/cypress_runner.js:156015:14)\n at tryCatcher (http://localhost:42421/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:42421/__cypress/runner/cypress_runner.js:16679:31)\n at Promise._settlePromise (http://localhost:42421/__cypress/runner/cypress_runner.js:16736:18)\n at Promise._settlePromise0 (http://localhost:42421/__cypress/runner/cypress_runner.js:16781:10)\n at Promise._settlePromises (http://localhost:42421/__cypress/runner/cypress_runner.js:16861:18)\n at Promise._fulfill (http://localhost:42421/__cypress/runner/cypress_runner.js:16805:18)\n at (http://localhost:42421/__cypress/runner/cypress_runner.js:18419:46)\nFrom Your Spec Code:\n at captureUserInvocationStack (http://localhost:42421/__cypress/runner/cypress_runner.js:141402:102)\n at $Cy.expect (http://localhost:42421/__cypress/runner/cypress_runner.js:141440:7)\n at Context.shouldFn (http://localhost:42421/__cypress/runner/cypress_runner.js:145103:18)\n at Context.should (http://localhost:42421/__cypress/runner/cypress_runner.js:145217:23)\n at (http://localhost:42421/__cypress/runner/cypress_runner.js:140730:39)\n at assertions (http://localhost:42421/__cypress/runner/cypress_runner.js:140979:16)\n at tryCatcher (http://localhost:42421/__cypress/runner/cypress_runner.js:18744:23)\n at Object.gotValue (http://localhost:42421/__cypress/runner/cypress_runner.js:17888:18)\n at Object.gotAccum (http://localhost:42421/__cypress/runner/cypress_runner.js:17875:25)\n at Object.tryCatcher (http://localhost:42421/__cypress/runner/cypress_runner.js:18744:23)", "diff": null }, "uuid": "011640ca-bb86-4e13-ad4a-85f196c5ced0", "parentUUID": "127b0c11-3ff0-4a3d-a5a4-9e2d06fc8cf7", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "011640ca-bb86-4e13-ad4a-85f196c5ced0" ], "pending": [], "skipped": [], "duration": 61373, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "15819c38-a586-4aed-84d7-fae92dc7ca51", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fd688f95-1c1e-4028-b45d-b5b709ce988b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 59854, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "8e79a73d-3c1d-49d9-8a5f-8a9b341e378e", "parentUUID": "fd688f95-1c1e-4028-b45d-b5b709ce988b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8e79a73d-3c1d-49d9-8a5f-8a9b341e378e" ], "failures": [], "pending": [], "skipped": [], "duration": 59854, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d43d9c56-ef04-4e3f-af49-f06afc0f80fb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fc83e511-8827-432d-86ea-674b0849eae4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 62986, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "62533296-b34c-44e6-8af1-02715815602c", "parentUUID": "fc83e511-8827-432d-86ea-674b0849eae4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "62533296-b34c-44e6-8af1-02715815602c" ], "failures": [], "pending": [], "skipped": [], "duration": 62986, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ffbc1b30-3241-4540-a2e9-a043c2f11a04", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5234249a-285c-4ee9-81f3-0e6f95c0c464", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 60025, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "17d57045-c0c5-4938-a439-ec5235a9f23e", "parentUUID": "5234249a-285c-4ee9-81f3-0e6f95c0c464", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "17d57045-c0c5-4938-a439-ec5235a9f23e" ], "failures": [], "pending": [], "skipped": [], "duration": 60025, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "59ff1581-7904-4430-a1fc-9c3be73a3d1e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8fb1c83d-165f-447a-aaef-36262ff134e9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 58743, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner`, but never found it.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:112:108)\n at runnable.fn (http://localhost:41513/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:41513/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:41513/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:41513/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:41513/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:41513/__cypress/runner/cypress_runner.js:16679:31)", "diff": null }, "uuid": "5fccc9a3-e4c9-4ada-adcb-88873dbe4e6a", "parentUUID": "8fb1c83d-165f-447a-aaef-36262ff134e9", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "5fccc9a3-e4c9-4ada-adcb-88873dbe4e6a" ], "pending": [], "skipped": [], "duration": 58743, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "15683c24-6822-4ea8-a12d-f1073a4c350d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "603c9a46-5c1d-46d7-9fcf-eddff50f0dc8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 50314, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1.contentvuer').should('have.length', 1);\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.singlepanel-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner`, but never found it.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:112:108)\n at runnable.fn (http://localhost:39355/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:39355/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:39355/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:39355/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:39355/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:39355/__cypress/runner/cypress_runner.js:16679:31)", "diff": null }, "uuid": "2e447f61-6c45-4e79-b80d-5f78042a2e0e", "parentUUID": "603c9a46-5c1d-46d7-9fcf-eddff50f0dc8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "2e447f61-6c45-4e79-b80d-5f78042a2e0e" ], "pending": [], "skipped": [], "duration": 50314, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ec9749c4-4c17-4aab-8997-015cc56fcd57", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "51ba6652-e95a-47dc-b4cb-ee439aff76a9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 60343, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "a6ef5d23-7051-45db-8af9-aebb0dbaf3af", "parentUUID": "51ba6652-e95a-47dc-b4cb-ee439aff76a9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a6ef5d23-7051-45db-8af9-aebb0dbaf3af" ], "failures": [], "pending": [], "skipped": [], "duration": 60343, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a85b6581-0a00-4a44-aa5e-8713491dd6c9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d4ed8bca-dc83-4867-9797-ee796a9026ca", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 58149, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "392c9848-c02a-4725-9b87-7dcdd8a101f2", "parentUUID": "d4ed8bca-dc83-4867-9797-ee796a9026ca", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "392c9848-c02a-4725-9b87-7dcdd8a101f2" ], "failures": [], "pending": [], "skipped": [], "duration": 58149, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "172c1c3c-5cda-42b1-bb77-c9089b464384", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a8c30d42-ab23-49b3-9b55-72320db19461", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 60063, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "7b7c7851-376a-4092-b966-569709ce71de", "parentUUID": "a8c30d42-ab23-49b3-9b55-72320db19461", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7b7c7851-376a-4092-b966-569709ce71de" ], "failures": [], "pending": [], "skipped": [], "duration": 60063, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f2893d74-1d7a-4ac6-999c-7b3500008275", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "896476ef-9b9a-4bc6-b910-ef501ea2586a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36164, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/rat-flatmap/blob/e4fd167c0969136b9e8d5190500cbdee909b17da/manifest.json' to include 'mouse'", "estack": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/rat-flatmap/blob/e4fd167c0969136b9e8d5190500cbdee909b17da/manifest.json' to include 'mouse'\n at Context. (webpack:///./cypress/component/MapContent.cy.js:63:103)\n at getRet (http://localhost:41835/__cypress/runner/cypress_runner.js:145525:20)\n at tryCatcher (http://localhost:41835/__cypress/runner/cypress_runner.js:18744:23)\n at Promise.attempt.Promise.try (http://localhost:41835/__cypress/runner/cypress_runner.js:16018:29)\n at Context.thenFn (http://localhost:41835/__cypress/runner/cypress_runner.js:145536:63)\n at Context.then (http://localhost:41835/__cypress/runner/cypress_runner.js:145785:21)\n at wrapped (http://localhost:41835/__cypress/runner/cypress_runner.js:161018:19)\n at (http://localhost:41835/__cypress/runner/cypress_runner.js:159844:15)", "diff": null }, "uuid": "bc4ac533-1319-4f91-9bfb-2184499db536", "parentUUID": "896476ef-9b9a-4bc6-b910-ef501ea2586a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "bc4ac533-1319-4f91-9bfb-2184499db536" ], "pending": [], "skipped": [], "duration": 36164, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0db640e1-209d-4e23-8f2f-aae7de9fd0c9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6c911bc3-5574-46ff-94a2-fbced5681e34", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 71954, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '7', expected '5'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '7', expected '5'.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:187:61)\n at runnable.fn (http://localhost:36971/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:36971/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:36971/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:36971/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:36971/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:36971/__cypress/runner/cypress_runner.js:16679:31)", "diff": "- 7\n+ 5\n" }, "uuid": "1510cbaf-89c7-40ff-946c-f300dc201342", "parentUUID": "6c911bc3-5574-46ff-94a2-fbced5681e34", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "1510cbaf-89c7-40ff-946c-f300dc201342" ], "pending": [], "skipped": [], "duration": 71954, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "25f95a47-0fed-4d4a-9a00-ed6fdf2e94d5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "afc61057-1d60-45a7-8cde-50bc9e560176", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39007, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/rat-flatmap/blob/e4fd167c0969136b9e8d5190500cbdee909b17da/manifest.json' to include 'mouse'", "estack": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/rat-flatmap/blob/e4fd167c0969136b9e8d5190500cbdee909b17da/manifest.json' to include 'mouse'\n at Context. (webpack:///./cypress/component/MapContent.cy.js:63:103)\n at getRet (http://localhost:40091/__cypress/runner/cypress_runner.js:145525:20)\n at tryCatcher (http://localhost:40091/__cypress/runner/cypress_runner.js:18744:23)\n at Promise.attempt.Promise.try (http://localhost:40091/__cypress/runner/cypress_runner.js:16018:29)\n at Context.thenFn (http://localhost:40091/__cypress/runner/cypress_runner.js:145536:63)\n at Context.then (http://localhost:40091/__cypress/runner/cypress_runner.js:145785:21)\n at wrapped (http://localhost:40091/__cypress/runner/cypress_runner.js:161018:19)\n at (http://localhost:40091/__cypress/runner/cypress_runner.js:159844:15)", "diff": null }, "uuid": "f59e6e07-c2b2-4431-8d86-356214471c02", "parentUUID": "afc61057-1d60-45a7-8cde-50bc9e560176", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f59e6e07-c2b2-4431-8d86-356214471c02" ], "pending": [], "skipped": [], "duration": 39007, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "07ea60d3-1627-4c68-aa93-56af46870429", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6b4c8894-312c-4e64-a35f-bb5165c742ca", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 89925, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '8', expected '5'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '8', expected '5'.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:199:61)\n at runnable.fn (http://localhost:35453/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:35453/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:35453/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:35453/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:35453/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:35453/__cypress/runner/cypress_runner.js:16679:31)", "diff": "- 8\n+ 5\n" }, "uuid": "bdbb702b-785c-41d0-9b36-6b60bccb3b82", "parentUUID": "6b4c8894-312c-4e64-a35f-bb5165c742ca", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "bdbb702b-785c-41d0-9b36-6b60bccb3b82" ], "pending": [], "skipped": [], "duration": 89925, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4a55371d-f18b-45fe-9788-ffd43633255c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dbe001c9-18fc-43ad-b061-ddfb1426c554", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 93927, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '8', expected '5'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '8', expected '5'.\n at Context. (webpack:///./cypress/component/MapContent.cy.js:199:61)\n at runnable.fn (http://localhost:42145/__cypress/runner/cypress_runner.js:161259:19)\n at callFn (http://localhost:42145/__cypress/runner/cypress_runner.js:114794:21)\n at (http://localhost:42145/__cypress/runner/cypress_runner.js:168248:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:42145/__cypress/runner/cypress_runner.js:15298:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:42145/__cypress/runner/cypress_runner.js:18744:23)\n at Promise._settlePromiseFromHandler (http://localhost:42145/__cypress/runner/cypress_runner.js:16679:31)", "diff": "- 8\n+ 5\n" }, "uuid": "63e52a1c-bc81-44d3-9bbf-b55f0439bec7", "parentUUID": "dbe001c9-18fc-43ad-b061-ddfb1426c554", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "63e52a1c-bc81-44d3-9bbf-b55f0439bec7" ], "pending": [], "skipped": [], "duration": 93927, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "02e7feaf-2e16-44c3-82a8-c4cd663976b5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bf1f6404-d838-4328-9422-4756408970e5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 81074, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n }).should('not.exist');\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "cd4838c6-9a9e-4f98-9fb5-784ed8d2ba45", "parentUUID": "bf1f6404-d838-4328-9422-4756408970e5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cd4838c6-9a9e-4f98-9fb5-784ed8d2ba45" ], "failures": [], "pending": [], "skipped": [], "duration": 81074, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4e72d767-b929-4fce-85f6-03cec34abe65", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3b72a9dd-9a6a-42c6-9111-c689ea0a6f64", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 44620, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n }).should('not.exist');\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/mouse-flatmap/blob/3da9cf2ebd98dd0e0364c6d0dd5356aea002b2ee/manifest.json' to include 'mouseexplorationexplorationexplorationexplorationexplorationexploration'", "estack": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/mouse-flatmap/blob/3da9cf2ebd98dd0e0364c6d0dd5356aea002b2ee/manifest.json' to include 'mouseexplorationexplorationexplorationexplorationexplorationexploration'\n at Context. (webpack:///./cypress/component/MapContent.cy.js:64:103)\n at getRet (http://localhost:45743/__cypress/runner/cypress_runner.js:145525:20)\n at tryCatcher (http://localhost:45743/__cypress/runner/cypress_runner.js:18744:23)\n at Promise.attempt.Promise.try (http://localhost:45743/__cypress/runner/cypress_runner.js:16018:29)\n at Context.thenFn (http://localhost:45743/__cypress/runner/cypress_runner.js:145536:63)\n at Context.then (http://localhost:45743/__cypress/runner/cypress_runner.js:145785:21)\n at wrapped (http://localhost:45743/__cypress/runner/cypress_runner.js:161018:19)\n at (http://localhost:45743/__cypress/runner/cypress_runner.js:159844:15)", "diff": null }, "uuid": "2dc1ab02-f668-4022-befd-ac27d8b89944", "parentUUID": "3b72a9dd-9a6a-42c6-9111-c689ea0a6f64", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "2dc1ab02-f668-4022-befd-ac27d8b89944" ], "pending": [], "skipped": [], "duration": 44620, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "43222cce-902d-4d26-a67d-5585f0b886b0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0390b5ec-ce15-4f5c-988b-e53e04c0090c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 80179, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 5);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "6d6006e6-b5f1-42dd-985b-6f2b26279335", "parentUUID": "0390b5ec-ce15-4f5c-988b-e53e04c0090c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6d6006e6-b5f1-42dd-985b-6f2b26279335" ], "failures": [], "pending": [], "skipped": [], "duration": 80179, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "de126b43-b77a-4a91-b7da-1568b689e717", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f840fe0f-d6d1-4221-a9cb-5a2d7669845f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 48753, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n }).should('not.exist');\n cy.get('.selected').then(function ($label) {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', $label.text().toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/mouse-flatmap/blob/3da9cf2ebd98dd0e0364c6d0dd5356aea002b2ee/manifest.json' to include 'mouseexplorationexplorationexplorationexplorationexplorationexploration'", "estack": "AssertionError: Timed out retrying after 10000ms: expected 'https://github.com/AnatomicMaps/mouse-flatmap/blob/3da9cf2ebd98dd0e0364c6d0dd5356aea002b2ee/manifest.json' to include 'mouseexplorationexplorationexplorationexplorationexplorationexploration'\n at Context. (webpack:///./cypress/component/MapContent.cy.js:64:103)\n at getRet (http://localhost:40889/__cypress/runner/cypress_runner.js:145525:20)\n at tryCatcher (http://localhost:40889/__cypress/runner/cypress_runner.js:18744:23)\n at Promise.attempt.Promise.try (http://localhost:40889/__cypress/runner/cypress_runner.js:16018:29)\n at Context.thenFn (http://localhost:40889/__cypress/runner/cypress_runner.js:145536:63)\n at Context.then (http://localhost:40889/__cypress/runner/cypress_runner.js:145785:21)\n at wrapped (http://localhost:40889/__cypress/runner/cypress_runner.js:161018:19)\n at (http://localhost:40889/__cypress/runner/cypress_runner.js:159844:15)", "diff": null }, "uuid": "9ddbc081-f0d0-4ff0-bbb9-41476e8120ed", "parentUUID": "f840fe0f-d6d1-4221-a9cb-5a2d7669845f", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "9ddbc081-f0d0-4ff0-bbb9-41476e8120ed" ], "pending": [], "skipped": [], "duration": 48753, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7e6ebc11-6693-42c2-ad2b-bee432237148", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7fe2d86b-864d-4544-8ee9-46e2b055c7d7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 85881, "state": "passed", "speed": "slow", "pass": true, "fail": false, "pending": false, "context": null, "code": "//Intercept any initial response with preloaded fixture\ncy.get('@stub').then(function (stub) {\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/*', {\n statusCode: 200,\n body: stub.noResponse\n });\n cy.intercept('/sparc-api/dataset_info/using_multiple_dois/?dois=*', {\n statusCode: 200,\n body: stub.resultResponse\n }).as(\"mouseDataset\");\n cy.intercept('/sparc-api/get-organ-curies', {\n statusCode: 200,\n body: stub.curiesResponse\n }).as(\"curieResponse\");\n cy.intercept('/sparc-api/get_featured_datasets_identifiers', {\n statusCode: 200,\n body: stub.featuredDatasetResponse\n }).as(\"featuredDatasetResponse\");\n var anatomy_dataset = {\n \"result\": [stub.datasetResult]\n };\n cy.intercept('/sparc-api/dataset_info/anatomy?identifier=130', {\n statusCode: 200,\n body: anatomy_dataset\n }).as(\"anatomyResponse\");\n});\n//cy.intercept('GET', 'https://mapcore-demo.org/current/flatmap/v2/**');\ncy.mount(_src_components_index_js__WEBPACK_IMPORTED_MODULE_2__[\"MapContent\"], {\n propsData: {\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});\nCypress.on('uncaught:exception', function (err) {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\")) return false;\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\")) return false;\n if (err.message.includes(\"Failed to fetch\")) return false;\n return true;\n});\nCypress.Commands.add('checkFlatmapProvenanceCard', function (species) {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n }).should('not.exist');\n cy.get('.selected').then(function () {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click();\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase());\n });\n});\n//Wait for the curie response before continuing\n// cy.wait('@categoryResponse');\n//Check if mapcontent is mounted correctly\ncy.get('.mapcontent').invoke('attr', 'style', 'height: 880px').should('have.attr', 'style', 'height: 880px');\n//Loading mask should exist at the beginning\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('exist');\ncy.get('.header').should('be.visible');\ncy.get('.toolbar-title').should('exist');\n//Only three visible button on the toolbar at the start\ncy.get('.icon-group .map-icon:visible ').should('have.length', 3);\n//Sidebar should not be visbile\ncy.get('.el-drawer.rtl.my-drawer').should('not.be.visible');\n//Wait for curie response\ncy.wait('@curieResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@featuredDatasetResponse', {\n timeout: 20000\n});\n//Wait for curie response\ncy.wait('@anatomyResponse', {\n timeout: 20000\n});\ncy.get('.multi-container > .el-loading-parent--relative > .el-loading-mask', {\n timeout: 30000\n}).should('not.exist');\n//Test the existence of the minimap\ncy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\ncy.checkFlatmapProvenanceCard('Mouse');\ncy.checkFlatmapProvenanceCard('Rat');\n//Search for non existance feature, expect not-found text\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"NON_EXISTANCE\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('exist');\n//Search for Vague nerve, expect not-found text to be gone\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"'Vagus Nerve'\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.not-found-text').should('not.exist');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').clear();\ncy.get('.el-autocomplete > .el-input > .el-input__inner').should('exist').type(\"UBERON:0018675\");\ncy.get('.search-container > .map-icon > use').should('exist').click();\ncy.get('.maplibregl-popup-content').should('exist').contains('pelvic splanchnic nerve');\n//Test searching with uberon id wich should display a pop up with anatomical name\ncy.get('[style=\"height: 100%;\"] > [style=\"height: 100%; width: 100%; position: relative;\"] > .settings-group > :nth-child(1)').should('exist').click();\ncy.get('.open-map-popper > :nth-child(2) > .el-button:visible').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view>').should('have.length', 2);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> :nth-child(1)', {\n timeout: 30000\n}).click();\n//Check for two content containers\ncy.get('.contentvuer').should('be.visible').should('have.length', 2);\n//Wait for the mouse dataset request\ncy.wait('@mouseDataset', {\n timeout: 20000\n});\n//Open the sidebar\ncy.get('.open-tab').should('exist').click();\n//Type in 76 generic\ncy.get('.search-input > .el-input__inner').should('exist').type('76 generic');\n//Search\ncy.get('.header > .el-button').should('exist').click();\n//Check number of dataset card, it should be 1\ncy.get('.dataset-card').should('have.length', 1);\n//Check how many tags in the dataset\ncy.get('.box-card .container button').should('have.length', 6);\n//Intercept the request and stub it with preloaded fixture\ncy.get('@metadata').then(function (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,\n body: metadata\n });\n});\n//Intercept the request and stub it with preloaded fixture\ncy.get('@primitive').then(function (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,\n body: primitive\n }).as(\"scaffoldResponse\");\n});\n//Check for scaffolds and open it, should have three items in select now\ncy.get('.box-card .container button').contains('Scaffolds (2)').click();\ncy.get('.gallery-strip').contains('54-8_metadata.json').should(\"exist\");\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1.contentvuer').should('have.length', 1);\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 3);\n//Check for plot and open it, should have four items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Segmentations (1)').click();\ncy.get('.gallery-strip').contains('M54-8_03_20_20_Final.xml').should(\"exist\");\ncy.get('.box-card .container button').contains('Plots (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.gallery-strip').contains('RAGP_4subs_negdct.csv').should(\"exist\");\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 4);\ncy.get('@simulation_ui').then(function (simulation_ui) {\n cy.intercept('/sparc-api//sim/dataset/999', {\n statusCode: 200,\n body: simulation_ui\n });\n});\n//Check for simulations and open it, should have five items in select now\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.box-card .container button').contains('Simulations (1)').click();\ncy.get('.box-card :nth-child(1) > .details .el-button').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > .el-input > .el-input__inner').should('exist').click();\ncy.get('.pane-1 .toolbar > .toolbar-flex-container > .el-select > transition-stub > .el-select-dropdown > .el-scrollbar > .el-select-dropdown__wrap > .el-scrollbar__view> ').should('have.length', 5);\n//Close the sidebar\ncy.get('.open-tab > .el-icon-arrow-left').click();\ncy.get('.close-tab').should('exist').click();\ncy.get('.sidebar-container').should('not.be.visible');\n//Change from single panel to four panels and check for it\ncy.get('.icon-group > :nth-child(2) > .el-popover__reference-wrapper').should('exist').click();\ncy.get('.icon-group.el-row .el-popover:visible').should('exist');\ncy.get('.icon-group.el-row .el-popover:visible .el-row').should('have.length', 8);\ncy.get('.icon-group.el-row .el-popover:visible .el-row').contains('Four panes').should('exist').click();\ncy.get('.content-container:visible').should('have.length', 4);", "err": {}, "uuid": "728f83d2-da61-4469-b2b9-f977324a4812", "parentUUID": "7fe2d86b-864d-4544-8ee9-46e2b055c7d7", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "728f83d2-da61-4469-b2b9-f977324a4812" ], "failures": [], "pending": [], "skipped": [], "duration": 85881, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "69036dcb-2afc-46bc-9809-6f0c92b49675", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "90184b75-b862-4428-9ad0-34e2e6332af5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42582, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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(1) > :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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.selected`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.selected`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:69:9)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:138282:43)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:144185: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)", "diff": null }, "uuid": "39c6d64b-66e2-4948-8e8d-dafd0bde53f9", "parentUUID": "90184b75-b862-4428-9ad0-34e2e6332af5", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "39c6d64b-66e2-4948-8e8d-dafd0bde53f9" ], "pending": [], "skipped": [], "duration": 42582, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c30c1d19-9d8b-40e5-8218-8db033d99104", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "75f21ac8-9773-4543-ab34-17f8476bcd9c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 88801, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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(1) > :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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "79c0e357-db13-4ff0-96a2-20a35c2e2bc9", "parentUUID": "75f21ac8-9773-4543-ab34-17f8476bcd9c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "79c0e357-db13-4ff0-96a2-20a35c2e2bc9" ], "failures": [], "pending": [], "skipped": [], "duration": 88801, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b1f7f434-b21b-4749-8fa5-32573fb3a61f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7755364a-9d5f-4185-8447-56b83e5bfa3f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 53439, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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(1) > :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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.selected`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.selected`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:69:9)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:138282:43)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:144185: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)", "diff": null }, "uuid": "b5b0aee0-1b66-4e98-9b98-dcac89461813", "parentUUID": "7755364a-9d5f-4185-8447-56b83e5bfa3f", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b5b0aee0-1b66-4e98-9b98-dcac89461813" ], "pending": [], "skipped": [], "duration": 53439, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "24398ca8-93de-42dc-9c65-3414fc68f594", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7bd39837-abaa-4134-837a-777e769a8a72", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 75329, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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(1) > :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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:125:94)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138557:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157178:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157165:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163089:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "93210ce4-b154-46b8-bc58-bf0f47238b40", "parentUUID": "7bd39837-abaa-4134-837a-777e769a8a72", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "93210ce4-b154-46b8-bc58-bf0f47238b40" ], "pending": [], "skipped": [], "duration": 75329, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5fb0b56e-d0a9-4c38-a2a8-d115a960da76", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1d18c58e-d2e8-4ab3-8122-2a1f3fe063f9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 34805, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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(1) > :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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:107:84)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138557:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157178:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157165:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163089:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "f4f36a16-57b2-4cb8-b463-68f2152d5727", "parentUUID": "1d18c58e-d2e8-4ab3-8122-2a1f3fe063f9", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f4f36a16-57b2-4cb8-b463-68f2152d5727" ], "pending": [], "skipped": [], "duration": 34805, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "48319c76-5a0e-4bc9-9d8a-fe43dc616c04", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "00a044e0-49eb-4168-a69c-8c39ad50eb49", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 91448, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d38c0f7f-2cbf-4c1e-aaba-556689349688", "parentUUID": "00a044e0-49eb-4168-a69c-8c39ad50eb49", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d38c0f7f-2cbf-4c1e-aaba-556689349688" ], "failures": [], "pending": [], "skipped": [], "duration": 91448, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "63349111-431f-4c7a-b6c6-350461e58bf1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c864dc46-7ee1-42e5-8400-d1c9ac3fa14a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 90362, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "28147344-c507-4cd0-8c13-e973eaba6075", "parentUUID": "c864dc46-7ee1-42e5-8400-d1c9ac3fa14a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "28147344-c507-4cd0-8c13-e973eaba6075" ], "failures": [], "pending": [], "skipped": [], "duration": 90362, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5cb49813-2169-45e2-8f9a-7b6e14fa868c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8804a9f9-588f-4a12-8680-b03c4a5660a1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 27487, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "CypressError: `cy.wait()` could not find a registered alias for: `@anatomyResponse`.\nYou have not aliased anything yet.", "estack": "CypressError: `cy.wait()` could not find a registered alias for: `@anatomyResponse`.\nYou have not aliased anything yet.\n at $Cy.aliasNotFoundFor (http://localhost:8081/__cypress/runner/cypress_runner.js:132470:66)\n at $Cy.getAlias (http://localhost:8081/__cypress/runner/cypress_runner.js:132413:12)\n at waitForXhr (http://localhost:8081/__cypress/runner/cypress_runner.js:135547:23)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:135650:14)\n at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)\n at MappingPromiseArray._promiseFulfilled (http://localhost:8081/__cypress/runner/cypress_runner.js:4947:38)\n at PromiseArray._iterate (http://localhost:8081/__cypress/runner/cypress_runner.js:2920:31)\n at MappingPromiseArray.init (http://localhost:8081/__cypress/runner/cypress_runner.js:2884:10)\n at MappingPromiseArray._asyncInit (http://localhost:8081/__cypress/runner/cypress_runner.js:4916: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)\n at Async._drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:2416:5)\n at Async.drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:2286:14)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:102:7)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138557:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157178:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157165:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163089:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "86b6b487-0535-4e52-bc5c-e9a75f5d0131", "parentUUID": "8804a9f9-588f-4a12-8680-b03c4a5660a1", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "86b6b487-0535-4e52-bc5c-e9a75f5d0131" ], "pending": [], "skipped": [], "duration": 27487, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5cb49813-2169-45e2-8f9a-7b6e14fa868c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8804a9f9-588f-4a12-8680-b03c4a5660a1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 27487, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "CypressError: `cy.wait()` could not find a registered alias for: `@anatomyResponse`.\nYou have not aliased anything yet.", "estack": "CypressError: `cy.wait()` could not find a registered alias for: `@anatomyResponse`.\nYou have not aliased anything yet.\n at $Cy.aliasNotFoundFor (http://localhost:8081/__cypress/runner/cypress_runner.js:132470:66)\n at $Cy.getAlias (http://localhost:8081/__cypress/runner/cypress_runner.js:132413:12)\n at waitForXhr (http://localhost:8081/__cypress/runner/cypress_runner.js:135547:23)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:135650:14)\n at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)\n at MappingPromiseArray._promiseFulfilled (http://localhost:8081/__cypress/runner/cypress_runner.js:4947:38)\n at PromiseArray._iterate (http://localhost:8081/__cypress/runner/cypress_runner.js:2920:31)\n at MappingPromiseArray.init (http://localhost:8081/__cypress/runner/cypress_runner.js:2884:10)\n at MappingPromiseArray._asyncInit (http://localhost:8081/__cypress/runner/cypress_runner.js:4916: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)\n at Async._drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:2416:5)\n at Async.drainQueues (http://localhost:8081/__cypress/runner/cypress_runner.js:2286:14)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:102:7)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138557:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157178:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157165:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163089:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "86b6b487-0535-4e52-bc5c-e9a75f5d0131", "parentUUID": "8804a9f9-588f-4a12-8680-b03c4a5660a1", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "86b6b487-0535-4e52-bc5c-e9a75f5d0131" ], "pending": [], "skipped": [], "duration": 27487, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "66dd93e6-d596-42bb-a2bb-32600abaf0b7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "An uncaught error was detected outside of a test", "fullTitle": "An uncaught error was detected outside of a test", "timedOut": null, "duration": 981, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "throw err;", "err": { "message": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "estack": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "diff": null }, "uuid": "fb1f9016-e83f-4dbb-81e5-a0583e110e74", "parentUUID": "66dd93e6-d596-42bb-a2bb-32600abaf0b7", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "fb1f9016-e83f-4dbb-81e5-a0583e110e74" ], "pending": [], "skipped": [], "duration": 981, "root": true, "rootEmpty": false, "_timeout": 2000 }, { "uuid": "e8925035-27f4-42ec-8747-6aeea86a38bc", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "33f01dbf-b8e9-44a7-af87-fa14e3082aa2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 28651, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:107:84)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138557:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157178:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157165:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163089:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "042cc6cd-a20e-489c-bde8-798ff864833e", "parentUUID": "33f01dbf-b8e9-44a7-af87-fa14e3082aa2", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "042cc6cd-a20e-489c-bde8-798ff864833e" ], "pending": [], "skipped": [], "duration": 28651, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8fbdb825-bcaa-4f09-8653-c8169406e9f6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "76e2d764-69cb-4ff4-b1f0-b5e5f84fc99e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 3013, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.getCurrentFlatmap (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-OHJMD27F.js?v=ef3a8bc6:93759:44)\n at Proxy.getFlatmapImp (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:238:40)\n at Proxy.addFeaturedMarker (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:282:27)\n at Proxy.updateFeatureMarkers (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:266:39)\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:281:16)", "diff": null }, "uuid": "e531da6d-2cdb-4846-b672-2d935b016e34", "parentUUID": "76e2d764-69cb-4ff4-b1f0-b5e5f84fc99e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "e531da6d-2cdb-4846-b672-2d935b016e34" ], "pending": [], "skipped": [], "duration": 3013, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b5f01463-1ada-4c77-95ef-de58d9c9778d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1886b27c-2a52-4027-a3cc-af2e6cc3d399", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 2848, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.getCurrentFlatmap (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-BU5SKBBQ.js?v=b9147be3:70112:44)\n at Proxy.getFlatmapImp (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:238:40)\n at Proxy.addFeaturedMarker (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:282:27)\n at Proxy.updateFeatureMarkers (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:266:39)\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:281:16)", "diff": null }, "uuid": "7849c749-c2a1-4fab-a162-3c68f0a79bcb", "parentUUID": "1886b27c-2a52-4027-a3cc-af2e6cc3d399", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "7849c749-c2a1-4fab-a162-3c68f0a79bcb" ], "pending": [], "skipped": [], "duration": 2848, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8491bd4f-70da-45bd-8718-d8b96e4dccf5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "38d5ec52-2247-4734-8fec-bb24214ad7bc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 25785, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:107:84)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138557:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157178:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157165:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163089:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "6c157d1e-93b6-4030-b748-0bd94cba9c13", "parentUUID": "38d5ec52-2247-4734-8fec-bb24214ad7bc", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "6c157d1e-93b6-4030-b748-0bd94cba9c13" ], "pending": [], "skipped": [], "duration": 25785, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b5356f82-6a9d-4abe-b24a-3d5ff87eaf33", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e8cd548e-1156-48ca-ac96-6f0e150ea0a4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 88698, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0a3bfba1-b136-420e-9425-5ff1d6c18305", "parentUUID": "e8cd548e-1156-48ca-ac96-6f0e150ea0a4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0a3bfba1-b136-420e-9425-5ff1d6c18305" ], "failures": [], "pending": [], "skipped": [], "duration": 88698, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "31b1e9f5-0a6e-4f60-bb4a-15f8da294cd9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1eb23409-4edb-48bc-8111-fbe266a58eed", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 2914, "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 \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 \n cy.mount(MapContent, {\n propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas').should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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 \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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.getCurrentFlatmap (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-JQCRH2GY.js?v=1dace69f:94094:44)\n at Proxy.getFlatmapImp (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:238:40)\n at Proxy.addFeaturedMarker (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:282:27)\n at Proxy.updateFeatureMarkers (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:266:39)\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:281:16)", "diff": null }, "uuid": "e3c61752-8e90-4eca-8ffa-7c4230c382d5", "parentUUID": "1eb23409-4edb-48bc-8111-fbe266a58eed", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "e3c61752-8e90-4eca-8ffa-7c4230c382d5" ], "pending": [], "skipped": [], "duration": 2914, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "94675d21-2ec4-4d98-a615-65e6bac757f7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ad7cf832-ac5a-4656-8d36-52e25d5b1d96", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 31055, "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 propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.", "estack": "AssertionError: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:139290:94)\n at Assertion.assert (http://localhost:8081/__cypress/runner/cypress_runner.js:139318:9)\n at Assertion. (http://localhost:8081/__cypress/runner/cypress_runner.js:139260:25)\n at Assertion.overwritingPropertyGetter (http://localhost:8081/__cypress/runner/cypress_runner.js:78147:37)\nat Reflect.get ()\n at Object.proxyGetter [as get] (http://localhost:8081/__cypress/runner/cypress_runner.js:78013:22)\n at applyChainer (http://localhost:8081/__cypress/runner/cypress_runner.js:117852:22)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:117890:16)\n at arrayReduce (http://localhost:8081/__cypress/runner/cypress_runner.js:17809:21)\n at Function.reduce (http://localhost:8081/__cypress/runner/cypress_runner.js:26861:14)", "diff": "" }, "uuid": "0bccd3d9-b0f7-440d-8ac9-213f25a8b4fa", "parentUUID": "ad7cf832-ac5a-4656-8d36-52e25d5b1d96", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "0bccd3d9-b0f7-440d-8ac9-213f25a8b4fa" ], "pending": [], "skipped": [], "duration": 31055, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "94675d21-2ec4-4d98-a615-65e6bac757f7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ad7cf832-ac5a-4656-8d36-52e25d5b1d96", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 31055, "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 propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.", "estack": "AssertionError: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:139290:94)\n at Assertion.assert (http://localhost:8081/__cypress/runner/cypress_runner.js:139318:9)\n at Assertion. (http://localhost:8081/__cypress/runner/cypress_runner.js:139260:25)\n at Assertion.overwritingPropertyGetter (http://localhost:8081/__cypress/runner/cypress_runner.js:78147:37)\nat Reflect.get ()\n at Object.proxyGetter [as get] (http://localhost:8081/__cypress/runner/cypress_runner.js:78013:22)\n at applyChainer (http://localhost:8081/__cypress/runner/cypress_runner.js:117852:22)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:117890:16)\n at arrayReduce (http://localhost:8081/__cypress/runner/cypress_runner.js:17809:21)\n at Function.reduce (http://localhost:8081/__cypress/runner/cypress_runner.js:26861:14)", "diff": "" }, "uuid": "0bccd3d9-b0f7-440d-8ac9-213f25a8b4fa", "parentUUID": "ad7cf832-ac5a-4656-8d36-52e25d5b1d96", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "0bccd3d9-b0f7-440d-8ac9-213f25a8b4fa" ], "pending": [], "skipped": [], "duration": 31055, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8157cbd7-8f40-42f5-9b9a-4ba46824d3fa", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9ed79b4c-c6cf-40b0-b85f-869c7668964a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 91895, "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 propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7fca693f-c634-4abb-93d8-bbe93e6b2842", "parentUUID": "9ed79b4c-c6cf-40b0-b85f-869c7668964a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7fca693f-c634-4abb-93d8-bbe93e6b2842" ], "failures": [], "pending": [], "skipped": [], "duration": 91895, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "93650caa-cb75-4f55-ab8d-ef1e39536a8e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "be4d9534-dcad-4b94-8d27-57f37e358d6d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 27515, "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 propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.", "estack": "AssertionError: Expected to find element: `#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas`, but never found it.\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:139290:94)\n at Assertion.assert (http://localhost:8081/__cypress/runner/cypress_runner.js:139318:9)\n at Assertion. (http://localhost:8081/__cypress/runner/cypress_runner.js:139260:25)\n at Assertion.overwritingPropertyGetter (http://localhost:8081/__cypress/runner/cypress_runner.js:78147:37)\nat Reflect.get ()\n at Object.proxyGetter [as get] (http://localhost:8081/__cypress/runner/cypress_runner.js:78013:22)\n at applyChainer (http://localhost:8081/__cypress/runner/cypress_runner.js:117852:22)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:117890:16)\n at arrayReduce (http://localhost:8081/__cypress/runner/cypress_runner.js:17809:21)\n at Function.reduce (http://localhost:8081/__cypress/runner/cypress_runner.js:26861:14)", "diff": "" }, "uuid": "f85c7c64-66fd-4124-944c-cd84b3933448", "parentUUID": "be4d9534-dcad-4b94-8d27-57f37e358d6d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f85c7c64-66fd-4124-944c-cd84b3933448" ], "pending": [], "skipped": [], "duration": 27515, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "edb56798-d34c-428f-af75-d5a5a34dc2f3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d1ade31e-2e53-448d-92f0-cec2f755b807", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 96350, "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 propsData: {\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 plugins: setActivePinia(createPinia())\n }\n });\n Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click();\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.selected').then(() => {\n cy.get('.toolbar > .icon-group > :nth-child(2)').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3ddf3099-e3dc-46f1-9d23-c1386a99192a", "parentUUID": "d1ade31e-2e53-448d-92f0-cec2f755b807", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3ddf3099-e3dc-46f1-9d23-c1386a99192a" ], "failures": [], "pending": [], "skipped": [], "duration": 96350, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "148d2f16-8f67-4a18-bb82-601c5aad66e0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "99985d4e-e878-4840-abb6-da5552f416a8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 88957, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "68cb7261-6405-4a4a-b423-57c14f438845", "parentUUID": "99985d4e-e878-4840-abb6-da5552f416a8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "68cb7261-6405-4a4a-b423-57c14f438845" ], "failures": [], "pending": [], "skipped": [], "duration": 88957, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a90de81e-80ca-4ba3-aaf5-865591617a43", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "60a6dcc7-19c3-47e3-8331-904c594e4b0f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 90500, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "e3b7b739-d4a8-446a-8166-cec0a71dcb6b", "parentUUID": "60a6dcc7-19c3-47e3-8331-904c594e4b0f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e3b7b739-d4a8-446a-8166-cec0a71dcb6b" ], "failures": [], "pending": [], "skipped": [], "duration": 90500, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0c23016d-32f9-4070-8cfa-10b627883c6a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9f9472cd-e8fc-4401-ba11-4e39829566b3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 35683, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"markers\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"markers\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at V1.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-XYY6LQL7.js?v=e8fa14e2:25202:19)\n at o.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-XYY6LQL7.js?v=e8fa14e2:30529:57)\n at new Wet (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-XYY6LQL7.js?v=e8fa14e2:32945:73)\n at new wdt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-XYY6LQL7.js?v=e8fa14e2:56364:47)\n at new dLt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-XYY6LQL7.js?v=e8fa14e2:92821:26)\n at QLt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-XYY6LQL7.js?v=e8fa14e2:93483:52)", "diff": null }, "uuid": "c4f25125-30c8-4680-bfc8-8f955565c722", "parentUUID": "9f9472cd-e8fc-4401-ba11-4e39829566b3", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "c4f25125-30c8-4680-bfc8-8f955565c722" ], "pending": [], "skipped": [], "duration": 35683, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7f1a2d38-8a0e-4ad2-bfbb-2da95bcc4d33", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "14852d8e-1826-4db7-bea8-7c567b476cac", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 88795, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "56315143-aa49-4f6a-95f9-256e69347944", "parentUUID": "14852d8e-1826-4db7-bea8-7c567b476cac", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "56315143-aa49-4f6a-95f9-256e69347944" ], "failures": [], "pending": [], "skipped": [], "duration": 88795, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2483ab45-e2a1-4298-b233-5e0710644760", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7cdf7c2d-0e54-42d0-a441-67ac38c20479", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 51098, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found.", "estack": "AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:99:126)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138678:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157289:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157276:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163200:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "076d7e04-04fb-4d6b-a758-97011c654a7d", "parentUUID": "7cdf7c2d-0e54-42d0-a441-67ac38c20479", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "076d7e04-04fb-4d6b-a758-97011c654a7d" ], "pending": [], "skipped": [], "duration": 51098, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5f852d34-9faa-49cf-8adb-aaf301ef6da3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "04bb8f72-9d02-4497-bb30-537c123da172", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 91215, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ad91fcac-64f1-486f-8f19-34d9215d4fc3", "parentUUID": "04bb8f72-9d02-4497-bb30-537c123da172", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ad91fcac-64f1-486f-8f19-34d9215d4fc3" ], "failures": [], "pending": [], "skipped": [], "duration": 91215, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7d06f1f2-bc19-4d87-b928-45c8dd7130b1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "68f7dedd-d7fb-45cd-9865-e385625ca42c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 94442, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ac2dcbad-42de-4c10-841f-577ea1f363f8", "parentUUID": "68f7dedd-d7fb-45cd-9865-e385625ca42c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ac2dcbad-42de-4c10-841f-577ea1f363f8" ], "failures": [], "pending": [], "skipped": [], "duration": 94442, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2d3fadd0-9fe3-4fc3-bc7c-37080a66a722", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b6f68676-9637-4427-b7a7-dc12dc318c36", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 22823, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this._layerManager.addMarkers is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this._layerManager.addMarkers is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at tLt.addMarker (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-GC3LTW3P.js?v=b368f098:92957:30)\n at nLt.addMarker (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-GC3LTW3P.js?v=b368f098:93579:69)\n at (http://localhost:8081/__cypress/src/src/mixins/DynamicMarkerMixin.js:56:22)\n at Array.forEach ()\n at Proxy.flatmapMarkerUpdate (http://localhost:8081/__cypress/src/src/mixins/DynamicMarkerMixin.js:49:17)\n at Proxy.multiFlatmapReady (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:230:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=b368f098:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=b368f098:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=b368f098:2424:5)\n at Proxy.FlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-GC3LTW3P.js?v=b368f098:96081:12)", "diff": null }, "uuid": "5f1faf67-34e7-4416-8ea5-9c99882bc006", "parentUUID": "b6f68676-9637-4427-b7a7-dc12dc318c36", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "5f1faf67-34e7-4416-8ea5-9c99882bc006" ], "pending": [], "skipped": [], "duration": 22823, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9d858404-2310-4e41-b34e-bef7a8785d02", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "412e255e-bb10-4a27-919e-5166ed2894ea", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 104900, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4b695fb6-91e3-431a-a2f5-99416916f605", "parentUUID": "412e255e-bb10-4a27-919e-5166ed2894ea", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4b695fb6-91e3-431a-a2f5-99416916f605" ], "failures": [], "pending": [], "skipped": [], "duration": 104900, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f0ba7159-fb90-417c-81d2-9aa087903b6b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6e05cfae-558e-495e-a297-601414c5a93a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 98678, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6d0a2aea-b3d6-41bc-9219-3db20116cb21", "parentUUID": "6e05cfae-558e-495e-a297-601414c5a93a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6d0a2aea-b3d6-41bc-9219-3db20116cb21" ], "failures": [], "pending": [], "skipped": [], "duration": 98678, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d2f2a8ac-1abc-4ce2-98dc-5585b392e99a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a1b74407-3254-4fb9-b823-b99e39a986e3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 101212, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "f18231f3-6da4-4c33-bf44-816fd32fdf55", "parentUUID": "a1b74407-3254-4fb9-b823-b99e39a986e3", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f18231f3-6da4-4c33-bf44-816fd32fdf55" ], "failures": [], "pending": [], "skipped": [], "duration": 101212, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "03f915b2-3c7f-4c77-8eb5-120fcba5bcbd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1bf0f434-fb16-432c-b4d7-085742a1058a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 94454, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "cd553d4b-2b96-4e94-b8e6-1ed43b3c32ff", "parentUUID": "1bf0f434-fb16-432c-b4d7-085742a1058a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cd553d4b-2b96-4e94-b8e6-1ed43b3c32ff" ], "failures": [], "pending": [], "skipped": [], "duration": 94454, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1196a969-326a-4759-87a4-38f5cdd48332", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2aed4ef9-2fc7-4e39-b563-2eae2ed13210", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 86716, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '2', expected '1'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '2', expected '1'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:151:28)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138678:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157289:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157276:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163200:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 2\n+ 1\n" }, "uuid": "ca135eea-811f-4e91-a204-e8d2bb87fe94", "parentUUID": "2aed4ef9-2fc7-4e39-b563-2eae2ed13210", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ca135eea-811f-4e91-a204-e8d2bb87fe94" ], "pending": [], "skipped": [], "duration": 86716, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b8ef9a11-85c7-45c5-be5d-09d8f1146de9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8b0bd592-cfcd-410d-8107-decc9155952a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 21316, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this._layerManager.addMarkers is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this._layerManager.addMarkers is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at tLt.addMarker (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-GC3LTW3P.js?v=af326639:92957:30)\n at nLt.addMarker (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-GC3LTW3P.js?v=af326639:93579:69)\n at (http://localhost:8081/__cypress/src/src/mixins/DynamicMarkerMixin.js:56:22)\n at Array.forEach ()\n at Proxy.flatmapMarkerUpdate (http://localhost:8081/__cypress/src/src/mixins/DynamicMarkerMixin.js:49:17)\n at Proxy.multiFlatmapReady (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:230:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=af326639:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=af326639:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=af326639:2424:5)\n at Proxy.FlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-GC3LTW3P.js?v=af326639:96081:12)", "diff": null }, "uuid": "db982980-d784-454b-a7d4-53b4aae9c05d", "parentUUID": "8b0bd592-cfcd-410d-8107-decc9155952a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "db982980-d784-454b-a7d4-53b4aae9c05d" ], "pending": [], "skipped": [], "duration": 21316, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ef9a03a7-a683-4075-83a7-06926afffc77", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "048684e9-efab-42ae-964c-cc640e5732dd", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 96028, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b78ef429-74ee-4ff7-b92c-66bb9271caa6", "parentUUID": "048684e9-efab-42ae-964c-cc640e5732dd", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b78ef429-74ee-4ff7-b92c-66bb9271caa6" ], "failures": [], "pending": [], "skipped": [], "duration": 96028, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3b2c2146-73b6-4238-bb7f-0ae3b67cb8f9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "349d32a3-7ea1-4eb6-ac57-9e436ab6c196", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 84732, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "9f6b0861-b331-437e-9739-3b8a3319a3a6", "parentUUID": "349d32a3-7ea1-4eb6-ac57-9e436ab6c196", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9f6b0861-b331-437e-9739-3b8a3319a3a6" ], "failures": [], "pending": [], "skipped": [], "duration": 84732, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ca2522a2-771e-4894-b6c5-aef25bb199db", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6a8ee3ae-54cc-4d03-b593-daf2b84b0c8c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 91208, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "18a5153e-e1f1-47de-85c5-30ef498b3ca3", "parentUUID": "6a8ee3ae-54cc-4d03-b593-daf2b84b0c8c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "18a5153e-e1f1-47de-85c5-30ef498b3ca3" ], "failures": [], "pending": [], "skipped": [], "duration": 91208, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ee570c86-5783-4e37-847e-636acb96cbed", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "80c6a58d-77b5-4251-a77b-88fb2aa39f4a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 84121, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '2', expected '1'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '2', expected '1'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:151:28)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138678:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157289:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157276:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163200:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 2\n+ 1\n" }, "uuid": "38922420-c9f7-4e1b-b51d-2b5c96642f14", "parentUUID": "80c6a58d-77b5-4251-a77b-88fb2aa39f4a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "38922420-c9f7-4e1b-b51d-2b5c96642f14" ], "pending": [], "skipped": [], "duration": 84121, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9381dac3-36a0-4c57-8494-4f02adf5b69a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a347b100-3dd6-43a6-8d4a-73acf1a70efe", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 76897, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '2', expected '1'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '2', expected '1'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:151:28)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138678:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:157289:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:157276:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:163200:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 2\n+ 1\n" }, "uuid": "fdbf1621-58c7-43a8-b26d-d1bfec58476e", "parentUUID": "a347b100-3dd6-43a6-8d4a-73acf1a70efe", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "fdbf1621-58c7-43a8-b26d-d1bfec58476e" ], "pending": [], "skipped": [], "duration": 76897, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f7eee91b-37c3-4a2a-a21f-a12802249c66", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c102442d-a39b-4642-9f6d-0006506a248e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 94278, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d2b2bc9c-8ad7-453a-a3f2-898a33929387", "parentUUID": "c102442d-a39b-4642-9f6d-0006506a248e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d2b2bc9c-8ad7-453a-a3f2-898a33929387" ], "failures": [], "pending": [], "skipped": [], "duration": 94278, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d923d4bd-c45e-44d8-9220-954dc0064034", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0dad25d7-92e3-4ff7-99f5-3930bed7a66f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 16664, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"markers\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"markers\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at F2.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=5878f269:28185:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=5878f269:33533:57)\n at new Z6t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=5878f269:35935:99)\n at new Xpt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=5878f269:57625:47)\n at new RMt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=5878f269:94080:26)\n at zMt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=5878f269:94781:52)", "diff": null }, "uuid": "a348deef-8935-48d2-aba5-904a6432f99d", "parentUUID": "0dad25d7-92e3-4ff7-99f5-3930bed7a66f", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a348deef-8935-48d2-aba5-904a6432f99d" ], "pending": [], "skipped": [], "duration": 16664, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "58131c38-6880-4563-9b00-a0e3a645e263", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e3d9bc86-193a-4d72-87ad-add5416e83c7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 75702, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onResize (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:101:25)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=4eda523e:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=4eda523e:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=4eda523e:2424:5)\n at (http://localhost:8081/__cypress/src/src/components/ContentBar.vue:121:18)", "diff": null }, "uuid": "7b434805-ba25-49c6-bac7-5eec52f616e4", "parentUUID": "e3d9bc86-193a-4d72-87ad-add5416e83c7", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "7b434805-ba25-49c6-bac7-5eec52f616e4" ], "pending": [], "skipped": [], "duration": 75702, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "549d2ab8-7197-42e5-8fd7-a0af5a3e8d13", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "141a8191-ac70-4fe7-8d75-9734a022fb9b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 40766, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"markers\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"markers\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at F2.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=4eda523e:28185:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=4eda523e:33533:57)\n at new Z6t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=4eda523e:35935:99)\n at new Xpt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=4eda523e:57625:47)\n at new RMt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=4eda523e:94080:26)\n at zMt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-ZMSXPFKF.js?v=4eda523e:94781:52)", "diff": null }, "uuid": "b3f449ce-397d-4853-b442-8d26a28fea74", "parentUUID": "141a8191-ac70-4fe7-8d75-9734a022fb9b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b3f449ce-397d-4853-b442-8d26a28fea74" ], "pending": [], "skipped": [], "duration": 40766, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fb4572fb-ce7a-467d-96bf-958dea8866bd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9b5129b5-d872-4f70-a0f7-0100bcf7953d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 77790, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onResize (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:101:25)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e75575af:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e75575af:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e75575af:2424:5)\n at (http://localhost:8081/__cypress/src/src/components/ContentBar.vue:121:18)", "diff": null }, "uuid": "13271ca5-a871-459a-b14e-00dcb1d3d5e1", "parentUUID": "9b5129b5-d872-4f70-a0f7-0100bcf7953d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "13271ca5-a871-459a-b14e-00dcb1d3d5e1" ], "pending": [], "skipped": [], "duration": 77790, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a356989a-b342-434f-bd43-6fa6594ce6f9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "254ae7a2-a804-4b69-b100-b00091f46ce8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 68938, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('be.visible').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onResize (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:101:25)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=7adb48ee:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=7adb48ee:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=7adb48ee:2424:5)\n at (http://localhost:8081/__cypress/src/src/components/ContentBar.vue:121:18)", "diff": null }, "uuid": "8d284fbf-facc-4cf4-8fb1-4ed60d80bce8", "parentUUID": "254ae7a2-a804-4b69-b100-b00091f46ce8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "8d284fbf-facc-4cf4-8fb1-4ed60d80bce8" ], "pending": [], "skipped": [], "duration": 68938, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a93610a8-c5bf-45a3-8537-104da0879503", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cb69f58c-4c13-40c6-9b0a-65896302ca42", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 70209, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('be.visible').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'onResize')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onResize (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:101:25)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=7adb48ee:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=7adb48ee:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=7adb48ee:2424:5)\n at (http://localhost:8081/__cypress/src/src/components/ContentBar.vue:121:18)", "diff": null }, "uuid": "bf7fbf19-e3a1-427c-81a3-a6f5bf19981e", "parentUUID": "cb69f58c-4c13-40c6-9b0a-65896302ca42", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "bf7fbf19-e3a1-427c-81a3-a6f5bf19981e" ], "pending": [], "skipped": [], "duration": 70209, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f9dc33a7-a705-4cde-b45c-e460daafd865", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "95cfe283-2faa-4dd7-bcdb-da6ea824e8e8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 97460, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "665d32a6-de0d-49a2-a98c-e2b04579537d", "parentUUID": "95cfe283-2faa-4dd7-bcdb-da6ea824e8e8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "665d32a6-de0d-49a2-a98c-e2b04579537d" ], "failures": [], "pending": [], "skipped": [], "duration": 97460, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fd305119-9eb9-4914-a808-a15fe6f8007c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7f25dcbe-dda0-46b6-a556-ad7609ab587d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 102893, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c5daa958-cc9a-47bb-be8f-bfa3c5af691b", "parentUUID": "7f25dcbe-dda0-46b6-a556-ad7609ab587d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c5daa958-cc9a-47bb-be8f-bfa3c5af691b" ], "failures": [], "pending": [], "skipped": [], "duration": 102893, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "80c56e51-ced9-4093-af34-b25f971c6bce", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2cf7d780-e1a3-4563-8ff7-3154216fa7a9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 102183, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0d8e0676-b9d3-458a-9686-1d777bed5dff", "parentUUID": "2cf7d780-e1a3-4563-8ff7-3154216fa7a9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0d8e0676-b9d3-458a-9686-1d777bed5dff" ], "failures": [], "pending": [], "skipped": [], "duration": 102183, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2811971e-0ab0-4cac-bbdb-71892ba6b848", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "236ede51-fd42-45a6-9b8c-ee63345848c4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 99475, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "9d6a7914-4680-42d1-b807-b29a16f79c78", "parentUUID": "236ede51-fd42-45a6-9b8c-ee63345848c4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9d6a7914-4680-42d1-b807-b29a16f79c78" ], "failures": [], "pending": [], "skipped": [], "duration": 99475, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2db3f6bb-dfa9-49de-ba5f-bf8de0aa87ac", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fae42c5a-df58-46a7-9f82-8f85eb6027c4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 7753, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at W0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=e7712c06:34034:11)\n at async rl.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=e7712c06:40309:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=e7712c06:100192:9)\n at async nlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=e7712c06:35460:14)\n at async Hw.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=e7712c06:100186:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=e7712c06:100209:7)", "diff": null }, "uuid": "3b112c0f-e5d3-467b-9ee0-7ac7ba277cad", "parentUUID": "fae42c5a-df58-46a7-9f82-8f85eb6027c4", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3b112c0f-e5d3-467b-9ee0-7ac7ba277cad" ], "pending": [], "skipped": [], "duration": 7753, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "80be2230-4586-40ec-970e-7a317cbf3d2c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "23512af6-a0ef-4b6f-819c-8b237532a6a3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 8608, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading '0')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.getCurrentFlatmap (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-OSQRQSXL.js?v=1190c608:98643:44)\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:383:56)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=e5588705:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=e5588705:13:20)\n at Proxy.searchChanged (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:271:18)\n at _createVNode.onSearchChanged._cache.._cache. (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:530:78)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=1190c608:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=1190c608:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=1190c608:2424:5)", "diff": null }, "uuid": "5519bde1-baca-4ae9-adb0-222c12ae0673", "parentUUID": "23512af6-a0ef-4b6f-819c-8b237532a6a3", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "5519bde1-baca-4ae9-adb0-222c12ae0673" ], "pending": [], "skipped": [], "duration": 8608, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3d3af6a0-e6ab-4dab-a592-75fcc44abbac", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6cfa6bf8-2bbd-4dc8-a671-8678a4d00edf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 10474, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at W0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=a4cccb94:34034:11)\n at async rl.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=a4cccb94:40309:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=a4cccb94:100192:9)\n at async nlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=a4cccb94:35460:14)\n at async Hw.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=a4cccb94:100186:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=a4cccb94:100209:7)", "diff": null }, "uuid": "808e5e90-0f55-4f0a-bea5-1ab99fc3e0af", "parentUUID": "6cfa6bf8-2bbd-4dc8-a671-8678a4d00edf", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "808e5e90-0f55-4f0a-bea5-1ab99fc3e0af" ], "pending": [], "skipped": [], "duration": 10474, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "446ec079-91cb-4b21-8a77-f777d394deab", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4a066261-d413-4651-a082-624359b2c21b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 8743, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at W0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=141fb426:34034:11)\n at async rl.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=141fb426:40309:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=141fb426:100192:9)\n at async nlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=141fb426:35460:14)\n at async Hw.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=141fb426:100186:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-EUBPCG6F.js?v=141fb426:100209:7)", "diff": null }, "uuid": "28a2bc35-fdd3-4ab6-acbf-8e375292e215", "parentUUID": "4a066261-d413-4651-a082-624359b2c21b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "28a2bc35-fdd3-4ab6-acbf-8e375292e215" ], "pending": [], "skipped": [], "duration": 8743, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "02919540-92d7-4746-a335-3d5d8294f5ce", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cdcf5ef0-e0c1-4d72-a2ce-e83865738891", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 9169, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at I5t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=c88f79bc:34543:11)\n at async ul.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=c88f79bc:40823:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=c88f79bc:100737:9)\n at async jlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=c88f79bc:35969:14)\n at async tM.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=c88f79bc:100731:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=c88f79bc:100754:7)", "diff": null }, "uuid": "94573c43-d6bc-4872-9b24-1ccf13b5914f", "parentUUID": "cdcf5ef0-e0c1-4d72-a2ce-e83865738891", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "94573c43-d6bc-4872-9b24-1ccf13b5914f" ], "pending": [], "skipped": [], "duration": 9169, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "67e6ec3b-204e-47e3-91ef-c1c57367b88d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a748f064-3293-49f8-ace0-81258599df9a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 8683, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at I5t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:34543:11)\n at async ul.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:40823:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100737:9)\n at async jlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:35969:14)\n at async tM.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100731:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100754:7)", "diff": null }, "uuid": "d39e7d91-cfe2-4f4f-a1d2-2c87bb879a3f", "parentUUID": "a748f064-3293-49f8-ace0-81258599df9a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "d39e7d91-cfe2-4f4f-a1d2-2c87bb879a3f" ], "pending": [], "skipped": [], "duration": 8683, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "70dd6864-af88-4017-ba08-55f34d6cf3e9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6f9fc44c-6a20-4bf4-bdab-5e7543077796", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 8824, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at I5t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:34543:11)\n at async ul.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:40823:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100737:9)\n at async jlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:35969:14)\n at async tM.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100731:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100754:7)", "diff": null }, "uuid": "eba34581-56e0-4585-bec8-a63ccb166f99", "parentUUID": "6f9fc44c-6a20-4bf4-bdab-5e7543077796", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "eba34581-56e0-4585-bec8-a63ccb166f99" ], "pending": [], "skipped": [], "duration": 8824, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5b0f3284-e86b-414f-9087-adb3194a8078", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7d06b9e9-1a13-4349-a048-d4666fb0278d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 8269, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at I5t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:34543:11)\n at async ul.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:40823:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100737:9)\n at async jlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:35969:14)\n at async tM.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100731:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=4b1a7b9c:100754:7)", "diff": null }, "uuid": "6dbd6070-1fc0-40c1-8bb1-22aa3d882676", "parentUUID": "7d06b9e9-1a13-4349-a048-d4666fb0278d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "6dbd6070-1fc0-40c1-8bb1-22aa3d882676" ], "pending": [], "skipped": [], "duration": 8269, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "49363614-cc0f-4369-b54e-969d029fe1ce", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8d26570d-c63a-407b-b506-b2c58bda1eba", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 10778, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at I5t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=2c36e33b:34543:11)\n at async ul.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=2c36e33b:40823:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=2c36e33b:100737:9)\n at async jlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=2c36e33b:35969:14)\n at async tM.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=2c36e33b:100731:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=2c36e33b:100754:7)", "diff": null }, "uuid": "c9f6ae83-c366-42c2-9f3a-1d7964817818", "parentUUID": "8d26570d-c63a-407b-b506-b2c58bda1eba", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "c9f6ae83-c366-42c2-9f3a-1d7964817818" ], "pending": [], "skipped": [], "duration": 10778, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c1e95fe6-0da5-4cf0-8eda-76d4c15814e7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2143a43b-a01c-402f-a3e2-f2648689e6fc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 9631, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/sparcterms\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at I5t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=92d2484b:34543:11)\n at async ul.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=92d2484b:40823:15)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=92d2484b:100737:9)\n at async jlt.dispatch (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=92d2484b:35969:14)\n at async tM.ensureInitialised_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=92d2484b:100731:12)\n at async (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-U63WJ5VD.js?v=92d2484b:100754:7)", "diff": null }, "uuid": "4716a4c0-a286-44b8-ac54-2fd864445721", "parentUUID": "2143a43b-a01c-402f-a3e2-f2648689e6fc", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "4716a4c0-a286-44b8-ac54-2fd864445721" ], "pending": [], "skipped": [], "duration": 9631, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "555d9664-bc9f-43cf-bc2b-f47248b26927", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6dd441f5-e1f2-448c-9f97-c64292b0e1de", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 105586, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "93825268-45af-42b7-8d96-d15dda72a6e1", "parentUUID": "6dd441f5-e1f2-448c-9f97-c64292b0e1de", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "93825268-45af-42b7-8d96-d15dda72a6e1" ], "failures": [], "pending": [], "skipped": [], "duration": 105586, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "116f22bb-e265-43b8-94da-60383add2cdd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "59852571-0339-4b32-8c1f-f93d6204af60", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 24405, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at d8t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=a8b534e8:38371:11)\n at _Qu.addNode (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=a8b534e8:39288:12)\n at _Qu.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=a8b534e8:40753:12)\n at j8t.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=a8b534e8:40798:18)\n at UCt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=a8b534e8:99845:18)", "diff": null }, "uuid": "c8693043-cf60-41a2-a363-efd5aa41c026", "parentUUID": "59852571-0339-4b32-8c1f-f93d6204af60", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "c8693043-cf60-41a2-a363-efd5aa41c026" ], "pending": [], "skipped": [], "duration": 24405, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1b8eee32-22d4-4381-9f4d-e4fe11e2b369", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8cbc9e46-4b7a-4ef1-92a9-d2eef96fad91", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 20067, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at d8t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=404aeb26:38371:11)\n at _Qu.addNode (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=404aeb26:39288:12)\n at _Qu.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=404aeb26:40753:12)\n at j8t.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=404aeb26:40798:18)\n at UCt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=404aeb26:99845:18)", "diff": null }, "uuid": "38df82a7-26a6-4f00-b9f8-06ac30aa55ec", "parentUUID": "8cbc9e46-4b7a-4ef1-92a9-d2eef96fad91", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "38df82a7-26a6-4f00-b9f8-06ac30aa55ec" ], "pending": [], "skipped": [], "duration": 20067, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0baac0a2-495b-4dbd-9569-fb34173b7bff", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b52a31e2-69bd-473c-b1d3-558ea5bcc7bb", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 18973, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at d8t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=45764380:38371:11)\n at _Qu.addNode (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=45764380:39288:12)\n at _Qu.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=45764380:40753:12)\n at j8t.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=45764380:40798:18)\n at UCt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-YZXWJRO3.js?v=45764380:99845:18)", "diff": null }, "uuid": "076fce38-b0f0-402a-83ed-ba63db84f1bb", "parentUUID": "b52a31e2-69bd-473c-b1d3-558ea5bcc7bb", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "076fce38-b0f0-402a-83ed-ba63db84f1bb" ], "pending": [], "skipped": [], "duration": 18973, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f3949e45-7f69-4882-9890-12ada04dff46", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a0a0f05a-c518-4597-889c-67423b950c12", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 21318, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "UsageGraphError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Graph.addNode: the \"UBERON:0013702\" node already exist in the graph.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at u8t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-VJWV3ZUQ.js?v=92ec0438:38371:11)\n at _fu.addNode (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-VJWV3ZUQ.js?v=92ec0438:39288:12)\n at _fu.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-VJWV3ZUQ.js?v=92ec0438:40753:12)\n at B8t.load (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-VJWV3ZUQ.js?v=92ec0438:40802:18)\n at zCt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-VJWV3ZUQ.js?v=92ec0438:99841:18)", "diff": null }, "uuid": "a9defcd2-852c-4e54-9cd0-954fc8d8d967", "parentUUID": "a0a0f05a-c518-4597-889c-67423b950c12", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a9defcd2-852c-4e54-9cd0-954fc8d8d967" ], "pending": [], "skipped": [], "duration": 21318, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6640a730-87d0-4471-a40f-f8f73b9e398d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "16cee5d2-f479-4213-92f6-b182002e09bc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 136866, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7e0f278b-7a4d-4c02-8280-22e106eeaa43", "parentUUID": "16cee5d2-f479-4213-92f6-b182002e09bc", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7e0f278b-7a4d-4c02-8280-22e106eeaa43" ], "failures": [], "pending": [], "skipped": [], "duration": 136866, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "da15964a-654a-4bc3-a2ca-54916755f9f1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4894571a-036d-4c3a-98b4-62b967653570", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 32766, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmapImp.clearDatasetMarkers is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmapImp.clearDatasetMarkers is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.flatmapMarkerUpdate (http://localhost:8081/__cypress/src/src/mixins/DynamicMarkerMixin.js:49:20)\n at Proxy.multiFlatmapReady (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:282:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e04127c1:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e04127c1:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e04127c1:2424:5)\n at Proxy.FlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-MPNMYHES.js?v=e04127c1:98644:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e04127c1:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e04127c1:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=e04127c1:2424:5)\n at Proxy.onFlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-MPNMYHES.js?v=e04127c1:97364:649)", "diff": null }, "uuid": "a74f436b-00f5-4fa2-8307-b488cf913671", "parentUUID": "4894571a-036d-4c3a-98b4-62b967653570", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a74f436b-00f5-4fa2-8307-b488cf913671" ], "pending": [], "skipped": [], "duration": 32766, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6c31a761-acbe-45bf-b70c-34a8e5c09d08", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "325ccc61-50b3-43d7-a96e-47fa611d19e5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 136450, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3c93af14-3e35-41fc-af34-302ea2d4e896", "parentUUID": "325ccc61-50b3-43d7-a96e-47fa611d19e5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3c93af14-3e35-41fc-af34-302ea2d4e896" ], "failures": [], "pending": [], "skipped": [], "duration": 136450, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "385c5975-63ac-4437-a8c2-da401b9e7506", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "db63518f-0298-47cb-9220-6d1789cf2528", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 136988, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "383113ea-d1a6-4a59-8de2-9c93c1ed87ab", "parentUUID": "db63518f-0298-47cb-9220-6d1789cf2528", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "383113ea-d1a6-4a59-8de2-9c93c1ed87ab" ], "failures": [], "pending": [], "skipped": [], "duration": 136988, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "77f32eb2-0393-4fe9-ac84-dda542e5cae2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5a88b612-097e-45ef-90ac-9c6737a65c5d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 142614, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "82f57d68-2ee6-4459-b9a9-1f006c3b1118", "parentUUID": "5a88b612-097e-45ef-90ac-9c6737a65c5d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "82f57d68-2ee6-4459-b9a9-1f006c3b1118" ], "failures": [], "pending": [], "skipped": [], "duration": 142614, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "54575bb4-a055-4ce3-a174-a63a08668f73", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "60839357-beb1-4b5a-8397-b2a835397a0b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 127784, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "16ebf987-ddf1-4a73-9d4b-c00e2928f97a", "parentUUID": "60839357-beb1-4b5a-8397-b2a835397a0b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "16ebf987-ddf1-4a73-9d4b-c00e2928f97a" ], "failures": [], "pending": [], "skipped": [], "duration": 127784, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "58a43f8f-eda4-4d0d-a1e9-319b432821ae", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2c6f4644-7eb5-4ed1-b90c-77044a4e004a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 134132, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "65bbc66b-2022-4bc7-9187-595b75f4df26", "parentUUID": "2c6f4644-7eb5-4ed1-b90c-77044a4e004a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "65bbc66b-2022-4bc7-9187-595b75f4df26" ], "failures": [], "pending": [], "skipped": [], "duration": 134132, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d590b2ec-1604-46ff-8b87-0e3f894e0080", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c6ef311f-8e0b-4537-a3df-4ef4414b3f4a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 113087, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "973c7824-9999-48b9-bf7f-62ad1d092c47", "parentUUID": "c6ef311f-8e0b-4537-a3df-4ef4414b3f4a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "973c7824-9999-48b9-bf7f-62ad1d092c47" ], "failures": [], "pending": [], "skipped": [], "duration": 113087, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f76c2a42-ff69-4d2c-8f0f-63c5b87fe83a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e08e255f-f06d-411e-9199-c53d2cdea960", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 139879, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "717b2d7e-8fd7-4fa3-9973-31e82bf33b0d", "parentUUID": "e08e255f-f06d-411e-9199-c53d2cdea960", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "717b2d7e-8fd7-4fa3-9973-31e82bf33b0d" ], "failures": [], "pending": [], "skipped": [], "duration": 139879, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1f0af646-9254-41ae-bad5-218803b5538e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "efb7f12f-9f66-4517-a522-4cdc5cf162d3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 138920, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "abdf751e-4772-4700-8a11-8231f8f1232d", "parentUUID": "efb7f12f-9f66-4517-a522-4cdc5cf162d3", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "abdf751e-4772-4700-8a11-8231f8f1232d" ], "failures": [], "pending": [], "skipped": [], "duration": 138920, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "15189b05-fabb-4dd5-a0e1-6426a490a2dd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "766feb59-a0ad-4708-ba06-67e6000da934", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 136967, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ad864291-3b27-43ee-a858-31cdf1c1adf7", "parentUUID": "766feb59-a0ad-4708-ba06-67e6000da934", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ad864291-3b27-43ee-a858-31cdf1c1adf7" ], "failures": [], "pending": [], "skipped": [], "duration": 136967, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3fd441cc-877d-4f39-8054-d208c8588095", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4a619f52-86e6-42d5-b721-a6a6bed24f0b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 135136, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1f474255-c93b-4c81-99d4-ba5c18b4a538", "parentUUID": "4a619f52-86e6-42d5-b721-a6a6bed24f0b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1f474255-c93b-4c81-99d4-ba5c18b4a538" ], "failures": [], "pending": [], "skipped": [], "duration": 135136, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "503fbd11-12af-4dc6-9824-6f5667f5e131", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9325f998-a747-4723-a274-d47d620641b4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 131409, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "682f0f00-6078-4ed5-964f-3aee518c3301", "parentUUID": "9325f998-a747-4723-a274-d47d620641b4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "682f0f00-6078-4ed5-964f-3aee518c3301" ], "failures": [], "pending": [], "skipped": [], "duration": 131409, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "45169b0b-b4a9-46f2-9889-606ee4e704d5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "427c9c1c-f79a-4fee-ba7b-d76044ebc79a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 136388, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "fce3cb04-78d4-4ec4-9e30-ef1a77f1113a", "parentUUID": "427c9c1c-f79a-4fee-ba7b-d76044ebc79a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fce3cb04-78d4-4ec4-9e30-ef1a77f1113a" ], "failures": [], "pending": [], "skipped": [], "duration": 136388, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5f41e00a-3d72-4531-a029-ee53d1ecf4b4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "81bdd16d-8e57-42b5-838a-662f967ab377", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 129996, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4dc495e6-4315-4f2e-99b0-0be0c056dae4", "parentUUID": "81bdd16d-8e57-42b5-838a-662f967ab377", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4dc495e6-4315-4f2e-99b0-0be0c056dae4" ], "failures": [], "pending": [], "skipped": [], "duration": 129996, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "06c46ec3-9192-491f-988e-5293e7855d8d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "92a7b0ba-1565-434f-8ae2-22ca20d1622f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 131980, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4622c013-64ef-4a3d-b7a8-ec926fc71a76", "parentUUID": "92a7b0ba-1565-434f-8ae2-22ca20d1622f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4622c013-64ef-4a3d-b7a8-ec926fc71a76" ], "failures": [], "pending": [], "skipped": [], "duration": 131980, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "aa788d2f-dafb-40a1-89ce-a79ce5cf4f4b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "091285c6-dfe6-49ed-907c-a129af5e5562", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 158980, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8849ae05-e8b3-48f0-a91d-0103a728aa8d", "parentUUID": "091285c6-dfe6-49ed-907c-a129af5e5562", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8849ae05-e8b3-48f0-a91d-0103a728aa8d" ], "failures": [], "pending": [], "skipped": [], "duration": 158980, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f9fbc9c3-89e8-46bb-8400-f9f4e17038bf", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e5c95a01-2da0-4704-b175-a358899af156", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 138195, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "11eb1fc8-61c7-4976-8d44-d27e0e2da0c4", "parentUUID": "e5c95a01-2da0-4704-b175-a358899af156", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "11eb1fc8-61c7-4976-8d44-d27e0e2da0c4" ], "failures": [], "pending": [], "skipped": [], "duration": 138195, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "047ff5d8-ef3c-4241-81da-51f9ff5f1ae4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "80e34a28-d29b-4c94-a5e3-2eea3fb6c130", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 142839, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1a76d946-0a97-4292-b14a-c46609b43ed8", "parentUUID": "80e34a28-d29b-4c94-a5e3-2eea3fb6c130", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1a76d946-0a97-4292-b14a-c46609b43ed8" ], "failures": [], "pending": [], "skipped": [], "duration": 142839, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0e21d1e7-b75d-42f8-9d52-534b750d40b8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "An uncaught error was detected outside of a test", "fullTitle": "An uncaught error was detected outside of a test", "timedOut": null, "duration": 1055, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "throw err;", "err": { "message": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "estack": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "diff": null }, "uuid": "7f52f912-cfc8-4e80-ba32-3643cc12654b", "parentUUID": "0e21d1e7-b75d-42f8-9d52-534b750d40b8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "7f52f912-cfc8-4e80-ba32-3643cc12654b" ], "pending": [], "skipped": [], "duration": 1055, "root": true, "rootEmpty": false, "_timeout": 2000 }, { "uuid": "e0ead97a-73c3-4374-ba54-18c60204417a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d825d75b-c0dc-4f53-bc1e-8843df4caab6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 137385, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "fb1fee78-5175-4f55-aac2-1e4153b607bf", "parentUUID": "d825d75b-c0dc-4f53-bc1e-8843df4caab6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fb1fee78-5175-4f55-aac2-1e4153b607bf" ], "failures": [], "pending": [], "skipped": [], "duration": 137385, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "427877df-123e-49a1-8d7a-f92c847e0c3d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "An uncaught error was detected outside of a test", "fullTitle": "An uncaught error was detected outside of a test", "timedOut": null, "duration": 1212, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "throw err;", "err": { "message": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "estack": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "diff": null }, "uuid": "382c217c-b893-46ad-8886-7ff4178ee49e", "parentUUID": "427877df-123e-49a1-8d7a-f92c847e0c3d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "382c217c-b893-46ad-8886-7ff4178ee49e" ], "pending": [], "skipped": [], "duration": 1212, "root": true, "rootEmpty": false, "_timeout": 2000 }, { "uuid": "f9d51249-19db-4d54-b4a1-2bdef2f2370d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2bfe4d52-d348-4191-9dc9-6b309fb9e295", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 134637, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a0dd31a2-e3af-4823-89c9-0b00a8d55bac", "parentUUID": "2bfe4d52-d348-4191-9dc9-6b309fb9e295", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a0dd31a2-e3af-4823-89c9-0b00a8d55bac" ], "failures": [], "pending": [], "skipped": [], "duration": 134637, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ae743ecb-be8b-4fad-8e1c-043fb6743259", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b27ed567-70e0-44df-b83b-b128d22fdbe8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 125450, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'zoomToFeatures')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress.\n\n > Cannot read properties of undefined (reading 'zoomToFeatures')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.mapHoverHighlight (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:495:18)\n at (http://localhost:8081/__cypress/src/src/components/viewers/Flatmap.vue:131:12)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=55bba694:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=55bba694:13:20)\n at Proxy.hoverChanged (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:222:16)\n at _createVNode.onHoverChanged._cache.._cache. (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:526:77)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=154b047c:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=154b047c:1908:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=154b047c:2424:5)", "diff": null }, "uuid": "b8e380b5-0eb8-46a2-b42c-5c4517826ce1", "parentUUID": "b27ed567-70e0-44df-b83b-b128d22fdbe8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b8e380b5-0eb8-46a2-b42c-5c4517826ce1" ], "pending": [], "skipped": [], "duration": 125450, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8a3cab14-4bd7-4d10-8b61-ac3b17f8b8bd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "618451e8-f240-490c-b469-b34a0a254477", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 21567, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e57b9079:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e57b9079:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e57b9079:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e57b9079:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e57b9079:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e57b9079:96130:134)", "diff": null }, "uuid": "e32058ab-4463-4f27-85fe-aa75cd2ba1f0", "parentUUID": "618451e8-f240-490c-b469-b34a0a254477", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "e32058ab-4463-4f27-85fe-aa75cd2ba1f0" ], "pending": [], "skipped": [], "duration": 21567, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9de84909-ef1e-4b41-9ab6-444efd407564", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6485e91c-1405-41a0-b0b3-789a12b1b9a2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 21630, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e12bae2a:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e12bae2a:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e12bae2a:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e12bae2a:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e12bae2a:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=e12bae2a:96130:134)", "diff": null }, "uuid": "b22bb390-7d58-44aa-b526-43abbae7ad8c", "parentUUID": "6485e91c-1405-41a0-b0b3-789a12b1b9a2", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b22bb390-7d58-44aa-b526-43abbae7ad8c" ], "pending": [], "skipped": [], "duration": 21630, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ab61d6d3-f27a-4bb0-b21b-be554a021531", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e65aecb2-5471-4403-8091-74b40e0e0fcb", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164030, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ccd82e15-a17e-478b-bcf3-ef011865389e", "parentUUID": "e65aecb2-5471-4403-8091-74b40e0e0fcb", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ccd82e15-a17e-478b-bcf3-ef011865389e" ], "failures": [], "pending": [], "skipped": [], "duration": 164030, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "de132418-37de-4447-addb-b74910a00d45", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "47505f07-f2e4-4162-8ed7-2b39972a2a9a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 19314, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=58985dd1:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=58985dd1:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=58985dd1:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=58985dd1:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=58985dd1:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=58985dd1:96130:134)", "diff": null }, "uuid": "3bc349e7-6abc-437a-9c85-3ed22de5e092", "parentUUID": "47505f07-f2e4-4162-8ed7-2b39972a2a9a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3bc349e7-6abc-437a-9c85-3ed22de5e092" ], "pending": [], "skipped": [], "duration": 19314, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4e831e75-8eae-422c-ac17-cf2e0ecc966e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f64071e1-66ba-44d9-8c45-f51973acc997", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 18604, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:96130:134)", "diff": null }, "uuid": "fbb334fb-9bdd-45c6-b10a-2eaacb10070e", "parentUUID": "f64071e1-66ba-44d9-8c45-f51973acc997", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "fbb334fb-9bdd-45c6-b10a-2eaacb10070e" ], "pending": [], "skipped": [], "duration": 18604, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a66eff21-1b3e-426a-aa46-b6a3517d3874", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "61fd4cdb-8477-4a6c-84df-7d5d9c38d605", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 18369, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2e2767d1:96130:134)", "diff": null }, "uuid": "269b147e-4c8b-460a-89aa-7c98fe346667", "parentUUID": "61fd4cdb-8477-4a6c-84df-7d5d9c38d605", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "269b147e-4c8b-460a-89aa-7c98fe346667" ], "pending": [], "skipped": [], "duration": 18369, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "425f42a4-de43-4ea7-a285-26a130bcd5ae", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "434898f8-dbe4-4e00-ac68-1853c8940e38", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 23898, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=240ba034:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=240ba034:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=240ba034:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=240ba034:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=240ba034:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=240ba034:96130:134)", "diff": null }, "uuid": "d0cac24a-be8e-4f7f-8889-b4bc19a3e019", "parentUUID": "434898f8-dbe4-4e00-ac68-1853c8940e38", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "d0cac24a-be8e-4f7f-8889-b4bc19a3e019" ], "pending": [], "skipped": [], "duration": 23898, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6c5d4c23-c16a-48cb-876b-5ec15c8e9685", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "38c68db1-ebf8-49cf-a53f-b65958b5ab8c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 31716, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Source \"anatomical-markers-source\" already exists.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Uo.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3879b481:24978:19)\n at a.Map.addSource (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3879b481:30324:57)\n at new M0t (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3879b481:37231:170)\n at new AQt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3879b481:58944:47)\n at new mHt (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3879b481:95405:26)\n at LHt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3879b481:96130:134)", "diff": null }, "uuid": "179f2c13-da68-453b-a1a1-621840774852", "parentUUID": "38c68db1-ebf8-49cf-a53f-b65958b5ab8c", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "179f2c13-da68-453b-a1a1-621840774852" ], "pending": [], "skipped": [], "duration": 31716, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ab126330-f8a0-48e7-bcb0-e45b3f9bbe29", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "84040714-260d-4227-92db-e8ee2c0e5625", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 144703, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b3b1492d-8186-4266-bc0b-d319981c1f63", "parentUUID": "84040714-260d-4227-92db-e8ee2c0e5625", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b3b1492d-8186-4266-bc0b-d319981c1f63" ], "failures": [], "pending": [], "skipped": [], "duration": 144703, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "20cf5fa6-7e98-4c23-8b83-117f956ddfa3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "46c29fa9-2740-4dc6-b186-48722b8e2c9e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 141613, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "diff": null }, "uuid": "00952de0-14d7-4a97-b886-570bb48d2695", "parentUUID": "46c29fa9-2740-4dc6-b186-48722b8e2c9e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "00952de0-14d7-4a97-b886-570bb48d2695" ], "pending": [], "skipped": [], "duration": 141613, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9fd0d3c8-4090-4ebd-a5e1-7d5222ab8fea", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8e759e73-2b38-49af-bc83-a1025f30950d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 134767, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3c0a9df4-a0b5-4c42-a2fa-0d07a24d2b89", "parentUUID": "8e759e73-2b38-49af-bc83-a1025f30950d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3c0a9df4-a0b5-4c42-a2fa-0d07a24d2b89" ], "failures": [], "pending": [], "skipped": [], "duration": 134767, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2d137af1-1a6a-4a3c-88d8-b7cec370b014", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "37f6b015-1e35-4132-b180-487725f91c82", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 143487, "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 propsData: {\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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ae7eb6ca-9395-429d-a3b1-4546abfb76f0", "parentUUID": "37f6b015-1e35-4132-b180-487725f91c82", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ae7eb6ca-9395-429d-a3b1-4546abfb76f0" ], "failures": [], "pending": [], "skipped": [], "duration": 143487, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4124d1fd-7aad-4def-8e1c-dec557901a4a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3316437a-9ce3-4abe-b7e7-ce2605aaa364", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 154695, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "diff": null }, "uuid": "08b112f1-f6b8-4b35-aac5-868acbc145e3", "parentUUID": "3316437a-9ce3-4abe-b7e7-ce2605aaa364", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "08b112f1-f6b8-4b35-aac5-868acbc145e3" ], "pending": [], "skipped": [], "duration": 154695, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "87051bf4-ced7-4553-92ca-3595c181beb5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0d84df1c-bc46-495d-922c-a074300d0128", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 126443, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1235a31d-edf7-4c2d-b260-34cd316ca99a", "parentUUID": "0d84df1c-bc46-495d-922c-a074300d0128", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1235a31d-edf7-4c2d-b260-34cd316ca99a" ], "failures": [], "pending": [], "skipped": [], "duration": 126443, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9a4750ec-85d5-4f5a-bcfb-2819f9cf9ef1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "013fdbaf-4d69-4d01-8537-761da1c92ea0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 136898, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "9c3be012-54dc-4ae8-8492-af78e65f10d3", "parentUUID": "013fdbaf-4d69-4d01-8537-761da1c92ea0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9c3be012-54dc-4ae8-8492-af78e65f10d3" ], "failures": [], "pending": [], "skipped": [], "duration": 136898, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "308e0360-abf4-4463-84ad-59984f2529e8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "be6eda77-505a-43ed-bba2-e9c704273403", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 140825, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "bdcf5158-4e5a-489f-8062-7d92aa1eacfd", "parentUUID": "be6eda77-505a-43ed-bba2-e9c704273403", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "bdcf5158-4e5a-489f-8062-7d92aa1eacfd" ], "failures": [], "pending": [], "skipped": [], "duration": 140825, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a706adc4-6abb-4853-beb6-289d85f62562", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "04b1b597-183e-4490-9f61-d14e63e41f98", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 138504, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "fc43e614-96cc-433c-bd04-26d4f6056d1e", "parentUUID": "04b1b597-183e-4490-9f61-d14e63e41f98", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fc43e614-96cc-433c-bd04-26d4f6056d1e" ], "failures": [], "pending": [], "skipped": [], "duration": 138504, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d95e3bc5-c4cb-4b8c-8adb-cf7b7f4b1ba1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ad5c9af0-b3a4-4f07-b585-3238c411a7de", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 137783, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "e4e22d5e-4d13-4eb7-815b-5b9345728f47", "parentUUID": "ad5c9af0-b3a4-4f07-b585-3238c411a7de", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e4e22d5e-4d13-4eb7-815b-5b9345728f47" ], "failures": [], "pending": [], "skipped": [], "duration": 137783, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c6f733eb-0177-44c2-bf0b-a6fd9fbdf46a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cb54ebad-8799-432e-8383-dba8f4913db6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 140272, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n //Wait for the curie response before continuing\n // cy.wait('@categoryResponse');\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('@curieResponse', {timeout: 20000});\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1b280451-2c3f-4fc4-b527-e49588b4022d", "parentUUID": "cb54ebad-8799-432e-8383-dba8f4913db6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1b280451-2c3f-4fc4-b527-e49588b4022d" ], "failures": [], "pending": [], "skipped": [], "duration": 140272, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f537dd39-00a8-46cd-abcc-a8615bc728e4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "An uncaught error was detected outside of a test", "fullTitle": "An uncaught error was detected outside of a test", "timedOut": null, "duration": 854, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "throw err;", "err": { "message": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "estack": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "diff": null }, "uuid": "32da3683-ce9d-4442-aa81-f6ac158640ef", "parentUUID": "f537dd39-00a8-46cd-abcc-a8615bc728e4", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "32da3683-ce9d-4442-aa81-f6ac158640ef" ], "pending": [], "skipped": [], "duration": 854, "root": true, "rootEmpty": false, "_timeout": 2000 }, { "uuid": "72a3a370-d624-4daa-8dce-176c2d5d3d74", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3a27c8c8-f657-49c4-96fe-c038b72986c0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 140216, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "f674fbcb-77e3-474f-8540-27cd0764e06d", "parentUUID": "3a27c8c8-f657-49c4-96fe-c038b72986c0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f674fbcb-77e3-474f-8540-27cd0764e06d" ], "failures": [], "pending": [], "skipped": [], "duration": 140216, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f2199ba5-2736-40bb-bd99-b5f073bc33ef", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ec60f086-617e-4436-a04d-ae577e865920", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 148597, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "2df275cf-c2c8-402b-bf3e-b5af6cdcf0b5", "parentUUID": "ec60f086-617e-4436-a04d-ae577e865920", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2df275cf-c2c8-402b-bf3e-b5af6cdcf0b5" ], "failures": [], "pending": [], "skipped": [], "duration": 148597, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "16b95449-6376-4a7b-8109-a93c7480ee83", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4780dbf6-361b-47d4-a657-eb48ef8bcbc9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 146555, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ce744f88-8de3-4111-9c3c-b5aa3b9b8935", "parentUUID": "4780dbf6-361b-47d4-a657-eb48ef8bcbc9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ce744f88-8de3-4111-9c3c-b5aa3b9b8935" ], "failures": [], "pending": [], "skipped": [], "duration": 146555, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4f359d94-899d-46cc-95c8-c7a4379c082e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7ec2c0e2-dba3-49c8-830f-350ccd237ce6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 141728, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "72230d10-9017-4551-b671-050bed2f06eb", "parentUUID": "7ec2c0e2-dba3-49c8-830f-350ccd237ce6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "72230d10-9017-4551-b671-050bed2f06eb" ], "failures": [], "pending": [], "skipped": [], "duration": 141728, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "357d2f30-c163-450d-a7a5-29769cc5f679", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "338595c2-0a7b-4243-b9b9-21d8dd1e6bae", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 132082, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "98c040da-c438-48dc-b862-d16029f19d4a", "parentUUID": "338595c2-0a7b-4243-b9b9-21d8dd1e6bae", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "98c040da-c438-48dc-b862-d16029f19d4a" ], "failures": [], "pending": [], "skipped": [], "duration": 132082, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ed9d2e7e-282b-4c91-93ec-3489b8b7a757", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2446ac42-5424-46ed-af1c-7fa23bbeadfb", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 130801, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "095f5880-8e86-47a5-8212-ec18ac590222", "parentUUID": "2446ac42-5424-46ed-af1c-7fa23bbeadfb", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "095f5880-8e86-47a5-8212-ec18ac590222" ], "failures": [], "pending": [], "skipped": [], "duration": 130801, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a9a710f5-397e-4e55-9fd7-fc5cb79e2047", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d3f8b131-ffbc-410a-8dad-cb1d8cda8a6c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 138319, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0e551db5-cc71-41f5-b018-ba3c2ffcbbd6", "parentUUID": "d3f8b131-ffbc-410a-8dad-cb1d8cda8a6c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0e551db5-cc71-41f5-b018-ba3c2ffcbbd6" ], "failures": [], "pending": [], "skipped": [], "duration": 138319, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "cda6c865-d7aa-45ec-b797-20196adc12c9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1505bb3a-addf-4ef4-bcc1-861cf4b48025", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 2251, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of null (reading 'title')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of null (reading 'title')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.updateCopyContent (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=ed6bcc48:32792:22)\n at Proxy.mounted (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=ed6bcc48:32713:10)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:4568:88)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:1908:17)\n at hook.__weh.hook.__weh (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:4548:19)\n at flushPostFlushCbs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:2075:41)\n at flushJobs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:2113:5)\n at flushJobs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=41731097:2117:7)", "diff": null }, "uuid": "d1042970-e1a4-4c1b-892f-aa9445ad8afc", "parentUUID": "1505bb3a-addf-4ef4-bcc1-861cf4b48025", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "d1042970-e1a4-4c1b-892f-aa9445ad8afc" ], "pending": [], "skipped": [], "duration": 2251, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ef95cdc6-e09f-42c0-8078-6c489c63c50f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5446e5b4-cd3f-4cd7-8974-4020652de5fd", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 2246, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of null (reading 'title')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of null (reading 'title')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.updateCopyContent (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=ee07e226:32792:22)\n at Proxy.mounted (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=ee07e226:32713:10)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:4568:88)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:1908:17)\n at hook.__weh.hook.__weh (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:4548:19)\n at flushPostFlushCbs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:2075:41)\n at flushJobs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:2113:5)\n at flushJobs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:2117:7)", "diff": null }, "uuid": "6d441dde-680e-4431-88dd-124463d92421", "parentUUID": "5446e5b4-cd3f-4cd7-8974-4020652de5fd", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "6d441dde-680e-4431-88dd-124463d92421" ], "pending": [], "skipped": [], "duration": 2246, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ef639334-3bc3-42b4-bd48-7273efcd5218", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "31e1ce4e-8044-4f8f-a706-2b0a72786956", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 2181, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of null (reading 'title')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of null (reading 'title')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.updateCopyContent (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=ee07e226:32792:22)\n at Proxy.mounted (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=ee07e226:32713:10)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:4568:88)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:1900:18)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:1908:17)\n at hook.__weh.hook.__weh (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:4548:19)\n at flushPostFlushCbs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:2075:41)\n at flushJobs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:2113:5)\n at flushJobs (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-FJP5KDZO.js?v=ee07e226:2117:7)", "diff": null }, "uuid": "cf936034-e2f5-4176-a4e5-c93fedfba233", "parentUUID": "31e1ce4e-8044-4f8f-a706-2b0a72786956", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "cf936034-e2f5-4176-a4e5-c93fedfba233" ], "pending": [], "skipped": [], "duration": 2181, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "01258fa4-b907-460d-91b0-65f9ea9b751a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "984f24e2-586a-4275-b8e8-53d4032f8f4a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 140977, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1c6fc7b6-f089-42c5-ab98-bd7b250148df", "parentUUID": "984f24e2-586a-4275-b8e8-53d4032f8f4a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1c6fc7b6-f089-42c5-ab98-bd7b250148df" ], "failures": [], "pending": [], "skipped": [], "duration": 140977, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b0ce1f2a-1459-4664-b45f-3164b02ada92", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "74b472bb-35ba-475b-83c5-75d0182bfa73", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 140476, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3cec473a-05d6-4477-826b-37057b0742e0", "parentUUID": "74b472bb-35ba-475b-83c5-75d0182bfa73", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3cec473a-05d6-4477-826b-37057b0742e0" ], "failures": [], "pending": [], "skipped": [], "duration": 140476, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "61ef97c3-5a1e-452e-83f3-644f6ff35156", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "459271f4-714f-43dc-aa74-63d902794391", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 133679, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "05c0e59a-d71f-465f-ba58-5edeb1cbf8c3", "parentUUID": "459271f4-714f-43dc-aa74-63d902794391", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "05c0e59a-d71f-465f-ba58-5edeb1cbf8c3" ], "failures": [], "pending": [], "skipped": [], "duration": 133679, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5b341bb9-b0aa-40d9-a498-c19118c01e47", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "91c6762f-fe6b-4c64-b068-3c605c20c532", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 141497, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "56b8d10d-db92-4407-bb58-e35068dbd785", "parentUUID": "91c6762f-fe6b-4c64-b068-3c605c20c532", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "56b8d10d-db92-4407-bb58-e35068dbd785" ], "failures": [], "pending": [], "skipped": [], "duration": 141497, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5433018b-82b6-47d3-b15d-724c0d716029", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9dd6dee5-dacb-4f21-b0b8-36fed34a8a7d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 129693, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3ad48263-db6c-49dc-b8e5-98e790171b35", "parentUUID": "9dd6dee5-dacb-4f21-b0b8-36fed34a8a7d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3ad48263-db6c-49dc-b8e5-98e790171b35" ], "failures": [], "pending": [], "skipped": [], "duration": 129693, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d6834aab-d873-4b01-8ada-c10e3201982f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9ef151a5-7c4a-4033-8548-2fe3754b20f8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 135806, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0cf005e5-a5db-4135-8541-3e8ad7c24d75", "parentUUID": "9ef151a5-7c4a-4033-8548-2fe3754b20f8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0cf005e5-a5db-4135-8541-3e8ad7c24d75" ], "failures": [], "pending": [], "skipped": [], "duration": 135806, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "811671e7-2eff-4df2-b504-78e1e459c5e3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8bc6d955-6b97-46e9-896a-5cb1473ca107", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 77095, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found.", "estack": "AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:69:128)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137986:43)\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)", "diff": null }, "uuid": "4c6f5ccf-6de2-4408-bda5-fd2b963e04aa", "parentUUID": "8bc6d955-6b97-46e9-896a-5cb1473ca107", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "4c6f5ccf-6de2-4408-bda5-fd2b963e04aa" ], "pending": [], "skipped": [], "duration": 77095, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a77df889-70d7-4317-abb2-0699f38d5b87", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3ca4374a-644c-4ea0-b9b1-6d4b951bb511", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8f4f8fc6-01ce-43f1-a7b0-ee8987b3b500", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "8f4f8fc6-01ce-43f1-a7b0-ee8987b3b500" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a6036983-3edc-47b9-8e22-b66299887471", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "51a4c8b7-47e1-49dc-8b68-939249bd3a4b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 145578, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a2ab7dc5-ec10-45fe-bd17-733207a5aeb2", "parentUUID": "51a4c8b7-47e1-49dc-8b68-939249bd3a4b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a2ab7dc5-ec10-45fe-bd17-733207a5aeb2" ], "failures": [], "pending": [], "skipped": [], "duration": 145578, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6cb929b7-9049-4f43-b4ad-15c3adc70c7b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d337851d-8b0e-4f50-80f2-6ee6d1c05378", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 137695, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "65fb4f3a-92cc-4eda-8122-695a5ba8f90e", "parentUUID": "d337851d-8b0e-4f50-80f2-6ee6d1c05378", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "65fb4f3a-92cc-4eda-8122-695a5ba8f90e" ], "failures": [], "pending": [], "skipped": [], "duration": 137695, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "86cfe64a-0180-4b88-a5e6-838a4a5ae0d9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "99a8efc1-c4e4-4367-b106-e4f05830db93", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 145663, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "315e12a1-697e-4885-bfda-e8e210676ea9", "parentUUID": "99a8efc1-c4e4-4367-b106-e4f05830db93", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "315e12a1-697e-4885-bfda-e8e210676ea9" ], "failures": [], "pending": [], "skipped": [], "duration": 145663, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c98e0ff4-748a-444e-8e34-84b811309c39", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cd7618ad-ed2e-4ab9-a2ce-4fcfc4123d77", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 134582, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6dbb05ec-f18b-4612-a3ba-6e9e20e494d0", "parentUUID": "cd7618ad-ed2e-4ab9-a2ce-4fcfc4123d77", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6dbb05ec-f18b-4612-a3ba-6e9e20e494d0" ], "failures": [], "pending": [], "skipped": [], "duration": 134582, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2b6a7511-44d6-49ad-82f2-b2cc693870c7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a88432b3-065d-48d4-87eb-e770dcbffbea", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 141103, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a0492bad-e524-4b16-9fa5-72515fa2cccc", "parentUUID": "a88432b3-065d-48d4-87eb-e770dcbffbea", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a0492bad-e524-4b16-9fa5-72515fa2cccc" ], "failures": [], "pending": [], "skipped": [], "duration": 141103, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c9f84295-3056-4b9f-942a-6ec319b0510a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0b40463e-07fd-49f0-abfd-a83ad027d590", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 147789, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "acb79b54-0897-4b4f-8300-9b553fc847d4", "parentUUID": "0b40463e-07fd-49f0-abfd-a83ad027d590", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "acb79b54-0897-4b4f-8300-9b553fc847d4" ], "failures": [], "pending": [], "skipped": [], "duration": 147789, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d299e322-cbb3-4198-b769-8313e5a38c07", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "An uncaught error was detected outside of a test", "fullTitle": "An uncaught error was detected outside of a test", "timedOut": null, "duration": 1181, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "throw err;", "err": { "message": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "estack": "TypeError: The following error originated from your test code, not from Cypress.\n\n > Failed to fetch dynamically imported module: http://localhost:8081/__cypress/src/@fs/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js\n\nWhen Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n\nCypress could not associate this error to any specific test.\n\nWe dynamically generated a new test to display this failure.", "diff": null }, "uuid": "9e3c5b9e-7d53-488a-9e92-6361bab45496", "parentUUID": "d299e322-cbb3-4198-b769-8313e5a38c07", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "9e3c5b9e-7d53-488a-9e92-6361bab45496" ], "pending": [], "skipped": [], "duration": 1181, "root": true, "rootEmpty": false, "_timeout": 2000 }, { "uuid": "434c43d0-6b23-484e-83f5-30c4bc58cd97", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "00b6ffbf-acfa-40d7-9fb4-c23861868e4b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 145765, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a7f1554f-fca1-4d35-a636-f180095917b3", "parentUUID": "00b6ffbf-acfa-40d7-9fb4-c23861868e4b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a7f1554f-fca1-4d35-a636-f180095917b3" ], "failures": [], "pending": [], "skipped": [], "duration": 145765, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3ace23f0-13c2-44bb-bd2c-9d6cd080d36e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "394da1f0-4e2f-4d72-af1c-19a159ae7c7c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 132535, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "51b31aec-b8d0-43aa-9c96-b73fec10e5e2", "parentUUID": "394da1f0-4e2f-4d72-af1c-19a159ae7c7c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "51b31aec-b8d0-43aa-9c96-b73fec10e5e2" ], "failures": [], "pending": [], "skipped": [], "duration": 132535, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "40e18df1-2f5a-494b-b22e-799624b32d6d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bad5bdb6-0cfb-40f1-b2f7-53cfca36dffa", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 160726, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d22377e1-35cf-4e3d-811b-4af68a259b50", "parentUUID": "bad5bdb6-0cfb-40f1-b2f7-53cfca36dffa", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d22377e1-35cf-4e3d-811b-4af68a259b50" ], "failures": [], "pending": [], "skipped": [], "duration": 160726, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3dddd1d2-f1ad-4338-a598-e02443d0de39", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "097ab5c5-9054-401a-8c87-9ac90207c22d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 146338, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3e497df8-68bc-4193-a7f3-312c4c4f34ad", "parentUUID": "097ab5c5-9054-401a-8c87-9ac90207c22d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3e497df8-68bc-4193-a7f3-312c4c4f34ad" ], "failures": [], "pending": [], "skipped": [], "duration": 146338, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "07dd0ef9-1809-4f4b-a75a-b1a61ad85fa3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4c908a43-d269-4ab3-a60e-dc6cff871f5f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 149718, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "2eb98683-ffd8-4d62-b693-e0fdd90ac93f", "parentUUID": "4c908a43-d269-4ab3-a60e-dc6cff871f5f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2eb98683-ffd8-4d62-b693-e0fdd90ac93f" ], "failures": [], "pending": [], "skipped": [], "duration": 149718, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "250647a9-ffe6-46d6-8520-586dc8a3302d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "eea707b0-e6c4-49f8-be84-ea6be745527a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 143715, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "96469417-e5bf-41f3-a0ee-b59af1f3a5d7", "parentUUID": "eea707b0-e6c4-49f8-be84-ea6be745527a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "96469417-e5bf-41f3-a0ee-b59af1f3a5d7" ], "failures": [], "pending": [], "skipped": [], "duration": 143715, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "09d6bf1d-2103-4f0d-bddc-88e5b5b16767", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "58577883-fa54-431f-975a-8edde197932e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 128376, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7cc2d44a-d3ae-4b9d-8d0b-3b16318e1bc3", "parentUUID": "58577883-fa54-431f-975a-8edde197932e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7cc2d44a-d3ae-4b9d-8d0b-3b16318e1bc3" ], "failures": [], "pending": [], "skipped": [], "duration": 128376, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b869bb2b-d966-4498-b501-c867bf1c8d7b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "215d95fc-3195-4a5f-afdc-de82390fd368", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 141921, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "85fa6c6d-85b5-4762-9da9-6cf593838875", "parentUUID": "215d95fc-3195-4a5f-afdc-de82390fd368", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "85fa6c6d-85b5-4762-9da9-6cf593838875" ], "failures": [], "pending": [], "skipped": [], "duration": 141921, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "232eca64-57dd-4335-b934-1c484f84eae3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "930b5ff1-18de-4216-a86a-b89a5824803d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 133223, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).click();\n //Check for two content containers\n cy.get('.contentvuer').should('be.visible').should('have.length', 2);\n //Wait for the mouse dataset request\n cy.wait('@mouseDataset', {timeout: 20000});\n //Open the sidebar\n cy.get('.side-bar > .open-tab').should('exist').click();\n //Type in 76 generic\n cy.get('.search-input > .el-input__wrapper > .el-input__inner').should('exist').type('76 generic');\n //Search\n cy.get('.header > .el-button').should('exist').click();\n //Check number of dataset card, it should be 1\n cy.get('.dataset-card-container').should('have.length', 1);\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').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').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').contains('Plots (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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').contains('Simulations (1)').click();\n cy.get('.box-card :nth-child(1) > .details .el-button').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6d035f36-3b7d-4d51-be7e-94733e7aa1b1", "parentUUID": "930b5ff1-18de-4216-a86a-b89a5824803d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6d035f36-3b7d-4d51-be7e-94733e7aa1b1" ], "failures": [], "pending": [], "skipped": [], "duration": 133223, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d3864469-19ce-423f-9548-6a9c00f7dc01", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "eb08e318-97f1-4923-b22a-7577f27be831", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 167770, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "e92a6423-3508-4cb9-8468-a7c7de4ffe94", "parentUUID": "eb08e318-97f1-4923-b22a-7577f27be831", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e92a6423-3508-4cb9-8468-a7c7de4ffe94" ], "failures": [], "pending": [], "skipped": [], "duration": 167770, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "001e5770-a277-430b-b344-f9f1a93d757b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "15d7b13b-d80c-4b17-82ba-dc4e4c3155f3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 167243, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a382e30e-0609-4335-9bf8-ed423713a686", "parentUUID": "15d7b13b-d80c-4b17-82ba-dc4e4c3155f3", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a382e30e-0609-4335-9bf8-ed423713a686" ], "failures": [], "pending": [], "skipped": [], "duration": 167243, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0ebde6ba-aa20-4179-8334-ec693707b5fb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3e9b865d-c95d-4c05-a87c-44bce01534d6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 172934, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "29530cf3-4be5-4f64-ab07-897bc02c8fb2", "parentUUID": "3e9b865d-c95d-4c05-a87c-44bce01534d6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "29530cf3-4be5-4f64-ab07-897bc02c8fb2" ], "failures": [], "pending": [], "skipped": [], "duration": 172934, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "91c98f7e-9550-4eaa-9563-adf174a7ad14", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d28b60ab-0b51-4a89-88cd-84bfef8fefbb", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 169374, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "730282da-e596-4617-9680-2dec7613aaca", "parentUUID": "d28b60ab-0b51-4a89-88cd-84bfef8fefbb", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "730282da-e596-4617-9680-2dec7613aaca" ], "failures": [], "pending": [], "skipped": [], "duration": 169374, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b367bd53-7bd5-4cd0-85d6-5718777a1bb2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3c3b904c-1bd5-4ece-a1f2-bf4e39430ebf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 174778, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "52f3d234-ff1f-4f87-9e92-b7597178baac", "parentUUID": "3c3b904c-1bd5-4ece-a1f2-bf4e39430ebf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "52f3d234-ff1f-4f87-9e92-b7597178baac" ], "failures": [], "pending": [], "skipped": [], "duration": 174778, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "27801a75-10aa-4f89-b4b3-5a93a865c616", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2565fd80-cf29-4629-a90e-eca9f2715295", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 171848, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ea37e58a-879c-4b60-9eeb-33d42605e696", "parentUUID": "2565fd80-cf29-4629-a90e-eca9f2715295", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ea37e58a-879c-4b60-9eeb-33d42605e696" ], "failures": [], "pending": [], "skipped": [], "duration": 171848, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "739a220f-2d0c-479a-a088-226dbffbbb6d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c4c57923-c291-47d4-bab2-c5b8dfad7658", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 152716, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "94267cb9-bea5-4595-adbf-01d0940cf5e5", "parentUUID": "c4c57923-c291-47d4-bab2-c5b8dfad7658", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "94267cb9-bea5-4595-adbf-01d0940cf5e5" ], "failures": [], "pending": [], "skipped": [], "duration": 152716, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2b40b083-148e-461b-a55c-c80f4229ca3e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "01f2be35-ff4e-48f4-b52c-92760797cb46", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 163389, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "161c02f1-deb4-4fd4-b7a5-c26c32af519d", "parentUUID": "01f2be35-ff4e-48f4-b52c-92760797cb46", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "161c02f1-deb4-4fd4-b7a5-c26c32af519d" ], "failures": [], "pending": [], "skipped": [], "duration": 163389, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1eccf535-0931-4874-8cb4-9a8bd0673f07", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2698a797-2124-4586-b89a-c78b2fe0a508", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 171346, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "31af1ff5-db97-4f62-b1bc-6e386e5d5110", "parentUUID": "2698a797-2124-4586-b89a-c78b2fe0a508", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "31af1ff5-db97-4f62-b1bc-6e386e5d5110" ], "failures": [], "pending": [], "skipped": [], "duration": 171346, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "71f9277b-4efa-42d8-afa8-63cd8b29f5c6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "02865403-b216-4af3-ba54-f07a3ec56cea", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 167601, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a9a3317e-6c67-4fe0-ab0f-e05d391a2dc5", "parentUUID": "02865403-b216-4af3-ba54-f07a3ec56cea", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a9a3317e-6c67-4fe0-ab0f-e05d391a2dc5" ], "failures": [], "pending": [], "skipped": [], "duration": 167601, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9b4d7fa2-ff61-4381-a270-0cb133571d3f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9379f42e-804d-4cc1-971f-a04d398b9224", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 163449, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8f5cb0e9-31bf-4095-a78f-ca0b376761c5", "parentUUID": "9379f42e-804d-4cc1-971f-a04d398b9224", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8f5cb0e9-31bf-4095-a78f-ca0b376761c5" ], "failures": [], "pending": [], "skipped": [], "duration": 163449, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c9617127-f6ab-4bad-ab89-1d6b81d8f169", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a314c884-9373-434d-aeb7-7b0594584153", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 51806, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n cy.compareSnapshot('default-map');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found.", "estack": "AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:103:126)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "f51ae577-b122-41cb-bba6-b35f0bf0d9c8", "parentUUID": "a314c884-9373-434d-aeb7-7b0594584153", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f51ae577-b122-41cb-bba6-b35f0bf0d9c8" ], "pending": [], "skipped": [], "duration": 51806, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "60944963-aab2-413a-b543-cd90c54ac548", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b1b29a8c-d48a-4742-9ea6-792beac70990", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164249, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "66b28d1c-9a5f-4c54-ae5f-6c7859628d20", "parentUUID": "b1b29a8c-d48a-4742-9ea6-792beac70990", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "66b28d1c-9a5f-4c54-ae5f-6c7859628d20" ], "failures": [], "pending": [], "skipped": [], "duration": 164249, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d6db0ce7-b78f-49b3-b85a-bc1b952ebe69", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a7b71656-9283-4cce-b098-9b5d67455def", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 166098, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c71a5857-ff06-4f78-ad8e-84efb440a285", "parentUUID": "a7b71656-9283-4cce-b098-9b5d67455def", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c71a5857-ff06-4f78-ad8e-84efb440a285" ], "failures": [], "pending": [], "skipped": [], "duration": 166098, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a3226e28-7f6f-45df-8df0-8fa553ab956c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "80afe98d-75e0-4661-805e-04c0633dd2b1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164956, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4792b9cb-cd74-4628-a445-ba7cc0d85012", "parentUUID": "80afe98d-75e0-4661-805e-04c0633dd2b1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4792b9cb-cd74-4628-a445-ba7cc0d85012" ], "failures": [], "pending": [], "skipped": [], "duration": 164956, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1c27c411-f11f-40ca-9a3c-6c9d5ce26de1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "678b3caf-0b25-49c5-89a2-c7f8e4b380cc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 174362, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "77beb1f3-b92f-4108-9ae3-2bca3ce136f9", "parentUUID": "678b3caf-0b25-49c5-89a2-c7f8e4b380cc", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "77beb1f3-b92f-4108-9ae3-2bca3ce136f9" ], "failures": [], "pending": [], "skipped": [], "duration": 174362, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0a1d2861-0ba7-489e-9358-4e8f3c80d0e9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "659a4b8f-2f96-4e48-8e03-2bc9e0eeece4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 151862, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "77f797c3-241c-4c62-9376-2279a02f14bf", "parentUUID": "659a4b8f-2f96-4e48-8e03-2bc9e0eeece4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "77f797c3-241c-4c62-9376-2279a02f14bf" ], "failures": [], "pending": [], "skipped": [], "duration": 151862, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3a635a3e-b199-42f4-8e2d-b1566d824949", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8e292cc5-053b-4419-a412-3418b7bb39a6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 161901, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0f5051b1-d03f-4e5e-b96c-463e3a3e38b0", "parentUUID": "8e292cc5-053b-4419-a412-3418b7bb39a6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0f5051b1-d03f-4e5e-b96c-463e3a3e38b0" ], "failures": [], "pending": [], "skipped": [], "duration": 161901, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "aa9cbba7-7594-436f-a308-d220a8a84a3f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4246f2b5-0290-4fa6-a252-e31b29d5c2b8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 163246, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "59ce3845-f165-42f6-a3b0-8dfae76a64c0", "parentUUID": "4246f2b5-0290-4fa6-a252-e31b29d5c2b8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "59ce3845-f165-42f6-a3b0-8dfae76a64c0" ], "failures": [], "pending": [], "skipped": [], "duration": 163246, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "85468ec6-d943-4b29-a069-169f23a30023", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4e0e5521-595b-46cd-b426-84c08004830f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 162993, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "feec2e6b-4267-49a1-b360-467d79cfd4ce", "parentUUID": "4e0e5521-595b-46cd-b426-84c08004830f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "feec2e6b-4267-49a1-b360-467d79cfd4ce" ], "failures": [], "pending": [], "skipped": [], "duration": 162993, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "85470e4d-322d-4eb3-a593-12997d04bbeb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "26217a0a-bb88-4532-87d1-a923c851990d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 172036, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "82bb557d-8c34-4c53-9703-f9f7f9b97f2c", "parentUUID": "26217a0a-bb88-4532-87d1-a923c851990d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "82bb557d-8c34-4c53-9703-f9f7f9b97f2c" ], "failures": [], "pending": [], "skipped": [], "duration": 172036, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "30ff6d05-0ee5-4d4d-9a14-bf1eb118f39e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0aed97c6-29dc-4a9f-a915-a7d8c81a783e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 163840, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ebb77be6-6a11-4b82-947b-de5a432f4f6b", "parentUUID": "0aed97c6-29dc-4a9f-a915-a7d8c81a783e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ebb77be6-6a11-4b82-947b-de5a432f4f6b" ], "failures": [], "pending": [], "skipped": [], "duration": 163840, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "963a81d1-c106-401c-ac67-961f385550c9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c1335658-5ee3-4e0a-af94-08da16183c3d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41511, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\n //the following attempt to workaround it.\n cy.get('html').invoke('css', 'width', '1200px');\n cy.get('body').invoke('css', 'width', '1200px');\n cy.wait(1000);\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('minimap');\n cy.get('html').invoke('css', 'width', 'initial');\n cy.get('body').invoke('css', 'width', 'initial');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: Base screenshot not found at cypress/snapshots/base/cypress/component/MapContent.cy.js/minimap.png", "estack": "Error: Base screenshot not found at cypress/snapshots/base/cypress/component/MapContent.cy.js/minimap.png\n at Context. (http://localhost:8081/__cypress/src/node_modules/.vite/deps/cypress-visual-regression_dist_command.js?v=e7f0acb2:190:40)\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)", "diff": null }, "uuid": "32941912-c223-4880-a8d7-e150e9437ce9", "parentUUID": "c1335658-5ee3-4e0a-af94-08da16183c3d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "32941912-c223-4880-a8d7-e150e9437ce9" ], "pending": [], "skipped": [], "duration": 41511, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "be7184c4-ba28-402f-a092-03b0426bd0f2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c99c037c-e56f-4f62-b2e1-91a26c3d74c4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 178901, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\n //the following attempt to workaround it.\n cy.get('html').invoke('css', 'width', '1200px');\n cy.get('body').invoke('css', 'width', '1200px');\n cy.wait(1000);\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('minimap').then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n cy.get('body').invoke('css', 'width', 'initial');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "255e26b3-6076-4e17-9ff3-2462859b1ede", "parentUUID": "c99c037c-e56f-4f62-b2e1-91a26c3d74c4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "255e26b3-6076-4e17-9ff3-2462859b1ede" ], "failures": [], "pending": [], "skipped": [], "duration": 178901, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fbb73c1e-ef7b-4eea-aa0e-c5027ba2fdb3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2bc83010-c165-424e-b552-f990078cc385", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 182085, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\n //the following attempt to workaround it.\n cy.get('html').invoke('css', 'width', '1200px');\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').invoke('css', 'width', '300px');\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').invoke('css', 'height', '190px');\n cy.wait(1000);\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('minimap').then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "581af770-e0d7-4057-9639-536695a84e5d", "parentUUID": "2bc83010-c165-424e-b552-f990078cc385", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "581af770-e0d7-4057-9639-536695a84e5d" ], "failures": [], "pending": [], "skipped": [], "duration": 182085, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0e43ffff-e915-4df5-9f8a-2c376d410250", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "22691830-da15-46a3-a673-8c3a492b0921", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 172000, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\n //the following attempt to workaround it.\n cy.get('html').invoke('css', 'width', '1200px');\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').invoke('css', 'width', '300px');\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').invoke('css', 'height', '190px');\n cy.wait(1000);\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('minimap').then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b0b130df-fb3e-4d3b-aa55-0296e173cefc", "parentUUID": "22691830-da15-46a3-a673-8c3a492b0921", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b0b130df-fb3e-4d3b-aa55-0296e173cefc" ], "failures": [], "pending": [], "skipped": [], "duration": 172000, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7ddf517c-a582-492c-95f1-04ef2f74d27c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "46d259ff-3369-4a0f-911c-48b77681fab8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 178043, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\n //the following attempt to workaround it.\n if (Cypress.platform !== 'darwin') {\n cy.get('html').invoke('css', 'width', '1200px');\n cy.wait(1000);\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('minimap').then(comparisonResults => {\n expect(comparisonResults.percentage).to.be.below(0.1)\n });\n cy.get('html').invoke('css', 'width', 'initial');\n }\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "469277b1-a257-4f6e-8c6b-a94904e46fbe", "parentUUID": "46d259ff-3369-4a0f-911c-48b77681fab8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "469277b1-a257-4f6e-8c6b-a94904e46fbe" ], "failures": [], "pending": [], "skipped": [], "duration": 178043, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c44af553-8063-419e-88ff-4960b03ff428", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9b762647-e354-49a4-9b73-90e9ef964097", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 166773, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7f189f11-385d-4cfa-b808-dd3958d080e1", "parentUUID": "9b762647-e354-49a4-9b73-90e9ef964097", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7f189f11-385d-4cfa-b808-dd3958d080e1" ], "failures": [], "pending": [], "skipped": [], "duration": 166773, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6ca6f49e-7d19-4c0f-b5f7-20aadcc58bfa", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "16206d68-b545-4dc2-a139-6010375dee57", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164688, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "fb49f3d7-6dae-4213-be63-8054059373be", "parentUUID": "16206d68-b545-4dc2-a139-6010375dee57", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "fb49f3d7-6dae-4213-be63-8054059373be" ], "failures": [], "pending": [], "skipped": [], "duration": 164688, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8a45206b-fc37-4d93-bf08-63148f5a85ee", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4bea01a7-00df-4956-a6db-b8f423ebc819", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 176598, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "f9b3eefb-e449-4b91-a4df-ddb19939e6f7", "parentUUID": "4bea01a7-00df-4956-a6db-b8f423ebc819", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f9b3eefb-e449-4b91-a4df-ddb19939e6f7" ], "failures": [], "pending": [], "skipped": [], "duration": 176598, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5941a45c-ddba-4ace-a751-c032d5468348", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1790eb78-9481-48e5-b314-330248b4e69e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 158232, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at vQt.queryKnowledge (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=90421c5d:33856:15)\n at async DGt.queryLabels (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=90421c5d:103851:19)\n at async DGt.$M (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=90421c5d:103937:15)\n at async DGt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=90421c5d:102869:5)", "diff": null }, "uuid": "66754d62-bfba-421a-976f-6867f1cf27f0", "parentUUID": "1790eb78-9481-48e5-b314-330248b4e69e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "66754d62-bfba-421a-976f-6867f1cf27f0" ], "pending": [], "skipped": [], "duration": 158232, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a0215247-23e7-457f-ad74-d8d1dbc80685", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4dad16a7-d48e-4b88-98aa-1e0d772965e3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 167128, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at vQt.queryKnowledge (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=48816154:33856:15)\n at async DGt.queryLabels (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=48816154:103851:19)\n at async DGt.$M (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=48816154:103937:15)\n at async DGt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=48816154:102869:5)", "diff": null }, "uuid": "51170731-ae08-42b1-8a12-c8ffe74e5e41", "parentUUID": "4dad16a7-d48e-4b88-98aa-1e0d772965e3", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "51170731-ae08-42b1-8a12-c8ffe74e5e41" ], "pending": [], "skipped": [], "duration": 167128, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0fb802f7-f322-4109-81e2-7955a1b11705", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "53d64c54-4dc6-4f1e-a296-9c20c4c8d470", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164796, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "2f4237c6-98e7-411b-8317-e00a64f1b95a", "parentUUID": "53d64c54-4dc6-4f1e-a296-9c20c4c8d470", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2f4237c6-98e7-411b-8317-e00a64f1b95a" ], "failures": [], "pending": [], "skipped": [], "duration": 164796, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a22e4f60-47d8-4930-b97c-aec153874d02", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f6be5640-9cf5-432e-8d4f-aa9d9a494708", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 178249, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4f7f385a-f950-42c0-8f9e-42f7478f3ef6", "parentUUID": "f6be5640-9cf5-432e-8d4f-aa9d9a494708", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4f7f385a-f950-42c0-8f9e-42f7478f3ef6" ], "failures": [], "pending": [], "skipped": [], "duration": 178249, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "97705e18-2691-499d-80f6-305e4bc87794", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b7bb45d4-0aed-4270-be1c-bddab1b42f82", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 171083, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b1307e9d-a66c-42ca-8083-e9532d12e4b8", "parentUUID": "b7bb45d4-0aed-4270-be1c-bddab1b42f82", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b1307e9d-a66c-42ca-8083-e9532d12e4b8" ], "failures": [], "pending": [], "skipped": [], "duration": 171083, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5a5d6ba0-3c24-47bf-ac87-cba3cba064c8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0477b816-c699-4575-b264-7703ede0c6ac", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 171020, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at mQt.queryKnowledge (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=d2599837:33853:15)\n at async PGt.queryLabels (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=d2599837:103776:19)\n at async PGt.zM (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=d2599837:103862:15)\n at async PGt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=d2599837:102812:5)", "diff": null }, "uuid": "e129a714-760a-4cb1-8e9f-e7c5d6f7f388", "parentUUID": "0477b816-c699-4575-b264-7703ede0c6ac", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "e129a714-760a-4cb1-8e9f-e7c5d6f7f388" ], "pending": [], "skipped": [], "duration": 171020, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "720920fa-2c9e-4c70-84cb-b5dd5f5c032c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f846cd26-0ba4-4229-b4ad-c212beb716fe", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 165417, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at mQt.queryKnowledge (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:33853:15)\n at async PGt.queryLabels (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:103776:19)\n at async PGt.zM (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:103862:15)\n at async PGt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:102812:5)", "diff": null }, "uuid": "aa718eae-7ec3-414b-96b8-30832106c09c", "parentUUID": "f846cd26-0ba4-4229-b4ad-c212beb716fe", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "aa718eae-7ec3-414b-96b8-30832106c09c" ], "pending": [], "skipped": [], "duration": 165417, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "de2df61a-989f-46e3-9247-d32bda7ec216", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bfe1e748-f4d7-4e68-9037-ba5204db8cb8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 158077, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot access https://mapcore-demo.org/current/flatmap/v3/knowledge/query/\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at mQt.queryKnowledge (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:33853:15)\n at async PGt.queryLabels (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:103776:19)\n at async PGt.zM (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:103862:15)\n at async PGt.setupUserInteractions_ (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=8adfb67b:102812:5)", "diff": null }, "uuid": "b35dcd05-cb24-4aa5-9997-52430d345bc5", "parentUUID": "bfe1e748-f4d7-4e68-9037-ba5204db8cb8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b35dcd05-cb24-4aa5-9997-52430d345bc5" ], "pending": [], "skipped": [], "duration": 158077, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fae9878c-9e60-4777-8627-560b7f8605f5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b3b3d852-fe7a-43df-97be-989d08a23550", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 163487, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "da3e2c02-3341-4bc2-b5ea-ac4083b4cab8", "parentUUID": "b3b3d852-fe7a-43df-97be-989d08a23550", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "da3e2c02-3341-4bc2-b5ea-ac4083b4cab8" ], "failures": [], "pending": [], "skipped": [], "duration": 163487, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "521c2253-4c04-4cf9-ab88-d71d4b40c780", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dc6a50a1-093d-4e4a-a661-a67f27e97f79", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 171069, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4b661c32-92b8-41fb-9361-d8bbb31b410b", "parentUUID": "dc6a50a1-093d-4e4a-a661-a67f27e97f79", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4b661c32-92b8-41fb-9361-d8bbb31b410b" ], "failures": [], "pending": [], "skipped": [], "duration": 171069, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8e33ab7b-8bf7-43c3-9bcc-c1ea50c5f15f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "788fd16f-a542-4a8d-9826-8e8396278a9a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 166111, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0780c0fe-f2d7-4717-a647-bc4066631b96", "parentUUID": "788fd16f-a542-4a8d-9826-8e8396278a9a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0780c0fe-f2d7-4717-a647-bc4066631b96" ], "failures": [], "pending": [], "skipped": [], "duration": 166111, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b441a64b-7751-4357-a121-c27a280b1b88", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "67ce9965-f11b-4a4f-8095-d675bd6ebca6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 175677, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "29b17d41-e824-4b7b-8fb1-f7b98af667da", "parentUUID": "67ce9965-f11b-4a4f-8095-d675bd6ebca6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "29b17d41-e824-4b7b-8fb1-f7b98af667da" ], "failures": [], "pending": [], "skipped": [], "duration": 175677, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a71aca09-e755-4846-ae97-fe9c8e9a4dea", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "94af8bef-7f9a-4e01-9aac-937fd2c936ce", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 175742, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c263dcc7-f52d-4ae8-9799-11e64cfb350f", "parentUUID": "94af8bef-7f9a-4e01-9aac-937fd2c936ce", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c263dcc7-f52d-4ae8-9799-11e64cfb350f" ], "failures": [], "pending": [], "skipped": [], "duration": 175742, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ddcb984f-cca6-4a7f-8ce1-e8c550817626", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d6551e49-4338-4d0f-bcf3-786765778d8e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 161964, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "bc92d276-eb74-45a5-98cd-762ed2422228", "parentUUID": "d6551e49-4338-4d0f-bcf3-786765778d8e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "bc92d276-eb74-45a5-98cd-762ed2422228" ], "failures": [], "pending": [], "skipped": [], "duration": 161964, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4cb6cd3c-892a-48d2-8982-da48582cb9c6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "99e5ae9c-a3ad-4358-9f6b-79f70e5b8164", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 132181, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find content: 'pelvic splanchnic nerve' within the element: but never did.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find content: 'pelvic splanchnic nerve' within the element: but never did.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:146:56)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "b91f11dd-f9c1-4840-a25f-6f74599c4ae4", "parentUUID": "99e5ae9c-a3ad-4358-9f6b-79f70e5b8164", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b91f11dd-f9c1-4840-a25f-6f74599c4ae4" ], "pending": [], "skipped": [], "duration": 132181, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8c1486c4-501a-4930-bc9f-1e5638508d5c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "33cc09b2-b37c-451e-a90d-91291be5aba7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164068, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "546dc701-08d8-48f9-bc93-220f35f7a169", "parentUUID": "33cc09b2-b37c-451e-a90d-91291be5aba7", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "546dc701-08d8-48f9-bc93-220f35f7a169" ], "failures": [], "pending": [], "skipped": [], "duration": 164068, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "45a8c46f-c244-4efa-8c29-b92cdd00df5b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a7726243-9b23-4e44-87f5-d604c68ee7b0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 162710, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0538ccac-44ed-4419-97da-19f39ae543f6", "parentUUID": "a7726243-9b23-4e44-87f5-d604c68ee7b0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0538ccac-44ed-4419-97da-19f39ae543f6" ], "failures": [], "pending": [], "skipped": [], "duration": 162710, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "19175006-65c1-438b-afe4-e9999661304b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "10d975d8-1609-461e-9523-3bca8c9bc7c9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 164934, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "2e673d65-b08c-41c3-8a80-4aa9fea5ef83", "parentUUID": "10d975d8-1609-461e-9523-3bca8c9bc7c9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2e673d65-b08c-41c3-8a80-4aa9fea5ef83" ], "failures": [], "pending": [], "skipped": [], "duration": 164934, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "53520c3d-fba9-4cb3-b01e-7cc14cb1abd8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "013cc5be-afcd-407d-bf90-13f6bc928690", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 167860, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8f94dca4-0ab6-4827-b6c0-c5ac452b5827", "parentUUID": "013cc5be-afcd-407d-bf90-13f6bc928690", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8f94dca4-0ab6-4827-b6c0-c5ac452b5827" ], "failures": [], "pending": [], "skipped": [], "duration": 167860, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2e07e7bb-4950-4076-a3d4-df71ffd73d84", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e02b513d-7244-4332-8cda-bd867b614bd7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 166791, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "f5f7d7fe-2c90-4374-91c8-025339064482", "parentUUID": "e02b513d-7244-4332-8cda-bd867b614bd7", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f5f7d7fe-2c90-4374-91c8-025339064482" ], "failures": [], "pending": [], "skipped": [], "duration": 166791, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a6fe57c0-7f8a-4182-a54d-ecea1aba4600", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d0c20ad0-8ebe-435d-af46-cc2f78a558a5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 167654, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c716d50e-a199-4b28-a465-0b37a53a8f9b", "parentUUID": "d0c20ad0-8ebe-435d-af46-cc2f78a558a5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c716d50e-a199-4b28-a465-0b37a53a8f9b" ], "failures": [], "pending": [], "skipped": [], "duration": 167654, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a775be4f-326a-4dc3-9416-90ea49e8a1ca", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4c64c01e-a887-446f-8c1d-c05e0c3cc188", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 160967, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d26ae748-b775-42c8-8d36-1e94bf5a05bf", "parentUUID": "4c64c01e-a887-446f-8c1d-c05e0c3cc188", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d26ae748-b775-42c8-8d36-1e94bf5a05bf" ], "failures": [], "pending": [], "skipped": [], "duration": 160967, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2761d01c-47de-4f6e-8e4a-cac7b2507722", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "503a13d3-5e7c-4269-b8d5-eb5ca30760cc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 159577, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7942235e-649e-4b9b-968a-12678db87bc1", "parentUUID": "503a13d3-5e7c-4269-b8d5-eb5ca30760cc", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7942235e-649e-4b9b-968a-12678db87bc1" ], "failures": [], "pending": [], "skipped": [], "duration": 159577, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "684381ca-3c66-4708-a618-efa046295ee7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "430de494-5f72-441f-9208-c3e777105a2e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 166852, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7f0c5113-8784-4bcf-b71a-562e275be737", "parentUUID": "430de494-5f72-441f-9208-c3e777105a2e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7f0c5113-8784-4bcf-b71a-562e275be737" ], "failures": [], "pending": [], "skipped": [], "duration": 166852, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4c66afe1-0832-4116-8973-8c797672c159", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "96177077-01a9-4af2-bedf-2e43a4c858c0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 188211, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ee868efc-2b1f-45b1-beb8-fc82ab057b68", "parentUUID": "96177077-01a9-4af2-bedf-2e43a4c858c0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ee868efc-2b1f-45b1-beb8-fc82ab057b68" ], "failures": [], "pending": [], "skipped": [], "duration": 188211, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "395f44cf-f195-4937-a191-76c268083a03", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1f3558d1-a13e-4bf7-8148-c09747847ef5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 196206, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "837e843a-d1a9-4067-8ba4-ba62517ddbdc", "parentUUID": "1f3558d1-a13e-4bf7-8148-c09747847ef5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "837e843a-d1a9-4067-8ba4-ba62517ddbdc" ], "failures": [], "pending": [], "skipped": [], "duration": 196206, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f4460c0f-e157-476f-9d66-762f21a2dd54", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cf90f850-680d-4731-a3aa-20fe944c3b86", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 184793, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "69d5c28a-1240-4fe6-997d-667114af6407", "parentUUID": "cf90f850-680d-4731-a3aa-20fe944c3b86", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "69d5c28a-1240-4fe6-997d-667114af6407" ], "failures": [], "pending": [], "skipped": [], "duration": 184793, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f99f094c-399c-47cc-82c6-01f86580db39", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "40aaba93-354e-470f-b942-358160b2e0cf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 192685, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "5019336a-b7d6-48ef-9704-02889c8d3cde", "parentUUID": "40aaba93-354e-470f-b942-358160b2e0cf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5019336a-b7d6-48ef-9704-02889c8d3cde" ], "failures": [], "pending": [], "skipped": [], "duration": 192685, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8ecd641b-8344-404f-9094-96ea90cfa743", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cebd4ac6-96c8-4ffa-ac93-ef078ea797e1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 214672, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "a1d69f03-df9d-44f9-a004-ed8965ecd172", "parentUUID": "cebd4ac6-96c8-4ffa-ac93-ef078ea797e1", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a1d69f03-df9d-44f9-a004-ed8965ecd172" ], "pending": [], "skipped": [], "duration": 214672, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d9151ba7-f809-4479-a638-cfa72364c6d1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c3829747-a3bf-4620-a87e-9ae05a53d4bf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 195134, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c22a00b9-6540-4a93-8f9e-f5d6d0a5f1f1", "parentUUID": "c3829747-a3bf-4620-a87e-9ae05a53d4bf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c22a00b9-6540-4a93-8f9e-f5d6d0a5f1f1" ], "failures": [], "pending": [], "skipped": [], "duration": 195134, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0e632c3e-e273-4623-adaf-f5f584050559", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c1cd7bbf-2628-4f1b-9c88-a0fe30cadbc5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 205805, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0d55ff0d-f081-4fa9-b47a-f709db212c0d", "parentUUID": "c1cd7bbf-2628-4f1b-9c88-a0fe30cadbc5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0d55ff0d-f081-4fa9-b47a-f709db212c0d" ], "failures": [], "pending": [], "skipped": [], "duration": 205805, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "11b91c44-bc6a-4c76-93a3-9475310f38e7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0573fdab-4de5-4b7f-ba77-0386534814aa", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 186877, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "176e3233-b76b-4b3f-9280-55c2a8981de0", "parentUUID": "0573fdab-4de5-4b7f-ba77-0386534814aa", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "176e3233-b76b-4b3f-9280-55c2a8981de0" ], "failures": [], "pending": [], "skipped": [], "duration": 186877, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "13662c1f-201f-49fb-a181-622e857d65c7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dee5fecf-ce18-4ae7-b955-c11a0bc31917", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200012, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "102a8825-2b44-4d19-a4f2-8bafda6bf221", "parentUUID": "dee5fecf-ce18-4ae7-b955-c11a0bc31917", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "102a8825-2b44-4d19-a4f2-8bafda6bf221" ], "failures": [], "pending": [], "skipped": [], "duration": 200012, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a92ae3f5-295d-4fed-abac-6c0ce3e4dcf2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9b57eb0a-54ad-4cec-9d7d-361cc700bc50", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199110, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "163a61b2-43f5-4d43-a36d-817d796041cc", "parentUUID": "9b57eb0a-54ad-4cec-9d7d-361cc700bc50", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "163a61b2-43f5-4d43-a36d-817d796041cc" ], "failures": [], "pending": [], "skipped": [], "duration": 199110, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3b7c9cf9-a00b-44c3-8aa1-ce13a907bbbb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b0385130-dd0e-4d4f-b0f1-6f4b2294f6a4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200548, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "08a139c2-9d83-4ae2-9803-769da1da58ed", "parentUUID": "b0385130-dd0e-4d4f-b0f1-6f4b2294f6a4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "08a139c2-9d83-4ae2-9803-769da1da58ed" ], "failures": [], "pending": [], "skipped": [], "duration": 200548, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "57214eee-943a-4369-a589-408a487c66f5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "532bd208-a56b-40ab-8588-b0144a193b2f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 197394, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "336254fe-a2fd-498b-8a5e-c0e70adb4e59", "parentUUID": "532bd208-a56b-40ab-8588-b0144a193b2f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "336254fe-a2fd-498b-8a5e-c0e70adb4e59" ], "failures": [], "pending": [], "skipped": [], "duration": 197394, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a03fa3a4-c5d3-48e3-b3fc-5646328db62e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7ba948a4-0aca-4bc5-98c0-48d8c577335b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198163, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ef98eec5-3e41-4c00-9478-cd7f998fc31c", "parentUUID": "7ba948a4-0aca-4bc5-98c0-48d8c577335b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ef98eec5-3e41-4c00-9478-cd7f998fc31c" ], "failures": [], "pending": [], "skipped": [], "duration": 198163, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e5c326c4-b369-4bb3-8751-078873c11977", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "20b90a7b-11ae-4887-909b-4b97d6d8783e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191327, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "bb978dfb-7da5-4c76-a221-e81d86af6ef7", "parentUUID": "20b90a7b-11ae-4887-909b-4b97d6d8783e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "bb978dfb-7da5-4c76-a221-e81d86af6ef7" ], "failures": [], "pending": [], "skipped": [], "duration": 191327, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3c6f1c70-b46a-4260-93e2-c276092ab6e9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6849cca7-4036-4e14-a9f0-503b50c35db6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 196123, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "5b8d56e7-09d3-4817-a8f0-0885fbb1d953", "parentUUID": "6849cca7-4036-4e14-a9f0-503b50c35db6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5b8d56e7-09d3-4817-a8f0-0885fbb1d953" ], "failures": [], "pending": [], "skipped": [], "duration": 196123, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "cc3d4c82-d76e-4b9d-b61b-6f6e7d0236be", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f27390e4-5ffe-4019-b0b0-47a5bf594488", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199581, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ce2f7a47-9496-4dd6-86c0-56d74245c1ca", "parentUUID": "f27390e4-5ffe-4019-b0b0-47a5bf594488", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ce2f7a47-9496-4dd6-86c0-56d74245c1ca" ], "failures": [], "pending": [], "skipped": [], "duration": 199581, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "457aa90c-7acb-4b5a-a46f-37045b322c68", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bdd7ea8b-5e35-4062-aa56-d8e190ab4fce", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189385, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "5ba91b46-4707-49ec-8401-415d29bab0e2", "parentUUID": "bdd7ea8b-5e35-4062-aa56-d8e190ab4fce", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5ba91b46-4707-49ec-8401-415d29bab0e2" ], "failures": [], "pending": [], "skipped": [], "duration": 189385, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a35c7741-3086-467b-af46-2d6d84c4fac3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dd9bb1b7-abf2-437c-80db-67b75138bbf1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200983, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "cf1bae01-ba71-43ce-ab16-739c3383faa1", "parentUUID": "dd9bb1b7-abf2-437c-80db-67b75138bbf1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cf1bae01-ba71-43ce-ab16-739c3383faa1" ], "failures": [], "pending": [], "skipped": [], "duration": 200983, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "153e127c-c502-4dc6-a99d-297b5f839386", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c4afaacf-96b1-414c-a43e-e0b7d5d846f0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200199, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6d263cb1-0b80-4411-bb0f-50eb75676057", "parentUUID": "c4afaacf-96b1-414c-a43e-e0b7d5d846f0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6d263cb1-0b80-4411-bb0f-50eb75676057" ], "failures": [], "pending": [], "skipped": [], "duration": 200199, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "500bcad0-50a0-4f3e-b35b-63113024f7fa", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "83ccbafc-5b4a-42b4-b962-e2171698162c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198830, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ecaee844-6234-49df-ba6c-54ecc8903e17", "parentUUID": "83ccbafc-5b4a-42b4-b962-e2171698162c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ecaee844-6234-49df-ba6c-54ecc8903e17" ], "failures": [], "pending": [], "skipped": [], "duration": 198830, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8a3cc560-c6e3-49ec-9771-a4a55949714a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a51131f1-510f-4b10-97cc-628d9606ec92", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 194152, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1bed92eb-ce36-415d-abdd-7934787a7eb6", "parentUUID": "a51131f1-510f-4b10-97cc-628d9606ec92", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1bed92eb-ce36-415d-abdd-7934787a7eb6" ], "failures": [], "pending": [], "skipped": [], "duration": 194152, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fce1084d-53f3-49cf-a27f-183ebea9a9c8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1c6b3c5b-4765-4f58-87b6-4b3d2bad5c1e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 202075, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "07326f18-fe76-47a7-a6e6-dab13ed555eb", "parentUUID": "1c6b3c5b-4765-4f58-87b6-4b3d2bad5c1e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "07326f18-fe76-47a7-a6e6-dab13ed555eb" ], "failures": [], "pending": [], "skipped": [], "duration": 202075, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9156e147-f693-4eb0-9bbb-53b00baa7c94", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5c7d03f0-5d60-4b29-aaf6-f89294ce9a82", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 201687, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0737faf0-2e1d-4901-a86b-1da1c2c9cfa1", "parentUUID": "5c7d03f0-5d60-4b29-aaf6-f89294ce9a82", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0737faf0-2e1d-4901-a86b-1da1c2c9cfa1" ], "failures": [], "pending": [], "skipped": [], "duration": 201687, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "869efeae-28b0-49c3-9ffb-cbd0cbc5fa05", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a2757d19-7400-422c-b6fc-2c2c0708da8a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 205001, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0f0e40ae-eb31-461d-a791-43ea549e562e", "parentUUID": "a2757d19-7400-422c-b6fc-2c2c0708da8a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0f0e40ae-eb31-461d-a791-43ea549e562e" ], "failures": [], "pending": [], "skipped": [], "duration": 205001, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c2125ef1-dfba-4f94-adb6-974591e1ff40", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5f12526d-ebc1-43b9-b7d3-593d10717b3d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 4601, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > n.filter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > n.filter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at WL.processPMRData (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=29085cdb:24083:15)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=29085cdb:24068:24)", "diff": null }, "uuid": "1e4836cf-c84b-4177-96f8-1634d27d3468", "parentUUID": "5f12526d-ebc1-43b9-b7d3-593d10717b3d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "1e4836cf-c84b-4177-96f8-1634d27d3468" ], "pending": [], "skipped": [], "duration": 4601, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ce0bfa88-3dd6-4286-855b-552bca954576", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8044a685-610b-4f36-97eb-72e619a1e244", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 210381, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "4c40420a-495f-4d80-a508-185ef5bb7811", "parentUUID": "8044a685-610b-4f36-97eb-72e619a1e244", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "4c40420a-495f-4d80-a508-185ef5bb7811" ], "failures": [], "pending": [], "skipped": [], "duration": 210381, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2eefbd85-8ee2-4cce-85a1-a6b8aced397b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "83216a22-364b-41c5-9dc3-bc40d1e82a12", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 4537, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > n.filter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > n.filter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at WL.processPMRData (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=cbd53079:24104:15)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_map-side-bar.js?v=cbd53079:24089:24)", "diff": null }, "uuid": "0b74a781-71ed-4947-bf98-38ce89da09d1", "parentUUID": "83216a22-364b-41c5-9dc3-bc40d1e82a12", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "0b74a781-71ed-4947-bf98-38ce89da09d1" ], "pending": [], "skipped": [], "duration": 4537, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7e14c6fa-e3ad-4b14-b37d-7a24c637ef56", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "44da2572-762a-4137-b50a-3361b880204c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 210829, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6f19e171-fb33-4f53-8da2-ce1ee129c22e", "parentUUID": "44da2572-762a-4137-b50a-3361b880204c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6f19e171-fb33-4f53-8da2-ce1ee129c22e" ], "failures": [], "pending": [], "skipped": [], "duration": 210829, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9b836fcd-f2b1-4091-91ff-d32d307d02ba", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c6d828fa-1383-45f2-b006-c5d8543d312f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198714, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "dbcd7dc3-39fd-4a6d-aff0-190130ce0a30", "parentUUID": "c6d828fa-1383-45f2-b006-c5d8543d312f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "dbcd7dc3-39fd-4a6d-aff0-190130ce0a30" ], "failures": [], "pending": [], "skipped": [], "duration": 198714, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1c37ed86-f602-403f-b6cb-48c373b41d7a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8fe701d5-18bf-4d3b-be0a-54656ea94236", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 190136, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1f7eb347-77c5-4f24-803f-44e2a5a19689", "parentUUID": "8fe701d5-18bf-4d3b-be0a-54656ea94236", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1f7eb347-77c5-4f24-803f-44e2a5a19689" ], "failures": [], "pending": [], "skipped": [], "duration": 190136, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "81ee5f0a-bd97-40c1-b8f3-6645e341bdcd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "25664345-ee8e-480e-b06d-948a6014310f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 179282, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0c380ed0-1242-4de3-8523-f346371faf53", "parentUUID": "25664345-ee8e-480e-b06d-948a6014310f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0c380ed0-1242-4de3-8523-f346371faf53" ], "failures": [], "pending": [], "skipped": [], "duration": 179282, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "55abb7f0-9dce-4fa5-9668-2095ec04bed2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "81dc3089-7833-4e64-87d9-b7022b7d3ffe", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 190889, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "96834e25-636a-4abe-aaf2-c483523c8bbd", "parentUUID": "81dc3089-7833-4e64-87d9-b7022b7d3ffe", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "96834e25-636a-4abe-aaf2-c483523c8bbd" ], "failures": [], "pending": [], "skipped": [], "duration": 190889, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "efa4c742-5aca-4e9a-aa88-0f6677032456", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "807c119e-123e-49d6-85fe-5b7937a312a8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 182727, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a5ff4635-a744-404e-b6b7-089889226f60", "parentUUID": "807c119e-123e-49d6-85fe-5b7937a312a8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a5ff4635-a744-404e-b6b7-089889226f60" ], "failures": [], "pending": [], "skipped": [], "duration": 182727, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "600ffd50-d9e0-42d5-9b14-b9b65fdcdc30", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0b9bdd7b-fbb6-43f9-9c4e-c0fa677cc73c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198675, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "63d36a41-6ffd-4e4b-953b-512f22308d23", "parentUUID": "0b9bdd7b-fbb6-43f9-9c4e-c0fa677cc73c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "63d36a41-6ffd-4e4b-953b-512f22308d23" ], "failures": [], "pending": [], "skipped": [], "duration": 198675, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a14b47d2-df1d-4cd7-bab3-1d69672ceff0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e778ff82-5ec6-4131-9647-cbc5ced9a2b0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 194901, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d3aece61-f97d-4ce8-b9eb-7aa85f2b640a", "parentUUID": "e778ff82-5ec6-4131-9647-cbc5ced9a2b0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d3aece61-f97d-4ce8-b9eb-7aa85f2b640a" ], "failures": [], "pending": [], "skipped": [], "duration": 194901, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5c114c8b-d275-4fd0-9d64-cb6abdce8ee8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "88614bb3-3ad3-42d2-bc14-6ec950feb0ae", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 188487, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "caf9c0e9-b341-4202-a136-5dfe68b41b4d", "parentUUID": "88614bb3-3ad3-42d2-bc14-6ec950feb0ae", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "caf9c0e9-b341-4202-a136-5dfe68b41b4d" ], "failures": [], "pending": [], "skipped": [], "duration": 188487, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "49bb8aaa-75d2-4924-b71d-ef960e7e19d5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0a86ba5b-37c5-4306-aab2-d0a112e24204", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199845, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8b222601-8cbd-4e49-bdd1-c4509b10351d", "parentUUID": "0a86ba5b-37c5-4306-aab2-d0a112e24204", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8b222601-8cbd-4e49-bdd1-c4509b10351d" ], "failures": [], "pending": [], "skipped": [], "duration": 199845, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "912da601-4ccc-4b40-968d-896e2e4dc87d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "99fe486c-2730-4542-bf4b-daae9d8b38b7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193425, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "425fb276-4336-42bd-abf7-b4dd01b5600a", "parentUUID": "99fe486c-2730-4542-bf4b-daae9d8b38b7", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "425fb276-4336-42bd-abf7-b4dd01b5600a" ], "failures": [], "pending": [], "skipped": [], "duration": 193425, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f5b99b1d-5e32-4637-b5e9-0132bc1a6723", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8f67892f-ae96-45a4-9079-21ead53cfe51", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 185593, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1b03820c-c076-492f-8b26-ff66566772fb", "parentUUID": "8f67892f-ae96-45a4-9079-21ead53cfe51", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1b03820c-c076-492f-8b26-ff66566772fb" ], "failures": [], "pending": [], "skipped": [], "duration": 185593, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "38504480-c7d2-48d2-829e-273546a3e7fd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c98702d7-581c-448f-b3f2-f8f1977ace33", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200425, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c35d7d96-5cfb-4315-83bf-8d4586ff2d29", "parentUUID": "c98702d7-581c-448f-b3f2-f8f1977ace33", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c35d7d96-5cfb-4315-83bf-8d4586ff2d29" ], "failures": [], "pending": [], "skipped": [], "duration": 200425, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ff8ffc3f-52a6-45eb-a7ff-6d045a1bc878", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "03e1d398-cbb8-42b9-a5fa-e48115d4d004", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198040, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b42625f7-df54-432e-b74d-74e0886324a0", "parentUUID": "03e1d398-cbb8-42b9-a5fa-e48115d4d004", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b42625f7-df54-432e-b74d-74e0886324a0" ], "failures": [], "pending": [], "skipped": [], "duration": 198040, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "39934b64-421f-4c36-bc7b-c5dda87388d6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b8211c3b-f808-41c1-97de-ca4e58431f16", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 190860, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "9c5fcea7-e28b-4d49-b7e9-794fe96aa304", "parentUUID": "b8211c3b-f808-41c1-97de-ca4e58431f16", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9c5fcea7-e28b-4d49-b7e9-794fe96aa304" ], "failures": [], "pending": [], "skipped": [], "duration": 190860, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "edfd4e60-7910-4383-a347-bdf002b65d7e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ac3e4c40-5f4b-4ab2-9fb4-b327799a1ef0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 179554, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "10e3cad1-6f00-4709-9540-7f92d64fac81", "parentUUID": "ac3e4c40-5f4b-4ab2-9fb4-b327799a1ef0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "10e3cad1-6f00-4709-9540-7f92d64fac81" ], "failures": [], "pending": [], "skipped": [], "duration": 179554, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9a384750-cb27-4b60-a796-8d6d215de1ad", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "61cffe9a-edb5-4695-9e4c-d6d260733303", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193057, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "76ebf951-265b-4789-b6a7-c75ab1048d42", "parentUUID": "61cffe9a-edb5-4695-9e4c-d6d260733303", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "76ebf951-265b-4789-b6a7-c75ab1048d42" ], "failures": [], "pending": [], "skipped": [], "duration": 193057, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1896d7ce-75d7-4860-9f52-0014bacc1843", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b0429b05-b70f-4714-9c70-06bb47be1abf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 204465, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "76fa9859-1eba-4aa3-8492-8d1c53f92b95", "parentUUID": "b0429b05-b70f-4714-9c70-06bb47be1abf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "76fa9859-1eba-4aa3-8492-8d1c53f92b95" ], "failures": [], "pending": [], "skipped": [], "duration": 204465, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e83ce500-fff3-435b-9d83-365a6317e52d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "38a75c89-9a45-4f09-ba5f-63c589c11639", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189983, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "2fe6dced-36db-4f1b-b2bd-bd2adc977f6b", "parentUUID": "38a75c89-9a45-4f09-ba5f-63c589c11639", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2fe6dced-36db-4f1b-b2bd-bd2adc977f6b" ], "failures": [], "pending": [], "skipped": [], "duration": 189983, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a3f48a28-f508-4aaf-b005-180b8e47d03f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "af72ad19-557d-4f5d-91ce-d992a316286e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191971, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //Type in 76 generic\n cy.get(':nth-child(1) > .el-card__header > .header > .el-input > .el-input__wrapper').should('exist').type('76 generic');\n //Search\n cy.get(':nth-child(1) > .el-card__header > .header > .el-button > span').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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "594a754f-a8d1-436e-b15d-0b3fde409e3c", "parentUUID": "af72ad19-557d-4f5d-91ce-d992a316286e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "594a754f-a8d1-436e-b15d-0b3fde409e3c" ], "failures": [], "pending": [], "skipped": [], "duration": 191971, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8495435b-2cac-445e-a8bf-5dea129d7434", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "088ffc67-e53c-4656-8a4b-83defacaacd2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 33263, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 30000ms: Expected to find element: `.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask`, but never found it.", "estack": "AssertionError: Timed out retrying after 30000ms: Expected to find element: `.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:88:126)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138359:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156978:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156965:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162889:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4095:23)\n at PassThroughHandlerContext.tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1830:23)\n at Promise._settlePromiseFromHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:1542:31)", "diff": null }, "uuid": "9f241e04-e303-40c2-b257-e7b9f7db85e8", "parentUUID": "088ffc67-e53c-4656-8a4b-83defacaacd2", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "9f241e04-e303-40c2-b257-e7b9f7db85e8" ], "pending": [], "skipped": [], "duration": 33263, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "70fa57be-a2e2-48fc-967e-66ddae8b5740", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d9679124-bcc5-4bbc-a7c5-a0db9da64a4e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199190, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "68e82b00-26fd-49e0-8804-332dca2eb9f0", "parentUUID": "d9679124-bcc5-4bbc-a7c5-a0db9da64a4e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "68e82b00-26fd-49e0-8804-332dca2eb9f0" ], "failures": [], "pending": [], "skipped": [], "duration": 199190, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "18962bf2-84c1-4152-90f2-15cd609a7002", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "61ad4a37-e422-42ba-8b96-ea143272151c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 186691, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3ef3350c-c681-41a8-ac55-bc26a577b339", "parentUUID": "61ad4a37-e422-42ba-8b96-ea143272151c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3ef3350c-c681-41a8-ac55-bc26a577b339" ], "failures": [], "pending": [], "skipped": [], "duration": 186691, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "096cbd1f-4bef-49f5-8e13-d085e2284e52", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "78571c62-0617-4fff-9324-151575c2a67c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 197473, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d5fc7146-2c9e-40db-b6ce-8bd79096a2aa", "parentUUID": "78571c62-0617-4fff-9324-151575c2a67c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d5fc7146-2c9e-40db-b6ce-8bd79096a2aa" ], "failures": [], "pending": [], "skipped": [], "duration": 197473, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6093bf47-e879-4c1f-b869-464681f048c1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "651dc6c9-bdec-4a15-b9a2-0affeb090d9e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42219, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: expected 0.24056140350877192 to be below 0.1", "estack": "AssertionError: expected 0.24056140350877192 to be below 0.1\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.assertBelow (http://localhost:8081/__cypress/runner/cypress_runner.js:80745:12)\n at Proxy.methodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78199:25)\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:121:49)\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)", "diff": "- 0.24056140350877192\n+ 0.1\n" }, "uuid": "a3a8bb7b-3177-4c2c-a7ff-b3e5b960ccd4", "parentUUID": "651dc6c9-bdec-4a15-b9a2-0affeb090d9e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a3a8bb7b-3177-4c2c-a7ff-b3e5b960ccd4" ], "pending": [], "skipped": [], "duration": 42219, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "176eb3e6-8742-49a8-97e5-c8e52859e0c2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "68f7155c-2c47-4a73-98b4-b36e68b8bd0b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 183758, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "dcaa6949-7c88-48bb-85fc-06b59f2108e3", "parentUUID": "68f7155c-2c47-4a73-98b4-b36e68b8bd0b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "dcaa6949-7c88-48bb-85fc-06b59f2108e3" ], "failures": [], "pending": [], "skipped": [], "duration": 183758, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6c012a13-ae4b-4808-b332-99f5ee240c4e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "47567444-54ef-4f35-b578-dfa2a64bb0ea", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 187646, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "e5b27a4b-0219-490a-a098-7db728780106", "parentUUID": "47567444-54ef-4f35-b578-dfa2a64bb0ea", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e5b27a4b-0219-490a-a098-7db728780106" ], "failures": [], "pending": [], "skipped": [], "duration": 187646, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ac75b6fc-3d49-47f7-8422-d252606a4fa5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3c60547c-bece-4a20-9da5-63e179666896", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 180010, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "eb5d201a-0c0d-4595-abdb-e44995472573", "parentUUID": "3c60547c-bece-4a20-9da5-63e179666896", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "eb5d201a-0c0d-4595-abdb-e44995472573" ], "failures": [], "pending": [], "skipped": [], "duration": 180010, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1a200fc0-0f39-40c1-93b3-b7cb34e347d8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "60b58eeb-dc77-46c3-a629-9f7cedec0630", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 185839, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "dd796cd7-37b7-4ec3-aae6-f5ff0cfb7eb4", "parentUUID": "60b58eeb-dc77-46c3-a629-9f7cedec0630", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "dd796cd7-37b7-4ec3-aae6-f5ff0cfb7eb4" ], "failures": [], "pending": [], "skipped": [], "duration": 185839, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e6b7fa46-36c6-4b11-a215-cdc5c088d35d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "61d74b1d-d01f-4c85-80d1-b4c31fbee431", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 206611, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "e90e0832-4809-4cd9-83f5-f46009a28c4c", "parentUUID": "61d74b1d-d01f-4c85-80d1-b4c31fbee431", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e90e0832-4809-4cd9-83f5-f46009a28c4c" ], "failures": [], "pending": [], "skipped": [], "duration": 206611, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "37cac56e-d2b2-4589-ba29-99a2600d01c1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fd81528d-0935-45d1-b6d7-5d1dbbd05fb1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 183560, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "216f9b85-45f0-4127-ab7c-b00250b3d727", "parentUUID": "fd81528d-0935-45d1-b6d7-5d1dbbd05fb1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "216f9b85-45f0-4127-ab7c-b00250b3d727" ], "failures": [], "pending": [], "skipped": [], "duration": 183560, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3081a5a4-77cf-409a-951e-ad7981b23be4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d74d4e11-f961-4ce1-9d76-89b48ece8f32", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d3426965-73e5-46b9-896d-2c04c9f33149", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "d3426965-73e5-46b9-896d-2c04c9f33149" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "50b7590a-6c27-4136-9e6e-4d8db78cd589", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "910b1428-c3d5-46b0-bd16-f7c01c60b7d5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 185346, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "aad68238-7894-42aa-a326-403fd5c18fbe", "parentUUID": "910b1428-c3d5-46b0-bd16-f7c01c60b7d5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "aad68238-7894-42aa-a326-403fd5c18fbe" ], "failures": [], "pending": [], "skipped": [], "duration": 185346, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "364e10b6-009a-4277-bffc-b4785b179e57", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b5956285-b39c-47c3-8f60-a4c33240e335", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189205, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d1f9b183-bb6e-448e-8bb7-a64459bb36b1", "parentUUID": "b5956285-b39c-47c3-8f60-a4c33240e335", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d1f9b183-bb6e-448e-8bb7-a64459bb36b1" ], "failures": [], "pending": [], "skipped": [], "duration": 189205, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "20dd3000-9f93-4ad5-9d5a-c13007ea549c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ea7037c4-4b12-48f4-ab0b-2741fec07478", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 185578, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a83c6431-062b-4b11-8851-1eba09ed86ab", "parentUUID": "ea7037c4-4b12-48f4-ab0b-2741fec07478", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a83c6431-062b-4b11-8851-1eba09ed86ab" ], "failures": [], "pending": [], "skipped": [], "duration": 185578, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d304f790-74a9-4cd0-956d-52573e0de839", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fbbb901f-a1a9-42e6-a1cd-0b5394da83e1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39286, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=8fe8669c:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=8fe8669c:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:103:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:94:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=7664d13b:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=7664d13b:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=7664d13b:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=7664d13b:1858:33)", "diff": null }, "uuid": "fd61ea86-863a-4c15-b4cb-b907db07c6db", "parentUUID": "fbbb901f-a1a9-42e6-a1cd-0b5394da83e1", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "fd61ea86-863a-4c15-b4cb-b907db07c6db" ], "pending": [], "skipped": [], "duration": 39286, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5f45ea05-e00e-4af4-bd11-0d170bfa67cb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "670727c5-5591-463d-8b10-eac3b7342011", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 196731, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a0787579-2070-4d1b-8117-e5e87711d261", "parentUUID": "670727c5-5591-463d-8b10-eac3b7342011", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a0787579-2070-4d1b-8117-e5e87711d261" ], "failures": [], "pending": [], "skipped": [], "duration": 196731, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "296f0816-0c50-40a3-bd37-b46c66d9e2bf", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "eeefc485-01d8-4c6a-8592-b03e9a7143c1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 182087, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3ead5f49-291c-49c5-b58b-184a3f2032db", "parentUUID": "eeefc485-01d8-4c6a-8592-b03e9a7143c1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3ead5f49-291c-49c5-b58b-184a3f2032db" ], "failures": [], "pending": [], "skipped": [], "duration": 182087, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "373476ad-71b2-4982-95ed-233562915a95", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7ae4ec2e-be7a-4dff-af99-0868789138f4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41779, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0dcc1509:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0dcc1509:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:103:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:94:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=8f9310ba:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=8f9310ba:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=8f9310ba:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-6UGCK2MK.js?v=8f9310ba:1858:33)", "diff": null }, "uuid": "ca03f75a-f67e-4bba-b2b2-8b2196fdb10d", "parentUUID": "7ae4ec2e-be7a-4dff-af99-0868789138f4", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ca03f75a-f67e-4bba-b2b2-8b2196fdb10d" ], "pending": [], "skipped": [], "duration": 41779, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ccacc7f8-0a5f-49d1-b6e4-58dd0d3621bb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "618e3663-5e7a-4d93-9eae-3ca1343e55bf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "c15cedea-afe6-4031-b1a9-fd58e7a67ce5", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "c15cedea-afe6-4031-b1a9-fd58e7a67ce5" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d159e458-4153-4060-aa5b-c9e956e35e5b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fdaecec1-8c12-4dbb-8e5b-b35b942902ee", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191340, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "cd8f8bca-a71d-4882-a432-8d41c72a338a", "parentUUID": "fdaecec1-8c12-4dbb-8e5b-b35b942902ee", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cd8f8bca-a71d-4882-a432-8d41c72a338a" ], "failures": [], "pending": [], "skipped": [], "duration": 191340, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "eebbac9c-d362-4397-9d74-8eec3c7d1a04", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3c9fd425-b1bb-4135-afa2-4dc9fc43f4db", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 196864, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3268f593-ee05-40c8-a5b8-b6e7340eee37", "parentUUID": "3c9fd425-b1bb-4135-afa2-4dc9fc43f4db", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3268f593-ee05-40c8-a5b8-b6e7340eee37" ], "failures": [], "pending": [], "skipped": [], "duration": 196864, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "af577285-dae9-47a8-8460-0c30633dd592", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c480f65d-04f2-4b4f-9fcf-4ed3f421e190", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 190633, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "1681dd41-1fd1-4b48-9df6-88698c97e9b3", "parentUUID": "c480f65d-04f2-4b4f-9fcf-4ed3f421e190", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1681dd41-1fd1-4b48-9df6-88698c97e9b3" ], "failures": [], "pending": [], "skipped": [], "duration": 190633, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c1b4c5a5-914e-458b-9600-b6f0b92715d4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d043ba13-73a7-4d9e-80b0-a8756d464e7c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 203026, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "5965704f-1d14-41d6-abae-c108e063c80b", "parentUUID": "d043ba13-73a7-4d9e-80b0-a8756d464e7c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5965704f-1d14-41d6-abae-c108e063c80b" ], "failures": [], "pending": [], "skipped": [], "duration": 203026, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "63cccf20-ea43-4d67-96f9-599bc1b217c6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dea7897a-ba1e-4cba-a956-f8d7873d808d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199174, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3bbd16b7-64ac-4f9a-977d-ce9b93df7fa2", "parentUUID": "dea7897a-ba1e-4cba-a956-f8d7873d808d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3bbd16b7-64ac-4f9a-977d-ce9b93df7fa2" ], "failures": [], "pending": [], "skipped": [], "duration": 199174, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "cecd1e6b-8b11-4901-a890-92f5d1392016", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "03163689-9345-4dbb-9ad4-6c7ec3088b73", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199031, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a3566d78-03ee-44e1-83ae-1685becc23cd", "parentUUID": "03163689-9345-4dbb-9ad4-6c7ec3088b73", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a3566d78-03ee-44e1-83ae-1685becc23cd" ], "failures": [], "pending": [], "skipped": [], "duration": 199031, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fc1401aa-21cd-4e1f-90fb-e958d9812121", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0e382f07-90df-4217-a7fd-a882a2763c51", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 188512, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "5a9faeff-bdf2-4ec3-805f-0d4107604237", "parentUUID": "0e382f07-90df-4217-a7fd-a882a2763c51", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5a9faeff-bdf2-4ec3-805f-0d4107604237" ], "failures": [], "pending": [], "skipped": [], "duration": 188512, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f7314f34-80df-45d1-b48c-4ce75a6128c1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "57286a3f-ed08-4806-bf0a-7396855fbe38", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 197623, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8db60819-4264-447b-9292-4f40079dfa0d", "parentUUID": "57286a3f-ed08-4806-bf0a-7396855fbe38", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8db60819-4264-447b-9292-4f40079dfa0d" ], "failures": [], "pending": [], "skipped": [], "duration": 197623, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c1bf3605-b919-4c4a-86c0-e7d043dfdd79", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "07ee03c4-3272-49d9-9473-ebca27456b8f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 187811, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "15ab4d02-94ca-4aa5-a67a-80dfcc71af80", "parentUUID": "07ee03c4-3272-49d9-9473-ebca27456b8f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "15ab4d02-94ca-4aa5-a67a-80dfcc71af80" ], "failures": [], "pending": [], "skipped": [], "duration": 187811, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "82d796d2-db3b-4c71-8260-f27051b6d22b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ad35bd4d-c387-4ce2-8802-2ab158c360bc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 195803, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b59ce059-a28a-4258-8334-31cdc8bdc466", "parentUUID": "ad35bd4d-c387-4ce2-8802-2ab158c360bc", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b59ce059-a28a-4258-8334-31cdc8bdc466" ], "failures": [], "pending": [], "skipped": [], "duration": 195803, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a235be30-ee90-44e3-a7db-359958d2b263", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "01860737-d446-449b-9671-fd5f00e95e0a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 184837, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ccfb96ff-4e41-4407-9943-84da0401cf46", "parentUUID": "01860737-d446-449b-9671-fd5f00e95e0a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ccfb96ff-4e41-4407-9943-84da0401cf46" ], "failures": [], "pending": [], "skipped": [], "duration": 184837, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5a920536-0627-4033-a4bd-60f4faaeb02f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bd0d7166-1d0d-4643-a8a4-b132e8a4009d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193917, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "aa03cf4a-c55e-44f6-82fe-94f35ad31726", "parentUUID": "bd0d7166-1d0d-4643-a8a4-b132e8a4009d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "aa03cf4a-c55e-44f6-82fe-94f35ad31726" ], "failures": [], "pending": [], "skipped": [], "duration": 193917, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "00910734-b3d5-4787-b46b-53cf5c7e830f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a9aeb323-9fc3-4d40-94c0-066d91e0a1af", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 173285, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "00394cee-4e5f-41b4-b771-81c128dcc941", "parentUUID": "a9aeb323-9fc3-4d40-94c0-066d91e0a1af", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "00394cee-4e5f-41b4-b771-81c128dcc941" ], "failures": [], "pending": [], "skipped": [], "duration": 173285, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "805f8782-44cf-47dd-94a0-c283f78fcd24", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9b9bd637-14b5-434e-9a46-4923cbc828a0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 44270, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=5be8df08:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=5be8df08:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:103:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:94:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=d4ccddd2:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=d4ccddd2:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=d4ccddd2:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=d4ccddd2:1858:33)", "diff": null }, "uuid": "96e3a1c7-07bf-45f3-a654-a065352efa7a", "parentUUID": "9b9bd637-14b5-434e-9a46-4923cbc828a0", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "96e3a1c7-07bf-45f3-a654-a065352efa7a" ], "pending": [], "skipped": [], "duration": 44270, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "05f2f961-aed5-4d02-8336-de77e72a8ac6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "28295b6e-d6a0-400b-a278-b0bba21fc757", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 203258, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "efda1a33-cf4a-4ba8-8890-2ea7c12984c4", "parentUUID": "28295b6e-d6a0-400b-a278-b0bba21fc757", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "efda1a33-cf4a-4ba8-8890-2ea7c12984c4" ], "failures": [], "pending": [], "skipped": [], "duration": 203258, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "bddbedc3-81e6-4526-916a-21d3074959e3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "34c255dd-2eca-4aaa-9385-0f904becdd27", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189828, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "16ed39f7-346e-46d9-af2c-4d1ec5734871", "parentUUID": "34c255dd-2eca-4aaa-9385-0f904becdd27", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "16ed39f7-346e-46d9-af2c-4d1ec5734871" ], "failures": [], "pending": [], "skipped": [], "duration": 189828, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5aade4dc-b527-40b2-b5db-3674f2fc0651", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "15f1bced-d470-4263-a1e6-060859a38a1c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 194692, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6eb5412e-832c-4d19-bc0d-3565842bd19c", "parentUUID": "15f1bced-d470-4263-a1e6-060859a38a1c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6eb5412e-832c-4d19-bc0d-3565842bd19c" ], "failures": [], "pending": [], "skipped": [], "duration": 194692, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8d2b0294-e863-48f7-b4d4-e2797a2468a6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8cfa2f76-654e-4fd1-93e4-c5c0a2e34cc8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189513, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "eb306ed1-a6d4-4d3f-a6b7-ecc1bc7a1b26", "parentUUID": "8cfa2f76-654e-4fd1-93e4-c5c0a2e34cc8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "eb306ed1-a6d4-4d3f-a6b7-ecc1bc7a1b26" ], "failures": [], "pending": [], "skipped": [], "duration": 189513, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a6422d0f-678a-4ef3-9448-a4fead5c2729", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "362b8146-5409-4da1-bb17-52f90e5b73ab", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41070, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=db9a7946:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=db9a7946:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:103:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:94:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=db9a7946:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=db9a7946:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=db9a7946:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=db9a7946:1858:33)", "diff": null }, "uuid": "ecedb671-8577-41a7-9620-f04fddacee8b", "parentUUID": "362b8146-5409-4da1-bb17-52f90e5b73ab", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ecedb671-8577-41a7-9620-f04fddacee8b" ], "pending": [], "skipped": [], "duration": 41070, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "882950c2-df0a-4946-82c7-6a4627f5d352", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "de25edb0-37ad-4b10-9262-1c554f9b7446", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 184867, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "f22c6604-aa6d-420b-8feb-59836fa04c87", "parentUUID": "de25edb0-37ad-4b10-9262-1c554f9b7446", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f22c6604-aa6d-420b-8feb-59836fa04c87" ], "failures": [], "pending": [], "skipped": [], "duration": 184867, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "511843d1-f02f-49ba-acd3-df4b0c5977ac", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "25b18316-0439-4aae-8440-173b23bd50ec", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 183186, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "70954730-b002-4e7f-925b-3d0803fded64", "parentUUID": "25b18316-0439-4aae-8440-173b23bd50ec", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "70954730-b002-4e7f-925b-3d0803fded64" ], "failures": [], "pending": [], "skipped": [], "duration": 183186, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "73d194a4-9ab2-48a7-9826-e2632297a624", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8e6b572f-8ecd-446c-9e23-d6aa6d2577e9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 180455, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d0ad611e-9f59-44fc-81d5-e12334928852", "parentUUID": "8e6b572f-8ecd-446c-9e23-d6aa6d2577e9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d0ad611e-9f59-44fc-81d5-e12334928852" ], "failures": [], "pending": [], "skipped": [], "duration": 180455, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dca25967-27b4-4678-9da2-1af59a93703f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "60c4ea8d-d810-4c5d-99f1-f26a606a69ff", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 172230, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "9bbfb041-9654-494b-9df0-307411d8f691", "parentUUID": "60c4ea8d-d810-4c5d-99f1-f26a606a69ff", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9bbfb041-9654-494b-9df0-307411d8f691" ], "failures": [], "pending": [], "skipped": [], "duration": 172230, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "452f9a67-4a7d-4403-96a1-1985bc730901", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5c414489-40dc-40a6-9a18-3a2a79d9f7dc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 180338, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "a9af54e9-7f1b-4e22-b29e-92e38ad3146f", "parentUUID": "5c414489-40dc-40a6-9a18-3a2a79d9f7dc", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a9af54e9-7f1b-4e22-b29e-92e38ad3146f" ], "failures": [], "pending": [], "skipped": [], "duration": 180338, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "86b56081-ccbf-4d6c-8b6e-e15ef6a34834", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "029a16a2-d57a-4405-a5b9-9e877099707f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 188495, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "8f07d033-7f6e-4dc8-a310-9ba2b2a4fe0f", "parentUUID": "029a16a2-d57a-4405-a5b9-9e877099707f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8f07d033-7f6e-4dc8-a310-9ba2b2a4fe0f" ], "failures": [], "pending": [], "skipped": [], "duration": 188495, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9db5fc3b-b8da-4e0a-aee2-0c43208b2478", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c441b732-f02e-42f1-81ed-f92d8e44dca1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 196010, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "1b6c55c8-9a5a-4304-8ad1-297dcbd247d6", "parentUUID": "c441b732-f02e-42f1-81ed-f92d8e44dca1", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "1b6c55c8-9a5a-4304-8ad1-297dcbd247d6" ], "pending": [], "skipped": [], "duration": 196010, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1c7ba89f-f4d3-428f-b409-d7ea688de1bd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7e0d254f-c7a2-4253-93af-021c2ce4280d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 194550, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ff80d658-94be-4dba-a650-ec14636687a6", "parentUUID": "7e0d254f-c7a2-4253-93af-021c2ce4280d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ff80d658-94be-4dba-a650-ec14636687a6" ], "failures": [], "pending": [], "skipped": [], "duration": 194550, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d3ae3658-cbeb-4beb-838d-4f29efd72793", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ffcf8796-5964-4b90-a6ca-7ccb85dd1916", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42047, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:588:50)", "diff": null }, "uuid": "74d809d2-2d03-4505-af82-2cc796fe815d", "parentUUID": "ffcf8796-5964-4b90-a6ca-7ccb85dd1916", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "74d809d2-2d03-4505-af82-2cc796fe815d" ], "pending": [], "skipped": [], "duration": 42047, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0ef198fe-fbd4-4919-b5f5-8049f10e58cc", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fa06cb04-f7fb-4e0d-95a6-3722c05d04e8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "ed06f19c-d829-45d8-9321-bb8e2eb716aa", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "ed06f19c-d829-45d8-9321-bb8e2eb716aa" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "43091605-7593-4147-9938-be5ed32c7410", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a3185f6e-ef93-4c67-84fd-aa467e25e88b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39562, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:588:50)", "diff": null }, "uuid": "edc2bc51-b188-4401-8ae5-e9faa7e3a2e6", "parentUUID": "a3185f6e-ef93-4c67-84fd-aa467e25e88b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "edc2bc51-b188-4401-8ae5-e9faa7e3a2e6" ], "pending": [], "skipped": [], "duration": 39562, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dd5020eb-ab07-4af5-bdb9-b25afd0432b6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4de11ede-41d7-4e1a-82f2-3fa0bc501bd4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 43201, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:588:62)", "diff": null }, "uuid": "64b90862-f655-470e-bce2-25939c892baa", "parentUUID": "4de11ede-41d7-4e1a-82f2-3fa0bc501bd4", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "64b90862-f655-470e-bce2-25939c892baa" ], "pending": [], "skipped": [], "duration": 43201, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f02dcbc5-e108-4980-9dc5-a251f644423e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "831b6044-a755-46dd-afd6-2ce0c089307c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39415, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: expected 0.10005263157894738 to be below 0.1", "estack": "AssertionError: expected 0.10005263157894738 to be below 0.1\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.assertBelow (http://localhost:8081/__cypress/runner/cypress_runner.js:80745:12)\n at Proxy.methodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78199:25)\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:121:49)\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)", "diff": "- 0.10005263157894738\n+ 0.1\n" }, "uuid": "01cc6c2a-39bb-4f4c-9f28-d89d3e13f59f", "parentUUID": "831b6044-a755-46dd-afd6-2ce0c089307c", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "01cc6c2a-39bb-4f4c-9f28-d89d3e13f59f" ], "pending": [], "skipped": [], "duration": 39415, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "81e2e0e7-8bd2-4f66-9b38-9ffe573391e1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "748fe2f4-102d-4745-8eac-e5083f25f2ed", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 195258, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6068d831-5820-42a0-8ec0-bf5840e74873", "parentUUID": "748fe2f4-102d-4745-8eac-e5083f25f2ed", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6068d831-5820-42a0-8ec0-bf5840e74873" ], "failures": [], "pending": [], "skipped": [], "duration": 195258, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4751b409-1894-4196-9fc8-c9320ae5633f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "84c29556-3f44-4b29-836d-aeaca3b84ef6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 43983, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:588:62)", "diff": null }, "uuid": "f5a21b0c-66dd-4c03-ad6f-27a91c72c94e", "parentUUID": "84c29556-3f44-4b29-836d-aeaca3b84ef6", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f5a21b0c-66dd-4c03-ad6f-27a91c72c94e" ], "pending": [], "skipped": [], "duration": 43983, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f6a7eaa9-acfa-429e-b3db-ab4d249efb8e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "aa99bae1-3892-4029-abd6-5f92ea322d15", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191211, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "0603c23b-466f-427f-a6b5-e0c251224051", "parentUUID": "aa99bae1-3892-4029-abd6-5f92ea322d15", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0603c23b-466f-427f-a6b5-e0c251224051" ], "failures": [], "pending": [], "skipped": [], "duration": 191211, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7c9d0e20-3092-4fa4-b84f-f5ad3382918e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e420ff4a-fb8b-4572-b204-ec296802198f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 173211, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "7dee7303-09ab-4aa9-aafe-9cbbe35d47b7", "parentUUID": "e420ff4a-fb8b-4572-b204-ec296802198f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7dee7303-09ab-4aa9-aafe-9cbbe35d47b7" ], "failures": [], "pending": [], "skipped": [], "duration": 173211, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "507bf7bc-b379-4010-abdd-2c4875a612d5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c1ee5ffa-1183-4265-ba32-cbb886f33dcc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "444f6790-855a-406b-903d-9cf257e47837", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "444f6790-855a-406b-903d-9cf257e47837" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a4e8b046-691f-4163-8c4c-0d8988efe499", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5fd72494-c051-40f4-9fde-9721c855e1ee", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198873, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "b7729048-513e-4d33-82f1-8463fe482d0d", "parentUUID": "5fd72494-c051-40f4-9fde-9721c855e1ee", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b7729048-513e-4d33-82f1-8463fe482d0d" ], "pending": [], "skipped": [], "duration": 198873, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e167c6cf-3794-4d72-8950-3409615bbb45", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "409680f3-6aec-42bb-a336-6c5b176bfd14", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200071, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "42e73b8a-ee03-47db-853f-bde218799151", "parentUUID": "409680f3-6aec-42bb-a336-6c5b176bfd14", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "42e73b8a-ee03-47db-853f-bde218799151" ], "pending": [], "skipped": [], "duration": 200071, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "781de84e-69e5-4f03-9ab8-3ff8b6cb6e89", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "537f5d6f-029a-4a23-81c4-ada8fa3de6f7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 214699, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "cba07818-9f59-4089-9dbe-366de30ae5a1", "parentUUID": "537f5d6f-029a-4a23-81c4-ada8fa3de6f7", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "cba07818-9f59-4089-9dbe-366de30ae5a1" ], "pending": [], "skipped": [], "duration": 214699, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e32dc062-0baa-4b24-80fd-e27adc20624b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dde1227a-4ba1-45a5-a56e-86a3b2ee5996", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39877, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:588:62)", "diff": null }, "uuid": "26418edf-39a2-4602-89ad-20b3ccc35cae", "parentUUID": "dde1227a-4ba1-45a5-a56e-86a3b2ee5996", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "26418edf-39a2-4602-89ad-20b3ccc35cae" ], "pending": [], "skipped": [], "duration": 39877, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "76328100-48d5-4b4c-8ab3-6e666f415e8e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1353b81d-59fa-4f6b-a3cf-50477acf10f8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 35267, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:648:28)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0005c52f:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0005c52f:13:20)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:568:16)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:2381:5)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=0005c52f:106904:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1858:19)", "diff": null }, "uuid": "145bcdd5-d5e3-4e57-8069-e0a4dd33839f", "parentUUID": "1353b81d-59fa-4f6b-a3cf-50477acf10f8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "145bcdd5-d5e3-4e57-8069-e0a4dd33839f" ], "pending": [], "skipped": [], "duration": 35267, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "35f0a0e1-98f7-4465-be7b-6e431d937853", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dc1cec33-4457-4369-ae67-f1d641b44f7a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 34897, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:648:28)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0005c52f:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0005c52f:13:20)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:568:16)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:2381:5)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=0005c52f:106904:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1858:19)", "diff": null }, "uuid": "f9d89343-cc5f-4f9e-b4dc-16cfe101db7f", "parentUUID": "dc1cec33-4457-4369-ae67-f1d641b44f7a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f9d89343-cc5f-4f9e-b4dc-16cfe101db7f" ], "pending": [], "skipped": [], "duration": 34897, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b4de28d7-8bc7-4e26-9a57-a15c8095b6a0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "af447793-31b0-43e3-9b92-b981e381d9fd", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 188506, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "d52bc731-3978-4677-a44b-2a75b3058e11", "parentUUID": "af447793-31b0-43e3-9b92-b981e381d9fd", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d52bc731-3978-4677-a44b-2a75b3058e11" ], "failures": [], "pending": [], "skipped": [], "duration": 188506, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d9d00498-c67a-4b2a-83ab-a06a925b92c7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "db233816-0c32-4a6f-bc0e-55429680972e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 40223, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:648:28)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=6460dc3a:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=6460dc3a:13:20)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:568:16)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=edcc0db3:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=edcc0db3:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=edcc0db3:2381:5)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=ad694623:106904:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=edcc0db3:1858:19)", "diff": null }, "uuid": "32d6e443-1b85-42a9-8a65-b09b747c7e2e", "parentUUID": "db233816-0c32-4a6f-bc0e-55429680972e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "32d6e443-1b85-42a9-8a65-b09b747c7e2e" ], "pending": [], "skipped": [], "duration": 40223, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "db681c89-531f-4140-989c-d94b17245b6e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9103c1eb-cbdb-404c-9c3d-18cb27a2bae0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 32924, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:648:28)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0005c52f:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0005c52f:13:20)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:568:16)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:2381:5)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=0005c52f:106904:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0005c52f:1858:19)", "diff": null }, "uuid": "24cccf42-c194-4666-84ec-3f0135093ec2", "parentUUID": "9103c1eb-cbdb-404c-9c3d-18cb27a2bae0", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "24cccf42-c194-4666-84ec-3f0135093ec2" ], "pending": [], "skipped": [], "duration": 32924, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "811ed3d3-f336-492f-834c-95758f65dd49", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0b654aef-c891-43c2-9daa-35b3105d04cc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 222174, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "65d85adf-37ed-4250-a6d6-7de622032054", "parentUUID": "0b654aef-c891-43c2-9daa-35b3105d04cc", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "65d85adf-37ed-4250-a6d6-7de622032054" ], "pending": [], "skipped": [], "duration": 222174, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "885f0d14-b8f1-4c1b-8a30-4938a4c277fb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3b09a321-4fea-45e7-a04b-3cd22ad8c098", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 192108, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "863262f7-39c4-4d50-be20-3493e391e209", "parentUUID": "3b09a321-4fea-45e7-a04b-3cd22ad8c098", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "863262f7-39c4-4d50-be20-3493e391e209" ], "failures": [], "pending": [], "skipped": [], "duration": 192108, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f818eadf-adae-4ba3-a291-d1c697936420", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f5cda0f3-f510-4d7f-b03e-4defc4a38a7e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 174241, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "6c5ac39e-4213-4d34-87d1-28fb66720180", "parentUUID": "f5cda0f3-f510-4d7f-b03e-4defc4a38a7e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6c5ac39e-4213-4d34-87d1-28fb66720180" ], "failures": [], "pending": [], "skipped": [], "duration": 174241, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "960bfcb0-19d4-440d-a458-97385a3a17a7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8a481984-be2d-44c5-bb69-de70643e6a99", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41802, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:587:62)", "diff": null }, "uuid": "073d00b7-45a6-4ca2-a99b-2230ba0f5312", "parentUUID": "8a481984-be2d-44c5-bb69-de70643e6a99", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "073d00b7-45a6-4ca2-a99b-2230ba0f5312" ], "pending": [], "skipped": [], "duration": 41802, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dda4292a-3daa-4810-89f7-e32f7315b517", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a428a8a3-3205-4efa-b403-f18cce099ea5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41544, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=a6b12046:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=a6b12046:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:108:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:96:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=a6b12046:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=a6b12046:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=a6b12046:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=a6b12046:1858:33)", "diff": null }, "uuid": "d8d646a4-62eb-4b21-a331-eb881cdacacc", "parentUUID": "a428a8a3-3205-4efa-b403-f18cce099ea5", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "d8d646a4-62eb-4b21-a331-eb881cdacacc" ], "pending": [], "skipped": [], "duration": 41544, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0d632789-ca91-4591-84ae-9368f0e5d609", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6a07055e-d5be-4ef9-82d3-4d0b25ad143b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 42242, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:587:62)", "diff": null }, "uuid": "08b86b0f-73d0-4d07-adf7-999d82a659a2", "parentUUID": "6a07055e-d5be-4ef9-82d3-4d0b25ad143b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "08b86b0f-73d0-4d07-adf7-999d82a659a2" ], "pending": [], "skipped": [], "duration": 42242, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5ea8e8ac-d0cc-480a-89c5-6f1f9349353b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bc72dd04-2733-40cd-89e4-cfb092b71729", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "3f5d8a55-41e2-42cc-a4f4-65b70ee5cb16", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "3f5d8a55-41e2-42cc-a4f4-65b70ee5cb16" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fdc93951-2834-4c07-b059-0132aad088de", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "18533556-1a15-4df9-a723-57cf192e5bad", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41990, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.getFilterOptions is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:587:62)", "diff": null }, "uuid": "86c91ca1-bd5e-4a22-8241-430107fc124d", "parentUUID": "18533556-1a15-4df9-a723-57cf192e5bad", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "86c91ca1-bd5e-4a22-8241-430107fc124d" ], "pending": [], "skipped": [], "duration": 41990, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2d0b4b15-5562-4cbb-a701-343076bab412", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e09c6096-e178-4a3f-918d-39217b582156", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39955, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=60e40ac8:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=60e40ac8:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:108:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:96:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=60e40ac8:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=60e40ac8:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=60e40ac8:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=60e40ac8:1858:33)", "diff": null }, "uuid": "0fe9bdd0-43d3-4f19-b2cd-d25cbdf516b0", "parentUUID": "e09c6096-e178-4a3f-918d-39217b582156", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "0fe9bdd0-43d3-4f19-b2cd-d25cbdf516b0" ], "pending": [], "skipped": [], "duration": 39955, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3295e3f7-e5f8-45eb-bfff-ebc7af42bfd9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "70219f26-fecf-4d74-8200-c53e5d854ca1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189134, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "65b53586-654a-4ba8-947b-5145a9235dca", "parentUUID": "70219f26-fecf-4d74-8200-c53e5d854ca1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "65b53586-654a-4ba8-947b-5145a9235dca" ], "failures": [], "pending": [], "skipped": [], "duration": 189134, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f2c378bd-fd7f-4820-8746-d354b45c0c1b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0e3e7f40-2914-4ff5-b18b-4eac18ede1e7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 38492, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:435:26)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=4ad15d97:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=4ad15d97:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:108:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:96:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=4ad15d97:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=4ad15d97:1865:17)\n at job (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=4ad15d97:3606:9)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=4ad15d97:1858:33)", "diff": null }, "uuid": "fd3dbf40-6c28-4f92-983d-d4ef33879e54", "parentUUID": "0e3e7f40-2914-4ff5-b18b-4eac18ede1e7", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "fd3dbf40-6c28-4f92-983d-d4ef33879e54" ], "pending": [], "skipped": [], "duration": 38492, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "05d8f001-d8ab-4139-8acd-26a66751616d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b3fd5bd1-0057-4716-a716-918363aac3cf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 181916, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "645f9593-006a-493a-9a0f-6f966cb048b4", "parentUUID": "b3fd5bd1-0057-4716-a716-918363aac3cf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "645f9593-006a-493a-9a0f-6f966cb048b4" ], "failures": [], "pending": [], "skipped": [], "duration": 181916, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5e805d33-3959-4c24-a09a-8e5fb2eb13e7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "177e9312-8fb1-4a47-8125-8d9d537444db", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 177510, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "399f3c88-d408-47dd-97a4-196f0781cb30", "parentUUID": "177e9312-8fb1-4a47-8125-8d9d537444db", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "399f3c88-d408-47dd-97a4-196f0781cb30" ], "failures": [], "pending": [], "skipped": [], "duration": 177510, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3989cd17-43f6-4089-9cd1-47c54ce32435", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a3c7c15e-1513-4d57-a259-8230bdf7808c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 37324, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar.closeConnectivity is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:648:28)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=bd6ce3e2:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=bd6ce3e2:13:20)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:569:16)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=507c187d:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=507c187d:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=507c187d:2381:5)\n at Proxy.onAnnotationClose (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=87babf54:106904:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=507c187d:1858:19)", "diff": null }, "uuid": "63bf9eb3-b30b-4be3-9d53-d79ddf284975", "parentUUID": "a3c7c15e-1513-4d57-a259-8230bdf7808c", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "63bf9eb3-b30b-4be3-9d53-d79ddf284975" ], "pending": [], "skipped": [], "duration": 37324, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "07e103a9-3527-4afc-bfc2-de5f552b41e4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "59aa0bf6-9b69-48a3-96c1-d0eff7df1597", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 40983, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: expected 0.10005263157894738 to be below 0.1", "estack": "AssertionError: expected 0.10005263157894738 to be below 0.1\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.assertBelow (http://localhost:8081/__cypress/runner/cypress_runner.js:80745:12)\n at Proxy.methodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78199:25)\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:121:49)\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)", "diff": "- 0.10005263157894738\n+ 0.1\n" }, "uuid": "3a1d1b9f-88bc-4967-888b-983616cf7609", "parentUUID": "59aa0bf6-9b69-48a3-96c1-d0eff7df1597", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3a1d1b9f-88bc-4967-888b-983616cf7609" ], "pending": [], "skipped": [], "duration": 40983, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8f73e890-a736-478b-bc38-9c34cb18b3fa", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "434486e5-8f13-43d9-9467-1af6c44f0684", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 41803, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: expected 0.23671929824561402 to be below 0.1", "estack": "AssertionError: expected 0.23671929824561402 to be below 0.1\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.assertBelow (http://localhost:8081/__cypress/runner/cypress_runner.js:80745:12)\n at Proxy.methodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78199:25)\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:121:49)\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)", "diff": "- 0.23671929824561402\n+ 0.1\n" }, "uuid": "7b42fadd-bc81-4c25-abac-b169ed459fd7", "parentUUID": "434486e5-8f13-43d9-9467-1af6c44f0684", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "7b42fadd-bc81-4c25-abac-b169ed459fd7" ], "pending": [], "skipped": [], "duration": 41803, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a3790e04-bb1c-4f44-819d-d6410d9b85a3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f1b2bbf6-028b-43fc-b458-933ac91d7b74", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 270095, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "34685414-2b5f-4bbb-99b8-9a6a9a043956", "parentUUID": "f1b2bbf6-028b-43fc-b458-933ac91d7b74", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "34685414-2b5f-4bbb-99b8-9a6a9a043956" ], "failures": [], "pending": [], "skipped": [], "duration": 270095, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0ae2ac7d-ebd8-40ae-8d96-5e7120d3c3ce", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ecdfcc50-aa09-4390-82f3-d5358047d89c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 0, "state": "skipped", "speed": null, "pass": false, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "b1cc981d-ee20-4a38-a664-5266bd6a5fc9", "parentUUID": null, "isHook": false, "skipped": true } ], "suites": [], "passes": [], "failures": [], "pending": [], "skipped": [ "b1cc981d-ee20-4a38-a664-5266bd6a5fc9" ], "duration": 0, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4e37cb56-d544-495f-9173-797c15e3f3c1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3b96ae4d-015b-4748-ba40-c13662332ed8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198823, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "11d10df3-cd4f-4d95-a22c-4758f37ee1cf", "parentUUID": "3b96ae4d-015b-4748-ba40-c13662332ed8", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "11d10df3-cd4f-4d95-a22c-4758f37ee1cf" ], "pending": [], "skipped": [], "duration": 198823, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c3dff3f7-4f75-46a7-a363-19291f1030ac", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9590faa5-8fe3-4622-82ae-5383f4a9bccf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 211115, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": { "message": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.icon-group > svg:visible:nth-child(2)`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:229:53)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "33f1411b-77eb-4c37-b88f-fef0b54af5e4", "parentUUID": "9590faa5-8fe3-4622-82ae-5383f4a9bccf", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "33f1411b-77eb-4c37-b88f-fef0b54af5e4" ], "pending": [], "skipped": [], "duration": 211115, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "40375e74-77fe-4e38-bdca-2c657ae94006", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f9a61475-79c6-4e0d-a846-0e1dd4b465cf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 183536, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 30000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 30000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 30000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 30000}).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 //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 > svg:visible:nth-child(2)').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);", "err": {}, "uuid": "f68ad9da-4727-45ad-a81f-610cdc8ff105", "parentUUID": "f9a61475-79c6-4e0d-a846-0e1dd4b465cf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f68ad9da-4727-45ad-a81f-610cdc8ff105" ], "failures": [], "pending": [], "skipped": [], "duration": 183536, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "217c40e1-e894-4dd8-a8ed-57fc12a1d2e3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7d4030a5-c027-4c4c-9cb9-17c1b37927a6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 44829, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "AssertionError: expected 0.10005263157894738 to be below 0.1", "estack": "AssertionError: expected 0.10005263157894738 to be below 0.1\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.assertBelow (http://localhost:8081/__cypress/runner/cypress_runner.js:80745:12)\n at Proxy.methodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78199:25)\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:123:49)\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)", "diff": "- 0.10005263157894738\n+ 0.1\n" }, "uuid": "c771e196-4e2f-4a27-8b6a-7b2e0a48d828", "parentUUID": "7d4030a5-c027-4c4c-9cb9-17c1b37927a6", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "c771e196-4e2f-4a27-8b6a-7b2e0a48d828" ], "pending": [], "skipped": [], "duration": 44829, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e2abd043-2b23-4b0e-b401-601f701dcd1a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e8ced10e-9659-4061-80cc-8ede7b04bb60", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39150, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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(1000);\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "AssertionError: expected 0.24056140350877192 to be below 0.1", "estack": "AssertionError: expected 0.24056140350877192 to be below 0.1\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.assertBelow (http://localhost:8081/__cypress/runner/cypress_runner.js:80745:12)\n at Proxy.methodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78199:25)\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:123:49)\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)", "diff": "- 0.24056140350877192\n+ 0.1\n" }, "uuid": "feb95390-9610-4403-941d-ef9407b6fafe", "parentUUID": "e8ced10e-9659-4061-80cc-8ede7b04bb60", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "feb95390-9610-4403-941d-ef9407b6fafe" ], "pending": [], "skipped": [], "duration": 39150, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a0481a56-6f12-4146-ad3f-8de1ddc905d7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d9fe6c27-89a0-44ec-8123-0dd23e43e324", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193337, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "503666c5-029d-494c-b93e-6abe1cdd55b6", "parentUUID": "d9fe6c27-89a0-44ec-8123-0dd23e43e324", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "503666c5-029d-494c-b93e-6abe1cdd55b6" ], "failures": [], "pending": [], "skipped": [], "duration": 193337, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6da7a536-d347-4272-8937-d49387b4d5cb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "574780f6-ee05-42f9-a7da-48a2bc376557", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 201435, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "e450bbea-61ee-44c9-9a24-6125b06dafce", "parentUUID": "574780f6-ee05-42f9-a7da-48a2bc376557", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e450bbea-61ee-44c9-9a24-6125b06dafce" ], "failures": [], "pending": [], "skipped": [], "duration": 201435, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1aa7a5c0-bbdc-45a3-b16d-e2943cdcb679", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2543c953-e198-47b8-8735-5d0299c335e2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 198636, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "45428ec7-b0d3-4a74-a861-6c34b547886d", "parentUUID": "2543c953-e198-47b8-8735-5d0299c335e2", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "45428ec7-b0d3-4a74-a861-6c34b547886d" ], "failures": [], "pending": [], "skipped": [], "duration": 198636, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b36d6c8f-a199-49d9-8065-1448492d95ed", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "271ffcde-3941-470e-ae17-e6c6b205a730", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 190366, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "da469780-0479-48fe-9825-0ca30bad5995", "parentUUID": "271ffcde-3941-470e-ae17-e6c6b205a730", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "da469780-0479-48fe-9825-0ca30bad5995" ], "failures": [], "pending": [], "skipped": [], "duration": 190366, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1182ebf8-e11e-43a0-8b9f-6af8fd42e684", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c7163c0b-4f58-42cd-a8e3-e532273b85fc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193419, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "b41bb5d4-d2bc-4395-86cd-3f57e92c6ac3", "parentUUID": "c7163c0b-4f58-42cd-a8e3-e532273b85fc", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b41bb5d4-d2bc-4395-86cd-3f57e92c6ac3" ], "failures": [], "pending": [], "skipped": [], "duration": 193419, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "992eb170-f75e-48b1-a69d-39cafb47a20c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8b6212f7-c953-40f3-852d-a92712677298", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 176310, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "3b8788a1-840d-4e93-bab1-ee9807f99698", "parentUUID": "8b6212f7-c953-40f3-852d-a92712677298", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3b8788a1-840d-4e93-bab1-ee9807f99698" ], "failures": [], "pending": [], "skipped": [], "duration": 176310, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b512e5b1-b60e-40d7-b979-712b2e3c1663", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4ffd0c3b-640a-4bcd-8685-bacc9af4cf8c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193005, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "2a525e21-98ad-49a8-bf23-cbaad6836356", "parentUUID": "4ffd0c3b-640a-4bcd-8685-bacc9af4cf8c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2a525e21-98ad-49a8-bf23-cbaad6836356" ], "failures": [], "pending": [], "skipped": [], "duration": 193005, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6b46e9f5-afd9-4f76-a60b-e14a4ceade30", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "52e5c5b2-6104-47f7-a334-0c905af99416", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191443, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "de626f8e-9dc9-451a-b347-5c916979993f", "parentUUID": "52e5c5b2-6104-47f7-a334-0c905af99416", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "de626f8e-9dc9-451a-b347-5c916979993f" ], "failures": [], "pending": [], "skipped": [], "duration": 191443, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "251f314d-0cc6-4fac-98b6-e612cbd5aa63", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dcbfbdbc-1693-4a21-ada1-c2d17157fda9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 192788, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "263c4899-4e5a-4118-85c7-b344d874f291", "parentUUID": "dcbfbdbc-1693-4a21-ada1-c2d17157fda9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "263c4899-4e5a-4118-85c7-b344d874f291" ], "failures": [], "pending": [], "skipped": [], "duration": 192788, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "98884f52-2c83-4f74-8cf2-000d990b7b8d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9ed92abc-6b88-4866-9a4d-84e06becdc22", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 287194, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent', setting, index);\n })\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\n cy.get('.connectivity-card-container > .connectivity-card').first().click();\n cy.get(':nth-child(1) > .connectivity-info').should('contain', 'Neuron type aacar 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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 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": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `:nth-child(1) > .connectivity-info`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `:nth-child(1) > .connectivity-info`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:202:49)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "26cfd38f-4f7d-41c8-8349-b42539b082cd", "parentUUID": "9ed92abc-6b88-4866-9a4d-84e06becdc22", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "26cfd38f-4f7d-41c8-8349-b42539b082cd" ], "pending": [], "skipped": [], "duration": 287194, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b5429506-04d4-49b3-94c0-a4bf3b4307f9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4132ebae-f8b7-4bea-98db-15e161a4c8d8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 180936, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "2bd7b495-8007-4b7b-b46a-cb0cfe6b6f84", "parentUUID": "4132ebae-f8b7-4bea-98db-15e161a4c8d8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2bd7b495-8007-4b7b-b46a-cb0cfe6b6f84" ], "failures": [], "pending": [], "skipped": [], "duration": 180936, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f3bd7fae-b675-4ddf-97d4-79445e5a2354", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "63c9db77-9188-4d8f-b821-08b933d32ff1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 409119, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 Object.entries(settings).forEach(([setting, index]) => {\n cy.checkGlobalSettings('MapContent', setting, index);\n })\n //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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 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": "e62acb14-1c75-4817-8010-6947bb8125f3", "parentUUID": "63c9db77-9188-4d8f-b821-08b933d32ff1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e62acb14-1c75-4817-8010-6947bb8125f3" ], "failures": [], "pending": [], "skipped": [], "duration": 409119, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7bbc34f5-ba5d-4d4a-b4d9-50bc67eeec54", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e1bf8dcd-d277-42e2-9ba6-04c986dac711", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 194862, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "52260ccf-a91e-4aa9-8a28-7f0c981e0a20", "parentUUID": "e1bf8dcd-d277-42e2-9ba6-04c986dac711", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "52260ccf-a91e-4aa9-8a28-7f0c981e0a20" ], "failures": [], "pending": [], "skipped": [], "duration": 194862, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "821171d1-9d6c-4b3d-bb88-1e84da92c425", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7cd4111d-aa45-4267-9c95-4a9c0643f7d6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189431, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "75301567-7ca7-41ec-a817-ba52d29a1663", "parentUUID": "7cd4111d-aa45-4267-9c95-4a9c0643f7d6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "75301567-7ca7-41ec-a817-ba52d29a1663" ], "failures": [], "pending": [], "skipped": [], "duration": 189431, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8efa0368-7a43-4aaf-875b-91326563ac75", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e61c2d3b-6ead-46fa-99db-3a24d5d0ef70", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 179694, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "c0ee8173-d21e-4a5c-b076-29e06dfa484d", "parentUUID": "e61c2d3b-6ead-46fa-99db-3a24d5d0ef70", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "c0ee8173-d21e-4a5c-b076-29e06dfa484d" ], "failures": [], "pending": [], "skipped": [], "duration": 179694, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8028a3c9-4c74-485f-a7cf-c082d61845bf", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b0456ae2-11f5-45bd-a1a0-b78beb1bd6d2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199864, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "e00ccbd0-a341-4c61-be31-77acb97d47ee", "parentUUID": "b0456ae2-11f5-45bd-a1a0-b78beb1bd6d2", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e00ccbd0-a341-4c61-be31-77acb97d47ee" ], "failures": [], "pending": [], "skipped": [], "duration": 199864, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a1647a57-9c7d-4192-b603-6dcbb3f978ac", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bf05119d-761b-4896-b190-867855170e29", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 369690, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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();\n cy.get('.tree-controls > .drawer-button').click();\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": "CypressError: Timed out retrying after 10050ms: `cy.click()` failed because this element:\n\n`
...
`\n\nis being covered by another element:\n\n`
...
`\n\nFix this problem, or use {force: true} to disable error checking.\n\nhttps://on.cypress.io/element-cannot-be-interacted-with", "estack": "CypressError: Timed out retrying after 10050ms: `cy.click()` failed because this element:\n\n`
...
`\n\nis being covered by another element:\n\n`
...
`\n\nFix this problem, or use {force: true} to disable error checking.\n\nhttps://on.cypress.io/element-cannot-be-interacted-with\n at ensureIsDescendent (http://localhost:8081/__cypress/runner/cypress_runner.js:112445:68)\n at ensureDescendents (http://localhost:8081/__cypress/runner/cypress_runner.js:112496:5)\n at ensureDescendentsAndScroll (http://localhost:8081/__cypress/runner/cypress_runner.js:112502:14)\n at ensureElIsNotCovered (http://localhost:8081/__cypress/runner/cypress_runner.js:112633:5)\n at runAllChecks (http://localhost:8081/__cypress/runner/cypress_runner.js:112832:52)\n at retryActionability (http://localhost:8081/__cypress/runner/cypress_runner.js:112869:16)\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 whenStable (http://localhost:8081/__cypress/runner/cypress_runner.js:143646:68)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:143587:14)\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._settlePromise0 (http://localhost:8081/__cypress/runner/cypress_runner.js:1621:10)\n at Promise._settlePromises (http://localhost:8081/__cypress/runner/cypress_runner.js:1701:18)\n at Promise._fulfill (http://localhost:8081/__cypress/runner/cypress_runner.js:1645:18)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:5450:46)\nFrom Your Spec Code:\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at $Cy.expect (http://localhost:8081/__cypress/runner/cypress_runner.js:139034:7)\n at Context.shouldFn (http://localhost:8081/__cypress/runner/cypress_runner.js:118295:18)\n at Context.should (http://localhost:8081/__cypress/runner/cypress_runner.js:118409:23)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:142916:39)\n at assertions (http://localhost:8081/__cypress/runner/cypress_runner.js:143164:16)\n at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)\n at Object.gotValue (http://localhost:8081/__cypress/runner/cypress_runner.js:6478:18)\n at Object.gotAccum (http://localhost:8081/__cypress/runner/cypress_runner.js:6465:25)\n at Object.tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)", "diff": null }, "uuid": "90055626-2cb8-42a6-a8cb-46647e8e6a6c", "parentUUID": "bf05119d-761b-4896-b190-867855170e29", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "90055626-2cb8-42a6-a8cb-46647e8e6a6c" ], "pending": [], "skipped": [], "duration": 369690, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7c11022f-1257-4a48-a645-487b0deb3cb8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e8d85f00-a3f4-496f-8898-242c312bcd26", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 178720, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "b1632726-7cd6-4791-8728-3bac6f080c9e", "parentUUID": "e8d85f00-a3f4-496f-8898-242c312bcd26", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b1632726-7cd6-4791-8728-3bac6f080c9e" ], "failures": [], "pending": [], "skipped": [], "duration": 178720, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "62ee399b-9343-48d8-849f-7bd5e4120c28", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c95fecc7-5c2a-416f-908c-8e3581769d88", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 384679, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "412a6976-99ce-4acf-b20f-79857061dde0", "parentUUID": "c95fecc7-5c2a-416f-908c-8e3581769d88", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "412a6976-99ce-4acf-b20f-79857061dde0" ], "failures": [], "pending": [], "skipped": [], "duration": 384679, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4e09870c-8069-44a7-97a3-2df34fc9e2bd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "b149a8a2-3977-4b7e-8a83-fd3eb5aefb63", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 203858, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "d2352f79-2298-4e07-9950-b4564db742e9", "parentUUID": "b149a8a2-3977-4b7e-8a83-fd3eb5aefb63", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "d2352f79-2298-4e07-9950-b4564db742e9" ], "failures": [], "pending": [], "skipped": [], "duration": 203858, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9c039304-cf08-4de5-af54-ae6d7c5f7712", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8c70a5da-2442-4791-9ffb-aa5c9def0c9b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199441, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "2c382818-5548-44a7-9e18-a69265675f94", "parentUUID": "8c70a5da-2442-4791-9ffb-aa5c9def0c9b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2c382818-5548-44a7-9e18-a69265675f94" ], "failures": [], "pending": [], "skipped": [], "duration": 199441, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "54c642d3-ea3a-4771-b8d7-66e29a9be03d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "950ab774-6eb4-41f6-a99a-4e8b57edbcb9", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 193649, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "ee23bff9-f124-458f-9c60-e82a3fa951f9", "parentUUID": "950ab774-6eb4-41f6-a99a-4e8b57edbcb9", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "ee23bff9-f124-458f-9c60-e82a3fa951f9" ], "failures": [], "pending": [], "skipped": [], "duration": 193649, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "66178975-ce7b-4667-82f0-7beb5b74b71a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a7461aa1-1c8c-4aaf-9b39-c80790dfedaf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191412, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "42b3d512-3c3a-465f-8458-04dc96d2d946", "parentUUID": "a7461aa1-1c8c-4aaf-9b39-c80790dfedaf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "42b3d512-3c3a-465f-8458-04dc96d2d946" ], "failures": [], "pending": [], "skipped": [], "duration": 191412, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "cba50990-f68e-459b-b732-f76e031445d1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0ad1ab01-38f1-4a4a-93ad-186b1509ac00", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 48239, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.setVisibilityFilter (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:436:26)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:137:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:465:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:464:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=9680272b:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=9680272b:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:116:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:99:14)", "diff": null }, "uuid": "f4965e2e-6bae-4bf7-963d-537387f0d059", "parentUUID": "0ad1ab01-38f1-4a4a-93ad-186b1509ac00", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f4965e2e-6bae-4bf7-963d-537387f0d059" ], "pending": [], "skipped": [], "duration": 48239, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d2347759-a7d9-4ebf-849a-0672a9cefc11", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9f36d570-508a-4ed2-a4ef-5a2ff16662f7", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 200860, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "225760e5-b339-4919-bbac-445b2f2f616c", "parentUUID": "9f36d570-508a-4ed2-a4ef-5a2ff16662f7", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "225760e5-b339-4919-bbac-445b2f2f616c" ], "failures": [], "pending": [], "skipped": [], "duration": 200860, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f5329b71-df66-4f60-a4f8-afeb5f850495", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9fd4bf75-c6c9-4e47-b124-8205f3dd4b0b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 53671, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.setVisibilityFilter (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:436:26)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:137:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:474:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:473:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=9680272b:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=9680272b:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:117:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:100:14)", "diff": null }, "uuid": "3af00a1e-194a-42cc-bf00-be2bc1121e09", "parentUUID": "9fd4bf75-c6c9-4e47-b124-8205f3dd4b0b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3af00a1e-194a-42cc-bf00-be2bc1121e09" ], "pending": [], "skipped": [], "duration": 53671, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a6a6ce2c-090e-4bf3-80ed-334d56f3cbbb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4dda1876-ae58-4aec-b5eb-fe5c4418245f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 189065, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:137:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:474:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:473:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=02fa586c:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=02fa586c:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:117:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:100:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=1f755e7f:1858:19)", "diff": null }, "uuid": "74d638ca-0b5b-4248-a17f-940c33912e8f", "parentUUID": "4dda1876-ae58-4aec-b5eb-fe5c4418245f", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "74d638ca-0b5b-4248-a17f-940c33912e8f" ], "pending": [], "skipped": [], "duration": 189065, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1846788d-32e1-4cb1-b3a7-a080a9ff7505", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fc426167-50eb-4288-ac86-ad18e0126d8e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 196589, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "bc878f6a-8999-489a-bd08-d9f8245ef36b", "parentUUID": "fc426167-50eb-4288-ac86-ad18e0126d8e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "bc878f6a-8999-489a-bd08-d9f8245ef36b" ], "failures": [], "pending": [], "skipped": [], "duration": 196589, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2a256894-d2c5-4502-80e1-173fe7b498a3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c4e2434b-77f1-4f46-b452-cfb7b0114dc5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 205904, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:137:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:474:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:473:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=61f00f67:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=61f00f67:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:117:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:100:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=a1e46e56:1858:19)", "diff": null }, "uuid": "24b01b60-4ae1-4a00-acd3-7887d78b51d6", "parentUUID": "c4e2434b-77f1-4f46-b452-cfb7b0114dc5", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "24b01b60-4ae1-4a00-acd3-7887d78b51d6" ], "pending": [], "skipped": [], "duration": 205904, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e6956150-1fa0-4ca5-9580-dabb33b28857", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "40c55765-8dff-4d74-82cd-d16abe349b21", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 231022, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "07bfc1ec-53e3-4ac9-b138-05089bded0c8", "parentUUID": "40c55765-8dff-4d74-82cd-d16abe349b21", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "07bfc1ec-53e3-4ac9-b138-05089bded0c8" ], "failures": [], "pending": [], "skipped": [], "duration": 231022, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2a5fcf4f-10dd-49d9-a66f-8067561c4c40", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "456c4d9d-8210-4468-b0c4-0774651d880c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 206072, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "e7a57a71-b061-432a-8fe4-1a3f96dc8ed7", "parentUUID": "456c4d9d-8210-4468-b0c4-0774651d880c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e7a57a71-b061-432a-8fe4-1a3f96dc8ed7" ], "failures": [], "pending": [], "skipped": [], "duration": 206072, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "791da26e-677d-463b-a710-1ab7f5f47a8f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "adc23574-ece8-4483-98f2-7b586988c00d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 206283, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "afb98adf-292e-4e1e-8e66-95a2b53a9d70", "parentUUID": "adc23574-ece8-4483-98f2-7b586988c00d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "afb98adf-292e-4e1e-8e66-95a2b53a9d70" ], "failures": [], "pending": [], "skipped": [], "duration": 206283, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9292c1e2-be55-486b-87b4-889c27db5d8e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e0f1e4b9-fac7-43a0-b9c5-0a1b4f225bba", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 34643, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": { "message": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'values')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'values')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at loadAndStoreKnowledge (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer_src_services_flatmapKnowledge__js.js?v=9680272b:53:33)\n at async Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:619:25)", "diff": null }, "uuid": "f7c09945-7d85-4ef8-b377-150e8c02222a", "parentUUID": "e0f1e4b9-fac7-43a0-b9c5-0a1b4f225bba", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f7c09945-7d85-4ef8-b377-150e8c02222a" ], "pending": [], "skipped": [], "duration": 34643, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "247f60e9-0333-41af-ae56-26080f2cb7b9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "05d82f1d-ded7-49c1-801f-56b2f44f3a9b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 194128, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "cc6a325f-6544-4a80-98f9-bab5d5f3c2ce", "parentUUID": "05d82f1d-ded7-49c1-801f-56b2f44f3a9b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cc6a325f-6544-4a80-98f9-bab5d5f3c2ce" ], "failures": [], "pending": [], "skipped": [], "duration": 194128, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9fa0a4d8-c166-490c-8597-fb0654de5e29", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "538bc6c7-2c99-46b1-9de2-56194279b259", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 199061, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "98accf4a-2ef9-4128-bbef-3649500c6461", "parentUUID": "538bc6c7-2c99-46b1-9de2-56194279b259", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "98accf4a-2ef9-4128-bbef-3649500c6461" ], "failures": [], "pending": [], "skipped": [], "duration": 199061, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4c9bdbee-728a-416c-aa9c-09e8cd16ed96", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "56246ca5-4747-45bf-be8b-b4cd4e6aee5a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 185692, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "9e16f5a9-7731-4b2d-af6c-b2fbd60e3470", "parentUUID": "56246ca5-4747-45bf-be8b-b4cd4e6aee5a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9e16f5a9-7731-4b2d-af6c-b2fbd60e3470" ], "failures": [], "pending": [], "skipped": [], "duration": 185692, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a51d9d8d-1746-40e9-8ddc-cc857a8b2715", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7db0b897-1397-4d71-99d5-9b0d6d36ecc3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 456606, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "bb24faea-f757-411e-8950-83c638ccd575", "parentUUID": "7db0b897-1397-4d71-99d5-9b0d6d36ecc3", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "bb24faea-f757-411e-8950-83c638ccd575" ], "failures": [], "pending": [], "skipped": [], "duration": 456606, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "79ddb29b-2740-4a6c-8670-87b300b90d73", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d49e1666-5b00-40a7-bf89-37e33f5bd9c3", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 191100, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "3751d632-718c-4c1a-ad59-c4e2861b086a", "parentUUID": "d49e1666-5b00-40a7-bf89-37e33f5bd9c3", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3751d632-718c-4c1a-ad59-c4e2861b086a" ], "failures": [], "pending": [], "skipped": [], "duration": 191100, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "02c51309-f414-4567-8b35-a5446eaf0d13", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5b40bad5-3aa2-45e3-8a61-8a8e40cde165", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 453461, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "3fc58322-a171-455f-9552-03441b5ab179", "parentUUID": "5b40bad5-3aa2-45e3-8a61-8a8e40cde165", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3fc58322-a171-455f-9552-03441b5ab179" ], "failures": [], "pending": [], "skipped": [], "duration": 453461, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fe6a6f7c-a84b-41fc-8135-1ce751d8d8fd", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d7202196-0548-4362-a5b1-9df6c19bbc2a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 396434, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "67cb1552-57d7-44e4-a158-285d96708f69", "parentUUID": "d7202196-0548-4362-a5b1-9df6c19bbc2a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "67cb1552-57d7-44e4-a158-285d96708f69" ], "failures": [], "pending": [], "skipped": [], "duration": 396434, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c989989b-5258-4dd2-b17f-0938059dec5b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "017562b1-66e7-49e9-a2c2-58a72785e916", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 431047, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "e5e1df27-aec7-4c09-9175-2431f0d44a17", "parentUUID": "017562b1-66e7-49e9-a2c2-58a72785e916", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e5e1df27-aec7-4c09-9175-2431f0d44a17" ], "failures": [], "pending": [], "skipped": [], "duration": 431047, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "df8796e6-eb43-405b-a76f-fe25fc8197b8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5d1993c7-bc54-458b-8f4a-d5a210d6d619", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 210484, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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 //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);", "err": {}, "uuid": "96779ed4-2972-4420-927d-5184c63f11be", "parentUUID": "5d1993c7-bc54-458b-8f4a-d5a210d6d619", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "96779ed4-2972-4420-927d-5184c63f11be" ], "failures": [], "pending": [], "skipped": [], "duration": 210484, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "25319576-40b8-4459-83a1-e0dcf2abbd02", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "86dede15-17bb-4370-a56a-49f3ef81e6a6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 39194, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.enableFeatureResetOnClick is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.enableFeatureResetOnClick is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.enableFeatureResetOnClick (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:336:17)\n at Proxy.onEnableFeatureResetOnClick (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:125:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:444:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:443:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0b7c267e:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0b7c267e:13:20)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:104:18)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=d0b1197c:1858:19)", "diff": null }, "uuid": "3ba3bfaf-2c4d-4bd1-94a5-bee49321b081", "parentUUID": "86dede15-17bb-4370-a56a-49f3ef81e6a6", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3ba3bfaf-2c4d-4bd1-94a5-bee49321b081" ], "pending": [], "skipped": [], "duration": 39194, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "57eeef42-1fd6-4c51-bd8a-bdd9eedf6a71", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e4b4bc11-1664-47eb-a766-a22c8fee6855", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 32713, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.enableFeatureResetOnClick is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > flatmap.enableFeatureResetOnClick is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.enableFeatureResetOnClick (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:336:17)\n at Proxy.onEnableFeatureResetOnClick (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:125:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:444:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:443:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0ee66b4d:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=0ee66b4d:13:20)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:104:18)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=0ee66b4d:1858:19)", "diff": null }, "uuid": "73379976-4bc8-4f20-8e22-0a30efc62b0b", "parentUUID": "e4b4bc11-1664-47eb-a766-a22c8fee6855", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "73379976-4bc8-4f20-8e22-0a30efc62b0b" ], "pending": [], "skipped": [], "duration": 32713, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5cf8a847-44e4-4150-bfd3-103f63863d7e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "08ebba65-5672-43e7-bcc2-00936ad055ce", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 439212, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "82cbf63f-b5cc-44bf-b262-9c1b4802b0d6", "parentUUID": "08ebba65-5672-43e7-bcc2-00936ad055ce", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "82cbf63f-b5cc-44bf-b262-9c1b4802b0d6" ], "failures": [], "pending": [], "skipped": [], "duration": 439212, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3e70494c-1a49-406c-8f72-76931f1c4437", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "140adf37-3241-4ebe-991a-ea87b9a72a25", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 428139, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "04a6165f-70d3-48ca-8053-1026d7f05bbe", "parentUUID": "140adf37-3241-4ebe-991a-ea87b9a72a25", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "04a6165f-70d3-48ca-8053-1026d7f05bbe" ], "failures": [], "pending": [], "skipped": [], "duration": 428139, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "35a204dd-a795-4968-897a-7f6aa01c0d71", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d5455ca0-32d1-41af-b33c-5834c633d106", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 442725, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "5a1c2284-a9bc-47f3-a228-c99621a81ce8", "parentUUID": "d5455ca0-32d1-41af-b33c-5834c633d106", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5a1c2284-a9bc-47f3-a228-c99621a81ce8" ], "failures": [], "pending": [], "skipped": [], "duration": 442725, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1525c428-6460-4360-8d65-5ff8aab18ed5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1a885771-a6a8-4bd0-9e37-e515be43323e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 356113, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "diff": null }, "uuid": "78f8ab57-e277-4f13-986f-561343b49463", "parentUUID": "1a885771-a6a8-4bd0-9e37-e515be43323e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "78f8ab57-e277-4f13-986f-561343b49463" ], "pending": [], "skipped": [], "duration": 356113, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8e800a51-bd95-4b94-829e-995bb96af7e2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "69f42855-49f1-4c61-8027-2af5f3c18d72", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 386667, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "cc6a1e1a-07bd-40a2-9119-e8206edbef0f", "parentUUID": "69f42855-49f1-4c61-8027-2af5f3c18d72", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cc6a1e1a-07bd-40a2-9119-e8206edbef0f" ], "failures": [], "pending": [], "skipped": [], "duration": 386667, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5ddb57dc-7fc1-4470-b9fc-7a478e0f0d7a", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7258c697-31a6-478e-8435-a1268e818823", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 335904, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > m is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > m is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=af15f82d:10309:55)\n at Proxy.forEach ()\n at Proxy.getFilterOptions (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=af15f82d:10303:11)\n at async Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:598:48)", "diff": null }, "uuid": "6b2ebc4a-9955-4f1b-9e9f-4a0eabff8431", "parentUUID": "7258c697-31a6-478e-8435-a1268e818823", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "6b2ebc4a-9955-4f1b-9e9f-4a0eabff8431" ], "pending": [], "skipped": [], "duration": 335904, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "69c9e9da-3dff-403b-bfb7-c65daf37953c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ae93acc1-5fb4-4c15-9a21-5812bfba8e92", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 365439, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > p is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > p is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3e3ccf88:10309:55)\n at Proxy.forEach ()\n at Proxy.getFilterOptions (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=3e3ccf88:10303:11)\n at async Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:598:48)", "diff": null }, "uuid": "4fb6e9e6-e8cc-4ef1-a636-0ca3af60beaf", "parentUUID": "ae93acc1-5fb4-4c15-9a21-5812bfba8e92", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "4fb6e9e6-e8cc-4ef1-a636-0ca3af60beaf" ], "pending": [], "skipped": [], "duration": 365439, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "79fc7eb4-a57b-463a-8fb3-209222e4c3e0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "769d5008-2e4a-4359-814a-91048a269dc2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 444608, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "1a239b80-d302-4c66-acfc-2e340b6f0b42", "parentUUID": "769d5008-2e4a-4359-814a-91048a269dc2", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1a239b80-d302-4c66-acfc-2e340b6f0b42" ], "failures": [], "pending": [], "skipped": [], "duration": 444608, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8d1d367b-7e1a-4a5f-a135-8a1b90105809", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5e41f80a-34a1-4211-991b-4c81e82ca315", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 393339, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "f7ecdd9e-e31d-4692-aeb4-c25e25701e40", "parentUUID": "5e41f80a-34a1-4211-991b-4c81e82ca315", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f7ecdd9e-e31d-4692-aeb4-c25e25701e40" ], "failures": [], "pending": [], "skipped": [], "duration": 393339, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "adaf3c79-2a33-4c68-bf46-ed4a80f04bb0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "99ce677e-3962-48b3-83da-d8af88113298", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 395982, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "6ff5f1b1-372c-4caa-8630-e0ed3b8fc5cf", "parentUUID": "99ce677e-3962-48b3-83da-d8af88113298", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6ff5f1b1-372c-4caa-8630-e0ed3b8fc5cf" ], "failures": [], "pending": [], "skipped": [], "duration": 395982, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a5cb5217-4f97-48f4-9eb6-db153765ecb4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7314e03f-8336-4a71-804e-5a6c3adaa195", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 385481, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "6662a211-0424-4e67-85de-8cac795a47ce", "parentUUID": "7314e03f-8336-4a71-804e-5a6c3adaa195", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6662a211-0424-4e67-85de-8cac795a47ce" ], "failures": [], "pending": [], "skipped": [], "duration": 385481, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "702f1df1-c085-4b37-9b45-44af34eb259b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c6d1cb69-a0e9-4d11-ab30-256a8648e9d1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 379259, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > g is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > g is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=a8106f44:10324:36)\n at Proxy.reduce ()\n at Proxy.getFilterOptions (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=a8106f44:10318:98)\n at async Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:595:48)", "diff": null }, "uuid": "3828e1cb-385d-4cd0-832e-149685671705", "parentUUID": "c6d1cb69-a0e9-4d11-ab30-256a8648e9d1", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "3828e1cb-385d-4cd0-832e-149685671705" ], "pending": [], "skipped": [], "duration": 379259, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ef02576a-acc8-424c-bb72-723459370737", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "fdddc35e-214e-4a5d-b6ad-d3b769e53c79", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 401686, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "0c0e590f-d3d6-46c2-bbab-0ae779673bea", "parentUUID": "fdddc35e-214e-4a5d-b6ad-d3b769e53c79", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0c0e590f-d3d6-46c2-bbab-0ae779673bea" ], "failures": [], "pending": [], "skipped": [], "duration": 401686, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1ff4680f-5cbb-4472-96e4-6722317d9cf1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0ed0b50a-3b13-457f-8f5f-30d576418684", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 347100, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:125:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:495:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:494:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=6514b870:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=6514b870:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:126:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:101:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=15b47e81:1858:19)", "diff": null }, "uuid": "cd78c44c-7edf-40c1-ae51-5b077bc14b86", "parentUUID": "0ed0b50a-3b13-457f-8f5f-30d576418684", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "cd78c44c-7edf-40c1-ae51-5b077bc14b86" ], "pending": [], "skipped": [], "duration": 347100, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d31a8270-6d6b-4114-b481-38d640576612", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9613092f-1428-4d3f-a6c1-243a59a5cbfb", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 344715, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.viewer?.setVisibilityFilter is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/ContentVuer.vue:125:26)\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:495:17)\n at Array.forEach ()\n at (http://localhost:8081/__cypress/src/src/components/SplitDialog.vue:494:16)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=cf786415:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=cf786415:13:20)\n at Proxy.onFilterVisibility (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:126:16)\n at Proxy.handler (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:101:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=198f9b13:1858:19)", "diff": null }, "uuid": "ecb5bae1-b5ad-4e84-a499-298ab018629c", "parentUUID": "9613092f-1428-4d3f-a6c1-243a59a5cbfb", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ecb5bae1-b5ad-4e84-a499-298ab018629c" ], "pending": [], "skipped": [], "duration": 344715, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3c8a1661-175a-4464-9cf8-66715a01cc31", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e5d1ca4e-7553-4fa8-aba7-bc160672970d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 35972, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setConnectionType is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setConnectionType is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.updateViewerSettings (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:351:24)\n at Proxy.multiFlatmapReady (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:216:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=97a86895:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=97a86895:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=97a86895:2381:5)\n at Proxy.FlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=b6b91498:11613:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=97a86895:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=97a86895:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=97a86895:2381:5)\n at Proxy.onFlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=b6b91498:10261:740)", "diff": null }, "uuid": "f4cfa9e9-da70-4f9d-9690-73b434f36aa2", "parentUUID": "e5d1ca4e-7553-4fa8-aba7-bc160672970d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f4cfa9e9-da70-4f9d-9690-73b434f36aa2" ], "pending": [], "skipped": [], "duration": 35972, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "86ac50e7-0267-4d6f-9e1b-1f66cd6c8bbf", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9aab7a19-43ad-4271-a12d-83eafa6df342", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36982, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setConnectionType is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > currentFlatmap.setConnectionType is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at Proxy.updateViewerSettings (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:351:24)\n at Proxy.multiFlatmapReady (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:216:14)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=7edf9266:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=7edf9266:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=7edf9266:2381:5)\n at Proxy.FlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2469fe4b:11613:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=7edf9266:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=7edf9266:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=7edf9266:2381:5)\n at Proxy.onFlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=2469fe4b:10261:740)", "diff": null }, "uuid": "6f5b3efe-bfa4-4b8f-a9b2-414b3cad5409", "parentUUID": "9aab7a19-43ad-4271-a12d-83eafa6df342", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "6f5b3efe-bfa4-4b8f-a9b2-414b3cad5409" ], "pending": [], "skipped": [], "duration": 36982, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f32186da-766d-4ee2-aabc-5ae914aa3566", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c3543d5c-1428-4e86-a178-fa1afad400cf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 356067, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.el-dropdown-menu__item > span`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.el-dropdown-menu__item > span`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:284:7)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "1efbd0ae-138d-4a0a-bb3a-83f62cba318b", "parentUUID": "c3543d5c-1428-4e86-a178-fa1afad400cf", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "1efbd0ae-138d-4a0a-bb3a-83f62cba318b" ], "pending": [], "skipped": [], "duration": 356067, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "9ccf0687-6b3b-4751-bcbc-81e253759b98", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0f0d99fe-076e-4d52-9713-2a21cd12b221", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 383426, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "cb9cfa4d-ea51-4225-bf55-be8e98cca538", "parentUUID": "0f0d99fe-076e-4d52-9713-2a21cd12b221", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "cb9cfa4d-ea51-4225-bf55-be8e98cca538" ], "failures": [], "pending": [], "skipped": [], "duration": 383426, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4781355f-6ac1-4074-8887-f605e70416c5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "153e49e5-0b53-400c-b900-e7414826cc51", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 353025, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > g is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > g is not iterable\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=053d34c0:10413:36)\n at Proxy.reduce ()\n at Proxy.getFilterOptions (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=053d34c0:10407:98)\n at async Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:595:48)", "diff": null }, "uuid": "f67f7c70-a81e-4cc2-9b2c-7aec2451dee3", "parentUUID": "153e49e5-0b53-400c-b900-e7414826cc51", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f67f7c70-a81e-4cc2-9b2c-7aec2451dee3" ], "pending": [], "skipped": [], "duration": 353025, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e8ddcef2-516b-4ed6-b495-ee78e0a0c68b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f4b232f5-6c00-44c1-9136-9b75c19eb19d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 400208, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "8de6c2cc-e97b-410d-a18d-4fb47e72bd4e", "parentUUID": "f4b232f5-6c00-44c1-9136-9b75c19eb19d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8de6c2cc-e97b-410d-a18d-4fb47e72bd4e" ], "failures": [], "pending": [], "skipped": [], "duration": 400208, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "012fbdc6-8e81-4bee-8598-6f7e4b72efb0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "561e7fe2-a111-457f-b891-a11cc192a872", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 325970, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.el-dropdown-menu__item > span`, but never found it.", "estack": "AssertionError: Timed out retrying after 10000ms: Expected to find element: `.el-dropdown-menu__item > span`, but never found it.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:284:7)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "71da82c8-7b30-4d44-ba34-5dc6c9ba60ee", "parentUUID": "561e7fe2-a111-457f-b891-a11cc192a872", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "71da82c8-7b30-4d44-ba34-5dc6c9ba60ee" ], "pending": [], "skipped": [], "duration": 325970, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "832e1fb6-1a70-4b23-8ebd-d3f097e39513", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "23960ca2-2027-48b0-98e2-305702e2030d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 386215, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "010bb4cf-e0ca-4ae9-9dc8-69023e685a82", "parentUUID": "23960ca2-2027-48b0-98e2-305702e2030d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "010bb4cf-e0ca-4ae9-9dc8-69023e685a82" ], "failures": [], "pending": [], "skipped": [], "duration": 386215, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5b2008c0-6ec0-436d-8931-236493e5cec4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "dea4dd39-008f-4d0b-b4ce-f2dc579f80ca", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 384331, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "8f5d2d26-7bd7-4d26-9c9c-c60efde4ef65", "parentUUID": "dea4dd39-008f-4d0b-b4ce-f2dc579f80ca", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8f5d2d26-7bd7-4d26-9c9c-c60efde4ef65" ], "failures": [], "pending": [], "skipped": [], "duration": 384331, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "412cd5f0-a84e-4dea-ba10-4afbb921db7b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "973b8711-dc46-49de-ae05-ddbed2479d69", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 373795, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "CypressError: Timed out retrying after 10050ms: `cy.click()` could not be issued because we could not determine the actionability of this element:\n\n`
...
`\n\nYou can prevent this by passing `{force: true}` to disable all error checking.", "estack": "CypressError: Timed out retrying after 10050ms: `cy.click()` could not be issued because we could not determine the actionability of this element:\n\n`
...
`\n\nYou can prevent this by passing `{force: true}` to disable all error checking.\n at ensureNotAnimating (http://localhost:8081/__cypress/runner/cypress_runner.js:112675:66)\n at runAllChecks (http://localhost:8081/__cypress/runner/cypress_runner.js:112825:9)\n at retryActionability (http://localhost:8081/__cypress/runner/cypress_runner.js:112869:16)\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 whenStable (http://localhost:8081/__cypress/runner/cypress_runner.js:143646:68)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:143587:14)\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._settlePromise0 (http://localhost:8081/__cypress/runner/cypress_runner.js:1621:10)\n at Promise._settlePromises (http://localhost:8081/__cypress/runner/cypress_runner.js:1701:18)\n at Promise._fulfill (http://localhost:8081/__cypress/runner/cypress_runner.js:1645:18)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:5450:46)\nFrom Your Spec Code:\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at $Cy.expect (http://localhost:8081/__cypress/runner/cypress_runner.js:139034:7)\n at Context.shouldFn (http://localhost:8081/__cypress/runner/cypress_runner.js:118295:18)\n at Context.should (http://localhost:8081/__cypress/runner/cypress_runner.js:118409:23)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:142916:39)\n at assertions (http://localhost:8081/__cypress/runner/cypress_runner.js:143164:16)\n at tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)\n at Object.gotValue (http://localhost:8081/__cypress/runner/cypress_runner.js:6478:18)\n at Object.gotAccum (http://localhost:8081/__cypress/runner/cypress_runner.js:6465:25)\n at Object.tryCatcher (http://localhost:8081/__cypress/runner/cypress_runner.js:1807:23)", "diff": null }, "uuid": "2833db74-5b77-420e-bb31-0ba21549d94d", "parentUUID": "973b8711-dc46-49de-ae05-ddbed2479d69", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "2833db74-5b77-420e-bb31-0ba21549d94d" ], "pending": [], "skipped": [], "duration": 373795, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "cee6f213-31e3-479c-b0d1-c603b5251bb7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8bf28117-1f33-4c6e-83c0-7a94aa5dcdbd", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 390898, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "e00938d7-eefa-42ad-b4a2-13fc013acc35", "parentUUID": "8bf28117-1f33-4c6e-83c0-7a94aa5dcdbd", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e00938d7-eefa-42ad-b4a2-13fc013acc35" ], "failures": [], "pending": [], "skipped": [], "duration": 390898, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5132d73c-5b80-4a22-a52e-59a2085c43d0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "172e96a0-e267-4181-8b3c-a5f39efdfcff", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 262455, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:206:64)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 10\n+ 9\n" }, "uuid": "dcda15a5-8999-43fa-b529-aa6e8bee6277", "parentUUID": "172e96a0-e267-4181-8b3c-a5f39efdfcff", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "dcda15a5-8999-43fa-b529-aa6e8bee6277" ], "pending": [], "skipped": [], "duration": 262455, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "8f67a4d6-a7f1-4ea8-8037-5406fe71f0de", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f2f1caf3-d4b9-44da-8fa2-e9421afe78cb", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 254012, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:206:64)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 10\n+ 9\n" }, "uuid": "46082a1c-a25f-43dc-9d1a-7aaec1370351", "parentUUID": "f2f1caf3-d4b9-44da-8fa2-e9421afe78cb", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "46082a1c-a25f-43dc-9d1a-7aaec1370351" ], "pending": [], "skipped": [], "duration": 254012, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5bd51324-ab6d-47b1-b71e-ea1bdc9d7726", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "7f69cd73-6384-49bf-bfb3-50437768f3aa", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 255900, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:206:64)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 10\n+ 9\n" }, "uuid": "5c9f7a28-4db4-482e-8772-e606ed878a06", "parentUUID": "7f69cd73-6384-49bf-bfb3-50437768f3aa", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "5c9f7a28-4db4-482e-8772-e606ed878a06" ], "pending": [], "skipped": [], "duration": 255900, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "cc8435c2-97dd-46d5-a8af-b5cf0f6a1d63", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bf02c4fe-c157-45fd-b3fd-6403d7562b2e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 303868, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:649:29)\n at Array.map ()\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:647:12)\n at Proxy.loadExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:567:12)", "diff": null }, "uuid": "e5dd7b2d-317b-4978-b349-d4de04df6217", "parentUUID": "bf02c4fe-c157-45fd-b3fd-6403d7562b2e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "e5dd7b2d-317b-4978-b349-d4de04df6217" ], "pending": [], "skipped": [], "duration": 303868, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1275980f-574f-472a-9fdd-24eb8e7ead5f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5b15b57a-1e21-4550-b38f-115e36d0173f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 330872, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:649:29)\n at Array.map ()\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:647:12)\n at Proxy.loadExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:567:12)", "diff": null }, "uuid": "b199f9ed-4376-474e-bfb8-1c18dd87e7ff", "parentUUID": "5b15b57a-1e21-4550-b38f-115e36d0173f", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b199f9ed-4376-474e-bfb8-1c18dd87e7ff" ], "pending": [], "skipped": [], "duration": 330872, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e43d15d1-4e95-45ee-9ca6-2043a4a3056f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2181af4a-5193-43f8-9a64-5b6ddb5a2294", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 334958, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:649:29)\n at Array.map ()\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:647:12)\n at Proxy.loadExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:567:12)", "diff": null }, "uuid": "4cbef519-282b-4b04-853a-429f7eb8bdd6", "parentUUID": "2181af4a-5193-43f8-9a64-5b6ddb5a2294", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "4cbef519-282b-4b04-853a-429f7eb8bdd6" ], "pending": [], "skipped": [], "duration": 334958, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7d020bc3-c565-4701-b14f-42212495b714", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bfecee71-266d-4bf0-95aa-0b833ca9c01f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 444654, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "80e12ac4-bbaf-4310-9bf0-0d242a1357ef", "parentUUID": "bfecee71-266d-4bf0-95aa-0b833ca9c01f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "80e12ac4-bbaf-4310-9bf0-0d242a1357ef" ], "failures": [], "pending": [], "skipped": [], "duration": 444654, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d418aeab-4720-4a96-bda5-84627771943e", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1b4775a7-e233-4843-b074-11f10a85530c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 278321, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.", "estack": "AssertionError: Timed out retrying after 10000ms: Too many elements found. Found '10', expected '9'.\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:206:64)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": "- 10\n+ 9\n" }, "uuid": "d8531fcc-9400-4ab7-9b6d-c7d7fba47f7a", "parentUUID": "1b4775a7-e233-4843-b074-11f10a85530c", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "d8531fcc-9400-4ab7-9b6d-c7d7fba47f7a" ], "pending": [], "skipped": [], "duration": 278321, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b912a25b-2e8a-4d99-b521-270b243fafff", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3a509b3f-9ca4-41ea-9f81-74b4d4fed9b2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 399801, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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": "b2fba406-c0e6-44f1-86bb-2100190ca615", "parentUUID": "3a509b3f-9ca4-41ea-9f81-74b4d4fed9b2", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b2fba406-c0e6-44f1-86bb-2100190ca615" ], "failures": [], "pending": [], "skipped": [], "duration": 399801, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0b3a217f-1f4e-4572-8f7c-7a047eb67d38", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ebc5fab5-b987-48bf-9aeb-7f935767318c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 300718, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > Cannot read properties of undefined (reading 'length')\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:649:29)\n at Array.map ()\n at Proxy.loadConnectivityExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:647:12)\n at Proxy.loadExplorerConfig (http://localhost:8081/__cypress/src/src/mixins/ContentMixin.js:567:12)", "diff": null }, "uuid": "0c3e93f1-5fa5-474e-8155-e1729c48b49a", "parentUUID": "ebc5fab5-b987-48bf-9aeb-7f935767318c", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "0c3e93f1-5fa5-474e-8155-e1729c48b49a" ], "pending": [], "skipped": [], "duration": 300718, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3fa57185-d75e-42e3-a04f-447f5350f365", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "670a5a2c-279e-49a7-aa4a-24dea3088a90", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 442208, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "92bb4b2a-319b-4fca-afc3-f5b589946059", "parentUUID": "670a5a2c-279e-49a7-aa4a-24dea3088a90", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "92bb4b2a-319b-4fca-afc3-f5b589946059" ], "failures": [], "pending": [], "skipped": [], "duration": 442208, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "713ea05c-eafb-4841-b33e-9d09bb245c2c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "9230d24a-b470-4cb7-823e-64dbd58e97e0", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 446296, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "51d67395-45cb-49b5-ada1-d2858c915ef7", "parentUUID": "9230d24a-b470-4cb7-823e-64dbd58e97e0", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "51d67395-45cb-49b5-ada1-d2858c915ef7" ], "failures": [], "pending": [], "skipped": [], "duration": 446296, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2501600a-06c5-400c-941f-a769cd9dc883", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "01544c96-f0c4-4aa6-aca0-b837a729e5e1", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 414296, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "8aa4b9f9-c078-4897-9cd4-a4598334d62d", "parentUUID": "01544c96-f0c4-4aa6-aca0-b837a729e5e1", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "8aa4b9f9-c078-4897-9cd4-a4598334d62d" ], "failures": [], "pending": [], "skipped": [], "duration": 414296, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b3654f22-c458-460d-8c9c-4103a83cbc66", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1e98ebad-b000-40a3-844c-6253d4ec8357", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 409156, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "641e390e-5b35-4229-9c79-96aad78dec63", "parentUUID": "1e98ebad-b000-40a3-844c-6253d4ec8357", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "641e390e-5b35-4229-9c79-96aad78dec63" ], "failures": [], "pending": [], "skipped": [], "duration": 409156, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "01a2509a-bf97-4f46-8d06-6f595d1dcb6b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "0ba6c25f-22d3-4bfb-8b80-81b1e6b06c41", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 452539, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "1559fa19-3106-4762-a139-8d8c326e5c6c", "parentUUID": "0ba6c25f-22d3-4bfb-8b80-81b1e6b06c41", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "1559fa19-3106-4762-a139-8d8c326e5c6c" ], "failures": [], "pending": [], "skipped": [], "duration": 452539, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "a0453e7f-f62e-419a-83f1-f227bf22d2dc", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c35d550a-3148-4ef4-b26e-416343b916c4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 416227, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "270c5262-e64f-4166-bcec-81dc7e5787f1", "parentUUID": "c35d550a-3148-4ef4-b26e-416343b916c4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "270c5262-e64f-4166-bcec-81dc7e5787f1" ], "failures": [], "pending": [], "skipped": [], "duration": 416227, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "7f6927af-fc26-49ef-b8f7-73fb82aa49a9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a2164836-0a38-4dfb-ab94-ba4dc31235ca", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 408522, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "0cbfa359-2a59-4623-a7ed-dedc209e00a1", "parentUUID": "a2164836-0a38-4dfb-ab94-ba4dc31235ca", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0cbfa359-2a59-4623-a7ed-dedc209e00a1" ], "failures": [], "pending": [], "skipped": [], "duration": 408522, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "41624475-8734-43d4-a90c-e04399527257", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "2b6c1ab3-6da3-4662-8282-dcb938686256", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 26496, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:146:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "7ede1a1b-1dbd-45fb-88cd-acee112b6c75", "parentUUID": "2b6c1ab3-6da3-4662-8282-dcb938686256", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "7ede1a1b-1dbd-45fb-88cd-acee112b6c75" ], "pending": [], "skipped": [], "duration": 26496, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "50f1dde2-5c35-4128-ae9d-36e444adfff0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4ea34ffb-1b98-4275-9008-dfea1e97617e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 409292, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "9787844a-d963-44ed-9650-8b18a7c50c5e", "parentUUID": "4ea34ffb-1b98-4275-9008-dfea1e97617e", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "9787844a-d963-44ed-9650-8b18a7c50c5e" ], "failures": [], "pending": [], "skipped": [], "duration": 409292, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1d88394c-f301-4f99-908d-9959cdd5f2cb", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "de3ae736-7215-4147-982d-dda24129f691", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 53660, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 45000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\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: 45000}).should('not.exist');\n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 45000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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 //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: 45000}).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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .header > .el-button--primary').click();\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length', 9);\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 10a');\n cy.get('[style=\"\"] > .el-card__header > .header > .is-link').click();\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('.el-dropdown-menu__item > span').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 (50) is out of bounds", "estack": "Error: queue.insert must be called with a valid index - the index (50) 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=ceab5235:103:63)\n at Context. (http://localhost:8081/__cypress/src/node_modules/.vite/deps/cypress-visual-regression_dist_command.js?v=ceab5235: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": "090705cc-ecee-4141-acf2-612765f431bb", "parentUUID": "de3ae736-7215-4147-982d-dda24129f691", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "090705cc-ecee-4141-acf2-612765f431bb" ], "pending": [], "skipped": [], "duration": 53660, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ce6b77c2-82b2-4534-bea1-b59c6ba063fc", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "95049f65-633a-42f9-835a-97a48480db02", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 30752, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "11cebc83-7850-4035-8366-45353d45e299", "parentUUID": "95049f65-633a-42f9-835a-97a48480db02", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "11cebc83-7850-4035-8366-45353d45e299" ], "pending": [], "skipped": [], "duration": 30752, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b905cdf7-7384-46eb-9409-e610c0248488", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6303aa84-9e65-4f03-bb07-ee12ab6a0fbf", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 398401, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "e3955215-ae48-4a37-a9f5-1354ed14f27f", "parentUUID": "6303aa84-9e65-4f03-bb07-ee12ab6a0fbf", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e3955215-ae48-4a37-a9f5-1354ed14f27f" ], "failures": [], "pending": [], "skipped": [], "duration": 398401, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ec7edb8a-bdd0-4b9b-b9ab-5b42b801cdd8", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "90687deb-111d-4cd0-b279-22cc65cf5215", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 365147, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "diff": null }, "uuid": "c8b67317-39a8-4078-8480-55be9a123c45", "parentUUID": "90687deb-111d-4cd0-b279-22cc65cf5215", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "c8b67317-39a8-4078-8480-55be9a123c45" ], "pending": [], "skipped": [], "duration": 365147, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3e5d4d93-a2a1-49b2-8c97-cbbf15727596", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3629cc83-85b3-46b4-be9e-b5d4ca1b1d4a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36950, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar?.getState is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "TypeError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > this.$refs.sideBar?.getState is not a function\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at (http://localhost:8081/__cypress/src/src/components/SplitFlow.vue:748:48)\n at (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=54ed8d26:14:7)\n at Array.map ()\n at Object.emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/mitt.js?v=54ed8d26:13:20)\n at Proxy.multiFlatmapReady (http://localhost:8081/__cypress/src/src/components/viewers/MultiFlatmap.vue:224:18)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=54ed8d26:1858:19)\n at callWithAsyncErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=54ed8d26:1865:17)\n at emit (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=54ed8d26:2381:5)\n at Proxy.FlatmapReady (http://localhost:8081/__cypress/src/node_modules/.vite/deps/@abi-software_flatmapvuer.js?v=54ed8d26:11806:12)\n at callWithErrorHandling (http://localhost:8081/__cypress/src/node_modules/.vite/deps/chunk-HM42ZP2D.js?v=54ed8d26:1858:19)", "diff": null }, "uuid": "ea5db5db-c3ac-4b5e-b187-5488461e941c", "parentUUID": "3629cc83-85b3-46b4-be9e-b5d4ca1b1d4a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ea5db5db-c3ac-4b5e-b187-5488461e941c" ], "pending": [], "skipped": [], "duration": 36950, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1c220810-6cdd-4bab-8404-2347eb42f14f", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "beb8c8d3-45f5-4bf8-9bb6-c62915c9a233", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 403040, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "614ff5e4-91ac-4b94-890c-3dfaf4620c68", "parentUUID": "beb8c8d3-45f5-4bf8-9bb6-c62915c9a233", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "614ff5e4-91ac-4b94-890c-3dfaf4620c68" ], "failures": [], "pending": [], "skipped": [], "duration": 403040, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fac44053-68d9-47c0-9bd2-8b7c14aa5f6b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cc472193-8d38-4593-87d0-bd0d987d3fc4", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 437592, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "2b63b5b8-ae39-4852-8bcb-907af74776c8", "parentUUID": "cc472193-8d38-4593-87d0-bd0d987d3fc4", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "2b63b5b8-ae39-4852-8bcb-907af74776c8" ], "failures": [], "pending": [], "skipped": [], "duration": 437592, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d7ce9221-30e9-49f6-aaeb-79c4ed000067", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "bcf5fd91-3f0f-4562-9681-681e531524d2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 431337, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "0803610c-fa87-4ff1-aa49-b95d5f53c1aa", "parentUUID": "bcf5fd91-3f0f-4562-9681-681e531524d2", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0803610c-fa87-4ff1-aa49-b95d5f53c1aa" ], "failures": [], "pending": [], "skipped": [], "duration": 431337, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "bdcfac39-3c3e-4fea-8b75-438f815715d6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ae52444b-1b15-416e-a33e-a993eea4ecbc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 24455, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "28d1c7f1-0f7d-48c4-bcde-a7d511cdfc42", "parentUUID": "ae52444b-1b15-416e-a33e-a993eea4ecbc", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "28d1c7f1-0f7d-48c4-bcde-a7d511cdfc42" ], "pending": [], "skipped": [], "duration": 24455, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "bdcfac39-3c3e-4fea-8b75-438f815715d6", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ae52444b-1b15-416e-a33e-a993eea4ecbc", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 24455, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "28d1c7f1-0f7d-48c4-bcde-a7d511cdfc42", "parentUUID": "ae52444b-1b15-416e-a33e-a993eea4ecbc", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "28d1c7f1-0f7d-48c4-bcde-a7d511cdfc42" ], "pending": [], "skipped": [], "duration": 24455, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0fef2d64-a4bd-4d49-aab6-3adf5b9ee8d9", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "76fdf516-8821-4d89-a155-bc624ba5ebbe", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 472888, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "adf55aae-be36-4d42-b3b5-c03c5c2fa698", "parentUUID": "76fdf516-8821-4d89-a155-bc624ba5ebbe", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "adf55aae-be36-4d42-b3b5-c03c5c2fa698" ], "failures": [], "pending": [], "skipped": [], "duration": 472888, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1cd887e5-819d-4be5-859e-e05d322a41ad", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6bd19208-6d2c-463d-b253-483585ed0d4b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 57317, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "ddb3447c-9876-4af5-9aca-85f0438e03e1", "parentUUID": "6bd19208-6d2c-463d-b253-483585ed0d4b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ddb3447c-9876-4af5-9aca-85f0438e03e1" ], "pending": [], "skipped": [], "duration": 57317, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "1cd887e5-819d-4be5-859e-e05d322a41ad", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6bd19208-6d2c-463d-b253-483585ed0d4b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 57317, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "ddb3447c-9876-4af5-9aca-85f0438e03e1", "parentUUID": "6bd19208-6d2c-463d-b253-483585ed0d4b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "ddb3447c-9876-4af5-9aca-85f0438e03e1" ], "pending": [], "skipped": [], "duration": 57317, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "86259d57-de00-4d6d-b49a-26722af2a3e2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f595a185-638e-42bd-aef7-58bb5a53826a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 24661, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "f5c2768a-1dbe-4b99-9425-cbea03087d7f", "parentUUID": "f595a185-638e-42bd-aef7-58bb5a53826a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f5c2768a-1dbe-4b99-9425-cbea03087d7f" ], "pending": [], "skipped": [], "duration": 24661, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "86259d57-de00-4d6d-b49a-26722af2a3e2", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f595a185-638e-42bd-aef7-58bb5a53826a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 24661, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "f5c2768a-1dbe-4b99-9425-cbea03087d7f", "parentUUID": "f595a185-638e-42bd-aef7-58bb5a53826a", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "f5c2768a-1dbe-4b99-9425-cbea03087d7f" ], "pending": [], "skipped": [], "duration": 24661, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "0e759cb6-3be6-49fd-94c7-79530d85f5ce", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "223cb83a-77b7-47fc-bd65-d37386f15ada", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 387757, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AbortError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > The user aborted a request.\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "diff": null }, "uuid": "be0d3cd1-8891-477d-b983-40a2e86e357f", "parentUUID": "223cb83a-77b7-47fc-bd65-d37386f15ada", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "be0d3cd1-8891-477d-b983-40a2e86e357f" ], "pending": [], "skipped": [], "duration": 387757, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "e4db2060-ca63-49ea-ab8e-a19b09f9af83", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "3440a33e-7c83-4934-acfd-0271247ec4e8", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 435669, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "0e9a2703-8bae-486c-90c4-d10d11099a67", "parentUUID": "3440a33e-7c83-4934-acfd-0271247ec4e8", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "0e9a2703-8bae-486c-90c4-d10d11099a67" ], "failures": [], "pending": [], "skipped": [], "duration": 435669, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d46e74d4-187c-4401-9676-30f1e064de44", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "c56cb492-a602-4616-b944-efcbd7d3ad3d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 462628, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "b7a2a729-2ddf-4bf5-9203-cd2dd8b01c7a", "parentUUID": "c56cb492-a602-4616-b944-efcbd7d3ad3d", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b7a2a729-2ddf-4bf5-9203-cd2dd8b01c7a" ], "failures": [], "pending": [], "skipped": [], "duration": 462628, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "eb3723c7-d217-4ca6-85b6-bfcaeb5425e7", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "cf3b7f4e-0a30-4430-ac0e-0efcca6cacef", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 444086, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "3a32c401-fdb7-4c24-92e0-f634ebdb4013", "parentUUID": "cf3b7f4e-0a30-4430-ac0e-0efcca6cacef", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "3a32c401-fdb7-4c24-92e0-f634ebdb4013" ], "failures": [], "pending": [], "skipped": [], "duration": 444086, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dcca956b-a99e-484c-89ae-2e7bda58f23c", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8d35ac29-0401-4540-a7d3-09f6c5c648a5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 430191, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "6759cce6-fbe6-48aa-9e6e-5b337c8d60d8", "parentUUID": "8d35ac29-0401-4540-a7d3-09f6c5c648a5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "6759cce6-fbe6-48aa-9e6e-5b337c8d60d8" ], "failures": [], "pending": [], "skipped": [], "duration": 430191, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "80e3ad51-ea7e-443a-b686-5ac0ec21b066", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6b547a28-51ed-47b8-8194-10a1ee681322", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 406391, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "5ad893ea-17d3-4945-965d-833503d4f2a9", "parentUUID": "6b547a28-51ed-47b8-8194-10a1ee681322", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "5ad893ea-17d3-4945-965d-833503d4f2a9" ], "failures": [], "pending": [], "skipped": [], "duration": 406391, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "4d08c2af-9310-4cb8-aa61-b1cf32a4c1b3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "f6d58c6e-304d-4aa2-bfac-ac702722bd2f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 402741, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "a8d1901c-1efd-42be-beec-0ced4aa9d855", "parentUUID": "f6d58c6e-304d-4aa2-bfac-ac702722bd2f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a8d1901c-1efd-42be-beec-0ced4aa9d855" ], "failures": [], "pending": [], "skipped": [], "duration": 402741, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "194ea5e2-7811-44f8-912d-ffeaa7a158e4", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "21e60643-b808-41b2-a335-0a09022d3fc2", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 32590, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 \n //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.checkFlatmapProvenanceCard('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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:168:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "a68d7e3e-e15d-41d7-9ce9-27669531da72", "parentUUID": "21e60643-b808-41b2-a335-0a09022d3fc2", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "a68d7e3e-e15d-41d7-9ce9-27669531da72" ], "pending": [], "skipped": [], "duration": 32590, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fc5de342-0c34-420b-848c-b70854e52b82", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "d58aadbd-cdf8-46e7-a616-b1d45441fdf6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 207247, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n win.navigator.clipboard.readText().then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "AssertionError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > expected '' to include 'https://github.com/AnatomicMaps/rat-flatmap/blob/1dfd3fce0cf5d261464f893b3e3452dd66d370c5/manifest.json'\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AssertionError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > expected '' to include 'https://github.com/AnatomicMaps/rat-flatmap/blob/1dfd3fce0cf5d261464f893b3e3452dd66d370c5/manifest.json'\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.include (http://localhost:8081/__cypress/runner/cypress_runner.js:79930:10)\n at Proxy.chainableMethodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78744:49)\n at (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:112:32)", "diff": null }, "uuid": "b655bd7d-7048-4f8c-ae1d-cbf434e8f790", "parentUUID": "d58aadbd-cdf8-46e7-a616-b1d45441fdf6", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b655bd7d-7048-4f8c-ae1d-cbf434e8f790" ], "pending": [], "skipped": [], "duration": 207247, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "3543228f-b97b-49c6-8de8-c97b0e1ab37b", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "026f9ff5-0658-4239-a288-f1383be28d9e", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 202659, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().its('navigator.clipboard').invoke('readText');\n cy.window().then((win) => {\n win.navigator.clipboard.readText().then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "AssertionError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > expected '' to include 'https://github.com/AnatomicMaps/rat-flatmap/blob/1dfd3fce0cf5d261464f893b3e3452dd66d370c5/manifest.json'\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application", "estack": "AssertionError: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.\n\n > expected '' to include 'https://github.com/AnatomicMaps/rat-flatmap/blob/1dfd3fce0cf5d261464f893b3e3452dd66d370c5/manifest.json'\n\nWhen Cypress detects uncaught errors originating from your application it will automatically fail the current test.\n\nThis behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.\n\nhttps://on.cypress.io/uncaught-exception-from-application\n at captureUserInvocationStack (http://localhost:8081/__cypress/runner/cypress_runner.js:138996:94)\n at Proxy. (http://localhost:8081/__cypress/runner/cypress_runner.js:139024:9)\n at Proxy.include (http://localhost:8081/__cypress/runner/cypress_runner.js:79930:10)\n at Proxy.chainableMethodWrapper (http://localhost:8081/__cypress/runner/cypress_runner.js:78744:49)\n at (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:113:32)", "diff": null }, "uuid": "39a369f5-ea55-4387-ae11-d9ab0a43b7df", "parentUUID": "026f9ff5-0658-4239-a288-f1383be28d9e", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "39a369f5-ea55-4387-ae11-d9ab0a43b7df" ], "pending": [], "skipped": [], "duration": 202659, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "5221e626-27dd-4d37-a808-c548dad4bd49", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "38262050-3e8c-4957-9dad-ce689a75202b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 460320, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "e0c35a3b-3f8c-4c8d-84ea-dd8a48261ab5", "parentUUID": "38262050-3e8c-4957-9dad-ce689a75202b", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "e0c35a3b-3f8c-4c8d-84ea-dd8a48261ab5" ], "failures": [], "pending": [], "skipped": [], "duration": 460320, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "d8fb81ff-c800-47e2-8b4d-fa299e97a103", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "6f386f51-82de-410f-a25e-07c72fcb073d", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 59257, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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 (56) is out of bounds", "estack": "Error: queue.insert must be called with a valid index - the index (56) 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=a471191b:103:63)\n at Context. (http://localhost:8081/__cypress/src/node_modules/.vite/deps/cypress-visual-regression_dist_command.js?v=a471191b: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": "4f11d70e-0b8d-43e1-a822-a02275b92fd1", "parentUUID": "6f386f51-82de-410f-a25e-07c72fcb073d", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "4f11d70e-0b8d-43e1-a822-a02275b92fd1" ], "pending": [], "skipped": [], "duration": 59257, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "87254dac-a539-41a4-8116-1c6206d7f977", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "1860e493-b5ea-498d-b65f-e1c623525223", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 435212, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "f42ff74f-eeb4-4aae-ac25-2f5265fd5de5", "parentUUID": "1860e493-b5ea-498d-b65f-e1c623525223", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "f42ff74f-eeb4-4aae-ac25-2f5265fd5de5" ], "failures": [], "pending": [], "skipped": [], "duration": 435212, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f36e5520-144b-4d17-aff5-086be1dff403", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "35babc99-9ae2-4ffa-a12d-b81c626036d5", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 422508, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "bde67121-47ec-49a7-a57c-251564ecec13", "parentUUID": "35babc99-9ae2-4ffa-a12d-b81c626036d5", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "bde67121-47ec-49a7-a57c-251564ecec13" ], "failures": [], "pending": [], "skipped": [], "duration": 422508, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "f09ae03a-6306-48b0-b987-427d91180116", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "4e450d3a-31f7-4131-8d17-c6a3f430e86c", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 426756, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "89484c79-b00a-48ab-9cda-a87e162bd2b5", "parentUUID": "4e450d3a-31f7-4131-8d17-c6a3f430e86c", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "89484c79-b00a-48ab-9cda-a87e162bd2b5" ], "failures": [], "pending": [], "skipped": [], "duration": 426756, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "c0f58648-2a5c-4b4c-a499-48961792522d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "795dc400-9c31-4d2f-af6a-1ccef8af167f", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 417503, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "b6f57c3e-823f-4d28-9f67-848c9aa507c5", "parentUUID": "795dc400-9c31-4d2f-af6a-1ccef8af167f", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "b6f57c3e-823f-4d28-9f67-848c9aa507c5" ], "failures": [], "pending": [], "skipped": [], "duration": 417503, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ece88b23-e2f9-4c4a-89a9-edc5a9df7e10", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8ac884e0-a420-4bbb-9847-d9acac4815f6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 479094, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "7d7a27a7-3ebc-4544-8b67-ed30e8251343", "parentUUID": "8ac884e0-a420-4bbb-9847-d9acac4815f6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "7d7a27a7-3ebc-4544-8b67-ed30e8251343" ], "failures": [], "pending": [], "skipped": [], "duration": 479094, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "ee1473b2-acd5-4231-9b72-dbe1a68ae3b1", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "5f62dad6-4b21-4f22-a559-f62c617204a6", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 477018, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "90d92dfa-7b76-4c51-b596-78a5f867468d", "parentUUID": "5f62dad6-4b21-4f22-a559-f62c617204a6", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "90d92dfa-7b76-4c51-b596-78a5f867468d" ], "failures": [], "pending": [], "skipped": [], "duration": 477018, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dc3012ba-c2f1-4a06-879b-0ca713a1ed09", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ded897fa-44ca-4e15-b45b-5ac1c3c70fec", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 32611, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "b5adf1c5-ce57-4b7b-a0df-f3e6f859b3b9", "parentUUID": "ded897fa-44ca-4e15-b45b-5ac1c3c70fec", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b5adf1c5-ce57-4b7b-a0df-f3e6f859b3b9" ], "pending": [], "skipped": [], "duration": 32611, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "dc3012ba-c2f1-4a06-879b-0ca713a1ed09", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "ded897fa-44ca-4e15-b45b-5ac1c3c70fec", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 32611, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "b5adf1c5-ce57-4b7b-a0df-f3e6f859b3b9", "parentUUID": "ded897fa-44ca-4e15-b45b-5ac1c3c70fec", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "b5adf1c5-ce57-4b7b-a0df-f3e6f859b3b9" ], "pending": [], "skipped": [], "duration": 32611, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "81dcb6d4-a2c5-4069-9437-9f0e00edae9d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a3ab7890-744e-404e-aa5e-792e6aa24e93", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 28649, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "16830b08-e7f1-4c2a-aadf-c24710471148", "parentUUID": "a3ab7890-744e-404e-aa5e-792e6aa24e93", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "16830b08-e7f1-4c2a-aadf-c24710471148" ], "pending": [], "skipped": [], "duration": 28649, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "81dcb6d4-a2c5-4069-9437-9f0e00edae9d", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "a3ab7890-744e-404e-aa5e-792e6aa24e93", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 28649, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "16830b08-e7f1-4c2a-aadf-c24710471148", "parentUUID": "a3ab7890-744e-404e-aa5e-792e6aa24e93", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "16830b08-e7f1-4c2a-aadf-c24710471148" ], "pending": [], "skipped": [], "duration": 28649, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b903e5ad-7522-4e77-91ac-a9c1dc09aae5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e2183f81-f5fa-4dc5-83b1-ca784dc92f2b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36573, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "28dcb03e-c7a3-4663-8e7e-397a7e380d82", "parentUUID": "e2183f81-f5fa-4dc5-83b1-ca784dc92f2b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "28dcb03e-c7a3-4663-8e7e-397a7e380d82" ], "pending": [], "skipped": [], "duration": 36573, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "b903e5ad-7522-4e77-91ac-a9c1dc09aae5", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "e2183f81-f5fa-4dc5-83b1-ca784dc92f2b", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 36573, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "28dcb03e-c7a3-4663-8e7e-397a7e380d82", "parentUUID": "e2183f81-f5fa-4dc5-83b1-ca784dc92f2b", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "28dcb03e-c7a3-4663-8e7e-397a7e380d82" ], "pending": [], "skipped": [], "duration": 36573, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "6c053ee2-8922-41f1-b6e6-dbb4f03845f3", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "8ae23064-5688-499d-ad6f-d45d78fcf931", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 442718, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "57bf3f71-63bd-4a91-98e3-e9557486a090", "parentUUID": "8ae23064-5688-499d-ad6f-d45d78fcf931", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "57bf3f71-63bd-4a91-98e3-e9557486a090" ], "failures": [], "pending": [], "skipped": [], "duration": 442718, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "fa4009e4-3b95-4c2e-bc7b-6c97a7080308", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "25bfc3f9-9823-4a56-a89a-4a62a774c561", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 52710, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)", "estack": "CypressError: `cy.compareSnapshot()` failed because it requires a DOM element.\n\nNo elements in the current DOM matched your query:\n\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)\n at isElement (http://localhost:8081/__cypress/runner/cypress_runner.js:144895:62)\n at validateType (http://localhost:8081/__cypress/runner/cypress_runner.js:144753:14)\n at Object.isType (http://localhost:8081/__cypress/runner/cypress_runner.js:144784:7)\n at $Cy.pushSubject (http://localhost:8081/__cypress/runner/cypress_runner.js:138436:22)\n at wrapped (http://localhost:8081/__cypress/runner/cypress_runner.js:137993:19)\nFrom Your Spec Code:\n at Context. (/home/cmiss/Jenkins/workspace/mapintegratedvuer/cypress/component/MapContent.cy.js:235:240)\n at runnable.fn (http://localhost:8081/__cypress/runner/cypress_runner.js:138261:19)\n at callFn (http://localhost:8081/__cypress/runner/cypress_runner.js:156877:21)\n at Runnable.run (http://localhost:8081/__cypress/runner/cypress_runner.js:156864:7)\n at (http://localhost:8081/__cypress/runner/cypress_runner.js:162788:30)\n at PassThroughHandlerContext.finallyHandler (http://localhost:8081/__cypress/runner/cypress_runner.js:4072:23)\n at PassThroughHandlerContext.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)", "diff": null }, "uuid": "04667aee-d7ad-451b-a57d-c6b539961b4c", "parentUUID": "25bfc3f9-9823-4a56-a89a-4a62a774c561", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "04667aee-d7ad-451b-a57d-c6b539961b4c" ], "pending": [], "skipped": [], "duration": 52710, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "2dea8184-6170-487c-9a10-03a3c8bc5268", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "538faba8-0745-4e55-b196-2b5cc1f07a5a", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 420883, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "a1a1054e-612b-4983-a4f8-b3e953137603", "parentUUID": "538faba8-0745-4e55-b196-2b5cc1f07a5a", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "a1a1054e-612b-4983-a4f8-b3e953137603" ], "failures": [], "pending": [], "skipped": [], "duration": 420883, "root": false, "rootEmpty": false, "_timeout": 2000 } ], "passes": [], "failures": [], "pending": [], "skipped": [], "duration": 0, "root": true, "rootEmpty": true, "_timeout": 2000 }, { "uuid": "827f8146-f1ce-415c-bdc4-ec619a78d6b0", "title": "", "fullFile": "cypress/component/MapContent.cy.js", "file": "cypress/component/MapContent.cy.js", "beforeHooks": [], "afterHooks": [], "tests": [], "suites": [ { "uuid": "085e2b07-1833-4000-a538-6ee523ee2714", "title": "MapContent", "fullFile": "", "file": "", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "Workflow testing", "fullTitle": "MapContent Workflow testing", "timedOut": null, "duration": 453420, "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 Cypress.on('uncaught:exception', (err) => {\n // returning false here prevents Cypress from\n // failing the test\n if (err.message.includes(\"this.facets.at is not a function\"))\n return false\n if (err.message.includes(\"this.$refs.sideBar.closeConnectivity is not a function\"))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'left')\"))\n return false\n if (err.message.includes(\"Failed to fetch\"))\n return false\n if (err.message.includes('Source \"mapbox-gl-draw-cold\" already exists.'))\n return false\n if (err.message.includes('Source \"markers\" already exists.'))\n return false\n if (err.message.includes(\"Cannot read properties of undefined (reading 'onResize')\"))\n return false\n if (err.message.includes(\"knowledge/query/\")) {\n return false\n }\n return true\n })\n Cypress.Commands.add('checkFlatmapProvenanceCard', (species, prevPublicationLink) => {\n cy.get('#flatmap-select').click({force: true} );\n cy.get('.el-select-dropdown__wrap > .el-scrollbar__view').contains(species).click();\n cy.get('.multi-container > .el-loading-parent--relative > [name=\"el-loading-fade\"] > .el-loading-mask', {timeout: 60000}).should('not.exist');\n cy.get('.el-row > div[style=\"\"]').click()\n cy.get('.flatmap-context-card > .card-right > a').contains('here').should('have.attr', 'href').and('include', species.toLowerCase())\n cy.get('.flatmap-context-card').trigger('mouseover');\n cy.get('.flatmap-context-card').within(() => {\n cy.get('.publication-link').invoke('attr', 'href').as(`${species}_publicationLink`);\n // To verify data change\n if (prevPublicationLink) {\n cy.get('.float-button-container').invoke('css', {\n 'opacity': '1',\n 'visibility': 'visible'\n });\n cy.get(`@${species}_publicationLink`).then((publicationLink) => {\n const expectedContent = `Flatmap Provenance\nSCKAN version: Mock SCKAN version\nPublished on:\nMock publication date\nView publication:\n${publicationLink}`;\n cy.window().then((win) => {\n if (win.setMockClipboardText) {\n win.setMockClipboardText(expectedContent);\n }\n });\n cy.get('.float-button-container button').click({ force: true });\n cy.wait(100);\n if (prevPublicationLink) {\n expect(publicationLink).to.not.equal(prevPublicationLink);\n }\n cy.window().then((win) => {\n return win.navigator.clipboard.readText();\n }).then((text) => {\n expect(text).to.include(publicationLink);\n if (prevPublicationLink) {\n expect(text).to.not.include(prevPublicationLink);\n }\n });\n });\n }\n });\n })\n Cypress.Commands.add('checkGlobalSettings', (compare, setting, index) => {\n cy.wait(1000);\n cy.get('.el-icon.header-icon').as('globalSettings').click(); // open\n cy.get(`.setting-popover-inner > :nth-child(${index}) > .el-radio-group > .el-radio`).as('settingOptions').last().click();\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n cy.get('html').compareSnapshot(compare).then(comparisonResults => {\n expect(comparisonResults.percentage, `${setting} should be applied`).to.be.above(0);\n });\n cy.get('@globalSettings').click(); // open\n cy.get('@settingOptions').first().click(); // reset to default\n cy.get('@globalSettings').click(); // close\n cy.get('@globalSettings').trigger('mouseleave');\n cy.wait(1000);\n })\n Cypress.Commands.add('checkNeuronConnectionMode', (mode, searchTerm) => {\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(mode).click();\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').type(searchTerm);\n cy.get('.search-container > .map-icon > use').should('exist').click();\n cy.wait(2000);\n const tagTerm = `${mode[0]}:${searchTerm}`\n cy.get('.sidebar-container .filters').should('exist').contains(tagTerm);\n cy.get('.connectivity-card-container > .connectivity-card').should('have.length.greaterThan', 0);\n cy.get('.sidebar-container .header .is-link > span').contains('Reset').click({ multiple: true })\n cy.get('.search-box.el-autocomplete > .el-input > .el-input__wrapper > .el-input__inner').should('exist').clear();\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 //There is some issue with capture function with Cypress causing the screenshot to be taken incorrectly,\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 //Test the existence of the minimap\n cy.get('#maplibre-minimap > .maplibregl-canvas-container > .maplibregl-canvas', {timeout: 60000}).should('exist');\n cy.checkFlatmapProvenanceCard('Mouse')\n cy.get('@Mouse_publicationLink').then((mousePublicationLink) => {\n cy.checkFlatmapProvenanceCard('Rat', mousePublicationLink);\n });\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('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').clear();\n cy.get('[style=\"\"] > .el-card__header > .header > .el-input > .el-input__wrapper > .el-input__inner').type(\"heart\");\n cy.get('[style=\"\"] > .el-card__header > .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('[style=\"\"] > .el-card__header > .header > .is-link').click();\n // Test Neuron connection mode, competency not yet ready for production, disable for now.\n /*\n for (const [key, value] of Object.entries(neuronConnectionSettings)) {\n cy.checkNeuronConnectionMode(key, value);\n }\n cy.get('.viewing-mode-selector .el-dropdown').as('viewingModes').trigger('mouseenter'); // open\n cy.get('@viewingModes').contains(\"Exploration\").click();\n */\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": "983414d2-510f-4b3f-a9f3-242c26625c29", "parentUUID": "085e2b07-1833-4000-a538-6ee523ee2714", "isHook": false, "skipped": false } ], "suites": [], "passes": [ "983414d2-510f-4b3f-a9f3-242c26625c29" ], "failures": [], "pending": [], "skipped": [], "duration": 453420, "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.3" }, "marge": { "options": { "id": "default", "reportDir": "cypress/results/json", "overwrite": false, "html": false, "json": true }, "version": "6.2.0" } } }