detail custom fields e2e
parent
313ab3cf63
commit
b1f492e5c0
|
@ -1,6 +1,5 @@
|
|||
var utils = require('../../../utils');
|
||||
|
||||
var adminAttributesHelper = require('../../../helpers').adminAttributes;
|
||||
var customFieldsHelper = require('../../../helpers/custom-fields-helper');
|
||||
|
||||
var chai = require('chai');
|
||||
var chaiAsPromised = require('chai-as-promised');
|
||||
|
@ -8,116 +7,181 @@ var chaiAsPromised = require('chai-as-promised');
|
|||
chai.use(chaiAsPromised);
|
||||
var expect = chai.expect;
|
||||
|
||||
describe('attributes - custom fields', function() {
|
||||
before(async function(){
|
||||
browser.get('http://localhost:9001/project/project-0/admin/project-values/custom-fields');
|
||||
|
||||
describe('custom-fields', function() {
|
||||
before(async function() {
|
||||
browser.get('http://localhost:9001/project/project-3/admin/project-values/custom-fields');
|
||||
await utils.common.waitLoader();
|
||||
|
||||
utils.common.takeScreenshot('attributes', 'custom-fields');
|
||||
});
|
||||
|
||||
it('new', async function() {
|
||||
let section = adminAttributesHelper.getSection(0);
|
||||
let rows = section.rows();
|
||||
let count = await rows.count();
|
||||
describe('create custom fields', function() {
|
||||
describe('userstories', function() {
|
||||
let typeIndex = 0;
|
||||
|
||||
let formWrapper = section.openNew();
|
||||
it('create', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
let form = adminAttributesHelper.getCustomFieldsForm(formWrapper);
|
||||
customFieldsHelper.create(typeIndex, 'test1-text', 'desc1', 1);
|
||||
|
||||
await form.name().sendKeys('test test');
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
await form.save();
|
||||
customFieldsHelper.create(typeIndex, 'test1-multi', 'desc1', 3);
|
||||
|
||||
await browser.waitForAngular();
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
let newCount = await rows.count();
|
||||
// customFieldsHelper.create(typeIndex, 'test1-date', 'desc1', 4);
|
||||
|
||||
expect(newCount).to.be.equal(count + 1);
|
||||
});
|
||||
// // debounce :(
|
||||
// await utils.notifications.success.open();
|
||||
// await browser.sleep(2000);
|
||||
|
||||
it('duplicate', async function() {
|
||||
let section = adminAttributesHelper.getSection(0);
|
||||
let rows = section.rows();
|
||||
let count = await rows.count();
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
let formWrapper = section.openNew();
|
||||
|
||||
let form = adminAttributesHelper.getCustomFieldsForm(formWrapper);
|
||||
|
||||
await form.name().sendKeys('test test');
|
||||
|
||||
await form.save();
|
||||
|
||||
await browser.waitForAngular();
|
||||
|
||||
let newCount = await rows.count();
|
||||
|
||||
let errors = await form.errors().count();
|
||||
|
||||
utils.common.takeScreenshot('attributes', 'status-error');
|
||||
|
||||
expect(errors).to.be.equal(1);
|
||||
expect(newCount).to.be.equal(count);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let section = adminAttributesHelper.getSection(0);
|
||||
let rows = section.rows();
|
||||
|
||||
let count = await rows.count();
|
||||
|
||||
let row = rows.get(count - 1);
|
||||
|
||||
section.delete(row);
|
||||
|
||||
let el = $('.lightbox-generic-ask');
|
||||
|
||||
await utils.lightbox.open(el);
|
||||
|
||||
utils.common.takeScreenshot('attributes', 'delete-custom-field');
|
||||
|
||||
el.$('.button-green').click();
|
||||
|
||||
await utils.lightbox.close(el);
|
||||
|
||||
let newCount = await rows.count();
|
||||
|
||||
expect(newCount).to.be.equal(count - 1);
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields + 2);
|
||||
});
|
||||
|
||||
it('edit', async function() {
|
||||
let section = adminAttributesHelper.getSection(0);
|
||||
let rows = section.rows();
|
||||
let row = rows.get(0);
|
||||
customFieldsHelper.edit(typeIndex, 0, 'edit', 'desc2', 2);
|
||||
|
||||
await section.edit(row);
|
||||
|
||||
let form = adminAttributesHelper.getCustomFieldsForm(row.$('form'));
|
||||
|
||||
let newCfName = 'test test' + Date.now();
|
||||
await form.name().clear();
|
||||
await form.name().sendKeys(newCfName);
|
||||
|
||||
await form.save();
|
||||
|
||||
await browser.waitForAngular();
|
||||
|
||||
let newCfs = await adminAttributesHelper.getCustomFieldsNames(section.el);
|
||||
|
||||
expect(newCfs.indexOf(newCfName)).to.be.not.equal(-1);
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
});
|
||||
|
||||
it('drag', async function() {
|
||||
let section = adminAttributesHelper.getSection(0);
|
||||
let rows = section.rows();
|
||||
let cfs = await adminAttributesHelper.getCustomFieldsNames(section.el);
|
||||
let nameOld = await customFieldsHelper.getName(typeIndex, 0);
|
||||
|
||||
await utils.common.drag(rows.get(0), rows.get(2));
|
||||
await customFieldsHelper.drag(typeIndex, 0, 1);
|
||||
|
||||
let newCfs = await adminAttributesHelper.getCustomFieldsNames(section.el);
|
||||
let nameNew = customFieldsHelper.getName(typeIndex, 1);
|
||||
|
||||
expect(cfs[0]).to.be.equal(newCfs[1]);
|
||||
expect(nameNew).to.be.eventually.equal(nameOld);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.delete(typeIndex, 0);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('tasks', function() {
|
||||
let typeIndex = 1;
|
||||
|
||||
it('create', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-text', 'desc1', 1);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-multi', 'desc1', 3);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
// customFieldsHelper.create(typeIndex, 'test1-date', 'desc1', 4);
|
||||
|
||||
// // debounce :(
|
||||
// await utils.notifications.success.open();
|
||||
// await browser.sleep(2000);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields + 2);
|
||||
});
|
||||
|
||||
it('edit', async function() {
|
||||
customFieldsHelper.edit(typeIndex, 0, 'edit', 'desc2', 2);
|
||||
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
});
|
||||
|
||||
it('drag', async function() {
|
||||
let nameOld = await customFieldsHelper.getName(typeIndex, 0);
|
||||
|
||||
await customFieldsHelper.drag(typeIndex, 0, 1);
|
||||
|
||||
let nameNew = customFieldsHelper.getName(typeIndex, 1);
|
||||
|
||||
expect(nameNew).to.be.eventually.equal(nameOld);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.delete(typeIndex, 0);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('issues', function() {
|
||||
let typeIndex = 2;
|
||||
|
||||
it('create', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-text', 'desc1', 1);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-multi', 'desc1', 3);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
// customFieldsHelper.create(typeIndex, 'test1-date', 'desc1', 4);
|
||||
|
||||
// // debounce :(
|
||||
// await utils.notifications.success.open();
|
||||
// await browser.sleep(2000);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields + 2);
|
||||
});
|
||||
|
||||
it('edit', async function() {
|
||||
customFieldsHelper.edit(typeIndex, 0, 'edit', 'desc2', 2);
|
||||
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
});
|
||||
|
||||
it('drag', async function() {
|
||||
let nameOld = await customFieldsHelper.getName(typeIndex, 0);
|
||||
|
||||
await customFieldsHelper.drag(typeIndex, 0, 1);
|
||||
|
||||
let nameNew = customFieldsHelper.getName(typeIndex, 1);
|
||||
|
||||
expect(nameNew).to.be.eventually.equal(nameOld);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.delete(typeIndex, 0);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,185 +0,0 @@
|
|||
var utils = require('../utils');
|
||||
var customFieldsHelper = require('../helpers/custom-fields-helper');
|
||||
|
||||
var chai = require('chai');
|
||||
var chaiAsPromised = require('chai-as-promised');
|
||||
|
||||
chai.use(chaiAsPromised);
|
||||
var expect = chai.expect;
|
||||
|
||||
describe('custom-fields', function() {
|
||||
before(async function() {
|
||||
browser.get('http://localhost:9001/project/project-3/admin/project-values/custom-fields');
|
||||
await utils.common.waitLoader();
|
||||
});
|
||||
|
||||
describe('create custom fields', function() {
|
||||
describe('userstories', function() {
|
||||
let typeIndex = 0;
|
||||
|
||||
it('create', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-text', 'desc1', 1);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-multi', 'desc1', 3);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
// customFieldsHelper.create(typeIndex, 'test1-date', 'desc1', 4);
|
||||
|
||||
// // debounce :(
|
||||
// await utils.notifications.success.open();
|
||||
// await browser.sleep(2000);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields + 2);
|
||||
});
|
||||
|
||||
it('edit', async function() {
|
||||
customFieldsHelper.edit(typeIndex, 0, 'edit', 'desc2', 2);
|
||||
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
});
|
||||
|
||||
it('drag', async function() {
|
||||
let nameOld = await customFieldsHelper.getName(typeIndex, 0);
|
||||
|
||||
await customFieldsHelper.drag(typeIndex, 0, 1);
|
||||
|
||||
let nameNew = customFieldsHelper.getName(typeIndex, 1);
|
||||
|
||||
expect(nameNew).to.be.eventually.equal(nameOld);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.delete(typeIndex, 0);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('tasks', function() {
|
||||
let typeIndex = 1;
|
||||
|
||||
it('create', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-text', 'desc1', 1);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-multi', 'desc1', 3);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
// customFieldsHelper.create(typeIndex, 'test1-date', 'desc1', 4);
|
||||
|
||||
// // debounce :(
|
||||
// await utils.notifications.success.open();
|
||||
// await browser.sleep(2000);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields + 2);
|
||||
});
|
||||
|
||||
it('edit', async function() {
|
||||
customFieldsHelper.edit(typeIndex, 0, 'edit', 'desc2', 2);
|
||||
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
});
|
||||
|
||||
it('drag', async function() {
|
||||
let nameOld = await customFieldsHelper.getName(typeIndex, 0);
|
||||
|
||||
await customFieldsHelper.drag(typeIndex, 0, 1);
|
||||
|
||||
let nameNew = customFieldsHelper.getName(typeIndex, 1);
|
||||
|
||||
expect(nameNew).to.be.eventually.equal(nameOld);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.delete(typeIndex, 0);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('issues', function() {
|
||||
let typeIndex = 2;
|
||||
|
||||
it('create', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-text', 'desc1', 1);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'test1-multi', 'desc1', 3);
|
||||
|
||||
// debounce :(
|
||||
await utils.notifications.success.open();
|
||||
await browser.sleep(2000);
|
||||
|
||||
// customFieldsHelper.create(typeIndex, 'test1-date', 'desc1', 4);
|
||||
|
||||
// // debounce :(
|
||||
// await utils.notifications.success.open();
|
||||
// await browser.sleep(2000);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields + 2);
|
||||
});
|
||||
|
||||
it('edit', async function() {
|
||||
customFieldsHelper.edit(typeIndex, 0, 'edit', 'desc2', 2);
|
||||
|
||||
expect(utils.notifications.success.open()).to.be.eventually.true;
|
||||
});
|
||||
|
||||
it('drag', async function() {
|
||||
let nameOld = await customFieldsHelper.getName(typeIndex, 0);
|
||||
|
||||
await customFieldsHelper.drag(typeIndex, 0, 1);
|
||||
|
||||
let nameNew = customFieldsHelper.getName(typeIndex, 1);
|
||||
|
||||
expect(nameNew).to.be.eventually.equal(nameOld);
|
||||
});
|
||||
|
||||
it('delete', async function() {
|
||||
let oldCountCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
customFieldsHelper.delete(typeIndex, 0);
|
||||
|
||||
let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count();
|
||||
|
||||
expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -36,6 +36,8 @@ describe('Issue detail', async function(){
|
|||
|
||||
it('attachments', utils.detail.attachmentTesting);
|
||||
|
||||
describe('custom-fields', utils.detail.customFields.bind(this, 2));
|
||||
|
||||
it('screenshot', async function() {
|
||||
await utils.common.takeScreenshot("issues", "detail updated");
|
||||
});
|
||||
|
|
|
@ -51,6 +51,8 @@ describe('Task detail', function(){
|
|||
|
||||
it('attachments', utils.detail.attachmentTesting);
|
||||
|
||||
describe('custom-fields', utils.detail.customFields.bind(this, 1));
|
||||
|
||||
it('screenshot', async function() {
|
||||
await utils.common.takeScreenshot("tasks", "detail updated");
|
||||
});
|
||||
|
|
|
@ -67,6 +67,8 @@ describe('User story detail', function(){
|
|||
|
||||
it('attachments', utils.detail.attachmentTesting);
|
||||
|
||||
describe('custom-fields', utils.detail.customFields.bind(this, 0));
|
||||
|
||||
describe('related tasks', function() {
|
||||
it('create', async function() {
|
||||
let oldRelatedTaskCount = await usDetailHelper.relatedTasks().count();
|
||||
|
|
|
@ -100,17 +100,3 @@ helper.getGenericForm = function(form) {
|
|||
helper.getGenericNames = function(section) {
|
||||
return section.$$('.status-name span').getText();
|
||||
};
|
||||
|
||||
helper.getCustomFieldsForm = function(form) {
|
||||
let obj = Object.create(helper.getForm(form));
|
||||
|
||||
obj.name = function() {
|
||||
return form.$('.custom-name input');
|
||||
};
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
helper.getCustomFieldsNames = function(section) {
|
||||
return section.$$('.table-body .custom-name span').getText();
|
||||
};
|
||||
|
|
|
@ -45,10 +45,6 @@ helper.drag = function(indexType, indexCustomField, indexNewPosition) {
|
|||
let customField = helper.getCustomFiledsByType(indexType).get(indexCustomField);
|
||||
let newPosition = helper.getCustomFiledsByType(indexType).get(indexNewPosition).getLocation();
|
||||
|
||||
// await browser.actions().mouseMove(customField).perform();
|
||||
|
||||
// let destination = el.$$('div[tg-attachment] .attachment-settings .icon-drag-v').first();
|
||||
|
||||
return utils.common.drag(customField, newPosition, {y: 30});
|
||||
};
|
||||
|
||||
|
@ -69,3 +65,7 @@ helper.delete = async function(indexType, indexCustomField) {
|
|||
helper.getName = function(indexType, indexCustomField) {
|
||||
return helper.getCustomFiledsByType(indexType).get(indexCustomField).$('.custom-name span').getText();
|
||||
};
|
||||
|
||||
helper.getDetailFields = function() {
|
||||
return $$('.custom-fields-body div[tg-custom-attribute-value]');
|
||||
};
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
var path = require('path');
|
||||
var detailHelper = require('../helpers').detail;
|
||||
var commonHelper = require('../helpers').common;
|
||||
var customFieldsHelper = require('../helpers/custom-fields-helper');
|
||||
var commonUtil = require('./common');
|
||||
|
||||
var chai = require('chai');
|
||||
var chaiAsPromised = require('chai-as-promised');
|
||||
|
@ -208,3 +210,98 @@ helper.watchersTesting = async function() {
|
|||
newUserNames = await watchersHelper.getWatchersUserNames();
|
||||
expect(newUserNames.join()).to.be.equal('');
|
||||
}
|
||||
|
||||
helper.customFields = function(typeIndex) {
|
||||
before(async function() {
|
||||
let url = await browser.getCurrentUrl();
|
||||
|
||||
browser.get('http://localhost:9001/project/project-3/admin/project-values/custom-fields');
|
||||
|
||||
commonUtil.waitLoader();
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'detail-test-custom-fields-text', 'desc1', 1);
|
||||
|
||||
// debounce :(
|
||||
browser.sleep(2000);
|
||||
|
||||
customFieldsHelper.create(typeIndex, 'detail-test-custom-fields-multi', 'desc1', 3);
|
||||
|
||||
// debounce :(
|
||||
browser.sleep(2000);
|
||||
|
||||
browser.get(url);
|
||||
commonUtil.waitLoader();
|
||||
});
|
||||
|
||||
it('text create', async function() {
|
||||
let customFields = customFieldsHelper.getDetailFields();
|
||||
let count = await customFields.count();
|
||||
|
||||
let textField = customFields.get(count - 2);
|
||||
|
||||
textField.$('input').sendKeys('test text');
|
||||
textField.$('.icon-floppy').click();
|
||||
|
||||
// debounce
|
||||
await browser.sleep(2000);
|
||||
|
||||
let fieldText = textField.$('.read-mode span').getText();
|
||||
|
||||
expect(fieldText).to.be.eventually.equal('test text');
|
||||
});
|
||||
|
||||
it('text edit', async function() {
|
||||
let customFields = customFieldsHelper.getDetailFields();
|
||||
let count = await customFields.count();
|
||||
|
||||
let textField = customFields.get(count - 2);
|
||||
|
||||
textField.$('.icon-edit').click();
|
||||
|
||||
textField.$('input').sendKeys('test text edit');
|
||||
textField.$('.icon-floppy').click();
|
||||
|
||||
// debounce
|
||||
await browser.sleep(2000);
|
||||
|
||||
let fieldText = textField.$('.read-mode span').getText();
|
||||
|
||||
expect(fieldText).to.be.eventually.equal('test text edit');
|
||||
});
|
||||
|
||||
it('multi', async function() {
|
||||
let customFields = customFieldsHelper.getDetailFields();
|
||||
let count = await customFields.count();
|
||||
|
||||
let textField = customFields.get(count - 1);
|
||||
|
||||
textField.$('textarea').sendKeys('test text2');
|
||||
textField.$('.icon-floppy').click();
|
||||
|
||||
// debounce
|
||||
await browser.sleep(2000);
|
||||
|
||||
let fieldText = textField.$('.read-mode span').getText();
|
||||
|
||||
expect(fieldText).to.be.eventually.equal('test text2');
|
||||
});
|
||||
|
||||
it('multi edit', async function() {
|
||||
let customFields = customFieldsHelper.getDetailFields();
|
||||
let count = await customFields.count();
|
||||
|
||||
let textField = customFields.get(count - 1);
|
||||
|
||||
textField.$('.icon-edit').click();
|
||||
|
||||
textField.$('textarea').sendKeys('test text2 edit');
|
||||
textField.$('.icon-floppy').click();
|
||||
|
||||
// debounce
|
||||
await browser.sleep(2000);
|
||||
|
||||
let fieldText = textField.$('.read-mode span').getText();
|
||||
|
||||
expect(fieldText).to.be.eventually.equal('test text2 edit');
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue