-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
27,511 additions
and
2,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
|
||
build | ||
dist | ||
bower_components | ||
node_modules | ||
web_modules | ||
private | ||
web_modules | ||
|
||
# General | ||
*.jar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const path = require("path"); | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| IVA Browser-sync config file | ||
|-------------------------------------------------------------------------- | ||
*/ | ||
module.exports = { | ||
files: [ | ||
"src", | ||
"lib/jsorolla/src", | ||
"lib/jsorolla/styles" | ||
], | ||
server: { | ||
//baseDir: path.resolve(__dirname), | ||
//directory: true | ||
}, | ||
startPath: "src", | ||
open: true, | ||
timestamps: true, | ||
excludedFileTypes: [], | ||
notify: { | ||
styles: { | ||
top: 'auto', | ||
bottom: '0' | ||
} | ||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
echo -n "Enter your Opencga Username [ENTER]: " | ||
read username | ||
stty -echo | ||
printf "Enter your Opencga password [ENTER]: " | ||
read password | ||
stty echo | ||
|
||
CYPRESS_username=$username CYPRESS_password=$password "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"baseUrl": "http://localhost:3000/src/", | ||
"chromeWebSecurity": false, | ||
"viewportWidth": 1600, | ||
"viewportHeight": 660 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
context("Login", () => { | ||
beforeEach(() => { | ||
cy.visit("http://localhost:3000/src/#login") | ||
}) | ||
|
||
it("login unsuccessful", () => { | ||
cy.get("#opencgaUser").type("demo") | ||
cy.get("#opencgaPassword").type("demo") | ||
cy.get("form#formLogin").submit() | ||
|
||
cy.get("#error").contains( "Incorrect user or password.") | ||
}) | ||
|
||
it("login uccessful", () => { | ||
|
||
const username = Cypress.env("username") | ||
const password = Cypress.env("password") | ||
|
||
//console.log("username", username) | ||
//console.log("password", password) | ||
|
||
expect(username, "username was set").to.be.a("string").and.not.be.empty | ||
expect(password, "password was set").to.be.a("string").and.not.be.empty | ||
cy.get("#opencgaUser").type(username) | ||
cy.get("#opencgaPassword").type(password) | ||
cy.get("form#formLogin").submit() | ||
|
||
cy.url().should("include", "#home") | ||
cy.get(".subtitle").contains( "Interactive Variant Analysis") | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import {login} from "../plugins/utils.js"; | ||
import "cypress-wait-until"; | ||
|
||
context("Case Portal", () => { | ||
before(() => { | ||
login(); | ||
}) | ||
|
||
it("query", () => { | ||
/*cy.waitUntil(() => cy.getCookie("iva_sid").then(cookie => { | ||
console.log("cookie", cookie) | ||
return Boolean(cookie && cookie.value) | ||
}));*/ | ||
|
||
cy.get("a[data-id=clinicalAnalysisPortal]").click({force: true}) | ||
|
||
//long timeout to make sure you are logged in | ||
cy.get("div.page-title h2", {timeout: 60000}).should("be.visible").and("contain", "Case Portal") | ||
|
||
//cy.get(".lhs button").should("have.length", 2) | ||
cy.get(".clearfix > .pull-left > .pagination-info", {timeout: 10000}) | ||
.should("be.visible") | ||
//.should('contain', /Showing \d+ to \d+ of \d+ records/) | ||
//.and("contain", "Showing 1 to 10 of 18 records") | ||
|
||
|
||
cy.get("opencga-clinical-analysis-grid .success > :nth-child(1)").then(elem => { | ||
// elem is the underlying Javascript object targeted by the .get() command. | ||
const firstCase = Cypress.$(elem).text().trim(); | ||
//opencga-clinical-analysis-view > data-form div:nth-child(1) > div.col-md-9 | ||
}); | ||
|
||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import {login} from "../plugins/utils.js"; | ||
|
||
context("File Browser", () => { | ||
before(() => { | ||
login(); | ||
}) | ||
|
||
it("query", () => { | ||
cy.get("a[data-id=files]").click({force: true}) | ||
cy.get("div.page-title h2", {timeout: 60000}).should("be.visible").and("contain", "File Browser") | ||
|
||
cy.get("#format + .subsection-content a").contains( "VCF").click({force: true}) | ||
cy.get("#bioformat + .subsection-content a").contains( "VARIANT").click({force: true}) | ||
|
||
cy.get(".lhs button[data-filter-name]").should("have.length", 2) | ||
|
||
//cy.get('.fixed-table-toolbar').find(".pagination-info", {log:true}) | ||
cy.get("div.search-button-wrapper button").click() | ||
}) | ||
|
||
it("aggregated query", () => { | ||
cy.get("a[data-id=files]").click({force: true}) | ||
cy.get("a[href='#facet_tab']").click({force: true}) | ||
//cy.get("div.search-button-wrapper button").click() | ||
|
||
//cy.wait(2000); | ||
|
||
cy.get("#bs-select-4-2").click({force: true}) // creation year field | ||
cy.get(`a[data-collapse="#creationYear_nested"]`).click({force: true}) // creation y field | ||
cy.get("#bs-select-7-3").click({force: true}) // creation month nested in year field | ||
cy.get("div.search-button-wrapper button").click() | ||
|
||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import {login} from "../plugins/utils.js"; | ||
|
||
context("Individual Browser", () => { | ||
before(() => { | ||
login(); | ||
}) | ||
|
||
it("query", () => { | ||
cy.get("a[data-id=individuals]").click({force: true}) | ||
cy.get("div.page-title h2", {timeout: 60000}).should("be.visible").and("contain", "Individual Browser") | ||
|
||
cy.get("#sex + .subsection-content a").contains( "MALE").click({force: true}) | ||
cy.get("#sex + .subsection-content a").contains( "FEMALE").click({force: true}) | ||
|
||
cy.get("#date + .subsection-content input[data-tab=recent] + label").click(); //creationDate recent | ||
|
||
cy.get(".lhs button[data-filter-name]").should("have.length", 2); | ||
cy.get("div.search-button-wrapper button").click(); | ||
|
||
}) | ||
|
||
it("aggregated query", () => { | ||
cy.get("a[data-id=individuals]").click({force: true}) | ||
|
||
cy.get("a[href='#facet_tab']").click({force: true}) | ||
cy.get("button.default-facets-button").click(); | ||
|
||
cy.get(".lhs button[data-filter-name]:nth-child(3)").click(); //remove creationDate | ||
|
||
cy.get("button.default-facets-button").click(); | ||
|
||
//cy.get("div.search-button-wrapper button").click() | ||
|
||
//cy.get(".facet-wrapper .button-list button").should("have.length", 4); | ||
|
||
//cy.get("opencb-facet-results opencga-facet-result-view").should("have.length", 4); | ||
|
||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import {login} from "../plugins/utils.js"; | ||
|
||
context("File Browser", () => { | ||
before(() => { | ||
login(); | ||
}) | ||
|
||
it("query", () => { | ||
cy.get("a[data-id=samples]").click({force: true}) | ||
cy.get("div.page-title h2", {timeout: 60000}).should("be.visible").and("contain", "Sample Browser") | ||
|
||
cy.get("#somatic + .subsection-content label").contains( "True").click({force: true}) | ||
|
||
cy.get(".lhs button[data-filter-name]").should("have.length", 1); | ||
cy.get("div.search-button-wrapper button").click(); | ||
|
||
cy.get(".lhs .somaticActiveFilter").click(); | ||
cy.get(".lhs button[data-filter-name]").should("have.length", 0); | ||
|
||
}) | ||
|
||
it("aggregated query", () => { | ||
cy.get("a[data-id=samples]").click({force: true}) | ||
|
||
cy.get("a[href='#facet_tab']").click({force: true}) | ||
cy.get("button.default-facets-button").click() | ||
cy.get("div.search-button-wrapper button").click() | ||
|
||
cy.get(".facet-wrapper .button-list button").should("have.length", 4); | ||
|
||
cy.get("opencb-facet-results opencga-facet-result-view").should("have.length", 4); | ||
|
||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {login} from "../plugins/utils.js"; | ||
|
||
context("Variant Browser", () => { | ||
before(() => { | ||
login(); | ||
}) | ||
|
||
it("query", () => { | ||
cy.get("a[data-id=browser]").click({force: true}) | ||
cy.get("div.page-title h2", {timeout: 60000}).should("be.visible").and("contain", "Variant Browser") | ||
|
||
|
||
cy.get("input#lof").click({force: true}); | ||
cy.get("opencga-active-filters").contains("Consequence Types 10") | ||
cy.get("button.ctActiveFilter").click() | ||
}) | ||
|
||
it("aggregated query", () => { | ||
cy.get("a[data-id=browser]").click({force: true}) | ||
cy.get("a[href='#facet_tab']").click({force: true}) | ||
cy.get("button.default-facets-button").click() | ||
cy.get("div.search-button-wrapper button").click() | ||
|
||
cy.wait(2000); | ||
|
||
cy.get("#bs-select-1-4").click({force: true}) // gene aggregation field | ||
cy.get("#type_Select a").contains( "INSERTION").click({force: true}) | ||
cy.get("div.search-button-wrapper button").click() | ||
|
||
}) | ||
}) |
Oops, something went wrong.