Skip to content

Commit

Permalink
Merge branch 'maps-qc' into e2e-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ddjnw1yu committed Nov 20, 2023
2 parents 29be479 + 55ce99d commit 20c2dbf
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/cypress/e2e/mapviewer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ const searchInput = 'heart'

describe('Maps Viewer', { testIsolation: false }, function () {
before(function () {
cy.intercept('GET', '**/flatmap/**').as('flatmap')
cy.intercept('**/flatmap/**').as('flatmap')
cy.visit('/maps?type=ac')
cy.wait('@flatmap')
})

apinatomyModels.forEach((model) => {

it(`Provenance card for ${model}`, function () {
cy.intercept('GET', '**/flatmap/**').as('flatmap')
cy.intercept('**/flatmap/**').as('flatmap')
if (model !== 'Rat') {
cy.get('#flatmap-select').click()
cy.get('.el-select-dropdown__item').should('be.visible')
Expand All @@ -27,8 +27,6 @@ describe('Maps Viewer', { testIsolation: false }, function () {
cy.get('.el-select-dropdown__item').contains(new RegExp(model, 'i')).click({ force: true })
}
cy.wait('@flatmap')
// There will have more than one matched result, only when 'numTestsKeptInMemory' is 0
// Unable to DEBUG as 'numTestsKeptInMemory' is 0, logs won't show in the console
cy.get('.maplibregl-touch-drag-pan.maplibregl-touch-zoom-rotate > .maplibregl-canvas:visible').click();
cy.get('.maplibregl-popup-content:visible').within(() => {
cy.get('.title').should('exist')
Expand All @@ -39,8 +37,8 @@ describe('Maps Viewer', { testIsolation: false }, function () {
})
})
it(`From 2D ${threeDSyncView}, open 3D map for synchronised view and Search within display`, function () {
cy.intercept('GET', '**/get_body_scaffold_info/**').as('body_scaffold')
cy.intercept('GET', '**/s3-resource/**').as('resource')
cy.intercept('**/get_body_scaffold_info/**').as('body_scaffold')
cy.intercept('**/s3-resource/**').as('resource')
cy.get('#flatmap-select').click()
cy.get('.el-select-dropdown__item').contains(new RegExp(threeDSyncView, 'i')).click({ force: true })
cy.get('.settings-group.open > .el-row:visible').filter(':contains(Open new map)').within(() => {
Expand All @@ -65,9 +63,9 @@ describe('Maps Viewer', { testIsolation: false }, function () {
datasetIds.forEach((datasetId) => {

it(`Context card in sidebar for scaffold dataset ${datasetId}`, function () {
cy.intercept('POST', '**/query?**').as('query')
cy.intercept('GET', '**/dataset_info/**').as('dataset_info')
cy.intercept('GET', '**/datasets/**').as('datasets')
cy.intercept('**/query?**').as('query')
cy.intercept('**/dataset_info/**').as('dataset_info')
cy.intercept('**/datasets/**').as('datasets')
cy.get('.open-tab > .el-icon-arrow-left').click()
cy.get('.search-input > .el-input__inner').clear()
cy.get('.search-input > .el-input__inner').type(datasetId)
Expand Down

0 comments on commit 20c2dbf

Please sign in to comment.