diff --git a/cypress/e2e/iva/genome-browser.cy.js b/cypress/e2e/iva/genome-browser.cy.js index 71e2f9f054..52c926dfd5 100644 --- a/cypress/e2e/iva/genome-browser.cy.js +++ b/cypress/e2e/iva/genome-browser.cy.js @@ -97,7 +97,7 @@ context("GenomeBrowser", () => { cy.get("@karyotype") .find(`div[data-cy="gb-karyotype-toggle"]`) - .trigger("click"); + .trigger("click", {force: true}); cy.get("@karyotypeContent") .invoke("css", "display") diff --git a/cypress/e2e/iva/variant-browser-grid.cy.js b/cypress/e2e/iva/variant-browser-grid.cy.js index ac7f4a6e8d..25e0066ab9 100644 --- a/cypress/e2e/iva/variant-browser-grid.cy.js +++ b/cypress/e2e/iva/variant-browser-grid.cy.js @@ -271,6 +271,38 @@ context("Variant Browser Grid", () => { }); }); + context("clinical info", () => { + context("cosmic column", () => { + const columnIndex = 18; + it("should display an 'x' icon if no cosmic information is available", () => { + cy.get("@variantBrowser") + .find(`tbody > tr[data-uniqueid="14:91649938:A:G"] > td`) + .eq(columnIndex) + .find("i") + .should("have.class", "fa-times"); + }); + + it("should display the number of entries and total trait associations", () => { + cy.get("@variantBrowser") + .find("tbody tr:first > td") + .eq(columnIndex) + .should("contain.text", "1 entry (1)"); + }); + + it("should display a tooltip with a link to cosmic", () => { + cy.get("@variantBrowser") + .find("tbody tr:first > td") + .eq(columnIndex) + .find("a") + .trigger("mouseover"); + + cy.get(`div[class="qtip-content"]`) + .find(`a[href^="https://cancer.sanger.ac.uk/cosmic/search?q="]`) + .should("exist"); + }); + }); + }); + context("actions", () => { const variant = "14:91649858:C:T"; beforeEach(() => { diff --git a/src/genome-browser/genome-browser.js b/src/genome-browser/genome-browser.js index 4ae1893fb1..2015a73a19 100644 --- a/src/genome-browser/genome-browser.js +++ b/src/genome-browser/genome-browser.js @@ -68,7 +68,7 @@ export default class GenomeBrowser { // Generate GB template const template = UtilsNew.renderHTML(`
-
+