admin project e2e
parent
f33b3bb43b
commit
9f68cbc8d5
|
@ -0,0 +1,27 @@
|
||||||
|
var utils = require('../../../utils');
|
||||||
|
|
||||||
|
var chai = require('chai');
|
||||||
|
var chaiAsPromised = require('chai-as-promised');
|
||||||
|
|
||||||
|
chai.use(chaiAsPromised);
|
||||||
|
var expect = chai.expect;
|
||||||
|
|
||||||
|
describe('project default values', function() {
|
||||||
|
before(async function(){
|
||||||
|
browser.get('http://localhost:9001/project/project-0/admin/project-profile/default-values');
|
||||||
|
|
||||||
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
utils.common.takeScreenshot('admin', 'project-default-values');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('change serveral default values and save it', async function() {
|
||||||
|
let fieldsets = $$('.default-values fieldset');
|
||||||
|
|
||||||
|
fieldsets.get(0).$(`select option:nth-child(2)`).click();
|
||||||
|
fieldsets.get(1).$(`select option:nth-child(2)`).click();
|
||||||
|
|
||||||
|
$('button[type="submit"]').click();
|
||||||
|
expect(utils.notifications.success.open()).to.be.eventually.equal(true);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,79 @@
|
||||||
|
var utils = require('../../../utils');
|
||||||
|
|
||||||
|
var chai = require('chai');
|
||||||
|
var chaiAsPromised = require('chai-as-promised');
|
||||||
|
|
||||||
|
chai.use(chaiAsPromised);
|
||||||
|
var expect = chai.expect;
|
||||||
|
|
||||||
|
describe('modules', function() {
|
||||||
|
before(async function(){
|
||||||
|
browser.get('http://localhost:9001/project/project-0/admin/project-profile/modules');
|
||||||
|
|
||||||
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
utils.common.takeScreenshot('admin', 'project-modules');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('disable module', async function() {
|
||||||
|
let functionalities = $$('.functionality');
|
||||||
|
|
||||||
|
let functionality = functionalities.get(0);
|
||||||
|
|
||||||
|
let label = functionality.$('label');
|
||||||
|
|
||||||
|
browser.actions()
|
||||||
|
.mouseMove(label)
|
||||||
|
.click()
|
||||||
|
.perform();
|
||||||
|
|
||||||
|
$('button[type="submit"]').click();
|
||||||
|
|
||||||
|
let active = await utils.common.hasClass(functionality, 'active');
|
||||||
|
|
||||||
|
expect(utils.notifications.success.open()).to.be.eventually.equal(true);
|
||||||
|
expect(active).to.be.false;
|
||||||
|
});
|
||||||
|
|
||||||
|
it('enable module', async function() {
|
||||||
|
let functionalities = $$('.functionality');
|
||||||
|
|
||||||
|
let functionality = functionalities.get(0);
|
||||||
|
|
||||||
|
let label = functionality.$('label');
|
||||||
|
|
||||||
|
browser.actions()
|
||||||
|
.mouseMove(label)
|
||||||
|
.click()
|
||||||
|
.perform();
|
||||||
|
|
||||||
|
$('button[type="submit"]').click();
|
||||||
|
|
||||||
|
let active = await utils.common.hasClass(functionality, 'active');
|
||||||
|
|
||||||
|
expect(utils.notifications.success.open()).to.be.eventually.equal(true);
|
||||||
|
expect(active).to.be.true;
|
||||||
|
});
|
||||||
|
|
||||||
|
it('enable videoconference', async function() {
|
||||||
|
let functionality = $$('.functionality').get(4);
|
||||||
|
|
||||||
|
let label = functionality.$('label');
|
||||||
|
|
||||||
|
browser.actions()
|
||||||
|
.mouseMove(label)
|
||||||
|
.click()
|
||||||
|
.perform();
|
||||||
|
|
||||||
|
let videoconference = functionality.$$('select').get(0);
|
||||||
|
|
||||||
|
videoconference.$(`option:nth-child(1)`).click();
|
||||||
|
|
||||||
|
let salt = functionality.$$('select').get(0);
|
||||||
|
|
||||||
|
salt.sendKeys('abccceee');
|
||||||
|
|
||||||
|
$('button[type="submit"]').click();
|
||||||
|
expect(utils.notifications.success.open()).to.be.eventually.equal(true);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,44 @@
|
||||||
|
var utils = require('../../../utils');
|
||||||
|
|
||||||
|
var chai = require('chai');
|
||||||
|
var chaiAsPromised = require('chai-as-promised');
|
||||||
|
|
||||||
|
chai.use(chaiAsPromised);
|
||||||
|
var expect = chai.expect;
|
||||||
|
|
||||||
|
describe('project detail', function() {
|
||||||
|
before(async function(){
|
||||||
|
browser.get('http://localhost:9001/project/project-0/admin/project-profile/details');
|
||||||
|
|
||||||
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
utils.common.takeScreenshot('admin', 'project-detail');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('edit tag, description and project settings', async function() {
|
||||||
|
let tag = $('.tag-input');
|
||||||
|
|
||||||
|
tag.sendKeys('aaa');
|
||||||
|
browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||||
|
|
||||||
|
tag.sendKeys('bbb');
|
||||||
|
browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||||
|
|
||||||
|
let description = $('#project-description');
|
||||||
|
|
||||||
|
description.sendKeys('test test');
|
||||||
|
|
||||||
|
let privateProjectButton = $$('.trans-button').get(1);
|
||||||
|
|
||||||
|
browser.actions()
|
||||||
|
.mouseMove(privateProjectButton)
|
||||||
|
.click()
|
||||||
|
.perform();
|
||||||
|
|
||||||
|
utils.common.takeScreenshot('admin', 'project-detail-filled');
|
||||||
|
|
||||||
|
$('button[type="submit"]').click();
|
||||||
|
|
||||||
|
expect(utils.notifications.success.open()).to.be.eventually.equal(true);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,44 @@
|
||||||
|
var utils = require('../../../utils');
|
||||||
|
|
||||||
|
var chai = require('chai');
|
||||||
|
var chaiAsPromised = require('chai-as-promised');
|
||||||
|
|
||||||
|
chai.use(chaiAsPromised);
|
||||||
|
var expect = chai.expect;
|
||||||
|
|
||||||
|
describe('reports', function() {
|
||||||
|
before(async function(){
|
||||||
|
browser.get('http://localhost:9001/project/project-0/admin/project-profile/reports');
|
||||||
|
|
||||||
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
utils.common.takeScreenshot('admin', 'project-reports');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('generate report url', async function() {
|
||||||
|
let reportField = $$('.csv-regenerate-field').get(0);
|
||||||
|
|
||||||
|
reportField.$('a').click();
|
||||||
|
|
||||||
|
await browser.waitForAngular();
|
||||||
|
|
||||||
|
let value = await reportField.$('input').getAttribute('value');
|
||||||
|
|
||||||
|
expect(value).to.have.length.above(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('regenerate report url', async function() {
|
||||||
|
let reportField = $$('.csv-regenerate-field').get(0);
|
||||||
|
let oldValue = await reportField.$('input').getAttribute('value');
|
||||||
|
|
||||||
|
reportField.$('a').click();
|
||||||
|
|
||||||
|
await utils.lightbox.confirm.ok();
|
||||||
|
|
||||||
|
await browser.waitForAngular();
|
||||||
|
|
||||||
|
let value = await reportField.$('input').getAttribute('value');
|
||||||
|
|
||||||
|
expect(value).not.to.be.equal(oldValue);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue