Skip to content

Commit

Permalink
gui test to open genome builder
Browse files Browse the repository at this point in the history
  • Loading branch information
chgibb committed Dec 30, 2017
1 parent 47cb2a3 commit 14dff3c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/guiTests/6viewAlignCoverage.ts
@@ -0,0 +1,22 @@
console.log("Started GUI test for alignment viewing");
require("./../req/main/main");

import {openProjectsView} from "./req/projectSelection/openProjectsView";
import {openFirstProject} from "./req/projectSelection/openFirstProject";

import {openCircularGenomeBuilderWindow} from "./req/circularGenomeBuilder/openCircularGenomeBuilderWindow";

import {closeToolBar} from "./req/closeToolBar";

async function runTest() : Promise<void>
{
await openProjectsView();
await openFirstProject();

await openCircularGenomeBuilderWindow();

await closeToolBar();
}
setTimeout(function(){
runTest();
},1000);
@@ -0,0 +1,23 @@
import * as winMgr from "./../../../req/main/winMgr";

/**
* Opens a circularGenomeBuilder window
*
* @export
* @returns {Promise<void>}
*/
export async function openCircularGenomeBuilderWindow() : Promise<void>
{
return new Promise<void>((resolve,reject) => {
setTimeout(function(){
console.log("opening circularGenomeBuilder window");
setTimeout(function(){
let toolBar = winMgr.getWindowsByName("toolBar");
toolBar[0].webContents.executeJavaScript(`
document.getElementById("circularGenomeBuilder").click();
`);
resolve();
},500);
},500);
});
}

0 comments on commit 14dff3c

Please sign in to comment.