Skip to content

Commit

Permalink
Fix struct-var-table specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas Leenknegt committed Jul 25, 2023
1 parent 48669a1 commit 51dc9ab
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions end-to-end-test/local/specs/struct-var-table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('study view structural variant table', function() {
beforeEach(() => {
goToUrlAndSetLocalStorage(studyViewUrl, true);
waitForStudyView();
showSvPane();
});

it('adds structural variant to study view filter', () => {
Expand All @@ -29,7 +30,7 @@ describe('study view structural variant table', function() {
assert($(structVarFilterPillTag).isExisting());
});

it('shows all checkboxes when row is hovered', () => {
it.only('shows all checkboxes when row is hovered', () => {
$(structVarNameCell).waitForExist();
const firstSvRowCell = $$(structVarNameCell)[0];
assert.equal($$(structVarNameCell)[1].getText(), 'SND1');
Expand Down Expand Up @@ -72,7 +73,7 @@ describe('study view structural variant table', function() {
clearToast();

const resultsViewQueryBox = openResultViewQueryBox();
assert.equal('SND1: FUSION::BRAF ;', resultsViewQueryBox.getValue());
assert.equal('SND1: FUSION::BRAF;', resultsViewQueryBox.getValue());
});

it('adds gene1::* to Results View query', () => {
Expand All @@ -87,7 +88,7 @@ describe('study view structural variant table', function() {
clearToast();

const resultsViewQueryBox = openResultViewQueryBox();
assert.equal('SND1: FUSION:: ;', resultsViewQueryBox.getValue());
assert.equal('SND1: FUSION::;', resultsViewQueryBox.getValue());
});

it('adds *::gene2 to Results View query', () => {
Expand All @@ -102,10 +103,31 @@ describe('study view structural variant table', function() {
clearToast();

const resultsViewQueryBox = openResultViewQueryBox();
assert.equal('BRAF: ::FUSION ;', resultsViewQueryBox.getValue());
assert.equal('BRAF: ::FUSION;', resultsViewQueryBox.getValue());
});
});

function showSvPane() {
const $chartsBtn = $('[data-test=add-charts-button]');
$chartsBtn.waitForExist();
$chartsBtn.waitForClickable();
$chartsBtn.click();
const $chartsGenomicTab = $('.tabAnchor_Genomic');
$chartsGenomicTab.waitForExist();
$chartsGenomicTab.waitForClickable();
$chartsGenomicTab.click();
const $svChartCheckbox = $(
'[data-test="add-chart-option-structural-variants"]'
).$('[data-test="labeledCheckbox"]');
$svChartCheckbox.waitForExist();
$svChartCheckbox.waitForClickable();
if (!$svChartCheckbox.isSelected()) {
$svChartCheckbox.click();
}
$chartsBtn.click();
waitForStudyView();
}

function openResultViewQueryBox() {
const resultsViewQueryBox = $('[data-test=geneSet]');
resultsViewQueryBox.waitForClickable();
Expand Down

0 comments on commit 51dc9ab

Please sign in to comment.