Skip to content
Snippets Groups Projects
Commit 4ab0aa03 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh
Browse files

rm deprecated getInnerHtml & fix misc e2e test bugs

parent 116e500c
No related branches found
No related tags found
1 merge request!223Reports overhaul
...@@ -387,14 +387,17 @@ describe('reports app', function(){ ...@@ -387,14 +387,17 @@ describe('reports app', function(){
// add back the exp to group1 // add back the exp to group1
afterAll(function(){ afterAll(function(){
return addButton.click() const parent = addButton.element(by.xpath('..'));
parent.getAttribute('class')
.then(cls => cls.includes('open') || addButton.click())
.then(() => { .then(() => {
// make sure list opened correctly & add an exp // make sure list opened correctly & add an exp
const parent = addButton.element(by.xpath('..'));
const list = parent.element(by.css('ul')); const list = parent.element(by.css('ul'));
const lis = list.all(by.css('li')); const first = list.element(by.tagName('li'));
browser.wait(until.elementToBeClickable(first), 5000, 'First add button isnt becoming clickable')
return lis.get(0).element(by.css('a')).click(); return first.click();
}); });
}); });
...@@ -415,10 +418,10 @@ describe('reports app', function(){ ...@@ -415,10 +418,10 @@ describe('reports app', function(){
// check state of group after adding exp // check state of group after adding exp
const analyzer = element(by.css('#group1-explist-heading > h4 > i')); const analyzer = element(by.css('#group1-explist-heading > h4 > i'));
expect(analyzer.isDisplayed()).toBeTruthy(); expect(analyzer.isDisplayed()).toBeTruthy();
expect(analyzer.getInnerHtml()).not.toBe(''); expect(analyzer.getText()).not.toBe('');
const expsBody = element(by.css('#collapse-group1-explist > .panel-body')); const expsBody = element(by.css('#collapse-group1-explist > .panel-body'));
expect(expsBody.getInnerHtml()).not.toBe(''); expect(expsBody.getText()).not.toBe('');
}); });
}); });
...@@ -468,7 +471,7 @@ describe('reports app', function(){ ...@@ -468,7 +471,7 @@ describe('reports app', function(){
it('has a list of formatted dbs & protocols in the third row', function() { it('has a list of formatted dbs & protocols in the third row', function() {
const els = cells.get(2).all(by.css('span')); const els = cells.get(2).all(by.css('span'));
expect(els.count()).toBeGreaterThan(0); expect(els.count()).toBeGreaterThan(0);
expect(els.element(by.css('a')).getText()).toMatch(/\S+@\S+/); expect(els.get(0).element(by.css('a')).getText()).toMatch(/\S+@\S+/);
}); });
it('has an editable alias input in the fourth row', function() { it('has an editable alias input in the fourth row', function() {
...@@ -487,12 +490,12 @@ describe('reports app', function(){ ...@@ -487,12 +490,12 @@ describe('reports app', function(){
describe('removing 1 experiment', function(){ describe('removing 1 experiment', function(){
beforeAll(function(){ beforeAll(function(){
const rmExpButton = element(by.css('#collapse-group1-explist > tbody > .btn-delete')); const rmExpButton = element(by.css('#collapse-group1-explist tbody .btn-delete'));
return rmExpButton.click(); return rmExpButton.click();
}); });
it('removes the exp table', function(){ it('removes the exp table', function(){
expect(g1ExpPanel.getInnerHtml()).toBe(''); expect(g1ExpPanel.getText()).toBe('');
}); });
it('removes the analyzer tag', function() { it('removes the analyzer tag', function() {
...@@ -502,7 +505,7 @@ describe('reports app', function(){ ...@@ -502,7 +505,7 @@ describe('reports app', function(){
it('lets the user add any experiment again', function() { it('lets the user add any experiment again', function() {
const expRowsCount = element.all(by.css('#experiment-list-test tbody > tr')).count(); const expRowsCount = element.all(by.css('#experiment-list-test tbody > tr')).count();
Promise.all([expRowsCount, addOptionsCount, element(by.css('#group1_exp_add_dropdown')).click()]) Promise.all([expRowsCount, element(by.css('#group1_exp_add_dropdown')).click()])
.then(([expCount]) => .then(([expCount]) =>
Promise.all([ Promise.all([
expCount, expCount,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment