{ "stats": { "suites": 1, "tests": 1, "passes": 0, "pending": 0, "failures": 1, "start": "2024-08-02T00:28:14.113Z", "end": "2024-08-02T00:28:16.583Z", "duration": 2470, "testsRegistered": 1, "passPercent": 0, "pendingPercent": 0, "other": 0, "hasOther": false, "skipped": 0, "hasSkipped": false }, "results": [ { "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 } ], "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" } } }