diff --git a/beat/web/reports/static/reports/test/report-spec.js b/beat/web/reports/static/reports/test/report-spec.js index 48f15217877c66766d0a06727324c5139641bcfd..2f4eb924d8af474b01732e0e27cef0a98e5f8e61 100644 --- a/beat/web/reports/static/reports/test/report-spec.js +++ b/beat/web/reports/static/reports/test/report-spec.js @@ -786,25 +786,22 @@ describe('reports app', function(){ }); describe('group experiment panel functionality', function() { - describe('experiment link', function() { - it('links to a valid experiment', function() { - - }); - }); - - describe('database~protocol link', function() { - it('links to a valid database~protocol', function() { - - }); - }); + const firstRowCells = element(by.css('#collapse-group1-explist tbody > tr')).all(by.css('td')); describe('alias field', function() { - it('lets you change the alias', function() { + const alias = element(by.css('#collapse-group1-explist table > tbody input')); + const strToType = 'asdf'; + it('lets you change the alias', function() { + alias.sendKeys(strToType) + .then(() => expect(alias.getAttribute('value')).toContain(strToType)) + ; }); - it('saves the alias value when focus is moved from the input', function() { + it('changed the experiment name in the first row in the table item', function(){ + const nameEl = element(by.css('#collapse-group1_table_0 td')); + expect(nameEl.getText()).toContain(strToType); }); }); }); @@ -838,4 +835,38 @@ describe('reports app', function(){ }); }); }); + + // need to save report before doing these + describe('links outside the report page', function(){ + const firstRowCells = element(by.css('#collapse-group1-explist tbody > tr')).all(by.css('td')); + describe('experiment link', function() { + /* + const link = firstRowCells.get(1).element(by.css('a')); + + afterAll(function(){ + return browser.navigate().back(); + }); + + it('links to a valid experiment', function() { + link.click() + .then(([expName]) => expect(browser.getTitle()).toBe(`BEAT - ${expName}`)) + }); + */ + }); + + describe('database~protocol link', function() { + /* + const link = firstRowCells.get(2).element(by.css('a')); + + afterAll(function(){ + return browser.navigate().back(); + }); + + it('links to a valid database~protocol', function() { + Promise.all([link.getText(), link.click()]) + .then(([dbProtName]) => expect(browser.getTitle()).toBe(`BEAT - ${dbProtName.split('@')[0]}`)) + }); + */ + }); + }); });