{ "stats": { "suites": 1, "tests": 1, "passes": 1, "pending": 0, "failures": 0, "start": "2023-05-30T02:32:12.635Z", "end": "2023-05-30T02:32:50.291Z", "duration": 37656, "testsRegistered": 1, "passPercent": 100, "pendingPercent": 0, "other": 0, "hasOther": false, "skipped": 0, "hasSkipped": false }, "results": [ { "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 } ], "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" } } }