diff --git a/integration/full/project-home.integrationSpec.js b/integration/full/project-home.integrationSpec.js new file mode 100644 index 00000000..8e253d21 --- /dev/null +++ b/integration/full/project-home.integrationSpec.js @@ -0,0 +1,52 @@ +var utils = require('../utils'); + +var chai = require('chai'); +var chaiAsPromised = require('chai-as-promised'); + +chai.use(chaiAsPromised); +var expect = chai.expect; + +describe('project home', function() { + before(function(){ + browser.get('http://localhost:9001/'); + + return utils.common.waitLoader().then(function() { + return utils.common.takeScreenshot("project", "home"); + }); + }); + + it('go to project', function() { + browser.actions().mouseMove($('div[tg-dropdown-project-list]')).perform(); + $$('div[tg-dropdown-project-list] ul a').first().click(); + }); + + it('timeline filled', function() { + return expect($$('div[tg-user-timeline-item]').count()).to.be.eventually.above(0); + }); + + it('timeline pagination', function(done) { + $$('div[tg-user-timeline-item]') + .count() + .then(function(startTotal) { + return browser.executeScript('window.scrollTo(0,document.body.scrollHeight)') + .then(function() { + return browser.waitForAngular(); + }) + .then(function() { + return $$('div[tg-user-timeline-item]').count(); + }) + .then(function(endTotal) { + return startTotal < endTotal; + }); + }) + .then(function(hasMoreItems) { + expect(hasMoreItems).to.be.equal(true); + + done(); + }); + }); + + it('team filled', function() { + return expect($$('ul.involved-team a').count()).to.be.eventually.above(0); + }); +});