{ "stats": { "suites": 1, "tests": 1, "passes": 1, "pending": 0, "failures": 0, "start": "2023-12-01T02:47:41.608Z", "end": "2023-12-01T02:48:43.338Z", "duration": 61730, "testsRegistered": 1, "passPercent": 100, "pendingPercent": 0, "other": 0, "hasOther": false, "skipped": 0, "hasSkipped": false }, "results": [ { "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 } ], "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" } } }